lw-cdp-ui 1.2.55 → 1.2.57
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.
|
@@ -169,9 +169,19 @@
|
|
|
169
169
|
</template>
|
|
170
170
|
</template>
|
|
171
171
|
|
|
172
|
+
<!-- 自定义组件 -->
|
|
173
|
+
<template v-else-if="col.component">
|
|
174
|
+
<slot :name="col.component"
|
|
175
|
+
:scope="scope.row"
|
|
176
|
+
:col="col">
|
|
177
|
+
<el-tag type="danger">[{{ col.component }}]
|
|
178
|
+
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
179
|
+
</slot>
|
|
180
|
+
</template>
|
|
181
|
+
|
|
172
182
|
<!-- 其他简单渲染 -->
|
|
173
183
|
<template v-else>
|
|
174
|
-
{{ scope.row
|
|
184
|
+
{{ getChildName(scope.row, col) }}
|
|
175
185
|
</template>
|
|
176
186
|
|
|
177
187
|
<!-- 复制 -->
|
|
@@ -220,6 +230,14 @@ export default {
|
|
|
220
230
|
}
|
|
221
231
|
return allPermissions.includes(auth)
|
|
222
232
|
},
|
|
233
|
+
/**
|
|
234
|
+
* 渲染多层级数据
|
|
235
|
+
*/
|
|
236
|
+
getChildName(item, col) {
|
|
237
|
+
if (!col.dataIndex) return '';
|
|
238
|
+
const value = col.dataIndex.split('.').reduce((obj, key) => obj?.[key], item);
|
|
239
|
+
return value ?? (value === 0 ? '0' : '')
|
|
240
|
+
}
|
|
223
241
|
}
|
|
224
242
|
}
|
|
225
243
|
</script>
|
|
@@ -238,4 +256,12 @@ export default {
|
|
|
238
256
|
margin-left: 0px;
|
|
239
257
|
}
|
|
240
258
|
}
|
|
259
|
+
.el-tooltip {
|
|
260
|
+
position: relative;
|
|
261
|
+
.copy-btn {
|
|
262
|
+
position: absolute;
|
|
263
|
+
right: 0;
|
|
264
|
+
top: 40%;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
241
267
|
</style>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
.baseTablePage-wrap {
|
|
2
2
|
position: relative;
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
.icon-more {
|
|
5
5
|
margin-top: 3px;
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
width: 20px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
.tool-block {
|
|
12
11
|
display: flex;
|
|
13
12
|
gap: 10px;
|
|
@@ -202,3 +201,6 @@
|
|
|
202
201
|
margin-left: 20px;
|
|
203
202
|
}
|
|
204
203
|
}
|
|
204
|
+
.table-card-list {
|
|
205
|
+
user-select: none;
|
|
206
|
+
}
|
|
@@ -24,7 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
<!-- 数据列 -->
|
|
26
26
|
<TableColumn v-for="item in tableHeaders"
|
|
27
|
-
:col="item"
|
|
27
|
+
:col="item">
|
|
28
|
+
<template v-slot:[item.component]="slotProps">
|
|
29
|
+
<slot :name="item.component"
|
|
30
|
+
v-bind="slotProps"></slot>
|
|
31
|
+
</template>
|
|
32
|
+
</TableColumn>
|
|
28
33
|
|
|
29
34
|
</el-table>
|
|
30
35
|
|