@tdesign/uniapp 0.7.0 → 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 (111) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/action-sheet/README.en-US.md +1 -1
  3. package/dist/action-sheet/README.md +1 -1
  4. package/dist/action-sheet/action-sheet.vue +27 -12
  5. package/dist/action-sheet/computed.js +14 -0
  6. package/dist/action-sheet/type.ts +2 -2
  7. package/dist/avatar/avatar.vue +6 -6
  8. package/dist/avatar-group/avatar-group.vue +1 -3
  9. package/dist/back-top/back-top.vue +13 -15
  10. package/dist/badge/badge.vue +1 -3
  11. package/dist/button/README.en-US.md +5 -2
  12. package/dist/button/README.md +5 -2
  13. package/dist/button/button.vue +18 -14
  14. package/dist/button/props.ts +14 -0
  15. package/dist/button/type.ts +14 -0
  16. package/dist/calendar/README.en-US.md +1 -0
  17. package/dist/calendar/README.md +1 -0
  18. package/dist/calendar/calendar-header.vue +1 -3
  19. package/dist/calendar/calendar.vue +28 -19
  20. package/dist/calendar/props.ts +5 -0
  21. package/dist/calendar/template.vue +1 -3
  22. package/dist/calendar/type.ts +6 -0
  23. package/dist/cascader/cascader.vue +9 -7
  24. package/dist/cell/cell.vue +51 -35
  25. package/dist/cell-group/cell-group.vue +1 -3
  26. package/dist/check-tag/check-tag.vue +12 -15
  27. package/dist/checkbox/checkbox.vue +13 -15
  28. package/dist/col/col.vue +1 -3
  29. package/dist/collapse/collapse.vue +1 -3
  30. package/dist/collapse-panel/collapse-panel.vue +1 -3
  31. package/dist/color-picker/color-picker.vue +2 -4
  32. package/dist/color-picker/template.vue +1 -3
  33. package/dist/common/src/instantiationDecorator.js +14 -0
  34. package/dist/common/style/theme/index.css +42 -90
  35. package/dist/count-down/count-down.vue +2 -4
  36. package/dist/date-time-picker/date-time-picker.vue +1 -3
  37. package/dist/dialog/dialog.vue +67 -69
  38. package/dist/divider/divider.vue +1 -3
  39. package/dist/draggable/draggable.vue +1 -3
  40. package/dist/drawer/drawer.vue +1 -3
  41. package/dist/dropdown-item/dropdown-item.vue +1 -3
  42. package/dist/dropdown-menu/dropdown-menu.vue +12 -14
  43. package/dist/empty/empty.vue +1 -3
  44. package/dist/fab/fab.vue +1 -3
  45. package/dist/footer/footer.vue +1 -3
  46. package/dist/form/form.vue +1 -3
  47. package/dist/form-item/form-item.css +16 -11
  48. package/dist/form-item/form-item.vue +2 -7
  49. package/dist/grid/grid.vue +1 -3
  50. package/dist/grid-item/grid-item.vue +3 -5
  51. package/dist/guide/content.vue +1 -3
  52. package/dist/guide/guide.vue +25 -40
  53. package/dist/icon/icon.vue +2 -4
  54. package/dist/image/image.vue +1 -3
  55. package/dist/image-viewer/image-viewer.vue +27 -30
  56. package/dist/indexes/indexes.vue +13 -15
  57. package/dist/indexes-anchor/indexes-anchor.vue +1 -3
  58. package/dist/input/input.vue +31 -31
  59. package/dist/link/link.vue +25 -26
  60. package/dist/loading/loading.vue +2 -2
  61. package/dist/message/index.d.ts +1 -1
  62. package/dist/message/message.interface.ts +2 -1
  63. package/dist/message-item/message-item.vue +34 -36
  64. package/dist/mixins/page-scroll.js +1 -1
  65. package/dist/navbar/navbar.vue +46 -33
  66. package/dist/notice-bar/notice-bar.vue +24 -26
  67. package/dist/overlay/overlay.vue +5 -7
  68. package/dist/picker/picker.vue +3 -4
  69. package/dist/picker-item/picker-item.vue +2 -4
  70. package/dist/popover/popover.vue +1 -3
  71. package/dist/popup/popup.vue +2 -4
  72. package/dist/progress/progress.vue +1 -3
  73. package/dist/pull-down-refresh/pull-down-refresh.vue +13 -15
  74. package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +1 -3
  75. package/dist/qrcode/components/qrcode-status/qrcode-status.vue +1 -3
  76. package/dist/qrcode/qrcode.vue +1 -3
  77. package/dist/radio/radio.vue +20 -22
  78. package/dist/rate/rate.vue +1 -3
  79. package/dist/result/result.vue +13 -15
  80. package/dist/row/row.vue +1 -3
  81. package/dist/search/README.en-US.md +1 -1
  82. package/dist/search/README.md +1 -1
  83. package/dist/search/search.vue +22 -10
  84. package/dist/search/type.ts +1 -1
  85. package/dist/side-bar/side-bar.vue +1 -3
  86. package/dist/side-bar-item/side-bar-item.vue +12 -15
  87. package/dist/skeleton/skeleton.vue +2 -4
  88. package/dist/slider/slider.vue +18 -20
  89. package/dist/step-item/step-item.vue +1 -3
  90. package/dist/stepper/stepper.vue +1 -3
  91. package/dist/steps/steps.vue +1 -2
  92. package/dist/sticky/sticky.vue +1 -3
  93. package/dist/swipe-cell/swipe-cell.vue +2 -5
  94. package/dist/swiper/swiper.vue +1 -3
  95. package/dist/swiper-nav/swiper-nav.vue +1 -3
  96. package/dist/switch/switch.vue +1 -3
  97. package/dist/tab-bar/tab-bar.vue +2 -1
  98. package/dist/tab-bar-item/tab-bar-item.vue +22 -25
  99. package/dist/tab-panel/tab-panel.vue +1 -3
  100. package/dist/tabs/tabs.vue +1 -2
  101. package/dist/tag/tag.vue +23 -26
  102. package/dist/textarea/textarea.vue +1 -3
  103. package/dist/toast/toast.vue +12 -14
  104. package/dist/transition/transition.vue +1 -3
  105. package/dist/tree-select/tree-select.vue +6 -9
  106. package/dist/upload/props.ts +1 -1
  107. package/dist/upload/upload.vue +1 -3
  108. package/dist/watermark/watermark.vue +1 -2
  109. package/package.json +3 -1
  110. package/dist/.eslintrc.js +0 -30
  111. package/dist/tsconfig.eslint.json +0 -13
