ele_test
v1.0.0
Published
A Vue.js project
Downloads
8
Readme
element
基于element开发的自定义组件, 安装方式与element相同
使用
import Element from 'element-custom';
import Vue from 'vue';
Vue.use(Element)
开发步骤
1.在components插入相关的组件custom.vue
2.如果自定义组件基于element二次封装, 在文件中要单独引入:
import { Dialog as ElDialog, Button as ElButton } from 'element-ui';
- 在main.js中注册组件
const install = function(Vue) {
Vue.use(Element);
.....// other component
Vue.component('You component name', CustomComponent);
}
调试方式
在App.vue中注册, 之后
yarn start
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For a detailed explanation on how things work, check out the guide and docs for vue-loader.