@didaoktv/didaoui-uniapp 1.2.2 → 1.3.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 (75) hide show
  1. package/README.md +59 -0
  2. package/components/dd-action-sheet/dd-action-sheet.vue +7 -7
  3. package/components/dd-alert/dd-alert.vue +16 -16
  4. package/components/dd-backtop/dd-backtop.vue +3 -3
  5. package/components/dd-badge/dd-badge.vue +10 -10
  6. package/components/dd-bill-detail/dd-bill-detail.vue +20 -20
  7. package/components/dd-button/dd-button.vue +12 -12
  8. package/components/dd-calendar/dd-calendar.vue +21 -21
  9. package/components/dd-capsule-button/dd-capsule-button.vue +5 -5
  10. package/components/dd-car-keyboard/dd-car-keyboard.vue +8 -8
  11. package/components/dd-card/dd-card.vue +9 -9
  12. package/components/dd-cascader/dd-cascader.vue +3 -3
  13. package/components/dd-cell/dd-cell.vue +9 -9
  14. package/components/dd-cell-group/dd-cell-group.vue +4 -4
  15. package/components/dd-champion-card/dd-champion-card.vue +8 -8
  16. package/components/dd-checkbox/dd-checkbox.vue +8 -8
  17. package/components/dd-collapse/dd-collapse.vue +1 -1
  18. package/components/dd-collapse-item/dd-collapse-item.vue +6 -6
  19. package/components/dd-count-down/dd-count-down.vue +1 -1
  20. package/components/dd-coupon/dd-coupon.vue +53 -53
  21. package/components/dd-cropper/dd-cropper.vue +57 -40
  22. package/components/dd-date-picker/dd-date-picker.vue +7 -7
  23. package/components/dd-dialog/dd-dialog.vue +12 -12
  24. package/components/dd-divider/dd-divider.vue +2 -2
  25. package/components/dd-drawer/dd-drawer.vue +7 -7
  26. package/components/dd-dropdown-item/dd-dropdown-item.vue +3 -3
  27. package/components/dd-dropdown-menu/dd-dropdown-menu.vue +3 -3
  28. package/components/dd-empty-state/dd-empty-state.vue +5 -5
  29. package/components/dd-feature-grid/dd-feature-grid.vue +3 -3
  30. package/components/dd-field/dd-field.vue +18 -18
  31. package/components/dd-goods-sku/dd-goods-sku.vue +14 -14
  32. package/components/dd-icon/dd-icon.vue +1 -1
  33. package/components/dd-image/dd-image.vue +5 -5
  34. package/components/dd-input/dd-input.vue +9 -9
  35. package/components/dd-keyboard/dd-keyboard.vue +5 -5
  36. package/components/dd-list-cell/dd-list-cell.vue +8 -8
  37. package/components/dd-loading/dd-loading.vue +4 -4
  38. package/components/dd-loadmore/dd-loadmore.vue +1 -1
  39. package/components/dd-mini-program-navbar/dd-mini-program-navbar.vue +7 -7
  40. package/components/dd-modal/dd-modal.vue +11 -11
  41. package/components/dd-navigation/dd-navigation.vue +6 -6
  42. package/components/dd-number-keyboard/dd-number-keyboard.vue +6 -6
  43. package/components/dd-picker/dd-picker.vue +8 -8
  44. package/components/dd-popover/dd-popover.vue +4 -4
  45. package/components/dd-popover-item/dd-popover-item.vue +2 -2
  46. package/components/dd-popup/dd-popup.vue +4 -4
  47. package/components/dd-progress/dd-progress.vue +5 -5
  48. package/components/dd-pull-refresh/dd-pull-refresh.vue +4 -4
  49. package/components/dd-radio/dd-radio.vue +5 -5
  50. package/components/dd-room-card/dd-room-card.vue +26 -26
  51. package/components/dd-search-bar/dd-search-bar.vue +11 -11
  52. package/components/dd-segmented-tab/dd-segmented-tab.vue +7 -7
  53. package/components/dd-signature/dd-signature.vue +6 -6
  54. package/components/dd-skeleton/dd-skeleton.vue +2 -2
  55. package/components/dd-slider/dd-slider.vue +6 -6
  56. package/components/dd-stat-card/dd-stat-card.vue +9 -9
  57. package/components/dd-step/dd-step.vue +2 -2
  58. package/components/dd-stepper/dd-stepper.vue +7 -7
  59. package/components/dd-swipe/dd-swipe.vue +1 -1
  60. package/components/dd-swipe-action/dd-swipe-action.vue +3 -3
  61. package/components/dd-swipeable-tab/dd-swipeable-tab.vue +5 -5
  62. package/components/dd-switch/dd-switch.vue +4 -4
  63. package/components/dd-tabbar/dd-tabbar.vue +2 -2
  64. package/components/dd-tabbar-item/dd-tabbar-item.vue +2 -2
  65. package/components/dd-tag/dd-tag.vue +33 -33
  66. package/components/dd-text/dd-text.vue +11 -11
  67. package/components/dd-toast/dd-toast.vue +5 -5
  68. package/components/dd-top-navbar/dd-top-navbar.vue +4 -4
  69. package/components/dd-upload/dd-upload.vue +6 -6
  70. package/components/dd-workorder-card/dd-workorder-card.vue +17 -17
  71. package/package.json +2 -1
  72. package/scss/_mixins.scss +11 -11
  73. package/scss/_theme-tokens.scss +183 -0
  74. package/scss/_variables.scss +298 -250
  75. package/scss/theme.scss +36 -0
