@tdesign/uniapp 0.7.3 → 0.8.0

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.
Files changed (197) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -1
  3. package/dist/action-sheet/README.md +1 -1
  4. package/dist/action-sheet/action-sheet.vue +158 -150
  5. package/dist/action-sheet/props.ts +2 -2
  6. package/dist/action-sheet/type.ts +1 -1
  7. package/dist/avatar/avatar.vue +89 -87
  8. package/dist/avatar-group/avatar-group.vue +69 -67
  9. package/dist/back-top/back-top.vue +60 -58
  10. package/dist/badge/badge.vue +69 -59
  11. package/dist/button/button.vue +121 -116
  12. package/dist/button/props.ts +2 -2
  13. package/dist/button/type.ts +1 -1
  14. package/dist/calendar/calendar-header.vue +4 -4
  15. package/dist/calendar/calendar.vue +308 -297
  16. package/dist/calendar/template.vue +1 -1
  17. package/dist/cascader/README.en-US.md +2 -1
  18. package/dist/cascader/README.md +2 -1
  19. package/dist/cascader/cascader.vue +340 -328
  20. package/dist/cascader/props.ts +6 -1
  21. package/dist/cascader/type.ts +6 -0
  22. package/dist/cell/cell.vue +127 -121
  23. package/dist/cell-group/cell-group.vue +32 -30
  24. package/dist/check-tag/check-tag.vue +73 -71
  25. package/dist/checkbox/checkbox.vue +127 -127
  26. package/dist/checkbox/props.ts +6 -6
  27. package/dist/checkbox/type.ts +3 -3
  28. package/dist/checkbox-group/checkbox-group.vue +175 -173
  29. package/dist/checkbox-group/props.ts +6 -6
  30. package/dist/checkbox-group/type.ts +4 -4
  31. package/dist/col/col.vue +26 -24
  32. package/dist/collapse/collapse.vue +83 -81
  33. package/dist/collapse-panel/collapse-panel.vue +121 -119
  34. package/dist/collapse-panel/props.ts +4 -4
  35. package/dist/collapse-panel/type.ts +2 -2
  36. package/dist/color-picker/README.md +1 -1
  37. package/dist/color-picker/color-picker.vue +324 -322
  38. package/dist/color-picker/props.ts +2 -2
  39. package/dist/color-picker/template.vue +14 -10
  40. package/dist/common/common.ts +1 -0
  41. package/dist/common/style/theme/index.css +5 -5
  42. package/dist/common/utils.js +7 -2
  43. package/dist/common/validator.js +172 -0
  44. package/dist/config-provider/README.en-US.md +184 -0
  45. package/dist/config-provider/README.md +234 -0
  46. package/dist/config-provider/config-provider.vue +105 -0
  47. package/dist/config-provider/config-store.js +70 -0
  48. package/dist/config-provider/props.ts +16 -0
  49. package/dist/config-provider/reactive-state.js +39 -0
  50. package/dist/config-provider/type.ts +401 -0
  51. package/dist/config-provider/use-config.js +29 -0
  52. package/dist/config-provider/utils.js +29 -0
  53. package/dist/count-down/count-down.vue +98 -97
  54. package/dist/date-time-picker/date-time-picker.vue +410 -395
  55. package/dist/demo/demo.vue +1 -0
  56. package/dist/dialog/dialog.vue +175 -173
  57. package/dist/divider/divider.vue +38 -36
  58. package/dist/draggable/draggable.vue +60 -58
  59. package/dist/drawer/README.md +1 -1
  60. package/dist/drawer/drawer.vue +48 -46
  61. package/dist/dropdown-item/dropdown-item.vue +209 -207
  62. package/dist/dropdown-item/props.ts +4 -4
  63. package/dist/dropdown-item/type.ts +3 -3
  64. package/dist/dropdown-menu/dropdown-menu.vue +93 -99
  65. package/dist/empty/empty.vue +43 -42
  66. package/dist/fab/fab.vue +88 -86
  67. package/dist/footer/footer.vue +36 -34
  68. package/dist/form/README.en-US.md +17 -24
  69. package/dist/form/README.md +18 -25
  70. package/dist/form/form.css +1 -166
  71. package/dist/form/form.vue +251 -236
  72. package/dist/form/props.ts +2 -21
  73. package/dist/form/type.ts +7 -70
  74. package/dist/form-item/README.en-US.md +4 -5
  75. package/dist/form-item/README.md +4 -5
  76. package/dist/form-item/form-item.css +69 -96
  77. package/dist/form-item/form-item.vue +315 -336
  78. package/dist/form-item/form-model.ts +125 -173
  79. package/dist/form-item/props.ts +4 -17
  80. package/dist/form-item/type.ts +43 -1
  81. package/dist/grid/grid.vue +53 -51
  82. package/dist/grid-item/grid-item.vue +121 -119
  83. package/dist/guide/README.md +1 -1
  84. package/dist/guide/guide.vue +281 -277
  85. package/dist/icon/README.md +2 -4
  86. package/dist/icon/icon.vue +78 -76
  87. package/dist/image/README.md +1 -1
  88. package/dist/image/image.vue +103 -101
  89. package/dist/image-viewer/image-viewer.vue +160 -158
  90. package/dist/image-viewer/props.ts +2 -2
  91. package/dist/image-viewer/type.ts +1 -1
  92. package/dist/index.js +3 -0
  93. package/dist/indexes/indexes.vue +264 -267
  94. package/dist/indexes-anchor/indexes-anchor.vue +41 -41
  95. package/dist/input/input.vue +192 -192
  96. package/dist/input/props.ts +6 -6
  97. package/dist/input/type.ts +3 -3
  98. package/dist/link/link.vue +73 -71
  99. package/dist/loading/loading.vue +59 -59
  100. package/dist/locale/ar_KW.ts +157 -0
  101. package/dist/locale/en_US.ts +146 -0
  102. package/dist/locale/it_IT.ts +145 -0
  103. package/dist/locale/ja_JP.ts +132 -0
  104. package/dist/locale/ko_KR.ts +132 -0
  105. package/dist/locale/ru_RU.ts +157 -0
  106. package/dist/locale/zh_CN.ts +133 -0
  107. package/dist/locale/zh_TW.ts +132 -0
  108. package/dist/message/message.vue +181 -173
  109. package/dist/message/props.ts +2 -2
  110. package/dist/message/type.ts +1 -1
  111. package/dist/message-item/message-item.vue +192 -184
  112. package/dist/mixins/using-config.js +39 -0
  113. package/dist/navbar/navbar.vue +201 -199
  114. package/dist/notice-bar/notice-bar.vue +175 -171
  115. package/dist/notice-bar/props.ts +2 -2
  116. package/dist/notice-bar/type.ts +1 -1
  117. package/dist/npm/dayjs/esm/locale/ar.js +81 -0
  118. package/dist/npm/dayjs/esm/locale/it.js +39 -0
  119. package/dist/overlay/overlay.vue +50 -48
  120. package/dist/picker/picker.vue +168 -161
  121. package/dist/picker-item/picker-item.vue +269 -269
  122. package/dist/popover/README.md +1 -1
  123. package/dist/popover/popover.vue +262 -261
  124. package/dist/popover/props.ts +4 -4
  125. package/dist/popover/type.ts +2 -2
  126. package/dist/popup/popup.vue +46 -45
  127. package/dist/progress/README.md +1 -1
  128. package/dist/progress/progress.vue +76 -76
  129. package/dist/pull-down-refresh/props.ts +2 -2
  130. package/dist/pull-down-refresh/pull-down-refresh.vue +240 -234
  131. package/dist/pull-down-refresh/type.ts +1 -1
  132. package/dist/qrcode/README.md +1 -1
  133. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +340 -338
  134. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +6 -6
  135. package/dist/qrcode/qrcode.vue +93 -87
  136. package/dist/radio/props.ts +6 -6
  137. package/dist/radio/radio.vue +118 -120
  138. package/dist/radio/type.ts +3 -3
  139. package/dist/radio-group/props.ts +4 -4
  140. package/dist/radio-group/radio-group.vue +136 -134
  141. package/dist/radio-group/type.ts +4 -4
  142. package/dist/rate/computed.js +2 -2
  143. package/dist/rate/props.ts +4 -4
  144. package/dist/rate/rate.vue +155 -154
  145. package/dist/rate/type.ts +2 -2
  146. package/dist/result/result.vue +41 -39
  147. package/dist/row/row.vue +38 -36
  148. package/dist/scroll-view/scroll-view.vue +24 -22
  149. package/dist/search/props.ts +2 -2
  150. package/dist/search/search.vue +127 -125
  151. package/dist/search/type.ts +1 -1
  152. package/dist/side-bar/side-bar.vue +57 -55
  153. package/dist/side-bar-item/side-bar-item.vue +86 -86
  154. package/dist/skeleton/skeleton.vue +126 -124
  155. package/dist/slider/README.md +1 -1
  156. package/dist/slider/props.ts +2 -2
  157. package/dist/slider/slider.vue +457 -457
  158. package/dist/slider/type.ts +1 -1
  159. package/dist/step-item/step-item.vue +77 -75
  160. package/dist/stepper/props.ts +2 -2
  161. package/dist/stepper/stepper.vue +168 -149
  162. package/dist/stepper/type.ts +1 -1
  163. package/dist/steps/props.ts +2 -2
  164. package/dist/steps/steps.vue +83 -81
  165. package/dist/steps/type.ts +1 -1
  166. package/dist/sticky/sticky.vue +104 -102
  167. package/dist/swipe-cell/swipe-cell.vue +91 -89
  168. package/dist/swiper/README.md +1 -1
  169. package/dist/swiper/swiper.vue +91 -89
  170. package/dist/swiper-nav/swiper-nav.vue +38 -36
  171. package/dist/switch/props.ts +2 -2
  172. package/dist/switch/switch.vue +62 -62
  173. package/dist/switch/type.ts +1 -1
  174. package/dist/tab-bar/tab-bar.vue +88 -86
  175. package/dist/tab-bar-item/tab-bar-item.vue +85 -82
  176. package/dist/tab-panel/tab-panel.vue +66 -64
  177. package/dist/tabs/tabs.vue +294 -287
  178. package/dist/tag/tag.vue +79 -77
  179. package/dist/textarea/props.ts +6 -6
  180. package/dist/textarea/textarea.vue +127 -126
  181. package/dist/textarea/type.ts +3 -3
  182. package/dist/toast/toast.vue +107 -106
  183. package/dist/transition/transition.vue +30 -28
  184. package/dist/tree-select/tree-select.vue +151 -151
  185. package/dist/types/config-provider.d.ts +7 -0
  186. package/dist/types/index.d.ts +2 -0
  187. package/dist/types/popover.d.ts +7 -0
  188. package/dist/upload/README.en-US.md +13 -14
  189. package/dist/upload/README.md +11 -12
  190. package/dist/upload/props.ts +2 -4
  191. package/dist/upload/type.ts +12 -11
  192. package/dist/upload/upload.css +1 -1
  193. package/dist/upload/upload.vue +672 -512
  194. package/dist/watermark/watermark.vue +151 -149
  195. package/global.d.ts +2 -0
  196. package/package.json +15 -3
  197. package/dist/form/form-item-props.ts +0 -56
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view
3
- :style="tools._style([customStyle])"
3
+ :style="'' + tools._style([customStyle])"
4
4
  :class="[
