From 271dbf196eb058dc790e27160d076993dc388bd6 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 11 四月 2024 10:54:11 +0800
Subject: [PATCH] 富文本组件编写
---
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
index 0e0d322..f6b272f 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
@@ -1,5 +1,6 @@
<template>
<div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
+ <dynamic-button v-if="componentVO.buttons && componentVO.buttons.length>0" :butttonList="componentVO.buttons" :selectList="checkDatas" type="tree" style="margin-bottom: 10px;"></dynamic-button>
<el-input
placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�"
v-model="filterText">
@@ -7,6 +8,7 @@
<el-tree
class="filter-tree"
:show-checkbox="isMuti"
+ :check-on-click-node="true"
:lazy="lazy"
:data="data"
:load="loadNode"
@@ -42,6 +44,11 @@
type:Object,
default: {}
},
+ dataStore:{
+ //寮圭獥鏃舵寜閽墍灞炲尯鍩熼�変腑鏁版嵁
+ type:Array,
+ default: []
+ },
paramVOS:{
type:Object,
default: {}
@@ -66,8 +73,17 @@
checkDatas:{
handler(newval) {
if(newval) {
- console.log(newval)
+ this.$emit("setDataStore", {
+ area: this.areasName,
+ dataStore:newval
+ });
}
+ }
+ },
+ sourceData:{
+ handler(newval) {
+ //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹�
+ this.initData();
}
}
},
@@ -79,7 +95,7 @@
label: 'text'
},
lazy:this.componentVO.treeDefineVO.loadType == 'node',
- isMuti:true,
+ isMuti:false,
data:[],
checkDatas:[]
}
@@ -88,7 +104,9 @@
this.initData();
},
mounted() {
- console.log(this.$el.clientHeight)
+ if(this.componentVO.buttons && this.componentVO.buttons.length>0){
+ this.$children[2].$el.style.height = 'calc(100% - 50px - '+this.$children[0].$el.clientHeight+'px - 10px)';
+ }
},
methods: {
filterNode(value, data) {
@@ -1984,12 +2002,7 @@
//閫愮骇鍔犺浇
const parentOid = (node.level === 0) ? 0 : node.data.oid;
setTimeout(() => {
- const data = [{
- name: 'leaf',
- leaf: true
- }, {
- name: 'zone'
- }];
+ const data = this.data;
resolve(data);
}, 500);
--
Gitblit v1.9.3