Closed lyboy2012 closed 7 years ago
是否可以在vue组件内单独引用 element-ui的某一个组件, import { Button as ElButton } from 'element-ui'; export default { components: { ElButton }, template: template }
而不是在入口 用 全局引用
Vue.component(Button.name, Button) or Vue.use(Button)
目前测试组件内引用webpack 提示: Module not found: Error: Can't resolve 'antd/lib/el-button' , 没搞明白为什么引用el 怎么提示ant 去了
babelrc配置如下
{ "presets": [ ["env", { "modules": false }], "stage-0" ], "plugins": ["transform-runtime", [ "component", [{ "libraryName": "element-ui", "styleLibraryName": "theme-default" }] ]] }
Hello, this issue has been closed because it does not conform to our issue requirements. Please submit issues with issue-generator. More info can be found in #3693.
而不是在入口 用 全局引用
目前测试组件内引用webpack 提示: Module not found: Error: Can't resolve 'antd/lib/el-button' , 没搞明白为什么引用el 怎么提示ant 去了
babelrc配置如下