lw-cdp-ui 1.4.73 → 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 +19 -4
- package/dist/lw-cdp-ui.esm.js +1373 -1364
- package/dist/lw-cdp-ui.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
<slot :name="item?.options?.component"></slot>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
+
<!-- 物理换行 -->
|
|
23
|
+
<div v-else-if="item.component == 'dividerBr'" class="title-name-divider-br" :class="{ border: item?.border }"></div>
|
|
24
|
+
|
|
22
25
|
<!-- 表单内容 -->
|
|
23
26
|
<el-form-item
|
|
24
27
|
v-else
|
|
@@ -126,9 +129,14 @@
|
|
|
126
129
|
|
|
127
130
|
<!-- 没有组件是component值 就是插槽名称 -->
|
|
128
131
|
<template v-else>
|
|
129
|
-
<
|
|
130
|
-
<
|
|
131
|
-
|
|
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>
|
|
132
140
|
</template>
|
|
133
141
|
<div v-if="item.message" class="el-form-item-msg">{{ item.message }}</div>
|
|
134
142
|
</el-form-item>
|
|
@@ -169,7 +177,7 @@ export default {
|
|
|
169
177
|
watch: {
|
|
170
178
|
item: {
|
|
171
179
|
handler(val) {
|
|
172
|
-
this.objItem = val
|
|
180
|
+
this.objItem = { ...val, ...this.objItem }
|
|
173
181
|
},
|
|
174
182
|
immediate: true,
|
|
175
183
|
deep: true
|
|
@@ -266,6 +274,7 @@ export default {
|
|
|
266
274
|
},
|
|
267
275
|
// key to label
|
|
268
276
|
getKeyToLabel(val, options = {}) {
|
|
277
|
+
if (val === null || val === undefined || val === '') return '--'
|
|
269
278
|
if (!options?.multiple) {
|
|
270
279
|
val = [val]
|
|
271
280
|
}
|
|
@@ -337,4 +346,10 @@ export default {
|
|
|
337
346
|
margin-left: 10px;
|
|
338
347
|
}
|
|
339
348
|
}
|
|
349
|
+
.title-name-divider-br {
|
|
350
|
+
&.border {
|
|
351
|
+
margin-bottom: 15px;
|
|
352
|
+
border-top: 1px var(--el-border-color) var(--el-border-style);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
340
355
|
</style>
|