@@ -5,8 +5,8 @@
5
5
  align-items: flex-start;
6
6
  justify-content: var(--td-form-item-justify-content, space-between);
7
7
  width: 100%;
8
- padding: var(--td-form-item-horizontal-padding, 32rpx) var(--td-form-item-vertical-padding, 32rpx);
9
- background-color: #ffffff;
8
+ padding: var(--td-form-item-vertical-padding, 32rpx) var(--td-form-item-horizontal-padding, 32rpx);
9
+ background-color: var(--td-form-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
10
10
  --td-input-vertical-padding: 0rpx;
11
11
  --td-textarea-vertical-padding: 0rpx;
12
12
  --td-textarea-horizontal-padding: 0rpx;
@@ -60,13 +60,6 @@
60
60
  .t-form-item__controls {
61
61
  flex: 1;
62
62
  width: 100%;
63
- margin-top: 8rpx;
64
- }
65
- .t-form-item__controls--left {
66
- text-align: left;
67
- }
68
- .t-form-item__controls--right {
69
- text-align: right;
70
63
  }
71
64
  .t-form-item__controls-content {
72
65
  width: 100%;
@@ -74,11 +67,23 @@
74
67
  align-items: center;
75
68
  justify-content: space-between;
76
69
  }
70
+ .t-form-item__controls-content--left {
71
+ justify-content: flex-start;
72
+ }
73
+ .t-form-item__controls-content--right {
74
+ justify-content: flex-end;
75
+ }
77
76
  .t-form-item__help {
78
- font-size: var(--td-font-size-m, 32rpx);
79
- color: var(--td-font-gray-1, rgba(0, 0, 0, 0.9));
77
+ font-size: var(--td-font-size-s, 24rpx);
78
+ color: var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26)));
80
79
  line-height: 1.4;
