zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ES6 API兼容处理
// import "@/utils/polyfill"
// 核心插件
import corePlugin from './plugin/core'
// 组件
import ZmTreeOrg from './components/tree-org'
 
import "./styles/index.less";
const components = [
  ZmTreeOrg
]
 
const install = function (Vue) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
  Vue.use(corePlugin)
  Vue.directive('focus',{
    inserted: function(el, { value }){
      if(value) {
        el.focus();
      }
    },
    update(el, { value }){
      if(value) {
        el.focus();
      }
    },
    })
}
 
/* istanbul ignore if */
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}
 
export default {
  install, ZmTreeOrg
}