ldp-component-ui
v1.0.0
Published
ldp-components
Downloads
3
Readme
ldp-components
ldp-components 基于element-ui
封装的常用表单组件和表格组件。
组件使用文档请查看 doc
。
目录结构描述
├── README.md // 说明
├── doc // 文档
├── lib // 编译后的库文件
├── example // 示例
│ ├── components // 示例组件
│ ├── router // vue路径
│ ├── utils // 示例环境中使用的工具
│ ├── App.vue // vue挂载实例
│ ├── main.js // 运行环境的入口函数
├── src // 组件源码文件夹
│ ├── directive // 自定义指令
│ ├── mixins // 混入
│ ├── packages // 组件包
│ ├── index.js // 导出组件
│ ├── utils // 工具
├── vue-config.js // vue编译配置文件
运行案例
安装依赖
npm install
运行
npm run serve
编译组件
npm run lib
发布组件
ldp-components
包所属账号才能发布, 此npm
为公包,请谨慎发布。
- 登录
npm
npm login
- 添加用户
npm adduser
- 发布包
发布包请注意修改包版本
package.json
中修改version
版本号, 然后在进行编译版本,版本相同会发布失败
npm publish
项目中使用组件
推荐使用npm
或者 yarn
方式安装
npm i ldp-components -S
在 main.js
引入使用组件
import Vue from 'vue';
// 首先引用element-ui
import ElementUi from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUi);
// 一款第三方可编辑表格组件。 内置table组件使用了此组件,如果需要使用则需要引用。
import VueElementExtends from 'vue-element-extends';
import 'vue-element-extends/lib/index.css';
Vue.use(VueElementExtends);
// 最后引入组件
import LdpComponents from './ldp-components.vue';
Vue.use(LdpComponents);
new Vue({
el: '#app',
render: h => h(App)
});
详细组件文档说明请查看doc
目录