@lambo-design/detail-table 1.0.0-beta.28 → 1.0.0-beta.29
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/package.json +1 -1
- package/src/components/Col.js +37 -0
- package/src/detail-table-item.vue +4 -0
package/package.json
CHANGED
package/src/components/Col.js
CHANGED
|
@@ -30,6 +30,7 @@ const Col = {
|
|
|
30
30
|
const slots = getSlots(child);
|
|
31
31
|
const labelColSpan = Math.floor(100 / ColProps.totalCols * 0.33); // 计算 label 的长度
|
|
32
32
|
const contextColSpan = Math.floor(100 / ColProps.totalCols * 0.66); // 计算 context 的长度
|
|
33
|
+
const promptInfo = getComponentFromProp(child, "promptInfo")
|
|
33
34
|
const labelProps = {
|
|
34
35
|
attrs: {},
|
|
35
36
|
class: [
|
|
@@ -50,6 +51,42 @@ const Col = {
|
|
|
50
51
|
|
|
51
52
|
if (bordered) {
|
|
52
53
|
if (type === "label") {
|
|
54
|
+
if (promptInfo && promptInfo !=="") {
|
|
55
|
+
let labelItem = createElement(
|
|
56
|
+
'Tooltip',
|
|
57
|
+
{
|
|
58
|
+
ref: key,
|
|
59
|
+
props: {
|
|
60
|
+
placement: 'right',
|
|
61
|
+
maxWidth: 300
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
[
|
|
65
|
+
label,
|
|
66
|
+
createElement(
|
|
67
|
+
'Icon', {
|
|
68
|
+
ref: key,
|
|
69
|
+
props: {
|
|
70
|
+
type: 'ios-information-circle-outline',
|
|
71
|
+
size: 16,
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
createElement(
|
|
76
|
+
'div', {
|
|
77
|
+
slot: 'content',
|
|
78
|
+
theme: 'light'
|
|
79
|
+
},
|
|
80
|
+
[
|
|
81
|
+
createElement('span', {},
|
|
82
|
+
promptInfo
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
)
|
|
88
|
+
return createElement('th', labelProps, [labelItem])
|
|
89
|
+
}
|
|
53
90
|
return createElement("th", labelProps, label);
|
|
54
91
|
}
|
|
55
92
|
return createElement(
|