重新构建一遍okr-tree

This commit is contained in:
aixianling
2022-08-23 10:37:38 +08:00
parent f0edad2b97
commit df498efd2f
9 changed files with 1591 additions and 41 deletions

View File

@@ -8,7 +8,7 @@
</template>
<script>
import AiOkrTree from "./AiOkrTree";
import AiOkrTree from "./AiOkrTree/AiOkrTree";
export default {
name: 'AiDvPartyOrg',

View File

@@ -1,40 +0,0 @@
<template>
<section class="AiOkrTree">
<component v-if="okrTreeLoaded" v-bind="$attrs" :is="ot" :data="data"/>
</section>
</template>
<script>
import Vue from "vue"
export default {
name: "AiOkrTree",
props: {
data: {default: () => []}
},
computed: {
okrTreeLoaded: v => !!v.ot
},
data() {
return {
ot: null
}
},
created() {
this.$injectCss("https://cdn.cunwuyun.cn/vot/vue-okr-tree.css")
this.$injectLib("https://cdn.cunwuyun.cn/vot/vue-okr-tree.umd.min.js", () => {
const {VueOkrTree} = (window?.["vue-okr-tree"] || {})
this.ot = Vue.extend({
...VueOkrTree, data() {
return {...this.$attrs}
}
})
})
}
}
</script>
<style lang="scss" scoped>
.AiOkrTree {
}
</style>