@tdesign/uniapp 0.7.1 → 0.7.2

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 (96) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/action-sheet/action-sheet.vue +3 -5
  3. package/dist/avatar/avatar.vue +6 -6
  4. package/dist/avatar-group/avatar-group.vue +1 -3
  5. package/dist/back-top/back-top.vue +13 -15
  6. package/dist/badge/badge.vue +1 -3
  7. package/dist/button/button.vue +15 -14
  8. package/dist/calendar/README.en-US.md +1 -0
  9. package/dist/calendar/README.md +1 -0
  10. package/dist/calendar/calendar-header.vue +1 -3
  11. package/dist/calendar/calendar.vue +28 -19
  12. package/dist/calendar/props.ts +5 -0
  13. package/dist/calendar/template.vue +1 -3
  14. package/dist/calendar/type.ts +6 -0
  15. package/dist/cascader/cascader.vue +1 -3
  16. package/dist/cell/cell.vue +51 -35
  17. package/dist/cell-group/cell-group.vue +1 -3
  18. package/dist/check-tag/check-tag.vue +12 -15
  19. package/dist/checkbox/checkbox.vue +13 -15
  20. package/dist/col/col.vue +1 -3
  21. package/dist/collapse/collapse.vue +1 -3
  22. package/dist/collapse-panel/collapse-panel.vue +1 -3
  23. package/dist/color-picker/color-picker.vue +2 -4
  24. package/dist/color-picker/template.vue +1 -3
  25. package/dist/common/src/instantiationDecorator.js +6 -0
  26. package/dist/count-down/count-down.vue +2 -4
  27. package/dist/date-time-picker/date-time-picker.vue +1 -3
  28. package/dist/dialog/dialog.vue +67 -69
  29. package/dist/divider/divider.vue +1 -3
  30. package/dist/draggable/draggable.vue +1 -3
  31. package/dist/drawer/drawer.vue +1 -3
  32. package/dist/dropdown-item/dropdown-item.vue +1 -3
  33. package/dist/dropdown-menu/dropdown-menu.vue +12 -14
  34. package/dist/empty/empty.vue +1 -3
  35. package/dist/fab/fab.vue +1 -3
  36. package/dist/footer/footer.vue +1 -3
  37. package/dist/form/form.vue +1 -3
  38. package/dist/form-item/form-item.css +16 -11
  39. package/dist/form-item/form-item.vue +2 -7
  40. package/dist/grid/grid.vue +1 -3
  41. package/dist/grid-item/grid-item.vue +1 -3
  42. package/dist/guide/content.vue +1 -3
  43. package/dist/guide/guide.vue +3 -8
  44. package/dist/icon/icon.vue +1 -3
  45. package/dist/image/image.vue +1 -3
  46. package/dist/image-viewer/image-viewer.vue +27 -30
  47. package/dist/indexes/indexes.vue +5 -7
  48. package/dist/indexes-anchor/indexes-anchor.vue +1 -3
  49. package/dist/input/input.vue +31 -31
  50. package/dist/link/link.vue +25 -26
  51. package/dist/loading/loading.vue +2 -2
  52. package/dist/message/index.d.ts +1 -1
  53. package/dist/message/message.interface.ts +2 -1
  54. package/dist/message-item/message-item.vue +34 -36
  55. package/dist/mixins/page-scroll.js +1 -1
  56. package/dist/navbar/navbar.vue +46 -33
  57. package/dist/notice-bar/notice-bar.vue +24 -26
  58. package/dist/overlay/overlay.vue +5 -7
  59. package/dist/picker/picker.vue +3 -4
  60. package/dist/picker-item/picker-item.vue +2 -4
  61. package/dist/popover/popover.vue +1 -3
  62. package/dist/popup/popup.vue +1 -3
  63. package/dist/progress/progress.vue +1 -3
  64. package/dist/pull-down-refresh/pull-down-refresh.vue +13 -15
  65. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +1 -3
  66. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +1 -3
  67. package/dist/qrcode/qrcode.vue +1 -3
  68. package/dist/radio/radio.vue +17 -19
  69. package/dist/rate/rate.vue +1 -3
  70. package/dist/result/result.vue +1 -3
  71. package/dist/row/row.vue +1 -3
  72. package/dist/search/search.vue +8 -3
  73. package/dist/side-bar/side-bar.vue +1 -3
  74. package/dist/side-bar-item/side-bar-item.vue +12 -15
  75. package/dist/skeleton/skeleton.vue +2 -4
  76. package/dist/slider/slider.vue +1 -3
  77. package/dist/step-item/step-item.vue +1 -3
  78. package/dist/stepper/stepper.vue +1 -3
  79. package/dist/steps/steps.vue +1 -2
  80. package/dist/sticky/sticky.vue +1 -3
  81. package/dist/swipe-cell/swipe-cell.vue +2 -5
  82. package/dist/swiper/swiper.vue +1 -3
  83. package/dist/swiper-nav/swiper-nav.vue +1 -3
  84. package/dist/switch/switch.vue +1 -3
  85. package/dist/tab-bar/tab-bar.vue +2 -1
  86. package/dist/tab-bar-item/tab-bar-item.vue +22 -25
  87. package/dist/tab-panel/tab-panel.vue +1 -3
  88. package/dist/tabs/tabs.vue +1 -2
  89. package/dist/tag/tag.vue +23 -26
  90. package/dist/textarea/textarea.vue +1 -3
  91. package/dist/toast/toast.vue +12 -14
  92. package/dist/transition/transition.vue +1 -3
  93. package/dist/tree-select/tree-select.vue +6 -9
  94. package/dist/upload/upload.vue +1 -3
  95. package/dist/watermark/watermark.vue +1 -2
  96. package/package.json +1 -1
