diff --git a/frontend/src/components/ElTreeSelect/index.vue b/frontend/src/components/ElTreeSelect/index.vue index aa0ac6fd0b..af475cab2a 100644 --- a/frontend/src/components/ElTreeSelect/index.vue +++ b/frontend/src/components/ElTreeSelect/index.vue @@ -48,6 +48,7 @@ :render-content="treeRenderFun" @node-click="_treeNodeClickFun" @check="_treeCheckFun" + @check-change="_treeCheckChange" />
暂无数据
@@ -282,6 +283,9 @@ export default { off(document, 'mouseup', this._popoverHideFun) }, methods: { + _treeCheckChange() { + this.$emit("treeCheckChange") + }, // 根据类型判断单选,多选 _setMultipleFun() { let multiple = false diff --git a/frontend/src/components/widget/DeWidget/DeSelect.vue b/frontend/src/components/widget/DeWidget/DeSelect.vue index 749ad44920..5f10e81ca3 100644 --- a/frontend/src/components/widget/DeWidget/DeSelect.vue +++ b/frontend/src/components/widget/DeWidget/DeSelect.vue @@ -11,7 +11,6 @@ :popper-append-to-body="inScreen" :size="size" :filterable="true" - class="de-select-tag" popper-class="coustom-de-select" @change="changeValue" @focus="setOptionWidth" @@ -35,6 +34,7 @@ import { multFieldValues, linkMultFieldValues } from '@/api/dataset/dataset' import bus from '@/utils/bus' import { getLinkToken, getToken } from '@/utils/auth' import customInput from '@/components/widget/DeWidget/customInput' +import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js' export default { mixins: [customInput], @@ -173,6 +173,11 @@ export default { onBlur() { this.onFocus = false }, + handleElTagStyle() { + setTimeout(() => { + textSelectWidget(this.$refs["deSelect"].$el, this.element.style) + }, 50) + }, initLoad() { this.value = this.fillValueDerfault() this.datas = [] @@ -216,6 +221,7 @@ export default { contentWidth += kid.offsetWidth }) this.showNumber = contentWidth > ((this.$refs.deSelect.$refs.tags.clientWidth - 30) * 0.9) + this.handleElTagStyle() }) }, @@ -270,6 +276,7 @@ export default { \ No newline at end of file diff --git a/frontend/src/components/widget/DeWidget/DeSelectTree.vue b/frontend/src/components/widget/DeWidget/DeSelectTree.vue index b08009db08..132277d55f 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectTree.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectTree.vue @@ -16,6 +16,7 @@ @check="changeCheckNode" @select-clear="selectClear" @onFoucs="onFoucs" + @treeCheckChange="change" /> @@ -26,6 +27,7 @@ import bus from '@/utils/bus' import { getLinkToken, getToken } from '@/utils/auth' import ElTreeSelect from '@/components/ElTreeSelect' import customInput from '@/components/widget/DeWidget/customInput' +import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js' export default { components: { ElTreeSelect }, @@ -217,6 +219,12 @@ export default { this.handleCoustomStyle() }) }, + change() { + setTimeout(() => { + console.log(123, this.$refs.deSelectTree.$refs.select.$el); + textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style) + }, 50) + }, selectClear() { this.changeValue(this.value) }, @@ -366,6 +374,7 @@ export default {