Quasar:使用 Vue.js 语法(Vue 实例和 Vue.component)
Quasar: Use of Vue.js syntax (Vue instance and Vue.component)
我对 Quasar 很陌生。
我已经开始了一个项目,到目前为止对这个结构感到满意。
现在我想在我的 Index.vue 文件中实现以下 fiddle:https://jsfiddle.net/86216oko/
在所有可用的Quasar教程中,我只看到使用“export default”而没有看到“new Vue”或“Vue.component”的迹象。
如果我尝试实现一个新的 Vue 实例,它会出现以下错误:
vue-router.esm.js?85f8:2128 ReferenceError: Vue is not defined
at eval (Index.vue?b484:62)
at Object../node_modules/@quasar/app/lib/webpack/loader.transform-quasar-imports.js!./node_modules/babel-loader/lib/index.js?!./node_modules/@quasar/app/lib/webpack/loader.auto-import-client.js?kebab!./node_modules/vue-loader/lib/index.js?!./src/pages/Index.vue?vue&type=script&lang=js& (0.js:10)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (Index.vue?f4bd:1)
at Module../src/pages/Index.vue?vue&type=script&lang=js& (0.js:68)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (Index.vue?2d70:1)
at Module../src/pages/Index.vue (0.js:56)
我错过了什么?
我想可能有一种方法可以通过导出默认值或以某种方式使用 vue-normal 语法为不同的 div 设置多个特定的 vue 实例和 vue.components。
几乎我唯一想做的就是在 Quasar 中使用 vue 组件:https://vuejs.org/v2/guide/components.html
我也找到了一种使用“默认导出”(https://itnext.io/dynamic-component-creation-in-vue-js-b002bb41aaf4) 的方法,但这对我来说仍然是一个很大的问号。
如有任何帮助,我将不胜感激!
我对 Quasar 很陌生。 我已经开始了一个项目,到目前为止对这个结构感到满意。 现在我想在我的 Index.vue 文件中实现以下 fiddle:https://jsfiddle.net/86216oko/
在所有可用的Quasar教程中,我只看到使用“export default”而没有看到“new Vue”或“Vue.component”的迹象。
如果我尝试实现一个新的 Vue 实例,它会出现以下错误:
vue-router.esm.js?85f8:2128 ReferenceError: Vue is not defined
at eval (Index.vue?b484:62)
at Object../node_modules/@quasar/app/lib/webpack/loader.transform-quasar-imports.js!./node_modules/babel-loader/lib/index.js?!./node_modules/@quasar/app/lib/webpack/loader.auto-import-client.js?kebab!./node_modules/vue-loader/lib/index.js?!./src/pages/Index.vue?vue&type=script&lang=js& (0.js:10)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (Index.vue?f4bd:1)
at Module../src/pages/Index.vue?vue&type=script&lang=js& (0.js:68)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (Index.vue?2d70:1)
at Module../src/pages/Index.vue (0.js:56)
我错过了什么? 我想可能有一种方法可以通过导出默认值或以某种方式使用 vue-normal 语法为不同的 div 设置多个特定的 vue 实例和 vue.components。
几乎我唯一想做的就是在 Quasar 中使用 vue 组件:https://vuejs.org/v2/guide/components.html
我也找到了一种使用“默认导出”(https://itnext.io/dynamic-component-creation-in-vue-js-b002bb41aaf4) 的方法,但这对我来说仍然是一个很大的问号。
如有任何帮助,我将不胜感激!