1 Star 0 Fork 5

dgiot开源社区 / dgiot-component

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
h7ml 提交于 2021-09-22 16:06 . feat(all): :tada:dgiot-component v0.0.1
/**
*
*/
import dgiot from './src/dgiot'
import _Vue from 'vue'
import dgiotStore from './src/store/index.js' // store
import dgiotDirectives from './src/directives/index.js' // directives
// import dgiotUtils from './src/utils /index.js' // ./src/utils /index.js
const component = require.context('./src/components', true, /\.vue$/) // components
const plugins = require.context('./src/plugins', true, /\.js$/) // plugins
const dgiotMixins= require.context('./src/mixins', true, /\.js$/) // mixins
dgiot.install = Vue => {
if (!Vue) {
window.Vue = Vue = _Vue
}
Vue.use(dgiotStore)
Vue.use(dgiotDirectives)
// Vue.use(dgiotUtils)
dgiotMixins.keys().forEach(key => {
Vue.mixin(dgiotMixins(key).default)
})
plugins.keys().forEach((fileName) => {
plugins(fileName)
})
component.keys().forEach((fileName) => {
const componentConfig = dgiotComponent(fileName)
const componentName = componentConfig.default.name
if (componentName)
Vue.component(componentName, componentConfig.default || componentConfig)
})
}
export default dgiot;
1
https://gitee.com/dgiiot/dgiot-component.git
git@gitee.com:dgiiot/dgiot-component.git
dgiiot
dgiot-component
dgiot-component
master

搜索帮助