Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么js 引入文件来使用 vue-json-pretty #2

Closed
sobbk opened this issue Nov 30, 2017 · 1 comment
Closed

怎么js 引入文件来使用 vue-json-pretty #2

sobbk opened this issue Nov 30, 2017 · 1 comment

Comments

@sobbk
Copy link

sobbk commented Nov 30, 2017

No description provided.

@leezng
Copy link
Owner

leezng commented Dec 20, 2017

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <vue-json-pretty :data="obj"></vue-json-pretty>
  </div>
</body>
  <script src="https://cdn.bootcss.com/vue/2.5.9/vue.min.js"></script>
  <script src="./vue-json-pretty.js"></script>
  <script>
    new Vue({
      el: '#app',
      components: {
        VueJsonPretty: VueJsonPretty.default
      },
      data: function() {
        return {
          obj: {
            a: 'vaasafasfas',
            b: 'sasdas'
          }
        }
      }
    })
  </script>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants