2.9.2
所有浏览器
2.5.17
1.创建好项目后,在cmd中用命令“vue add vux” 安装可以不配做相关配置即可直接使用,
但所有组件都无法在main.js中全局引用,引用后就报错…,
只能局部引用,像loading,alert,cell,group.. 这样各个页面必用的组件只能重复引用,心好累…
2.因为刚开始用,暂时发现 querystring 组件连局部引用都不行,一样报错。
3.各种百度google,说是vue-loader 降级不会报错,但然并卵…
呃,重现步骤是什么鬼?
vux组件是目前见到功能最全的组件,在项目中可以让效率大大的提高,现在cli3.0已经是正式版,比2.0有很大的改进,不需要做额外的配置,有更友好的视图界面创建项目,希望能够针对cli3.0升级版本…
祝vux越做越好…
WARNING Compiled with 2 warnings 15:04:15
warning in ./node_modules/vux/src/plugins/locale/index.js
"export 'default' (imported as 'querystring') was not found in '../../tools/querystring'
warning in ./node_modules/vux/index.js
"export 'default' (reexported as 'querystring') was not found in './src/tools/querystring/index.js'
App running at:
以上是在main.js引用组件的报错内容,不管引用哪个组件都是报的这个错,不知道如何屏蔽了…
import Vue from 'vue'
import { AlertPlugin,LoadingPlugin,ToastPlugin } from 'vux'
Vue.use(AlertPlugin,LoadingPlugin,ToastPlugin )
// 像这么引用,点击事件调用会报错 必须 单独写才行,
但像这样单独写的话,设置默认参数不起作用
import { ToastPlugin } from 'vux'
Vue.use(ToastPlugin, {position: 'middle'})
设置默认参数不起作用
<script>
import Vue from 'vue'
import { XButton } from 'vux'
Vue.component('x-button', XButton)
</script>
WARNING Compiled with 1 warnings 14:07:54
warning in ./src/App.vue
"export 'default' (imported as '__vue_script__') was not found in '!!babel-loader!../node_modules/vux-loader/src/script-loader.js!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue'
直接在 App.vue 中 引用组件当全局来使用的话, 会有上面的 警告,我觉得还是某些组件有问题
See #3115
Most helpful comment