kz-ui-base 2.5.170 → 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
- <span class="textClass">{{ column.value }}</span>
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "2.5.170",
3
+ "version": "2.5.171",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {