@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/detail-table",
3
- "version": "1.0.0-beta.28",
3
+ "version": "1.0.0-beta.29",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -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(
@@ -11,6 +11,10 @@ export default {
11
11
  span: {
12
12
  type: Number,
13
13
  default: 1
14
+ },
15
+ promptInfo: {
16
+ type: String,
17
+ default: ""
14
18
  }
15
19
  }
16
20
  }