81
80
  }
81
+ .t-form-item__help--left {
82
+ text-align: left;
83
+ }
84
+ .t-form-item__help--right {
85
+ text-align: right;
86
+ }
82
87
  .t-form-item__desc-link {
83
88
  margin-top: 8rpx;
84
89
  color: var(--td-primary-color-7, #0052d9);
@@ -169,13 +169,10 @@ export default uniComponent({
169
169
  created() {
170
170
  // this.initFormItem();
171
171
  },
172
- onBeforeUnmount() {
172
+ beforeUnmount() {
173
173
  if (this.form) {
174
174
  this.form.unregisterChild(this.name);
175
175
  }
176
- },
177
- mounted() {
178
-
179
176
  },
180
177
  methods: {
181
178
  innerAfterLinked() {
@@ -391,6 +388,4 @@ export default uniComponent({
391
388
  },
392
389
  });
393
390
  </script>
394
- <style scoped>
395
- @import './form-item.css';
396
- </style>
391
+ <style scoped src="./form-item.css"></style>
@@ -89,6 +89,4 @@ export default uniComponent({
89
89
  },
90
90
  });
91
91
  </script>
92
- <style scoped>
93
- @import './grid.css';
94
- </style>
92
+ <style scoped src="./grid.css"></style>
@@ -60,8 +60,8 @@
60
60
  :webp="imageProps.webp"
61
61
  :show-menu-by-longpress="imageProps.showMenuByLongpress"
62
62
  :data-custom="imageProps.dataset"
63
- @error="binderror($event, { custom: dataset || null })"
64
- @load="bindload($event, { custom: dataset || null })"
63
+ @error="binderror($event)"
64
+ @load="bindload($event)"
65
65
  />
66
66
  </block>
67
67
  <slot name="image" />
@@ -281,9 +281,7 @@ export default uniComponent({
281
281
  },
282
282
  });
283
283
  </script>
284
- <style scoped>
285
- @import './grid-item.css';
286
- </style>
284
+ <style scoped src="./grid-item.css"></style>
287
285
  <style scoped>
288
286
  .t-grid-item__content--left {
289
287
  width: 100%;
@@ -320,6 +320,4 @@ export default {
320
320
  },
321
321
  };
322
322
  </script>
323
- <style scoped>
324
- @import './guide.css';
325
- </style>
323
+ <style scoped src="./guide.css"></style>
@@ -20,7 +20,7 @@
20
20
  <ContentComp
21
21
  :title="title"
22
22
  :body="body"
23
- :current="_current"
23
+ :current="iCurrent"
24
24
  :class-prefix="classPrefix"
25
25
  :prefix="prefix"
26
26
  :skip-button="skipButton"
@@ -120,7 +120,7 @@
120
120
  <ContentComp
121
121
  :title="title"
122
122
  :body="body"
123
- :current="_current"
123
+ :current="iCurrent"
124
124
  :class-prefix="classPrefix"
125
125
  :prefix="prefix"
126
126
  :skip-button="skipButton"
@@ -269,8 +269,7 @@ export default uniComponent({
269
269
  prefix,
270
270
  classPrefix: name,
271
271
  visible: false,
272
- _current: -1,
273
- _steps: [],
272
+ iCurrent: -1,
274
273
  referenceStyle: '',
275
274
  popoverStyle: '',
276
275
  title: '',
@@ -287,33 +286,31 @@ export default uniComponent({
287
286
  watch: {
288
287
  steps: {
289
288
  handler() {
290
- this._init();
289
+ this.innerInit();
291
290
  },
292
291
  deep: true,
293
292
  },
294
293
  current: {
295
294
  handler(v) {
296
- this._current = v;
295
+ this.iCurrent = v;
297
296
  },
298
297
  },
299
- _current: '_init',
300
- showOverlay: '_init',
298
+ iCurrent: 'innerInit',
299
+ showOverlay: 'innerInit',
301
300
  },
302
301
  created() {
303
302
  that = this;
304
- // this._init =
305
- this._getPlacement = this.getPlacement();
303
+ this.getPlacementResult = this.getPlacement();
306
304
  },
307
305
  mounted() {
308
- this._init();
306
+ this.innerInit();
309
307
  },
310
308
  methods: {
311
- _init: debounce(() => that.init(), 20),
309
+ innerInit: debounce(() => that.init(), 20),
312
310
  async init() {
313
- console.log('doing init');
314
311
  const { steps } = this;
315
- const { _current } = this;
316
- const step = steps[_current];
312
+ const { iCurrent } = this;
313
+ const step = steps[iCurrent];
317
314
  if (!step) {
318
315
  this.visible = false;
319
316
  return;
@@ -325,10 +322,9 @@ export default uniComponent({
325
322
  this.modeType = modeType;
326
323
 
327
324
 
328
- // if (current === _current) return;
329
325
  if (modeType === 'popover') {
330
326
  const rect = await step.element();
331
- console.log('rect', rect);
327
+
332
328
  if (!rect) return;
333
329
  const highlightPadding = rpx2px(coalesce(step.highlightPadding, this.highlightPadding));
334
330
  const referenceTop = rect.top - highlightPadding;
@@ -344,8 +340,6 @@ export default uniComponent({
344
340
  width: `${referenceWidth}px`,
345
341
  height: `${referenceHeight}px`,
346
342
  };
347
- this._steps = this.steps;
348
- // this._current = this.current;
349
343
  this.visible = true;
350
344
  this.referenceStyle = styles(style);
351
345
  this.title = coalesce(step.title, '');
@@ -355,8 +349,6 @@ export default uniComponent({
355
349
  const popoverStyle = await this.placementOffset(step, style);
356
350
  this.popoverStyle = popoverStyle;
357
351
  } else {
358
- this._steps = this.steps;
359
- // this._current = this.current;
360
352
  this.visible = true;
361
353
  this.title = coalesce(step.title, '');
362
354
  this.body = coalesce(step.body, '');
@@ -366,7 +358,7 @@ export default uniComponent({
366
358
  async placementOffset({ placement, offset }, place) {
367
359
  await nextTick();
368
360
  const rect = await getRect(this, `.${name}__container`);
369
- const style = this._getPlacement[placement]?.(rect, place, offset);
361
+ const style = this.getPlacementResult[placement]?.(rect, place, offset);
370
362
  return styles({ position: 'absolute', ...style });
371
363
  },
372
364
  makeButtonProps(step, mode) {
@@ -422,9 +414,9 @@ export default uniComponent({
422
414
  this.finishButton = finishButton;
423
415
  },
424
416
  renderCounter() {
425
- const { steps, _current, counter } = this;
417
+ const { steps, iCurrent, counter } = this;
426
418
  const stepsTotal = steps.length;
427
- const innerCurrent = _current + 1;
419
+ const innerCurrent = iCurrent + 1;
428
420
  const popupSlotCounter = isFunction(counter) ? counter({ total: stepsTotal, current: innerCurrent }) : counter;
429
421
  return counter ? popupSlotCounter : `(${innerCurrent}/${stepsTotal})`;
430
422
  },
@@ -433,34 +425,29 @@ export default uniComponent({
433
425
  return `${button.content.replace(/ \(.*?\)/, '')} ${hideCounter ? '' : this.renderCounter()}`;
434
426
  },
435
427
  onTplButtonTap(e, { type }) {
436
- console.log('onTplButtonTap.type', type);
437
- const params = { e, current: this._current, total: this.steps.length };
428
+ const params = { e, current: this.iCurrent, total: this.steps.length };
438
429
  switch (type) {
439
430
  case 'next':
440
- this.$emit('next-step-click', { next: this._current + 1, ...params });
441
- // this.setData({ current: this..current + 1 });
442
- this._current = this._current + 1;
431
+ this.$emit('next-step-click', { next: this.iCurrent + 1, ...params });
432
+ this.iCurrent = this.iCurrent + 1;
443
433
  break;
444
434
  case 'skip':
445
435
  this.$emit('skip', params);
446
- // this.setData({ current: -1 });
447
- this._current = -1;
436
+ this.iCurrent = -1;
448
437
  break;
449
438
  case 'back':
450
439
  this.$emit('back', params);
451
- // this.setData({ current: 0 });
452
- this._current = 0;
440
+ this.iCurrent = 0;
453
441
  break;
454
442
  case 'finish':
455
443
  this.$emit('finish', params);
456
- // this.setData({ current: -1 });
457
- this._current = -1;
444
+ this.iCurrent = -1;
458
445
  break;
459
446
  default:
460
447
  break;
461
448
  }
462
- console.log('_current', this._current);
463
- this.$emit('change', { current: this._current });
449
+
450
+ this.$emit('change', { current: this.iCurrent });
464
451
  },
465
452
  getPlacement() {
466
453
  const space = rpx2px(32);
@@ -530,9 +517,7 @@ export default uniComponent({
530
517
  });
531
518
 
532
519
  </script>
533
- <style scoped>
534
- @import './guide.css';
535
- </style>
520
+ <style scoped src="./guide.css"></style>
536
521
  <style scoped lang="less">
537
522
  .t-guide__footer--dialog {
538
523
  // 适配 QQ 小程序等
@@ -88,7 +88,7 @@ export default uniComponent({
88
88
  classPrefix,
89
89
  } = this;
90
90
  const isImage = name.indexOf('/') !== -1;
91
- const sizeValue = addUnit(size);
91
+ const sizeValue = size !== null && size !== '' ? addUnit(size) : undefined;
92
92
  const colorStyle = color ? {
93
93
  color,
94
94
  } : {};
@@ -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>
@@ -12,7 +12,7 @@
12
12
  @touchend.stop.prevent="onTouchEnd"
13
13
  >
14
14
  <view
15
- v-for="(item, index) in _indexList"
15
+ v-for="(item, index) in innerIndexList"
16
16
  :key="index"
17
17
  :class="tools.cls(classPrefix + '__sidebar-item', [['active', dataCurrent === item]]) + ' ' + tClassSidebarItem"
18
18
  :data-index="index"
@@ -89,8 +89,8 @@ export default uniComponent({
89
89
  return {
90
90
  prefix,
91
91
  classPrefix: name,
92
- _height: 0,
93
- _indexList: [],
92
+ innerHeight: 0,
93
+ innerIndexList: [],
94
94
  scrollTop: 0,
95
95
  activeAnchor: this.current,
96
96
  showTips: false,
@@ -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();
@@ -181,9 +181,9 @@ export default uniComponent({
181
181
  alphabet.push(String.fromCharCode(i));
182
182
  }
183
183
 
184
- this._indexList = alphabet;
184
+ this.innerIndexList = alphabet;
185
185
  } else {
186
- this._indexList = list;
186
+ this.innerIndexList = list;
187
187
  }
188
188
  },
189
189
 
@@ -194,7 +194,7 @@ export default uniComponent({
194
194
  item.totalHeight = (next?.top || Infinity) - item.top;
195
195
  });
196
196
 
197
- const current = this.dataCurrent || this._indexList[0];
197
+ const current = this.dataCurrent || this.innerIndexList[0];
198
198
  this.setAnchorByCurrent(current, 'init');
199
199
  })
200
200
  .catch((err) => {
@@ -221,7 +221,7 @@ export default uniComponent({
221
221
  getSidebarRect() {
222
222
  getRect(this, `#id-${name}__bar`).then((rect) => {
223
223
  const { top, height } = rect;
224
- const { length } = this._indexList;
224
+ const { length } = this.innerIndexList;
225
225
 
226
226
  this.sidebar = {
227
227
  top,
@@ -288,7 +288,7 @@ export default uniComponent({
288
288
  onAnchorTouch: throttle(function (e) {
289
289
  const getAnchorIndex = (clientY) => {
290
290
  const offsetY = clientY - this.sidebar.top;
291
- const max = this._indexList.length - 1;
291
+ const max = this.innerIndexList.length - 1;
292
292
 
293
293
  if (offsetY <= 0) {
294
294
  return 0;
@@ -302,7 +302,7 @@ export default uniComponent({
302
302
  };
303
303
  const index = getAnchorIndex(e.changedTouches[0].clientY);
304
304
 
305
- this.setAnchorByCurrent(this._indexList[index], 'touch');
305
+ this.setAnchorByCurrent(this.innerIndexList[index], 'touch');
306
306
  }, 1000 / 30), // 30 frame
307
307
 
308
308
  setAnchorOnScroll(scrollTop) {
@@ -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) {