Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
can';t在带有Vue库的JSFIDLE上运行Vue.js_Vue.js_Jsfiddle - Fatal编程技术网

can';t在带有Vue库的JSFIDLE上运行Vue.js

can';t在带有Vue库的JSFIDLE上运行Vue.js,vue.js,jsfiddle,Vue.js,Jsfiddle,我正在使用Vue.js库,但似乎无法在JSFIDLE上正确运行它。我已经包括了库的JS和CSS文件,还包括了Vue.JS本身。我做错什么了吗 错误是: Uncaught ReferenceError: VueGoodTablePlugin is not defined 我的代码是: HTML: 删除Vue.use(VueGoodTablePlugin) 您不需要添加Vue.use(VueGoodTablePlugin); <div id="app"> <div> &

我正在使用Vue.js库,但似乎无法在JSFIDLE上正确运行它。我已经包括了库的JS和CSS文件,还包括了Vue.JS本身。我做错什么了吗

错误是:

Uncaught ReferenceError: VueGoodTablePlugin is not defined
我的代码是:

HTML:

删除Vue.use(VueGoodTablePlugin)

您不需要添加Vue.use(VueGoodTablePlugin);
<div id="app">
<div>
  <vue-good-table
  :columns="columns"
  :rows="rows"/>
</div>
</div>
Vue.use(VueGoodTablePlugin);
example:
new Vue({
  el: "#app",
  data: {
    columns: [
        {
          label: 'Name',
          field: 'name',
        },
        {
          label: 'Age',
          field: 'age',
          type: 'number',
        },
        {
          label: 'Created On',
          field: 'createdAt',
          type: 'date',
          dateInputFormat: 'YYYY-MM-DD',
          dateOutputFormat: 'MMM Do YY',
        },
        {
          label: 'Percent',
          field: 'score',
          type: 'percentage',
        },
      ],
      rows: [
        { id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
        { id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
        { id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
        { id:4, name:"Chris", age: 55, createdAt: '2011-10-11', score: 0.03343 },
        { id:5, name:"Dan", age: 40, createdAt: '2011-10-21', score: 0.03343 },
        { id:6, name:"John", age: 20, createdAt: '2011-10-31', score: 0.03343 },
      ]
  },
  methods: {
    toggle: function(todo){
        todo.done = !todo.done
    }
  }
})