5
5
  tClass,
6
6
  tools.cls(classPrefix, [['hairline--top-bottom', border], theme])
@@ -21,97 +21,99 @@ import { ParentMixin, RELATION_MAP } from '../common/relation';
21
21
  const name = `${prefix}-collapse`;
22
22
 
23
23
 
24
- export default uniComponent({
25
- name,
26
- controlledProps: [
27
- {
28
- key: 'value',
29
- event: 'change',
30
- },
31
- ],
32
- options: {
33
- styleIsolation: 'shared',
34
- },
35
- externalClasses: [`${prefix}-class`],
36
- mixins: [ParentMixin(RELATION_MAP.CollapsePanel)],
37
- props: {
38
- ...props,
39
- },
40
- emits: [
41
- 'update:value',
42
- ],
43
- data() {
44
- return {
45
- prefix,
46
- classPrefix: name,
47
- tools,
48
- border: false,
49
- dataValue: coalesce(this.value, this.defaultValue),
50
- mounted: false,
51
- };
52
- },
53
- watch: {
54
- value: {
55
- handler(value) {
56
- this.dataValue = value;
24
+ export default {
25
+ ...uniComponent({
26
+ name,
27
+ controlledProps: [
28
+ {
29
+ key: 'value',
30
+ event: 'change',
57
31
  },
58
- immediate: true,
32
+ ],
33
+ options: {
34
+ styleIsolation: 'shared',
59
35
  },
60
- dataValue: {
61
- handler() {
62
- this.waitUntilMounted(this.updateExpanded);
63
- },
64
- immediate: true,
65
- deep: true,
36
+ externalClasses: [`${prefix}-class`],
37
+ mixins: [ParentMixin(RELATION_MAP.CollapsePanel)],
38
+ props: {
39
+ ...props,
66
40
  },
67
- expandMutex: {
68
- handler() {
69
- this.waitUntilMounted(this.updateExpanded);
70
- },
71
- immediate: true,
41
+ emits: [
42
+ 'update:value',
43
+ ],
44
+ data() {
45
+ return {
46
+ prefix,
47
+ classPrefix: name,
48
+ tools,
49
+ border: false,
50
+ dataValue: coalesce(this.value, this.defaultValue),
51
+ mounted: false,
52
+ };
72
53
  },
54
+ watch: {
55
+ value: {
56
+ handler(value) {
57
+ this.dataValue = value;
58
+ },
59
+ immediate: true,
60
+ },
61
+ dataValue: {
62
+ handler() {
63
+ this.waitUntilMounted(this.updateExpanded);
64
+ },
65
+ immediate: true,
66
+ deep: true,
67
+ },
68
+ expandMutex: {
69
+ handler() {
70
+ this.waitUntilMounted(this.updateExpanded);
71
+ },
72
+ immediate: true,
73
+ },
73
74
 
74
- },
75
- mounted() {
76
- let interval = 0;
77
- // #ifdef APP-PLUS
78
- interval = 33;
79
- // #endif
80
- setTimeout(() => {
81
- this.mounted = true;
82
- }, interval);
83
- },
84
- methods: {
85
- waitUntilMounted(cb) {
86
- if (this.mounted) {
87
- cb.call(this);
88
- return;
89
- }
75
+ },
76
+ mounted() {
77
+ let interval = 0;
78
+ // #ifdef APP-PLUS
79
+ interval = 33;
80
+ // #endif
90
81
  setTimeout(() => {
91
- cb.call(this);
92
- }, 33);
82
+ this.mounted = true;
83
+ }, interval);
93
84
  },
85
+ methods: {
86
+ waitUntilMounted(cb) {
87
+ if (this.mounted) {
88
+ cb.call(this);
89
+ return;
90
+ }
91
+ setTimeout(() => {
92
+ cb.call(this);
93
+ }, 33);
94
+ },
94
95
 
95
- updateExpanded() {
96
- this.children?.forEach((e) => {
97
- e.updateExpanded(this.dataValue);
98
- });
99
- },
100
- switch(panelValue) {
101
- const { expandMutex, dataValue: activeValues } = this;
96
+ updateExpanded() {
97
+ this.children?.forEach((e) => {
98
+ e.updateExpanded(this.dataValue);
99
+ });
100
+ },
101
+ switch(panelValue) {
102
+ const { expandMutex, dataValue: activeValues } = this;
102
103
 
103
- let value = [];
104
- const hit = activeValues?.indexOf(panelValue);
104
+ let value = [];
105
+ const hit = activeValues?.indexOf(panelValue);
105
106
 
106
- if (hit > -1) {
107
- value = activeValues.filter(item => item !== panelValue);
108
- } else {
109
- value = expandMutex ? [panelValue] : activeValues.concat(panelValue);
110
- }
107
+ if (hit > -1) {
108
+ value = activeValues.filter(item => item !== panelValue);
109
+ } else {
110
+ value = expandMutex ? [panelValue] : activeValues.concat(panelValue);
111
+ }
111
112
 
112
- this._trigger('change', { value });
113
+ this._trigger('change', { value });
114
+ },
113
115
  },
114
- },
115
- });
116
+ }),
117
+ };
116
118
  </script>
117
119
  <style scoped src="./collapse.css"></style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view
3
- :style="tools._style([customStyle])"
3
+ :style="'' + tools._style([customStyle])"
4
4
  :class="[
5
5
  classPrefix + ' ' + classPrefix + '--' + placement,
6
6
  tClass
@@ -64,7 +64,7 @@
64
64
  :animation="animation"
65
65
  :aria-hidden="expanded ? '' : true"
66
66
  >
67
- <view :class="tools.cls(classPrefix + '__content', [['disabled', ultimateDisabled], ['expanded', expanded], placement]) + ' ' + tClassContent">
67
+ <view :class="'' + tools.cls(classPrefix + '__content', [['disabled', ultimateDisabled], ['expanded', expanded], placement]) + ' ' + tClassContent">
68
68
  {{ content }}
69
69
  <slot />
70
70
  <slot name="content" />
@@ -85,152 +85,154 @@ import { ChildrenMixin, RELATION_MAP } from '../common/relation';
85
85
  const name = `${prefix}-collapse-panel`;
86
86
  const DISABLED_COLOR = 'var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, .26)))';
87
87
 
88
- export default uniComponent({
89
- name,
90
- options: {
91
- styleIsolation: 'shared',
92
- },
93
- externalClasses: [
94
- `${prefix}-class`,
95
- `${prefix}-class-content`,
96
- `${prefix}-class-header`,
97
- ],
98
- mixins: [ChildrenMixin(RELATION_MAP.CollapsePanel)],
88
+ export default {
99
89
  components: {
100
90
  TCell,
101
91
  },
102
- props: {
103
- ...props,
104
- },
105
- data() {
106
- return {
107
- prefix,
108
- expanded: false,
109
- classPrefix: name,
110
- classBasePrefix: prefix,
111
- ultimateExpandIcon: false,
112
- ultimateDisabled: false,
113
- tools,
114
- animation: null,
115
- };
116
- },
117
- computed: {
118
- titleCustomStyle() {
119
- return tools._style({
120
- fontSize: 'var(--td-collapse-title-font-size, var(--td-font-size-m, 16px))',
121
- color: this.ultimateDisabled && DISABLED_COLOR,
122
- });
92
+ ...uniComponent({
93
+ name,
94
+ options: {
95
+ styleIsolation: 'shared',
123
96
  },
124
- noteCustomStyle() {
125
- return tools._style({
126
- color: this.ultimateDisabled && DISABLED_COLOR,
127
-
128
- });
97
+ externalClasses: [
98
+ `${prefix}-class`,
99
+ `${prefix}-class-content`,
100
+ `${prefix}-class-header`,
101
+ ],
102
+ mixins: [ChildrenMixin(RELATION_MAP.CollapsePanel)],
103
+ props: {
104
+ ...props,
129
105
  },
130
- rightIconCustomStyle() {
131
- return tools._style({
132
- color: this.ultimateDisabled && DISABLED_COLOR,
133
- });
106
+ data() {
107
+ return {
108
+ prefix,
109
+ expanded: false,
110
+ classPrefix: name,
111
+ classBasePrefix: prefix,
112
+ ultimateExpandIcon: false,
113
+ ultimateDisabled: false,
114
+ tools,
115
+ animation: null,
116
+ };
134
117
  },
135
- },
136
- watch: {
137
- disabled: {
138
- handler(e) {
139
- this.ultimateDisabled = !!e;
118
+ computed: {
119
+ titleCustomStyle() {
120
+ return tools._style({
121
+ fontSize: 'var(--td-collapse-title-font-size, var(--td-font-size-m, 16px))',
122
+ color: this.ultimateDisabled && DISABLED_COLOR,
123
+ });
124
+ },
125
+ noteCustomStyle() {
126
+ return tools._style({
127
+ color: this.ultimateDisabled && DISABLED_COLOR,
128
+
129
+ });
130
+ },
131
+ rightIconCustomStyle() {
132
+ return tools._style({
133
+ color: this.ultimateDisabled && DISABLED_COLOR,
134
+ });
140
135
  },
141
- immediate: true,
142
136
  },
143
- },
144
- methods: {
145
- updateExpanded(activeValues = []) {
146
- if (!this[RELATION_MAP.CollapsePanel]) {
147
- return;
148
- }
137
+ watch: {
138
+ disabled: {
139
+ handler(e) {
140
+ this.ultimateDisabled = !!e;
141
+ },
142
+ immediate: true,
143
+ },
144
+ },
145
+ methods: {
146
+ updateExpanded(activeValues = []) {
147
+ if (!this[RELATION_MAP.CollapsePanel]) {
148
+ return;
149
+ }
149
150
 
150
- const { value } = this;
151
- const { defaultExpandAll } = this[RELATION_MAP.CollapsePanel];
152
- const expanded = defaultExpandAll ? !this.expanded : activeValues?.includes(value);
151
+ const { value } = this;
152
+ const { defaultExpandAll } = this[RELATION_MAP.CollapsePanel];
153
+ const expanded = defaultExpandAll ? !this.expanded : activeValues?.includes(value);
153
154
 
154
- if (expanded === this.expanded) return;
155
+ if (expanded === this.expanded) return;
155
156
 
156
- this.expanded = expanded;
157
- this.updateStyle(expanded);
158
- },
157
+ this.expanded = expanded;
158
+ this.updateStyle(expanded);
159
+ },
159
160
 
160
- updateStyle(expanded) {
161
- return getRect(this, `.${name}__content`)
162
- .then(rect => rect.height)
163
- .then((height) => {
164
- const animation = uni.createAnimation({
165
- duration: 0,
166
- timingFunction: 'ease-in-out',
167
- });
161
+ updateStyle(expanded) {
162
+ return getRect(this, `.${name}__content`)
163
+ .then(rect => rect.height)
164
+ .then((height) => {
165
+ const animation = uni.createAnimation({
166
+ duration: 0,
167
+ timingFunction: 'ease-in-out',
168
+ });
168
169
 
169
- if (expanded) {
170
- animation
171
- .height(height)
172
- .top(0)
173
- .step({ duration: 300 })
174
- .height('auto')
175
- .step();
176
- } else {
177
- let doAnimation = false;
178
-
179
- // #ifdef H5 || APP-PLUS
180
- animation
181
- .height(height)
182
- .top(1)
183
- .step({ duration: 17 })
184
- .height(0)
185
- .step({ duration: 300 });
186
- doAnimation = true;
187
- // #endif
188
-
189
- if (!doAnimation) {
170
+ if (expanded) {
171
+ animation
172
+ .height(height)
173
+ .top(0)
174
+ .step({ duration: 300 })
175
+ .height('auto')
176
+ .step();
177
+ } else {
178
+ let doAnimation = false;
179
+
180
+ // #ifdef H5 || APP-PLUS
190
181
  animation
191
182
  .height(height)
192
183
  .top(1)
193
- .step({ duration: 1 })
184
+ .step({ duration: 17 })
194
185
  .height(0)
195
186
  .step({ duration: 300 });
187
+ doAnimation = true;
188
+ // #endif
189
+
190
+ if (!doAnimation) {
191
+ animation
192
+ .height(height)
193
+ .top(1)
194
+ .step({ duration: 1 })
195
+ .height(0)
196
+ .step({ duration: 300 });
197
+ }
196
198
  }
197
- }
198
199
 
199
- this.animation = animation.export();
200
- });
201
- },
200
+ this.animation = animation.export();
201
+ });
202
+ },
202
203
 
203
- onClick() {
204
- const { ultimateDisabled } = this;
205
- const { value } = this;
204
+ onClick() {
205
+ const { ultimateDisabled } = this;
206
+ const { value } = this;
206
207
 
207
208
 
208
- if (ultimateDisabled) return;
209
+ if (ultimateDisabled) return;
209
210
 
210
- if (this[RELATION_MAP.CollapsePanel].defaultExpandAll) {
211
- this.updateExpanded();
212
- } else {
213
- this[RELATION_MAP.CollapsePanel].switch(value);
214
- }
215
- },
211
+ if (this[RELATION_MAP.CollapsePanel].defaultExpandAll) {
212
+ this.updateExpanded();
213
+ } else {
214
+ this[RELATION_MAP.CollapsePanel].switch(value);
215
+ }
216
+ },
216
217
 
217
- innerAfterLinked() {
218
- const { dataValue, expandIcon, disabled } = this[RELATION_MAP.CollapsePanel];
218
+ innerAfterLinked() {
219
+ const { dataValue, expandIcon, disabled } = this[RELATION_MAP.CollapsePanel];
219
220
 
220
- this.ultimateExpandIcon = this.expandIcon == null ? expandIcon : this.expandIcon;
221
- this.ultimateDisabled = this.disabled == null ? disabled : this.disabled;
221
+ this.ultimateExpandIcon = this.expandIcon == null ? expandIcon : this.expandIcon;
222
+ this.ultimateDisabled = this.disabled == null ? disabled : this.disabled;
222
223
 
223
224
 
224
- let interval = 0;
225
- // #ifdef APP-PLUS
226
- interval = 33;
227
- // #endif
228
- setTimeout(() => {
229
- this.updateExpanded(dataValue);
230
- }, interval);
225
+ let interval = 0;
226
+ // #ifdef APP-PLUS
227
+ interval = 33;
228
+ // #endif
229
+ setTimeout(() => {
230
+ this.updateExpanded(dataValue);
231
+ }, interval);
232
+ },
231
233
  },
232
- },
233
- });
234
+ }),
235
+ };
234
236
 
235
237
  </script>
236
238
  <style scoped src="./collapse-panel.css"></style>
@@ -12,13 +12,13 @@ export default {
12
12
  },
13
13
  /** 禁止当前面板展开,优先级大于 Collapse 的同名属性 */
14
14
  disabled: {
15
- type: Boolean,
16
- default: undefined,
15
+ type: [Boolean, null],
16
+ default: null as TdCollapsePanelProps['disabled'],
17
17
  },
18
18
  /** 当前折叠面板展开图标,优先级大于 Collapse 的同名属性 */
19
19
  expandIcon: {
20
- type: Boolean,
21
- default: undefined as TdCollapsePanelProps['expandIcon'],
20
+ type: [Boolean, null],
21
+ default: null as TdCollapsePanelProps['expandIcon'],
22
22
  },
23
23
  /** 面板头内容 */
24
24
  header: {
@@ -12,11 +12,11 @@ export interface TdCollapsePanelProps {
12
12
  /**
13
13
  * 禁止当前面板展开,优先级大于 Collapse 的同名属性
14
14
  */
15
- disabled?: boolean;
15
+ disabled?: boolean | null;
16
16
  /**
17
17
  * 当前折叠面板展开图标,优先级大于 Collapse 的同名属性
18
18
  */
19
- expandIcon?: boolean;
19
+ expandIcon?: boolean | null;
20
20
  /**
21
21
  * 面板头内容
22
22
  */
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: ColorPicker 颜色选择器
3
3
  description: 用于颜色选择,支持多种格式。
4
- spline: data
4
+ spline: form
5
5
  isComponent: true
6
6
  ---
7
7