1.0.9 • Published 3 years ago
oa-ui-zsxj v1.0.9
comment: <> (demo: https://arronkler.github.io/oa-ui/(https://arronkler.github.io/oa-ui/))
Install
Run the command below in your terminal to install OAUI first
npm install oa-ui-zsxj --save
Usage
Global Use
Import in your entry script file and register it
import OAUI from 'oa-ui-zsxj'
import "oa-ui-zsxj/lib/styles/oa-ui.css"
Vue.use(OAUI)
Example
<oa-button>click</oa-button>
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": "oa-ui",
"libDir": "lib",
"styleLibrary": {
"name": "styles",
"base": false,
"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 { Button } from 'oa-ui'
Vue.component('oa-button', Button)