0.0.4 • Published 4 years ago
atf-ui v0.0.4
Install
Run the command below in your terminal to install atfUI first
npm install atf-ui --save
Usage
Global Use
Import in your entry script file and register it
import AtfUI from 'atf-ui'
import "atf-ui/lib/styles/atf-ui.css"
Vue.use(AtfUI)
Example
<atf-button>click</atf-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": "atf-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.
0.0.4
4 years ago