1.0.0 • Published 6 years ago

ele_test v1.0.0

Weekly downloads
3
License
-
Repository
-
Last release
6 years ago

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';
  1. 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.

1.0.0

6 years ago