lille-ui
Version:
A Vue.js project
24 lines (20 loc) • 477 B
JavaScript
import LilleSwitch from './packages/switch/index.js';
import LilleButton from './packages/button/index.js';
const components = [
LilleSwitch,
LilleButton
]
const install = function(Vue, opts = {}) {
components.map(component => {
Vue.component(component.name, component);
})
}
/*支持实用标签的方式引入*/
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export default {
install,
LilleSwitch,
LilleButton
}