@@ -270,7 +270,6 @@ export default uniComponent({
270
270
  classPrefix: name,
271
271
  visible: false,
272
272
  iCurrent: -1,
273
- _steps: [],
274
273
  referenceStyle: '',
275
274
  popoverStyle: '',
276
275
  title: '',
@@ -301,7 +300,7 @@ export default uniComponent({
301
300
  },
302
301
  created() {
303
302
  that = this;
304
- this._getPlacement = this.getPlacement();
303
+ this.getPlacementResult = this.getPlacement();
305
304
  },
306
305
  mounted() {
307
306
  this.innerInit();
@@ -341,7 +340,6 @@ export default uniComponent({
341
340
  width: `${referenceWidth}px`,
342
341
  height: `${referenceHeight}px`,
343
342
  };
344
- this._steps = this.steps;
345
343
  this.visible = true;
346
344
  this.referenceStyle = styles(style);
347
345
  this.title = coalesce(step.title, '');
@@ -351,7 +349,6 @@ export default uniComponent({
351
349
  const popoverStyle = await this.placementOffset(step, style);
352
350
  this.popoverStyle = popoverStyle;
353
351
  } else {
354
- this._steps = this.steps;
355
352
  this.visible = true;
356
353
  this.title = coalesce(step.title, '');
357
354
  this.body = coalesce(step.body, '');
@@ -361,7 +358,7 @@ export default uniComponent({
361
358
  async placementOffset({ placement, offset }, place) {
362
359
  await nextTick();
363
360
  const rect = await getRect(this, `.${name}__container`);
364
- const style = this._getPlacement[placement]?.(rect, place, offset);
361
+ const style = this.getPlacementResult[placement]?.(rect, place, offset);
365
362
  return styles({ position: 'absolute', ...style });
366
363
  },
367
364
  makeButtonProps(step, mode) {
@@ -520,9 +517,7 @@ export default uniComponent({
520
517
  });
521
518
 
522
519
  </script>
523
- <style scoped>
524
- @import './guide.css';
525
- </style>
520
+ <style scoped src="./guide.css"></style>
526
521
  <style scoped lang="less">
527
522
  .t-guide__footer--dialog {
528
523
  // 适配 QQ 小程序等
@@ -116,6 +116,4 @@ export default uniComponent({
116
116
  },
117
117
  });
118
118
  </script>
119
- <style scoped>
120
- @import './icon.css';
121
- </style>
119
+ <style scoped src="./icon.css"></style>
@@ -202,6 +202,4 @@ export default uniComponent({
202
202
  },
203
203
  });
204
204
  </script>
205
- <style scoped>
206
- @import './image.css';
207
- </style>
205
+ <style scoped src="./image.css"></style>
@@ -62,20 +62,20 @@
62
62
  >
63
63
  <slot name="close-btn" />
64
64
  <block
65
- v-if="_closeBtn"
65
+ v-if="iCloseBtn"
66
66
  name="icon"
67
67
  >
68
68
  <t-icon
69
- :custom-style="_closeBtn.style || ''"
70
- :t-class="_closeBtn.tClass"
71
- :prefix="_closeBtn.prefix"
72
- :name="_closeBtn.name"
73
- :size="_closeBtn.size"
74
- :color="_closeBtn.color"
75
- :aria-hidden="!!_closeBtn.ariaHidden"
76
- :aria-label="_closeBtn.ariaLabel"
77
- :aria-role="_closeBtn.ariaRole"
78
- @click="_closeBtn.click || ''"
69
+ :custom-style="iCloseBtn.style || ''"
70
+ :t-class="iCloseBtn.tClass"
71
+ :prefix="iCloseBtn.prefix"
72
+ :name="iCloseBtn.name"
73
+ :size="iCloseBtn.size"
74
+ :color="iCloseBtn.color"
75
+ :aria-hidden="!!iCloseBtn.ariaHidden"
76
+ :aria-label="iCloseBtn.ariaLabel"
77
+ :aria-role="iCloseBtn.ariaRole"
78
+ @click="iCloseBtn.click || ''"
79
79
  />
80
80
  </block>
81
81
  </view>
@@ -93,17 +93,17 @@
93
93
  >
94
94
  <slot name="delete-btn" />
95
95
  <t-icon
96
- v-if="_deleteBtn"
97
- :custom-style="_deleteBtn.style || ''"
98
- :t-class="_deleteBtn.tClass"
99
- :prefix="_deleteBtn.prefix"
100
- :name="_deleteBtn.name"
101
- :size="_deleteBtn.size"
102
- :color="_deleteBtn.color"
103
- :aria-hidden="!!_deleteBtn.ariaHidden"
104
- :aria-label="_deleteBtn.ariaLabel"
105
- :aria-role="_deleteBtn.ariaRole"
106
- @click="_deleteBtn.click || ''"
96
+ v-if="iDeleteBtn"
97
+ :custom-style="iDeleteBtn.style || ''"
98
+ :t-class="iDeleteBtn.tClass"
99
+ :prefix="iDeleteBtn.prefix"
100
+ :name="iDeleteBtn.name"
101
+ :size="iDeleteBtn.size"
102
+ :color="iDeleteBtn.color"
103
+ :aria-hidden="!!iDeleteBtn.ariaHidden"
104
+ :aria-label="iDeleteBtn.ariaLabel"
105
+ :aria-role="iDeleteBtn.ariaRole"
106
+ @click="iDeleteBtn.click || ''"
107
107
  />
108
108
  </view>
109
109
  </view>
@@ -157,8 +157,8 @@ export default uniComponent({
157
157
  maskTop: 0,
158
158
  tools,
159
159
 
160
- _deleteBtn: null,
161
- _closeBtn: null,
160
+ iDeleteBtn: null,
161
+ iCloseBtn: null,
162
162
  dataVisible: this.visible,
163
163
  };
164
164
  },
@@ -174,14 +174,14 @@ export default uniComponent({
174
174
 
175
175
  closeBtn: {
176
176
  handler(v) {
177
- this._closeBtn = calcIcon(v, 'close');
177
+ this.iCloseBtn = calcIcon(v, 'close');
178
178
  },
179
179
  immediate: true,
180
180
  },
181
181
 
182
182
  deleteBtn: {
183
183
  handler(v) {
184
- this._deleteBtn = calcIcon(v, 'delete');
184
+ this.iDeleteBtn = calcIcon(v, 'delete');
185
185
  },
186
186
  immediate: true,
187
187
  },
@@ -311,7 +311,4 @@ export default uniComponent({
311
311
  },
312
312
  });
313
313
  </script>
314
- <style scoped>
315
- @import './image-viewer.css';
316
-
317
- </style>
314
+ <style scoped src="./image-viewer.css"></style>
@@ -89,7 +89,7 @@ export default uniComponent({
89
89
  return {
90
90
  prefix,
91
91
  classPrefix: name,
92
- _height: 0,
92
+ innerHeight: 0,
93
93
  innerIndexList: [],
94
94
  scrollTop: 0,
95
95
  activeAnchor: this.current,
@@ -110,7 +110,7 @@ export default uniComponent({
110
110
  handler(v, pre) {
111
111
  const cb = () => {
112
112
  this.setIndexList(v);
113
- this.setHeight(this._height);
113
+ this.setHeight(this.innerHeight);
114
114
  };
115
115
  if (!pre?.length) {
116
116
  // 防止抖音小程序报错
@@ -150,7 +150,7 @@ export default uniComponent({
150
150
  this.groupTop = [];
151
151
  this.sidebar = null;
152
152
 
153
- if (this._height === 0) {
153
+ if (this.innerHeight === 0) {
154
154
  this.setHeight();
155
155
  }
156
156
 
@@ -165,7 +165,7 @@ export default uniComponent({
165
165
  const { windowHeight } = systemInfo;
166
166
  height = windowHeight;
167
167
  }
168
- this._height = height;
168
+ this.innerHeight = height;
169
169
 
170
170
  setTimeout(() => {
171
171
  this.getAllRect();
@@ -366,6 +366,4 @@ export default uniComponent({
366
366
  },
367
367
  });
368
368
  </script>
369
- <style scoped>
370
- @import './indexes.css';
371
- </style>
369
+ <style scoped src="./indexes.css"></style>
@@ -68,6 +68,4 @@ export default uniComponent({
68
68
  },
69
69
  });
70
70
  </script>
71
- <style scoped>
72
- @import './indexes-anchor.css';
73
- </style>
71
+ <style scoped src="./indexes-anchor.css"></style>
@@ -9,20 +9,20 @@
9
9
  <view :class="classPrefix + '__icon--prefix'">
10
10
  <slot name="prefix-icon" />
11
11
  <block
12
- v-if="_prefixIcon"
12
+ v-if="iPrefixIcon"
13
13
  name="icon"
14
14
  >
15
15
  <t-icon
16
- :custom-style="_prefixIcon.style || ''"
16
+ :custom-style="iPrefixIcon.style || ''"
17
17
  :t-class="tClassPrefixIcon"
18
- :prefix="_prefixIcon.prefix"
19
- :name="_prefixIcon.name"
20
- :size="_prefixIcon.size"
21
- :color="_prefixIcon.color"
18
+ :prefix="iPrefixIcon.prefix"
19
+ :name="iPrefixIcon.name"
20
+ :size="iPrefixIcon.size"
21
+ :color="iPrefixIcon.color"
22
22
  :aria-hidden="true"
23
- :aria-label="_prefixIcon.ariaLabel"
24
- :aria-role="_prefixIcon.ariaRole"
25
- @click="_prefixIcon.click || ''"
23
+ :aria-label="iPrefixIcon.ariaLabel"
24
+ :aria-role="iPrefixIcon.ariaRole"
25
+ @click="iPrefixIcon.click || ''"
26
26
  />
27
27
  </block>
28
28
  </view>
@@ -81,21 +81,21 @@
81
81
  @nicknamereview="onNickNameReview"
82
82
  >
83
83
  <view
84
- v-if="_clearIcon && dataValue && dataValue.length && showClearIcon"
84
+ v-if="iClearIcon && dataValue && dataValue.length && showClearIcon"
85
85
  :class="classPrefix + '__wrap--clearable-icon'"
86
86
  @click.stop="clearInput"
87
87
  >
88
88
  <t-icon
89
- :custom-style="_clearIcon.style || ''"
89
+ :custom-style="iClearIcon.style || ''"
90
90
  :t-class="tClassClearable"
91
- :prefix="_clearIcon.prefix"
92
- :name="_clearIcon.name"
93
- :size="_clearIcon.size"
94
- :color="_clearIcon.color"
91
+ :prefix="iClearIcon.prefix"
92
+ :name="iClearIcon.name"
93
+ :size="iClearIcon.size"
94
+ :color="iClearIcon.color"
95
95
  :aria-hidden="false"
96
- :aria-label="_clearIcon.ariaLabel || '清除'"
97
- :aria-role="_clearIcon.ariaRole || 'button'"
98
- @click="_clearIcon.click || ''"
96
+ :aria-label="iClearIcon.ariaLabel || '清除'"
97
+ :aria-role="iClearIcon.ariaRole || 'button'"
98
+ @click="iClearIcon.click || ''"
99
99
  />
100
100
  </view>
101
101
  <view
@@ -113,20 +113,20 @@
113
113
  >
114
114
  <slot name="suffix-icon" />
115
115
  <block
116
- v-if="_suffixIcon"
116
+ v-if="iSuffixIcon"
117
117
  name="icon"
118
118
  >
119
119
  <t-icon
120
- :custom-style="_suffixIcon.style || ''"
120
+ :custom-style="iSuffixIcon.style || ''"
121
121
  :t-class="tClassSuffixIcon"
122
- :prefix="_suffixIcon.prefix"
123
- :name="_suffixIcon.name"
124
- :size="_suffixIcon.size"
125
- :color="_suffixIcon.color"
122
+ :prefix="iSuffixIcon.prefix"
123
+ :name="iSuffixIcon.name"
124
+ :size="iSuffixIcon.size"
125
+ :color="iSuffixIcon.color"
126
126
  :aria-hidden="true"
127
- :aria-label="_suffixIcon.ariaLabel"
128
- :aria-role="_suffixIcon.ariaRole || 'button'"
129
- @click="_suffixIcon.click || ''"
127
+ :aria-label="iSuffixIcon.ariaLabel"
128
+ :aria-role="iSuffixIcon.ariaRole || 'button'"
129
+ @click="iSuffixIcon.click || ''"
130
130
  />
131
131
  </block>
132
132
  </view>
@@ -214,21 +214,21 @@ export default uniComponent({
214
214
  watch: {
215
215
  prefixIcon: {
216
216
  handler(v) {
217
- this._prefixIcon = calcIcon(v);
217
+ this.iPrefixIcon = calcIcon(v);
218
218
  },
219
219
  immediate: true,
220
220
  },
221
221
 
222
222
  suffixIcon: {
223
223
  handler(v) {
224
- this._suffixIcon = calcIcon(v);
224
+ this.iSuffixIcon = calcIcon(v);
225
225
  },
226
226
  immediate: true,
227
227
  },
228
228
 
229
229
  clearable: {
230
230
  handler(v) {
231
- this._clearIcon = calcIcon(v, 'close-circle-filled');
231
+ this.iClearIcon = calcIcon(v, 'close-circle-filled');
232
232
  },
233
233
  immediate: true,
234
234
  },
@@ -390,8 +390,8 @@ export default uniComponent({
390
390
  });
391
391
 
392
392
  </script>
393
+ <style scoped src="./input.css"></style>
393
394
  <style scoped>
394
- @import './input.css';
395
395
  /* #ifdef H5 */
396
396
  .t-input--disabled {
397
397
  :deep(input) {
@@ -24,20 +24,20 @@
24
24
  <view :class="classPrefix + '__prefix-icon ' + tClassPrefixIcon">
25
25
  <slot name="prefix-icon" />
26
26
  <block
27
- v-if="_prefixIcon"
27
+ v-if="iPrefixIcon"
28
28
  name="icon"
29
29
  >
30
30
  <t-icon
31
- :custom-style="_prefixIcon.style || ''"
32
- :t-class="_prefixIcon.tClass"
33
- :prefix="_prefixIcon.prefix"
34
- :name="_prefixIcon.name"
35
- :size="_prefixIcon.size"
36
- :color="_prefixIcon.color"
31
+ :custom-style="iPrefixIcon.style || ''"
32
+ :t-class="iPrefixIcon.tClass"
33
+ :prefix="iPrefixIcon.prefix"
34
+ :name="iPrefixIcon.name"
35
+ :size="iPrefixIcon.size"
36
+ :color="iPrefixIcon.color"
37
37
  :aria-hidden="true"
38
- :aria-label="_prefixIcon.ariaLabel"
39
- :aria-role="_prefixIcon.arialRole"
40
- @click="_suffixIcon.click || ''"
38
+ :aria-label="iPrefixIcon.ariaLabel"
39
+ :aria-role="iPrefixIcon.arialRole"
40
+ @click="iSuffixIcon.click || ''"
41
41
  />
42
42
  </block>
43
43
  </view>
@@ -51,20 +51,20 @@
51
51
  <view :class="classPrefix + '__suffix-icon ' + tClassSuffixIcon">
52
52
  <slot name="suffix-icon" />
53
53
  <block
54
- v-if="_suffixIcon"
54
+ v-if="iSuffixIcon"
55
55
  name="icon"
56
56
  >
57
57
  <t-icon
58
- :custom-style="_suffixIcon.style || ''"
59
- :t-class="_suffixIcon.tClass"
60
- :prefix="_suffixIcon.prefix || ''"
61
- :name="_suffixIcon.name"
62
- :size="_suffixIcon.size"
63
- :color="_suffixIcon.color"
58
+ :custom-style="iSuffixIcon.style || ''"
59
+ :t-class="iSuffixIcon.tClass"
60
+ :prefix="iSuffixIcon.prefix || ''"
61
+ :name="iSuffixIcon.name"
62
+ :size="iSuffixIcon.size"
63
+ :color="iSuffixIcon.color"
64
64
  :aria-hidden="true"
65
- :aria-label="_suffixIcon.ariaLabel"
66
- :aria-role="_suffixIcon.arialRole"
67
- @click="_suffixIcon.click || ''"
65
+ :aria-label="iSuffixIcon.ariaLabel"
66
+ :aria-role="iSuffixIcon.arialRole"
67
+ @click="iSuffixIcon.click || ''"
68
68
  />
69
69
  </block>
70
70
  </view>
@@ -105,21 +105,21 @@ export default uniComponent({
105
105
  prefix,
106
106
  classPrefix: name,
107
107
  tools,
108
- _prefixIcon: null,
109
- _suffixIcon: null,
108
+ iPrefixIcon: null,
109
+ iSuffixIcon: null,
110
110
  className: '',
111
111
  };
112
112
  },
113
113
  watch: {
114
114
  prefixIcon: {
115
115
  handler(value) {
116
- this._prefixIcon = calcIcon(value);
116
+ this.iPrefixIcon = calcIcon(value);
117
117
  },
118
118
  immediate: true,
119
119
  },
120
120
  suffixIcon: {
121
121
  handler(value) {
122
- this._suffixIcon = calcIcon(value);
122
+ this.iSuffixIcon = calcIcon(value);
123
123
  },
124
124
  immediate: true,
125
125
  },
@@ -163,9 +163,8 @@ export default uniComponent({
163
163
  },
164
164
  });
165
165
  </script>
166
+ <style scoped src="./link.css"></style>
166
167
  <style scoped>
167
- @import './link.css';
168
-
169
168
  /* #ifdef H5 */
170
169
  :deep(.navigator-wrap) {
171
170
  display: flex;
@@ -142,7 +142,7 @@ export default uniComponent({
142
142
  immediate: true,
143
143
  },
144
144
  },
145
- beforeUnMount() {
145
+ beforeUnmount() {
146
146
  clearTimeout(this.timer);
147
147
  },
148
148
  methods: {
@@ -153,5 +153,5 @@ export default uniComponent({
153
153
  });
154
154
 
155
155
  </script>
156
- <style src="./loading.css" scoped>
156
+ <style src="./loading.css" scoped>
157
157
  </style>
@@ -1,7 +1,7 @@
1
1
  import { MessageProps } from './message.interface';
2
2
  declare type Context = any;
3
3
  declare type Instance = any;
4
- interface MessageActionOptionsType extends Optional<MessageProps> {
4
+ interface MessageActionOptionsType extends Partial<MessageProps> {
5
5
  context?: Context;
6
6
  selector?: string;
7
7
  }
@@ -1,3 +1,4 @@
1
+ import type { TdMessageProps } from './type';
1
2
 
2
3
  export const MessageType = {
3
4
  info: 'info',
@@ -21,7 +22,7 @@ export interface MessageProps {
21
22
  closeBtn?: boolean;
22
23
  action?: string;
23
24
  marquee?: MessageMarquee;
24
- offset?: object;
25
+ offset?: TdMessageProps['offset'];
25
26
  duration?: number;
26
27
  zIndex?: number;
27
28
  id?: string;
@@ -12,19 +12,19 @@
12
12
  <view :class="classPrefix + '__icon--left'">
13
13
  <slot name="icon" />
14
14
  <block
15
- v-if="_icon"
15
+ v-if="innerIcon"
16
16
  name="icon"
17
17
  >
18
18
  <t-icon
19
- :custom-style="_icon.style || ''"
19
+ :custom-style="innerIcon.style || ''"
20
20
  :t-class="tClassIcon"
21
- :prefix="_icon.prefix"
22
- :name="_icon.name"
23
- :size="_icon.size"
24
- :color="_icon.color"
21
+ :prefix="innerIcon.prefix"
22
+ :name="innerIcon.name"
23
+ :size="innerIcon.size"
24
+ :color="innerIcon.color"
25
25
  :aria-hidden="true"
26
- :aria-label="_icon.ariaLabel"
27
- :aria-role="_icon.ariaRole"
26
+ :aria-label="innerIcon.ariaLabel"
27
+ :aria-role="innerIcon.ariaRole"
28
28
  />
29
29
  </block>
30
30
  </view>
@@ -48,18 +48,18 @@
48
48
  </view>
49
49
  </view>
50
50
  <t-link
51
- v-if="_link && _link.content"
51
+ v-if="innerLink && innerLink.content"
52
52
  :t-class="classPrefix + '__link ' + tClassLink"
53
- :custom-style="tools._style([_link.style, _link.customStyle])"
54
- :disabled="_link.disabled || false"
55
- :hover="_link.hover || true"
56
- :theme="_link.theme || 'primary'"
57
- :size="_link.size || 'medium'"
58
- :prefix-icon="_link.prefixIcon || ''"
59
- :suffix-icon="_link.suffixIcon || ''"
60
- :underline="_link.underline || false"
61
- :content="_link.content || ''"
62
- :navigator-props="_link.navigatorProps || null"
53
+ :custom-style="tools._style([innerLink.style, innerLink.customStyle])"
54
+ :disabled="innerLink.disabled || false"
55
+ :hover="innerLink.hover || true"
56
+ :theme="innerLink.theme || 'primary'"
57
+ :size="innerLink.size || 'medium'"
58
+ :prefix-icon="innerLink.prefixIcon || ''"
59
+ :suffix-icon="innerLink.suffixIcon || ''"
60
+ :underline="innerLink.underline || false"
61
+ :content="innerLink.content || ''"
62
+ :navigator-props="innerLink.navigatorProps || null"
63
63
  @complete="handleLinkClick"
64
64
  />
65
65
  <slot name="link" />
@@ -69,19 +69,19 @@
69
69
  >
70
70
  <slot name="close-btn" />
71
71
  <block
72
- v-if="_closeBtn"
72
+ v-if="iCloseBtn"
73
73
  name="icon"
74
74
  >
75
75
  <t-icon
76
- :custom-style="_closeBtn.style || ''"
76
+ :custom-style="iCloseBtn.style || ''"
77
77
  :t-class="tClassCloseBtn"
78
- :prefix="_closeBtn.prefix"
79
- :name="_closeBtn.name"
80
- :size="_closeBtn.size"
81
- :color="_closeBtn.color"
78
+ :prefix="iCloseBtn.prefix"
79
+ :name="iCloseBtn.name"
80
+ :size="iCloseBtn.size"
81
+ :color="iCloseBtn.color"
82
82
  :aria-hidden="false"
83
- :aria-label="_closeBtn.ariaLabel || '关闭'"
84
- :aria-role="_closeBtn.ariaRole || 'button'"
83
+ :aria-label="iCloseBtn.ariaLabel || '关闭'"
84
+ :aria-role="iCloseBtn.ariaRole || 'button'"
85
85
  />
86
86
  </block>
87
87
  </view>
@@ -173,13 +173,13 @@ export default uniComponent({
173
173
  watch: {
174
174
  theme: {
175
175
  handler(theme) {
176
- this._icon = calcIcon(this.icon, THEME_ICON[theme]);
176
+ this.innerIcon = calcIcon(this.icon, THEME_ICON[theme]);
177
177
  },
178
178
  immediate: true,
179
179
  },
180
180
  icon: {
181
181
  handler(icon) {
182
- this._icon = calcIcon(icon, THEME_ICON[this.theme]);
182
+ this.innerIcon = calcIcon(icon, THEME_ICON[this.theme]);
183
183
  },
184
184
  immediate: true,
185
185
  },
@@ -187,15 +187,15 @@ export default uniComponent({
187
187
 
188
188
  link: {
189
189
  handler(v) {
190
- const _link = isObject(v) ? { ...v } : { content: v };
191
- this._link = _link;
190
+ const innerLink = isObject(v) ? { ...v } : { content: v };
191
+ this.innerLink = innerLink;
192
192
  },
193
193
  immediate: true,
194
194
  },
195
195
 
196
196
  closeBtn: {
197
197
  handler(v) {
198
- this._closeBtn = calcIcon(v, 'close');
198
+ this.iCloseBtn = calcIcon(v, 'close');
199
199
  },
200
200
  immediate: true,
201
201
  },
@@ -203,7 +203,7 @@ export default uniComponent({
203
203
  mounted() {
204
204
  this.memoInitialData();
205
205
  },
206
- beforeUnMount() {
206
+ beforeUnmount() {
207
207
  this.clearMessageAnimation();
208
208
  },
209
209
  methods: {
@@ -348,6 +348,4 @@ export default uniComponent({
348
348
  },
349
349
  });
350
350
  </script>
351
- <style scoped>
352
- @import './message-item.css';
353
- </style>
351
+ <style scoped src="./message-item.css"></style>
@@ -53,7 +53,7 @@ export default (funcName = 'onScroll', useBus = true) => {
53
53
  page.onPageScroll = onPageScroll;
54
54
  },
55
55
 
56
- beforeUnMount() {
56
+ beforeUnmount() {
57
57
  if (useBus) {
58
58
  bus.off(PAGE_SCROLL_EVENT_NAME, this[funcName]);
59
59
  return;