一个 vue 的 ui 库。
API Documentation
安装
npm i @ntbl/vue-gogh --save
使用
import Vue from 'vue'// 导入所有的 gogh 组件import gogh from '@ntbl/vue-gogh'// 全局注册Vue.use(gogh)// 仅导入 button 组件import button from '@ntbl/vue-gogh/package/componetns/button'// 全局注册Vue.use(button)// 全局注册(自定义组件名)Vue.component('my-button', button)// 或局部注册(在组件文件中)export default {
components: { 'my-button': button
}
}
注意,单个导入使用到图标的组件时,你还需要手动导入 gogh-icon
组件,以让图标正常显示。
import icon from '@ntbl/vue-gogh/package/componetns/icon'// 不能重定义组件名,内部使用 `gogh-icon` 调用此组件Vue.use(icon)
组件
vue-gogh 目前拥有的组件: