rjelement-components
a public component Library from rjelement was base on Vue.js
830
| Install | |
|---|---|
npm install rjelement-components |
|
| Latest Version: | 0.1.18 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Feb 18, 2020 |
| Links: | npm |
Maintainer: zhangziguang8
PublicComponents
基于 Vue.js 的公共组件仓库,使用 webpack 搭建一个 library 脚手架可以参考这个仓库的源码。
npm 安裝 / yarn
npm i rjelement-components --save-dev
yarn add rjelement-components -D
引入方式
全量引入
// main.js
import Vue from 'vue'
import Rjelement from 'rjelement-components'
Vue.use(Rjelement) // 会执行Rjelement的install方法,内部全部组件全局注册
按需引入
首先安装babel-plugin-import
yarn add babel-plugin-import -D
配置babel.config.js / vuecli2.0 创建的项目配置.babelrc
"plugins": [
["import", {
"libraryName": "rjelement-components",
"libraryDirectory": "packages/components"
}]
]
使用webpack-bundle-analyzer可以查看模块按需引入的打包依赖图。
按需引入示例
<template>
<rj-drawer title="xxx" :visable="true">
</rj-drawer>
</template>
<script type="es6">
import { drawer } from 'rjelement-components'
export default {
components: {
'rj-drawer': drawer
},
}
</script>
公共组件编写
参考 组件编写约定
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.18 | ^2.6.10 | MIT | |
| 0.1.17 | ^2.6.10 | MIT | |
| 0.1.14 | ^2.6.10 | MIT | |
| 0.1.13 | ^2.6.10 | MIT | |
| 0.1.11 | ^2.6.10 | MIT | |
| 0.1.10 | ^2.6.10 | MIT | |
| 0.1.6 | ^2.6.6 | MIT | |
| 0.1.5 | ^2.6.6 | MIT | |
| 0.1.3 | ^2.6.6 | MIT | |
| 0.1.2 | ^2.6.6 | MIT | |
| 0.1.1 | ^2.5.17 | MIT |
Pre-releases (19)
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.9-alpha.2 | ^2.6.10 | MIT | |
| 0.1.9-alpha.1 | ^2.6.10 | MIT | |
| 0.1.8-alpha.1 | ^2.6.10 | MIT | |
| 0.1.7-alpha.18 | ^2.6.6 | MIT | |
| 0.1.7-alpha.17 | ^2.6.6 | MIT | |
| 0.1.7-alpha.16 | ^2.6.6 | MIT | |
| 0.1.7-alpha.15 | ^2.6.6 | MIT | |
| 0.1.7-alpha.12 | ^2.6.6 | MIT | |
| 0.1.7-alpha.11 | ^2.6.6 | MIT | |
| 0.1.7-alpha.9 | ^2.6.6 | MIT | |
| 0.1.7-alpha.8 | ^2.6.6 | MIT | |
| 0.1.7-alpha.7 | ^2.6.6 | MIT | |
| 0.1.7-alpha.5 | ^2.6.6 | MIT | |
| 0.1.7-alpha.4 | ^2.6.6 | MIT | |
| 0.1.7-alpha.3 | ^2.6.6 | MIT | |
| 0.1.7-alpha.2 | ^2.6.6 | MIT | |
| 0.1.5-alpha.11 | ^2.6.6 | MIT | |
| 0.1.5-alpha.10 | ^2.6.6 | MIT | |
| 0.1.5-alpha.2 | ^2.6.6 | MIT |