@@ -355,6 +355,8 @@
355
355
  expWidth = this.expWidth,
356
356
  expHeight = this.expHeight;
357
357
 
358
+ // 立即模式画布:清掉裁剪大图再画导出小图,防止透明像素透出底图
359
+ ctxCanvas.clearRect(0, 0, this.windowWidth, this.windowHeight);
358
360
  await ctxCanvas.drawImage(r, 0, 0, expWidth, expHeight);
359
361
  ctxCanvas.draw(false, () => {
360
362
  ctxCanvas.toTempFilePath({
@@ -444,6 +446,8 @@
444
446
  expWidth = this.expWidth,
445
447
  expHeight = this.expHeight;
446
448
 
449
+ // 立即模式画布:清掉裁剪大图再画导出小图,防止透明像素透出底图
450
+ ctxCanvas.clearRect(0, 0, this.windowWidth, this.windowHeight);
447
451
  await ctxCanvas.drawImage(r, 0, 0, expWidth, expHeight);
448
452
  ctxCanvas.draw(false, () => {
449
453
  ctxCanvas.toTempFilePath({
@@ -570,14 +574,17 @@
570
574
  this.useHeight = useHeight;
571
575
 
572
576
  let style = this.selStyle,
573
- left = parseInt(style.left),
574
- top = parseInt(style.top),
575
- width = parseInt(style.width),
576
- height = parseInt(style.height),
577
- ctxCanvas = this.ctxCanvas,
578
- ctxCanvasOper = this.ctxCanvasOper;
577
+ left = parseInt(style.left),
578
+ top = parseInt(style.top),
579
+ width = parseInt(style.width),
580
+ height = parseInt(style.height),
581
+ ctxCanvas = this.ctxCanvas,
582
+ ctxCanvasOper = this.ctxCanvasOper;
579
583
 
580
- ctxCanvasOper.setLineWidth(3);
584
+ // H5/小程序 type=2d 为立即模式画布,重绘遮罩前须清掉上一帧,否则拖控制点时遮罩残留
585
+ ctxCanvasOper.clearRect(0, 0, this.windowWidth, this.windowHeight);
586
+
587
+ ctxCanvasOper.setLineWidth(3);
581
588
  ctxCanvasOper.setStrokeStyle('grey');
582
589
  ctxCanvasOper.setGlobalAlpha(0.4);
583
590
  ctxCanvasOper.setFillStyle('black');
@@ -627,22 +634,30 @@
627
634
  this.$emit("avtinit");
628
635
  },
629
636
  async drawImage() {
630
- await this.initCanvasRefs();
631
- let tm_now = Date.now();
632
- if (tm_now - this.drawTm < 20) return;
633
- this.drawTm = tm_now;
634
- let ctxCanvas = this.ctxCanvas;
635
- if (this.fillColor && this.fillColor !== 'transparent') {
636
- ctxCanvas.fillRect(0, 0, this.windowWidth, this.windowHeight - tabHeight);
637
- }
638
- ctxCanvas.save();
639
- ctxCanvas.translate(this.posWidth + this.useWidth / 2, this.posHeight + this.useHeight / 2);
640
- ctxCanvas.scale(this.scaleSize, this.scaleSize);
641
- ctxCanvas.rotate(this.rotateDeg * Math.PI / 180);
642
- await ctxCanvas.drawImage(this.imgPath, -this.useWidth / 2, -this.useHeight / 2, this.useWidth, this.useHeight);
643
- ctxCanvas.restore();
644
- ctxCanvas.draw(false);
645
- },
637
+ await this.initCanvasRefs();
638
+ let tm_now = Date.now();
639
+ if (tm_now - this.drawTm < 20) return;
640
+ this.drawTm = tm_now;
641
+ let ctxCanvas = this.ctxCanvas;
642
+ // 图片对象先取回(dd-canvas 内部有缓存,二次绘制走同步路径);
643
+ // 加载期间若新帧已触发(token 失配)则丢弃本帧,避免旧帧续体把图片画回旧位置
644
+ const token = this._drawToken = (this._drawToken || 0) + 1;
645
+ const image = await ctxCanvas.loadImage(this.imgPath).catch(() => null);
646
+ if (!image || token !== this._drawToken) return;
647
+ // H5/小程序 type=2d 为立即模式画布,ctx.draw() 在 dd-canvas 内是 no-op,
648
+ // 上一帧像素不会自动清空——拖动残影的根因,每帧必须先 clearRect
649
+ ctxCanvas.clearRect(0, 0, this.windowWidth, this.windowHeight);
650
+ if (this.fillColor && this.fillColor !== 'transparent') {
651
+ ctxCanvas.fillRect(0, 0, this.windowWidth, this.windowHeight - tabHeight);
652
+ }
653
+ ctxCanvas.save();
654
+ ctxCanvas.translate(this.posWidth + this.useWidth / 2, this.posHeight + this.useHeight / 2);
655
+ ctxCanvas.scale(this.scaleSize, this.scaleSize);
656
+ ctxCanvas.rotate(this.rotateDeg * Math.PI / 180);
657
+ ctxCanvas.drawImage(image, -this.useWidth / 2, -this.useHeight / 2, this.useWidth, this.useHeight);
658
+ ctxCanvas.restore();
659
+ ctxCanvas.draw(false);
660
+ },
646
661
  hideImg() {
647
662
  this.prvImg = '';
648
663
  this.prvTop = '-10000px';
@@ -681,23 +696,25 @@
681
696
  this.prvImgTmp = r = r.tempFilePath;
682
697
 
683
698
  let ctxCanvasPrv = this.ctxCanvasPrv,
684
- prvX = this.windowWidth,
685
- prvY = parseInt(this.cvsStyleHeight),
686
- prvWidth = parseInt(this.selStyle.width),
687
- prvHeight = parseInt(this.selStyle.height),
688
- useWidth = prvX - 40,
689
- useHeight = prvY - 80,
690
- radio = useWidth / prvWidth,
691
- rHeight = prvHeight * radio;
692
- if (rHeight < useHeight) {
693
- prvWidth = useWidth;
694
- prvHeight = rHeight;
695
- } else {
696
- radio = useHeight / prvHeight;
697
- prvWidth *= radio;
698
- prvHeight = useHeight;
699
- }
700
- if (this.fillColor && this.fillColor !== 'transparent') {
699
+ prvX = this.windowWidth,
700
+ prvY = parseInt(this.cvsStyleHeight),
701
+ prvWidth = parseInt(this.selStyle.width),
702
+ prvHeight = parseInt(this.selStyle.height),
703
+ useWidth = prvX - 40,
704
+ useHeight = prvY - 80,
705
+ radio = useWidth / prvWidth,
706
+ rHeight = prvHeight * radio;
707
+ // 立即模式画布:清掉上一次预览的残影再画新帧
708
+ ctxCanvasPrv.clearRect(0, 0, this.windowWidth, this.windowHeight);
709
+ if (rHeight < useHeight) {
710
+ prvWidth = useWidth;
711
+ prvHeight = rHeight;
712
+ } else {
713
+ radio = useHeight / prvHeight;
714
+ prvWidth *= radio;
715
+ prvHeight = useHeight;
716
+ }
717
+ if (this.fillColor && this.fillColor !== 'transparent') {
701
718
  ctxCanvasPrv.setFillStyle(this.fillColor);
702
719
  ctxCanvasPrv.fillRect(0, 0, prvX, prvY);
703
720
  ctxCanvasPrv.fillRect(x, y, width, height);
@@ -187,7 +187,7 @@ function onConfirm() {
187
187
  position: fixed;
188
188
  inset: 0;
189
189
  z-index: $dd-z-index-overlay;
190
- background: $dd-color-overlay-strong;
190
+ background: var(--dd-color-overlay-strong, #{$dd-color-overlay-strong});
191
191
  opacity: 0;
192
192
  pointer-events: none;
193
193
  @include dd-transition(opacity 0.3s);
@@ -199,7 +199,7 @@ function onConfirm() {
199
199
  right: 0;
200
200
  bottom: 0;
201
201
  z-index: $dd-z-index-popup;
202
- background: $dd-neutral-800;
202
+ background: var(--dd-bg-elevated, #{$dd-bg-elevated});
203
203
  border-radius: $dd-radius-2xl $dd-radius-2xl 0 0;
204
204
  transform: translateY(100%);
205
205
  @include dd-transition(transform 0.3s);
@@ -218,22 +218,22 @@ function onConfirm() {
218
218
  @include dd-flex-between;
219
219
  height: 96rpx;
220
220
  padding: 0 32rpx;
221
- @include dd-hairline-bottom($dd-border-default);
221
+ @include dd-hairline-bottom(var(--dd-border-default, #{$dd-border-default}));
222
222
  }
223
223
  &__cancel {
224
224
  font-size: 28rpx;
225
- color: $dd-text-secondary;
225
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
226
226
  }
227
227
  &__title {
228
228
  font-size: 32rpx;
229
229
  font-weight: 600;
230
- color: $dd-text-primary;
230
+ color: var(--dd-text-primary, #{$dd-text-primary});
231
231
  @include dd-ellipsis(1);
232
232
  }
233
233
  &__confirm {
234
234
  font-size: 28rpx;
235
235
  font-weight: 600;
236
- color: $dd-primary-400;
236
+ color: var(--dd-primary-400, #{$dd-primary-400});
237
237
  }
238
238
 
239
239
  &__wheels {
@@ -247,7 +247,7 @@ function onConfirm() {
247
247
  }
248
248
  &__item-text {
249
249
  font-size: 32rpx;
250
- color: $dd-text-primary;
250
+ color: var(--dd-text-primary, #{$dd-text-primary});
251
251
  }
252
252
  }
253
253
  </style>
@@ -145,7 +145,7 @@ function onCancel() {
145
145
  &__mask {
146
146
  position: fixed;
147
147
  inset: 0;
148
- background: $dd-color-overlay-strong;
148
+ background: var(--dd-color-overlay-strong, #{$dd-color-overlay-strong});
149
149
  opacity: 0;
150
150
  visibility: hidden;
151
151
  z-index: 2000;
@@ -165,10 +165,10 @@ function onCancel() {
165
165
  opacity: 0;
166
166
  visibility: hidden;
167
167
  z-index: 2001;
168
- background: $dd-bg-elevated;
169
- border: 1px solid $dd-border-default;
168
+ background: var(--dd-bg-elevated, #{$dd-bg-elevated});
169
+ border: 1px solid var(--dd-border-default, #{$dd-border-default});
170
170
  border-radius: $dd-radius-lg;
171
- box-shadow: $dd-shadow-4;
171
+ box-shadow: var(--dd-shadow-4, #{$dd-shadow-4});
172
172
  overflow: hidden;
173
173
  @include dd-transition(transform 0.3s ease, opacity 0.3s ease, visibility 0.3s);
174
174
 
@@ -187,7 +187,7 @@ function onCancel() {
187
187
  &__title {
188
188
  font-size: $dd-font-size-h4;
189
189
  font-weight: $dd-font-weight-h4;
190
- color: $dd-text-primary;
190
+ color: var(--dd-text-primary, #{$dd-text-primary});
191
191
  line-height: 1.3;
192
192
  }
193
193
 
@@ -202,14 +202,14 @@ function onCancel() {
202
202
 
203
203
  &__message {
204
204
  font-size: $dd-font-size-body;
205
- color: $dd-text-secondary;
205
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
206
206
  line-height: $dd-line-height-body;
207
207
  }
208
208
 
209
209
  &__footer {
210
210
  &--default {
211
211
  display: flex;
212
- border-top: 1px solid $dd-border-subtle;
212
+ border-top: 1px solid var(--dd-border-subtle, #{$dd-border-subtle});
213
213
  }
214
214
 
215
215
  &--round-button {
@@ -226,14 +226,14 @@ function onCancel() {
226
226
  height: 96rpx;
227
227
 
228
228
  &--cancel {
229
- border-right: 1px solid $dd-border-subtle;
229
+ border-right: 1px solid var(--dd-border-subtle, #{$dd-border-subtle});
230
230
  }
231
231
  }
232
232
 
233
233
  &__btn-text {
234
234
  font-size: $dd-font-size-body;
235
235
  font-weight: 500;
236
- color: $dd-text-secondary;
236
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
237
237
  }
238
238
 
239
239
  &__pill {
@@ -243,18 +243,18 @@ function onCancel() {
243
243
  @include dd-transition(background 0.2s ease);
244
244
 
245
245
  &--cancel {
246
- background: $dd-surface-container;
246
+ background: var(--dd-surface-container, #{$dd-surface-container});
247
247
  }
248
248
 
249
249
  &--confirm {
250
- background: $dd-primary-500;
250
+ background: var(--dd-primary, #{$dd-primary});
251
251
  }
252
252
  }
253
253
 
254
254
  &__pill-text {
255
255
  font-size: $dd-font-size-body;
256
256
  font-weight: 600;
257
- color: $dd-text-secondary;
257
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
258
258
 
259
259
  &--confirm {
260
260
  color: $dd-color-white;
@@ -59,14 +59,14 @@ const effectiveHairline = computed(() => props.hairline || props.dashed)
59
59
  &__content {
60
60
  flex: none;
61
61
  padding: 0 $dd-space-2;
62
- color: $dd-text-tertiary;
62
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
63
63
  font-size: $dd-font-size-caption;
64
64
  line-height: $dd-line-height-caption;
65
65
  }
66
66
 
67
67
  &__line {
68
68
  flex: 1;
69
- border-top-color: $dd-border-default;
69
+ border-top-color: var(--dd-border-default, #{$dd-border-default});
70
70
 
71
71
  &--left {
72
72
  flex: 1;
@@ -98,7 +98,7 @@ function onMaskClick() {
98
98
  .dd-drawer__mask {
99
99
  position: fixed;
100
100
  inset: 0;
101
- background: $dd-glass-bg;
101
+ background: var(--dd-glass-bg, #{$dd-glass-bg});
102
102
  backdrop-filter: blur(8px);
103
103
  -webkit-backdrop-filter: blur(8px);
104
104
  opacity: 0;
@@ -118,7 +118,7 @@ function onMaskClick() {
118
118
  bottom: 0;
119
119
  display: flex;
120
120
  flex-direction: column;
121
- background: $dd-surface;
121
+ background: var(--dd-surface, #{$dd-surface});
122
122
  overflow: hidden;
123
123
  z-index: 1001;
124
124
  // ponytail: cubic-bezier 取 iOS 标准滑出曲线,遮罩淡入同期 0.3s,合上略快收尾
@@ -144,7 +144,7 @@ function onMaskClick() {
144
144
 
145
145
  &--vip {
146
146
  padding: 64rpx 32rpx 32rpx;
147
- background: $dd-gradient-primary;
147
+ background: var(--dd-gradient-primary, #{$dd-gradient-primary});
148
148
  display: flex;
149
149
  align-items: center;
150
150
  gap: 24rpx;
@@ -169,7 +169,7 @@ function onMaskClick() {
169
169
 
170
170
  .dd-drawer__avatar-fallback {
171
171
  font-size: 40rpx;
172
- color: $dd-neutral-900;
172
+ color: var(--dd-primary-contrast, #{$dd-primary-contrast});
173
173
  font-weight: 700;
174
174
  }
175
175
 
@@ -189,13 +189,13 @@ function onMaskClick() {
189
189
  .dd-drawer__username {
190
190
  font-size: $dd-font-size-h3;
191
191
  font-weight: 700;
192
- color: $dd-neutral-900;
192
+ color: var(--dd-primary-contrast, #{$dd-primary-contrast});
193
193
  @include dd-ellipsis(1);
194
194
  }
195
195
 
196
196
  .dd-drawer__vip-badge {
197
- background: $dd-surface;
198
- color: $dd-primary-400;
197
+ background: var(--dd-surface, #{$dd-surface});
198
+ color: var(--dd-primary-400, #{$dd-primary-400});
199
199
  font-size: 20rpx;
200
200
  font-weight: 700;
201
201
  padding: 2rpx 10rpx;
@@ -125,7 +125,7 @@ function onSelect(opt: DropdownOption) {
125
125
  gap: $dd-space-1;
126
126
  height: 96rpx;
127
127
  padding: 0 $dd-space-2;
128
- color: $dd-text-primary;
128
+ color: var(--dd-text-primary, #{$dd-text-primary});
129
129
  font-size: $dd-font-size-body;
130
130
  @include dd-transition(color 0.3s);
131
131
  }
@@ -147,7 +147,7 @@ function onSelect(opt: DropdownOption) {
147
147
  &__panel {
148
148
  position: fixed;
149
149
  z-index: 10;
150
- background: $dd-surface;
150
+ background: var(--dd-surface, #{$dd-surface});
151
151
  max-height: 50vh;
152
152
  overflow: hidden;
153
153
  opacity: 0;
@@ -183,7 +183,7 @@ function onSelect(opt: DropdownOption) {
183
183
  height: 80rpx;
184
184
  padding: 0 32rpx;
185
185
  font-size: $dd-font-size-body;
186
- color: $dd-text-primary;
186
+ color: var(--dd-text-primary, #{$dd-text-primary});
187
187
  @include dd-transition(color 0.2s);
188
188
 
189
189
  &--active {
@@ -153,15 +153,15 @@ onUnmounted(() => {
153
153
  flex-direction: row;
154
154
  align-items: center;
155
155
  height: 96rpx;
156
- background: $dd-surface;
157
- @include dd-hairline-bottom($dd-border-subtle);
156
+ background: var(--dd-surface, #{$dd-surface});
157
+ @include dd-hairline-bottom(var(--dd-border-subtle, #{$dd-border-subtle}));
158
158
  }
159
159
 
160
160
  .dd-dropdown__overlay {
161
161
  position: fixed;
162
162
  left: 0;
163
163
  right: 0;
164
- background: $dd-glass-bg;
164
+ background: var(--dd-glass-bg, #{$dd-glass-bg});
165
165
  backdrop-filter: blur(8px);
166
166
  -webkit-backdrop-filter: blur(8px);
167
167
  z-index: 9;
@@ -99,14 +99,14 @@ function onAction() {
99
99
  &__title {
100
100
  font-size: $dd-font-size-h3;
101
101
  font-weight: $dd-font-weight-h3;
102
- color: $dd-text-primary;
102
+ color: var(--dd-text-primary, #{$dd-text-primary});
103
103
  line-height: $dd-line-height-h3;
104
104
  }
105
105
 
106
106
  &__desc {
107
107
  margin-top: $dd-space-2;
108
108
  font-size: $dd-font-size-body;
109
- color: $dd-text-tertiary;
109
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
110
110
  line-height: $dd-line-height-caption;
111
111
  max-width: 560rpx;
112
112
  }
@@ -116,15 +116,15 @@ function onAction() {
116
116
  padding: 0 $dd-space-5;
117
117
  height: $dd-size-button-md;
118
118
  border-radius: $dd-radius-full;
119
- background: $dd-gradient-primary;
119
+ background: var(--dd-gradient-primary, #{$dd-gradient-primary});
120
120
  @include dd-flex-center;
121
- box-shadow: $dd-shadow-glow-gold-md;
121
+ box-shadow: var(--dd-shadow-glow-gold-md, #{$dd-shadow-glow-gold-md});
122
122
  }
123
123
 
124
124
  &__btn-text {
125
125
  font-size: $dd-font-size-body;
126
126
  font-weight: $dd-font-weight-body;
127
- color: $dd-neutral-900;
127
+ color: var(--dd-primary-contrast, #{$dd-primary-contrast});
128
128
  }
129
129
  }
130
130
 
@@ -112,7 +112,7 @@ function onItemClick(item: FeatureItem, index: number) {
112
112
  display: flex;
113
113
  align-items: center;
114
114
  justify-content: center;
115
- background: $dd-gradient-primary-wide;
115
+ background: var(--dd-gradient-primary-wide, #{$dd-gradient-primary-wide});
116
116
  }
117
117
 
118
118
  .dd-feature-grid__item--circle .dd-feature-grid__icon {
@@ -125,13 +125,13 @@ function onItemClick(item: FeatureItem, index: number) {
125
125
 
126
126
  .dd-feature-grid__icon-text {
127
127
  font-size: $dd-font-size-h2;
128
- color: $dd-neutral-900;
128
+ color: var(--dd-primary-contrast, #{$dd-primary-contrast});
129
129
  line-height: 1;
130
130
  }
131
131
 
132
132
  .dd-feature-grid__label {
133
133
  font-size: $dd-font-size-caption;
134
- color: $dd-text-secondary;
134
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
135
135
  text-align: center;
136
136
  @include dd-ellipsis(1);
137
137
  max-width: 100%;
@@ -439,8 +439,8 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
439
439
  overflow: hidden;
440
440
  font-size: $dd-font-size-body;
441
441
  line-height: $dd-line-height-lead;
442
- color: $dd-text-primary;
443
- background: $dd-bg-elevated;
442
+ color: var(--dd-text-primary, #{$dd-text-primary});
443
+ background: var(--dd-bg-elevated, #{$dd-bg-elevated});
444
444
 
445
445
  // vant 式发丝线:两侧缩进 32rpx
446
446
  &::after {
@@ -451,7 +451,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
451
451
  right: $dd-space-4;
452
452
  bottom: 0;
453
453
  left: $dd-space-4;
454
- border-bottom: 1px solid $dd-border-subtle;
454
+ border-bottom: 1px solid var(--dd-border-subtle, #{$dd-border-subtle});
455
455
  transform: scaleY(0.5);
456
456
  }
457
457
 
@@ -480,7 +480,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
480
480
  box-sizing: border-box;
481
481
  width: 6.2em;
482
482
  margin-right: $dd-space-3;
483
- color: $dd-text-primary;
483
+ color: var(--dd-text-primary, #{$dd-text-primary});
484
484
  text-align: left;
485
485
  word-wrap: break-word;
486
486
 
@@ -494,7 +494,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
494
494
 
495
495
  &__required-mark {
496
496
  margin-right: 4rpx;
497
- color: $dd-error-500;
497
+ color: var(--dd-error, #{$dd-error});
498
498
  }
499
499
 
500
500
  &__label-text {
@@ -529,17 +529,17 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
529
529
  border: 0;
530
530
  resize: none;
531
531
  background: transparent;
532
- color: $dd-text-primary;
532
+ color: var(--dd-text-primary, #{$dd-text-primary});
533
533
  font-size: inherit;
534
534
  line-height: inherit;
535
535
 
536
536
  &::placeholder {
537
- color: $dd-text-tertiary;
537
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
538
538
  }
539
539
 
540
540
  // readonly(原生 disabled 拦输入但无禁用样式):保持正常文本色
541
541
  &:disabled {
542
- color: $dd-text-primary;
542
+ color: var(--dd-text-primary, #{$dd-text-primary});
543
543
  opacity: 1;
544
544
  }
545
545
  }
@@ -554,7 +554,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
554
554
  flex-shrink: 0;
555
555
  margin-right: $dd-space-1;
556
556
  font-size: $dd-font-size-h4;
557
- color: $dd-text-primary;
557
+ color: var(--dd-text-primary, #{$dd-text-primary});
558
558
  }
559
559
 
560
560
  &__clear {
@@ -565,7 +565,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
565
565
  margin-left: $dd-space-1;
566
566
  padding: $dd-space-1 0 $dd-space-1 $dd-space-2;
567
567
  font-size: $dd-font-size-h4;
568
- color: $dd-text-tertiary;
568
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
569
569
  }
570
570
 
571
571
  &__right-icon {
@@ -574,7 +574,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
574
574
  flex-shrink: 0;
575
575
  margin-left: $dd-space-1;
576
576
  font-size: $dd-font-size-h4;
577
- color: $dd-text-tertiary;
577
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
578
578
  }
579
579
 
580
580
  &__arrow {
@@ -583,7 +583,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
583
583
  flex-shrink: 0;
584
584
  margin-left: $dd-space-1;
585
585
  font-size: $dd-font-size-h4;
586
- color: $dd-text-tertiary;
586
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
587
587
 
588
588
  &--left {
589
589
  transform: rotate(180deg);
@@ -606,7 +606,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
606
606
  &__error-message {
607
607
  font-size: $dd-font-size-caption;
608
608
  line-height: 32rpx;
609
- color: $dd-error-500;
609
+ color: var(--dd-error, #{$dd-error});
610
610
  text-align: left;
611
611
 
612
612
  &--center {
@@ -622,7 +622,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
622
622
  margin-top: $dd-space-1;
623
623
  font-size: $dd-font-size-caption;
624
624
  line-height: 32rpx;
625
- color: $dd-text-secondary;
625
+ color: var(--dd-text-secondary, #{$dd-text-secondary});
626
626
  text-align: right;
627
627
  }
628
628
 
@@ -630,7 +630,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
630
630
  &--error {
631
631
  .dd-field__control,
632
632
  .dd-field__control::placeholder {
633
- color: $dd-error-500;
633
+ color: var(--dd-error, #{$dd-error});
634
634
  }
635
635
  }
636
636
 
@@ -638,12 +638,12 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
638
638
  &--disabled {
639
639
  .dd-field__label,
640
640
  .dd-field__left-icon {
641
- color: $dd-text-tertiary;
641
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
642
642
  }
643
643
 
644
644
  .dd-field__control,
645
645
  .dd-field__control::placeholder {
646
- color: $dd-text-tertiary;
646
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
647
647
  }
648
648
  }
649
649
 
@@ -654,7 +654,7 @@ defineExpose({ validate, validateWithTrigger, resetValidation, scrollIntoView, f
654
654
  }
655
655
 
656
656
  &--active {
657
- background: $dd-surface-container-high;
657
+ background: var(--dd-surface-container-high, #{$dd-surface-container-high});
658
658
  }
659
659
 
660
660
  &__extra {
@@ -310,7 +310,7 @@ defineExpose({ open, close, reset })
310
310
  @import '../../scss/mixins';
311
311
 
312
312
  .dd-goods-sku {
313
- background-color: $dd-bg-elevated;
313
+ background-color: var(--dd-bg-elevated, #{$dd-bg-elevated});
314
314
  overflow: hidden;
315
315
 
316
316
  &__container {
@@ -347,26 +347,26 @@ defineExpose({ open, close, reset })
347
347
 
348
348
  &__symbol {
349
349
  font-size: 24rpx;
350
- color: $dd-error-400;
350
+ color: var(--dd-error-400, #{$dd-error-400});
351
351
  margin-right: 4rpx;
352
352
  }
353
353
 
354
354
  &__value {
355
355
  font-size: 36rpx;
356
- color: $dd-error-400;
356
+ color: var(--dd-error-400, #{$dd-error-400});
357
357
  font-weight: bold;
358
358
  }
359
359
  }
360
360
 
361
361
  &__stock {
362
362
  font-size: 26rpx;
363
- color: $dd-text-tertiary;
363
+ color: var(--dd-text-tertiary, #{$dd-text-tertiary});
364
364
  margin-bottom: 20rpx;
365
365
  }
366
366
 
367
367
  &__selected {
368
368
  font-size: 26rpx;
369
- color: $dd-text-primary;
369
+ color: var(--dd-text-primary, #{$dd-text-primary});
370
370
  }
371
371
  }
372
372
  }
@@ -380,7 +380,7 @@ defineExpose({ open, close, reset })
380
380
 
381
381
  &__title {
382
382
  font-size: 28rpx;
383
- color: $dd-text-primary;
383
+ color: var(--dd-text-primary, #{$dd-text-primary});
384
384
  margin-bottom: 20rpx;
385
385
  }
386
386
 
@@ -391,22 +391,22 @@ defineExpose({ open, close, reset })
391
391
 
392
392
  &__item {
393
393
  padding: 10rpx 20rpx;
394
- border: 2rpx solid $dd-border-default;
394
+ border: 2rpx solid var(--dd-border-default, #{$dd-border-default});
395
395
  border-radius: 10rpx;
396
396
  margin-right: 20rpx;
397
397
  margin-bottom: 20rpx;
398
398
  font-size: 26rpx;
399
- color: $dd-text-primary;
400
- background-color: $dd-bg-elevated;
399
+ color: var(--dd-text-primary, #{$dd-text-primary});
400
+ background-color: var(--dd-bg-elevated, #{$dd-bg-elevated});
401
401
 
402
402
  &--active {
403
- border-color: $dd-error-400;
404
- color: $dd-error-400;
403
+ border-color: var(--dd-error-400, #{$dd-error-400});
404
+ color: var(--dd-error-400, #{$dd-error-400});
405
405
  }
406
406
 
407
407
  &--disabled {
408
- color: $dd-neutral-500;
409
- border-color: $dd-border-default;
408
+ color: var(--dd-muted, #{$dd-muted});
409
+ border-color: var(--dd-border-default, #{$dd-border-default});
410
410
  }
411
411
  }
412
412
  }
@@ -421,7 +421,7 @@ defineExpose({ open, close, reset })
421
421
 
422
422
  &__title {
423
423
  font-size: 28rpx;
424
- color: $dd-text-primary;
424
+ color: var(--dd-text-primary, #{$dd-text-primary});
425
425
  }
426
426
  }
427
427
  }