sunelement-biz
v3.52.3
Published
[](http://commitizen.github.io/cz-cli/) [](https://aleen42.github.io/badges/src/vue.svg) [;
new Vue({
el: "#app",
render: h => h(App)
});On demand
With the help of babel-plugin-component, we can import components we actually need, making the project smaller than otherwise.
First, install babel-plugin-component:
npm install babel-plugin-component --save-devThen edit .babelrc/babel.config.js:
{
"presets": [
// other config
],
"plugins": [
[
"component",
{
"libraryName": "@jdcloud/jelement-biz",
"libDir": "dist",
"styleLibrary": {
"name": "theme-default",
"base": false
}
}
]
]
}Next, if you need Text and other component, edit main.js:
import Vue from "vue";
import { Text } from "@jdcloud/jelement-biz";
import App from "./App.vue";
Vue.component(Text.name, Text);
/* or
* Vue.use(Text)
*/
new Vue({
el: "#app",
render: h => h(App)
});Features
- [x] Support on-demand loading
- [x] I18n
- [x] Add CLI to support rapid development
- [x] Example docs with vuepress
- [x] Unit Test
- [x] CSS dynamic separation
