youlu-components
v0.0.4
Published
# Install Run the command below in your terminal to install YouluComponents first `npm install youlu-components --save`
Downloads
11
Readme
youlu-components
Install
Run the command below in your terminal to install YouluComponents first
npm install youlu-components --save
Global Use
Import in your entry script file and register it
import YouluComponents from 'youlu-components'
import "youlu-components/lib/styles/youlu-components.css"
Vue.use(YouluComponents)
Example
<sys-select :options="[]" v-model="value"></sys-select>
On-demand Loading
Firstly, you should install babel-plugin-component in your project.
npm install babel-plugin-component
Configure your .babelrc file like this
{
"plugins": [
["component", {
"libraryName": "lime-ui",
"libDir": "lib",
"styleLibrary": {
"name": "styles",
"base": false, // no base.css file
"path": "[module].css"
}
}]
]
}
The you can import component on demand, and you don't need to care about importing styles, the babel plugin will do it automaticly. import Vue from 'vue' import { sysSelect } from 'youlu-components'
Vue.component('sysSelect', sysSelect)