kz-ui-base 2.5.169 → 2.5.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
</el-col>
|
|
83
83
|
</template>
|
|
84
|
-
<el-tabs style="width: 100%; display: inline-block" v-model="activeName">
|
|
84
|
+
<el-tabs style="width: 100%; display: inline-block" v-model="activeName" v-if="tabList.length>0">
|
|
85
85
|
<el-tab-pane
|
|
86
86
|
v-for="(it, ix) in tabList"
|
|
87
87
|
:key="ix"
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<el-form-item
|
|
3
|
+
:label="column.text"
|
|
4
|
+
:prop="column.property"
|
|
5
|
+
:label-width="column.labelWidth"
|
|
6
|
+
>
|
|
7
|
+
<span class="textClass">{{ displayValue }}</span>
|
|
8
|
+
</el-form-item>
|
|
3
9
|
</template>
|
|
4
10
|
|
|
5
11
|
<script lang="ts">
|
|
@@ -27,6 +33,17 @@ export default class text extends Vue {
|
|
|
27
33
|
setting;
|
|
28
34
|
@Prop()
|
|
29
35
|
columns;
|
|
36
|
+
|
|
37
|
+
get displayValue() {
|
|
38
|
+
// 优先级:setting.value > entity[property] > value > column.value
|
|
39
|
+
if (this.setting && this.setting.value !== undefined) {
|
|
40
|
+
return this.setting.value;
|
|
41
|
+
}
|
|
42
|
+
if (this.entity && this.column && this.column.property) {
|
|
43
|
+
return this.entity[this.column.property] || this.value || this.column.value || '';
|
|
44
|
+
}
|
|
45
|
+
return this.value || this.column?.value || '';
|
|
46
|
+
}
|
|
30
47
|
}
|
|
31
48
|
</script>
|
|
32
49
|
<style>
|
|
@@ -214,26 +214,16 @@ export default class textBox extends Vue {
|
|
|
214
214
|
public enter = false;
|
|
215
215
|
public currentValue = undefined;
|
|
216
216
|
timeout = null;
|
|
217
|
-
debounceTimer = null;
|
|
218
217
|
public onInputEvent(value, type) {
|
|
219
|
-
if (this.setting && this.setting.
|
|
220
|
-
|
|
221
|
-
this.debounceTimer = setTimeout(() => {
|
|
222
|
-
this.$emit("change", {
|
|
223
|
-
property: this.column.property,
|
|
224
|
-
entity: this.entity,
|
|
225
|
-
column: this.column,
|
|
226
|
-
value: value,
|
|
227
|
-
});
|
|
228
|
-
}, this.setting.debounceDelay || 500);
|
|
229
|
-
} else {
|
|
230
|
-
this.$emit("change", {
|
|
231
|
-
property: this.column.property,
|
|
232
|
-
entity: this.entity,
|
|
233
|
-
column: this.column,
|
|
234
|
-
value: value,
|
|
235
|
-
});
|
|
218
|
+
if (this.setting && this.setting.blurChange) {
|
|
219
|
+
return;
|
|
236
220
|
}
|
|
221
|
+
this.$emit("change", {
|
|
222
|
+
property: this.column.property,
|
|
223
|
+
entity: this.entity,
|
|
224
|
+
column: this.column,
|
|
225
|
+
value: value,
|
|
226
|
+
});
|
|
237
227
|
}
|
|
238
228
|
public onChangeEvent(value) {
|
|
239
229
|
// if (value.constructor != Array && value == "") {
|