lw-cdp-ui 1.4.74 → 1.4.75
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.
- package/dist/components/lwFormMini/ViewItem.vue +10 -4
- package/dist/lw-cdp-ui.esm.js +1102 -1096
- package/dist/lw-cdp-ui.umd.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -129,9 +129,14 @@
|
|
|
129
129
|
|
|
130
130
|
<!-- 没有组件是component值 就是插槽名称 -->
|
|
131
131
|
<template v-else>
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
|
|
132
|
+
<template v-if="!item?.viewShowComponent">
|
|
133
|
+
<slot :name="item.component" :itemCur="item" :formCur="form">
|
|
134
|
+
<el-tag type="danger">[{{ item.component }}] 没有这个默认组件也未自定义插槽内容</el-tag>
|
|
135
|
+
</slot>
|
|
136
|
+
</template>
|
|
137
|
+
<template v-else>
|
|
138
|
+
<div v-html="objItem.value || '--'"></div>
|
|
139
|
+
</template>
|
|
135
140
|
</template>
|
|
136
141
|
<div v-if="item.message" class="el-form-item-msg">{{ item.message }}</div>
|
|
137
142
|
</el-form-item>
|
|
@@ -172,7 +177,7 @@ export default {
|
|
|
172
177
|
watch: {
|
|
173
178
|
item: {
|
|
174
179
|
handler(val) {
|
|
175
|
-
this.objItem = val
|
|
180
|
+
this.objItem = { ...val, ...this.objItem }
|
|
176
181
|
},
|
|
177
182
|
immediate: true,
|
|
178
183
|
deep: true
|
|
@@ -269,6 +274,7 @@ export default {
|
|
|
269
274
|
},
|
|
270
275
|
// key to label
|
|
271
276
|
getKeyToLabel(val, options = {}) {
|
|
277
|
+
if (val === null || val === undefined || val === '') return '--'
|
|
272
278
|
if (!options?.multiple) {
|
|
273
279
|
val = [val]
|
|
274
280
|
}
|