hy-app 0.5.2 → 0.5.4

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 (74) hide show
  1. package/components/hy-action-sheet/index.scss +0 -5
  2. package/components/hy-avatar/hy-avatar.vue +4 -3
  3. package/components/hy-back-top/hy-back-top.vue +10 -9
  4. package/components/hy-back-top/props.ts +5 -3
  5. package/components/hy-badge/hy-badge.vue +5 -4
  6. package/components/hy-badge/index.scss +0 -1
  7. package/components/hy-badge/props.ts +11 -4
  8. package/components/hy-button/hy-button.vue +5 -5
  9. package/components/hy-button/index.scss +9 -0
  10. package/components/hy-button/props.ts +11 -6
  11. package/components/hy-coupon/hy-coupon.vue +159 -167
  12. package/components/hy-coupon/index.scss +135 -516
  13. package/components/hy-coupon/props.ts +101 -127
  14. package/components/hy-coupon/typing.d.ts +147 -146
  15. package/components/hy-datetime-picker/props.ts +1 -3
  16. package/components/hy-folding-panel/props.ts +1 -1
  17. package/components/hy-folding-panel/typing.d.ts +0 -38
  18. package/components/hy-folding-panel-item/hy-folding-panel-item.vue +2 -5
  19. package/components/hy-folding-panel-item/index.scss +0 -8
  20. package/components/hy-folding-panel-item/typing.d.ts +14 -0
  21. package/components/hy-form-group/hy-form-group.vue +308 -511
  22. package/components/hy-form-group/index.scss +0 -33
  23. package/components/hy-form-group/props.ts +103 -13
  24. package/components/hy-form-group/typing.d.ts +0 -77
  25. package/components/hy-form-item/hy-form-item.vue +3 -3
  26. package/components/hy-icon/hy-icon.vue +3 -8
  27. package/components/hy-input/hy-input.vue +16 -10
  28. package/components/hy-input/index.scss +4 -0
  29. package/components/hy-input/props.ts +2 -2
  30. package/components/hy-list/props.ts +1 -1
  31. package/components/hy-notice-bar/hy-column-notice.vue +63 -70
  32. package/components/hy-notice-bar/hy-row-notice.vue +92 -110
  33. package/components/hy-notice-bar/index.scss +2 -4
  34. package/components/hy-notice-bar/props.ts +4 -1
  35. package/components/hy-notice-bar/typing.d.ts +2 -0
  36. package/components/hy-popup/hy-popup.vue +0 -1
  37. package/components/hy-qrcode/hy-qrcode.vue +69 -3
  38. package/components/hy-qrcode/index.scss +3 -3
  39. package/components/hy-qrcode/qrcode.js +1344 -1400
  40. package/components/hy-rate/hy-rate.vue +0 -1
  41. package/components/hy-read-more/hy-read-more.vue +1 -1
  42. package/components/hy-signature/hy-signature.vue +25 -22
  43. package/components/hy-signature/index.scss +0 -4
  44. package/components/hy-tabbar/hy-tabbar.vue +137 -0
  45. package/components/{hy-tabBar → hy-tabbar}/index.scss +30 -30
  46. package/components/hy-tabbar/props.ts +59 -0
  47. package/components/hy-tabbar/typing.d.ts +61 -0
  48. package/components/hy-tabbar-group/README.md +326 -0
  49. package/components/hy-tabbar-group/hy-tabbar-group.vue +87 -0
  50. package/components/hy-tabbar-group/index.scss +57 -0
  51. package/components/hy-tabbar-group/props.ts +78 -0
  52. package/components/hy-tabbar-group/typing.ts +16 -0
  53. package/components/hy-tabbar-item/hy-tabbar-item.vue +103 -0
  54. package/components/hy-tabbar-item/index.scss +43 -0
  55. package/components/hy-tabbar-item/props.ts +24 -0
  56. package/components/hy-tabbar-item/typing.ts +22 -0
  57. package/components/hy-tag/props.ts +8 -2
  58. package/components/hy-text/props.ts +8 -2
  59. package/components/hy-textarea/hy-textarea.vue +1 -1
  60. package/components/hy-textarea/index.scss +8 -7
  61. package/components/hy-textarea/props.ts +4 -1
  62. package/components/hy-toast/index.scss +2 -7
  63. package/components/hy-tooltip/props.ts +1 -3
  64. package/components/hy-upload/props.ts +1 -1
  65. package/components/index.ts +177 -177
  66. package/global.d.ts +87 -85
  67. package/libs/css/common.scss +0 -5
  68. package/libs/typing/modules/form.ts +159 -163
  69. package/package.json +2 -2
  70. package/web-types.json +1 -1
  71. package/components/hy-coupon/README.md +0 -133
  72. package/components/hy-tabBar/hy-tabBar.vue +0 -109
  73. package/components/hy-tabBar/props.ts +0 -13
  74. package/components/hy-tabBar/typing.d.ts +0 -54
@@ -1,553 +1,172 @@
1
- @use "../../libs/css/mixin.scss" as *;
2
- @use "../../libs/css/theme" as *;
3
-
4
- // 优惠券主题颜色变量
5
- $coupon-primary-bg: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !default;
6
- $coupon-secondary-bg: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%) !default;
7
- $coupon-tertiary-bg: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%) !default;
8
- $coupon-disabled-bg: linear-gradient(135deg, #c8d6e5 0%, #a5b1c2 100%) !default;
9
- $coupon-used-bg: linear-gradient(135deg, #778beb 0%, #f8a5c2 100%) !default;
10
- $coupon-expired-bg: linear-gradient(135deg, #e17055 0%, #d63031 100%) !default;
11
- $coupon-content-bg: #ffffff !default;
12
- $coupon-light-bg: #f8f9fa !default;
1
+ @use '../../libs/css/mixin.scss' as *;
2
+ @use '../../libs/css/theme.scss' as *;
13
3
 
4
+ $hy-box-width: 180rpx;
14
5
  @include b(coupon) {
15
- position: relative;
16
- background-color: $coupon-light-bg;
17
- border-radius: 12px;
18
- overflow: hidden;
19
- height: 110px;
20
- display: flex;
21
- align-items: stretch;
22
- margin: 12px 0;
23
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
24
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
25
- cursor: pointer;
26
-
27
- // 点击交互效果
28
- &:active {
29
- transform: scale(0.97);
30
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
31
- }
32
-
33
- // 正常状态悬浮效果
34
- &:not(.hy-coupon--disabled):not(.hy-coupon--used):not(.hy-coupon--expired) {
35
- &:hover {
36
- box-shadow: 0 8px 20px rgba(255, 107, 107, 0.2);
37
- transform: translateY(-2px);
38
- }
39
- }
40
-
41
- // 不同类型的优惠券样式
42
- &--secondary {
43
- @include e(left) {
44
- background: $coupon-secondary-bg;
45
- }
46
-
47
- &:not(.hy-coupon--disabled):not(.hy-coupon--used):not(.hy-coupon--expired) {
48
- &:hover {
49
- box-shadow: 0 8px 20px rgba(78, 205, 196, 0.2);
50
- }
51
- }
52
-
53
- .limit-tag {
54
- background-color: rgba(78, 205, 196, 0.15);
55
- color: #4ecdc4;
56
- box-shadow: 0 2px 4px rgba(78, 205, 196, 0.1);
57
- }
58
-
59
- .action-button {
60
- background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
61
- box-shadow: 0 3px 8px rgba(78, 205, 196, 0.2);
62
-
63
- &:active {
64
- background: linear-gradient(135deg, #45b7d1 0%, #4ecdc4 100%);
65
- box-shadow: 0 2px 6px rgba(78, 205, 196, 0.3);
66
- }
67
- }
68
- }
69
-
70
- &--tertiary {
71
- @include e(left) {
72
- background: $coupon-tertiary-bg;
73
- }
74
-
75
- &:not(.hy-coupon--disabled):not(.hy-coupon--used):not(.hy-coupon--expired) {
76
- &:hover {
77
- box-shadow: 0 8px 20px rgba(254, 202, 87, 0.2);
78
- }
79
- }
80
-
81
- .limit-tag {
82
- background-color: rgba(254, 202, 87, 0.15);
83
- color: #feca57;
84
- box-shadow: 0 2px 4px rgba(254, 202, 87, 0.1);
85
- }
86
-
87
- .action-button {
88
- background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
89
- box-shadow: 0 3px 8px rgba(254, 202, 87, 0.2);
90
-
91
- &:active {
92
- background: linear-gradient(135deg, #ff9ff3 0%, #feca57 100%);
93
- box-shadow: 0 2px 6px rgba(254, 202, 87, 0.3);
94
- }
95
- }
6
+ width: 100%;
7
+ min-height: 190rpx;
8
+ max-height: 220rpx;
9
+
10
+ /* 已使用/过期状态的置灰效果 */
11
+ @include m(disabled) {
12
+ filter: grayscale(0.4) !important;
13
+ opacity: 0.6;
96
14
  }
97
-
98
- // 左侧金额区域
99
- @include e(left) {
15
+
16
+ /* 优惠券卡片主体 */
17
+ @include e(card) {
100
18
  position: relative;
101
- width: 110px;
102
- background: $coupon-primary-bg;
103
- color: white;
104
19
  display: flex;
105
- flex-direction: column;
106
- align-items: center;
107
- justify-content: center;
108
- padding: 16px 0;
109
- box-sizing: border-box;
20
+ border-radius: 16rpx;
110
21
  overflow: hidden;
111
- border-radius: 12px 0 0 12px;
112
-
113
- // 装饰圆点 - 右侧
114
- &::after {
115
- content: '';
116
- position: absolute;
117
- top: 50%;
118
- right: -5px;
119
- transform: translateY(-50%);
120
- width: 10px;
121
- height: 10px;
122
- background-color: $coupon-content-bg;
123
- border-radius: 50%;
124
- z-index: 3;
125
- }
126
-
127
- // 左侧装饰圆点
128
- &::before {
129
- content: '';
130
- position: absolute;
131
- top: 50%;
132
- left: -5px;
133
- transform: translateY(-50%);
134
- width: 10px;
135
- height: 10px;
136
- background-color: $hy-background;
137
- border-radius: 50%;
138
- z-index: 3;
139
- }
140
-
141
- // 内部容器用于背景纹理
142
- & > .texture {
143
- position: absolute;
144
- top: 0;
145
- left: 0;
146
- right: 0;
147
- bottom: 0;
148
- background-image:
149
- radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
150
- radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
151
- background-size: 100% 100%;
152
- z-index: 0;
153
- }
154
-
155
- // 金额样式
156
- .amount {
157
- font-size: 32px;
158
- font-weight: 800;
159
- line-height: 1;
160
- z-index: 1;
161
- position: relative;
162
- letter-spacing: -1px;
163
- }
164
-
165
- .amount-symbol {
166
- font-size: 16px;
167
- vertical-align: top;
168
- margin-right: 2px;
169
- opacity: 0.9;
170
- font-weight: 600;
171
- }
172
-
173
- .min-spend {
174
- font-size: 12px;
175
- opacity: 0.9;
176
- margin-top: 8px;
177
- z-index: 1;
178
- position: relative;
179
- background: rgba(255, 255, 255, 0.2);
180
- padding: 2px 8px;
181
- border-radius: 10px;
182
- backdrop-filter: blur(5px);
22
+ transition: transform 0.3s ease;
23
+ transform-style: preserve-3d; /* 子元素将保持 3D 位置 */
24
+
25
+ .status-unused:hover {
26
+ transform: translateY(-4rpx) rotateX(5deg);
183
27
  }
184
28
  }
185
-
186
- // 右侧内容区域
187
- @include e(right) {
29
+
30
+ /* 不同类型优惠券的背景色 */
31
+ @include m(moneyOff) {
32
+ background:
33
+ radial-gradient(circle at $hy-box-width top, transparent 15rpx, #ff7d00 0) top / 100% 60px
34
+ no-repeat,
35
+ radial-gradient(circle at $hy-box-width bottom, transparent 15rpx, #ff7d00 0) bottom / 100%
36
+ 51px no-repeat;
37
+ //background:
38
+ // radial-gradient(circle at left center, transparent 15rpx, #ff7d00 0) left center / 30rpx 100% no-repeat,
39
+ // radial-gradient(circle at right center, transparent 15rpx, #ff7d00 0) right center / 30rpx 100% no-repeat;
40
+
41
+
42
+ }
43
+ @include m(discount) {
44
+ background:
45
+ radial-gradient(circle at $hy-box-width top, transparent 15rpx, #00c6ff 0) top / 100% 60px
46
+ no-repeat,
47
+ radial-gradient(circle at $hy-box-width bottom, transparent 15rpx, #00c6ff 0) bottom / 100%
48
+ 51px no-repeat;
49
+ }
50
+ @include m(fixedAmount) {
51
+ background:
52
+ radial-gradient(circle at $hy-box-width top, transparent 15rpx, $hy-error 0) top / 100% 60px
53
+ no-repeat,
54
+ radial-gradient(circle at $hy-box-width bottom, transparent 15rpx, $hy-error 0) bottom / 100%
55
+ 51px no-repeat;
56
+ }
57
+
58
+ /* 优惠券内容区域 */
59
+ @include e(content) {
188
60
  flex: 1;
189
- padding: 16px 24px 16px 28px;
190
61
  display: flex;
191
- flex-direction: column;
192
- justify-content: center;
62
+ align-items: center;
63
+ color: #ffffff;
193
64
  position: relative;
194
- background-color: $coupon-content-bg;
195
- min-width: 0; // 防止内容溢出
196
- border-radius: 0 12px 12px 0;
197
-
198
- .content {
199
- flex: 1;
65
+
66
+ /* 左侧金额 */
67
+ @include m(left) {
200
68
  display: flex;
201
69
  flex-direction: column;
202
70
  justify-content: center;
203
- margin-bottom: 8px;
204
- }
205
-
206
- .title {
207
- font-size: 17px;
208
- font-weight: 700;
209
- color: $hy-text-color;
210
- line-height: 1.3;
211
- margin-bottom: 6px;
212
- overflow: hidden;
213
- text-overflow: ellipsis;
214
- display: -webkit-box;
215
- -webkit-line-clamp: 1;
216
- -webkit-box-orient: vertical;
217
- }
218
-
219
- .subtitle {
220
- font-size: 13px;
221
- color: $hy-text-color--2;
222
- line-height: 1.4;
223
- overflow: hidden;
224
- text-overflow: ellipsis;
225
- display: -webkit-box;
226
- -webkit-line-clamp: 1;
227
- -webkit-box-orient: vertical;
228
- margin-bottom: 8px;
229
- }
230
-
231
- .validity {
232
- font-size: 12px;
233
- color: $hy-text-color--3;
234
- margin-top: auto;
235
- }
236
-
237
- // 右侧角标记
238
- &::before {
239
- content: '';
240
- position: absolute;
241
- top: 50%;
242
- right: 0;
243
- transform: translateY(-50%);
244
- width: 40px;
245
- height: 40px;
246
- background-color: $coupon-content-bg;
247
- border-radius: 50%;
248
- margin-right: -20px;
249
- }
250
- }
251
-
252
- // 状态样式 - 禁用、已使用、已过期
253
- @include m(disabled) {
254
- opacity: 0.65;
255
- cursor: not-allowed;
256
-
257
- @include e(left) {
258
- background-color: $coupon-disabled-bg;
259
- }
260
-
261
- @include e(right) {
262
- .title,
263
- .subtitle {
264
- color: $hy-text-color--3;
265
- }
266
-
267
- // 添加禁用标记
268
- &::after {
269
- content: '已禁用';
270
- position: absolute;
271
- top: 50%;
272
- right: -30px;
273
- transform: translateY(-50%) rotate(45deg);
274
- background-color: $hy-text-color--3;
275
- color: white;
276
- font-size: 12px;
277
- padding: 4px 40px;
278
- white-space: nowrap;
279
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
280
- }
281
- }
282
- }
283
-
284
- @include m(used) {
285
- opacity: 0.7;
286
- cursor: not-allowed;
287
-
288
- @include e(left) {
289
- background-color: $hy-info;
290
- }
291
-
292
- @include e(right) {
293
- .title,
294
- .subtitle {
295
- color: $hy-text-color--3;
296
- }
297
- }
298
- }
299
-
300
- // 已使用状态标记
301
- @include m(used) {
302
- @include e(right) {
303
- &::after {
304
- content: '已使用';
305
- position: absolute;
306
- top: 50%;
307
- right: -30px;
308
- transform: translateY(-50%) rotate(45deg);
309
- background-color: $coupon-used-bg;
310
- color: white;
311
- font-size: 12px;
312
- padding: 4px 40px;
313
- white-space: nowrap;
314
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
71
+ align-items: center;
72
+ height: 100%;
73
+ width: $hy-box-width;
74
+ padding: $hy-border-margin-padding-base;
75
+ box-sizing: border-box;
76
+
77
+ @include e(block) {
78
+ display: flex;
79
+ align-items: flex-end;
80
+ margin-bottom: $hy-border-margin-padding-sm;
315
81
  }
316
- }
317
-
318
- // 添加已使用水印效果
319
- &::before {
320
- content: '已使用';
321
- position: absolute;
322
- top: 50%;
323
- left: 50%;
324
- transform: translate(-50%, -50%) rotate(-30deg);
325
- font-size: 30px;
326
- font-weight: bold;
327
- color: rgba(0, 0, 0, 0.05);
328
- pointer-events: none;
329
- }
330
- }
331
-
332
- // 已过期状态标记
333
- @include m(expired) {
334
- @include e(left) {
335
- background-color: $coupon-expired-bg;
336
- }
337
-
338
- @include e(right) {
339
- &::after {
340
- content: '已过期';
341
- position: absolute;
342
- top: 50%;
343
- right: -30px;
344
- transform: translateY(-50%) rotate(45deg);
345
- background-color: $coupon-expired-bg;
346
- color: white;
347
- font-size: 12px;
348
- padding: 4px 40px;
349
- white-space: nowrap;
350
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
82
+
83
+ @include e(value) {
84
+ font-size: 64rpx;
85
+ font-weight: 800;
86
+ line-height: 1;
87
+ display: inline-block;
88
+ vertical-align: baseline; /* 关键:基线对齐 */
351
89
  }
352
- }
353
-
354
- // 添加已过期水印效果
355
- &::before {
356
- content: '已过期';
357
- position: absolute;
358
- top: 50%;
359
- left: 50%;
360
- transform: translate(-50%, -50%) rotate(-30deg);
361
- font-size: 30px;
362
- font-weight: bold;
363
- color: rgba(0, 0, 0, 0.05);
364
- pointer-events: none;
365
- }
366
- }
367
-
368
- // 装饰性的虚线边框效果 - 更美观的实现
369
- .coupon-border-left {
370
- position: absolute;
371
- left: 110px;
372
- top: 10px;
373
- bottom: 10px;
374
- width: 1px;
375
- background-image: linear-gradient(transparent 50%, rgba(255, 255, 255, 0.3) 50%);
376
- background-size: 1px 8px;
377
- z-index: 1;
378
- }
379
-
380
- .coupon-border-right {
381
- position: absolute;
382
- right: 0;
383
- top: 10px;
384
- bottom: 10px;
385
- width: 1px;
386
- background-image: linear-gradient(transparent 50%, $hy-border-color 50%);
387
- background-size: 1px 8px;
388
- }
389
-
390
- // 顶部和底部波浪形装饰
391
- & > .top-wave,
392
- & > .bottom-wave {
393
- content: '';
394
- position: absolute;
395
- width: 100%;
396
- height: 8px;
397
- background-image: radial-gradient(circle at 8px 4px, transparent 4px, $coupon-content-bg 5px, transparent 6px);
398
- background-size: 16px 8px;
399
- left: 0;
400
- z-index: 1;
401
- }
402
-
403
- & > .top-wave {
404
- top: 0;
405
- }
406
-
407
- & > .bottom-wave {
408
- bottom: 0;
409
- transform: rotate(180deg);
410
- }
411
-
412
- // 修复状态标记与波浪装饰的层级关系
413
- @include m(disabled) {
414
- @include e(right) {
415
- &::after {
416
- z-index: 2;
90
+ @include e(suffix) {
91
+ font-size: 28rpx;
92
+ font-weight: 500;
93
+ display: inline-block;
94
+ vertical-align: baseline; /* 关键:基线对齐 */
417
95
  }
418
96
  }
419
- }
420
97
 
421
- @include m(used) {
422
- @include e(right) {
423
- &::after {
424
- z-index: 2;
425
- }
426
- }
427
- }
98
+ /* 右侧描述 */
99
+ @include m(right) {
100
+ flex: 1;
101
+ display: flex;
102
+ flex-direction: column;
103
+ justify-content: flex-start;
104
+ text-align: start;
105
+ padding: $hy-border-margin-padding-base;
428
106
 
429
- @include m(expired) {
430
- @include e(right) {
431
- &::after {
432
- z-index: 2;
107
+ @include e(name) {
108
+ font-size: 30rpx;
109
+ font-weight: 600;
110
+ margin-bottom: 8rpx;
111
+ @include lineEllipsis;
433
112
  }
434
- }
435
- }
436
- }
437
113
 
438
- // 响应式适配
439
- @media (max-width: 375px) {
440
- @include b(coupon) {
441
- height: 100px;
442
-
443
- @include e(left) {
444
- width: 95px;
445
-
446
- .amount {
447
- font-size: 28px;
114
+ @include e(desc) {
115
+ @include multiEllipsis(2);
448
116
  }
449
-
450
- .min-spend {
451
- font-size: 11px;
452
- }
453
- }
454
-
455
- @include e(right) {
456
- padding: 14px 20px 14px 24px;
457
-
458
- .title {
459
- font-size: 16px;
117
+
118
+ @include e(validity) {
119
+ @include lineEllipsis;
460
120
  }
461
-
462
- .subtitle {
463
- font-size: 12px;
121
+
122
+ @include e(desc, validity) {
123
+ font-size: 22rpx;
124
+ opacity: 0.9;
125
+ line-height: 1.4;
126
+ @include lineEllipsis;
464
127
  }
465
128
  }
466
-
467
- .coupon-border-left {
468
- left: 95px;
469
- }
470
-
471
- .action-button {
472
- font-size: 12px;
473
- padding: 5px 14px;
474
- }
475
129
  }
476
- }
477
130
 
478
- .hy-coupon {
479
- .limit-tags {
131
+ /* 右侧状态标签 */
132
+ @include e(btn) {
480
133
  position: absolute;
481
- top: 10px;
482
- right: 10px;
134
+ bottom: 0;
135
+ right: 0;
136
+ height: 100%;
483
137
  display: flex;
484
- gap: 6px;
485
- flex-wrap: wrap;
486
- }
487
-
488
- .limit-tag {
489
- background-color: rgba(255, 107, 107, 0.15);
490
- color: #ff6b6b;
491
- font-size: 11px;
492
- padding: 3px 8px;
493
- border-radius: 6px;
494
- white-space: nowrap;
495
- font-weight: 500;
496
- box-shadow: 0 2px 4px rgba(255, 107, 107, 0.1);
497
- }
498
-
499
- .action-button {
500
- position: absolute;
501
- bottom: 10px;
502
- right: 10px;
503
- background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
504
- color: white;
505
- font-size: 13px;
506
- padding: 6px 16px;
507
- border-radius: 16px;
508
- white-space: nowrap;
509
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
510
- font-weight: 600;
511
- box-shadow: 0 3px 8px rgba(255, 107, 107, 0.2);
512
- }
513
-
514
- .action-button:active {
515
- background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
516
- transform: scale(0.95);
517
- box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
138
+ justify-content: flex-start;
139
+ align-items: center;
518
140
  }
141
+ @include e(tag) {
142
+ height: 100%;
143
+ margin-left: 60rpx;
144
+ width: 120rpx;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ background-color: #ffd16d;
149
+ color: #d43c33;
150
+ font-size: 26rpx;
151
+ font-weight: bold;
152
+ z-index: 2;
153
+ transform-origin: top right;
154
+ transform: skewX(-15deg) translateX(15rpx); /* 倾斜标签 */
519
155
 
520
- .coupon-tooltip {
521
- position: absolute;
522
- top: -30px;
523
- left: 50%;
524
- transform: translateX(-50%);
525
- background-color: rgba(0, 0, 0, 0.75);
526
- color: white;
527
- font-size: 12px;
528
- padding: 4px 8px;
529
- border-radius: 4px;
530
- white-space: nowrap;
531
- opacity: 0;
532
- pointer-events: none;
533
- transition: opacity 0.3s ease;
534
- z-index: 10;
156
+ /* 标签文字反向倾斜,使其看起来是正的 */
157
+ @include m(btn) {
158
+ transform: skewX(15deg);
159
+ }
535
160
 
536
- &::after {
537
- content: "";
161
+ /* 标签与主体之间的白色分隔线 */
162
+ @include pseudo(before) {
163
+ content: '';
538
164
  position: absolute;
539
- bottom: -4px;
540
- left: 50%;
541
- transform: translateX(-50%);
542
- width: 0;
543
- height: 0;
544
- border-left: 4px solid transparent;
545
- border-right: 4px solid transparent;
546
- border-top: 4px solid rgba(0, 0, 0, 0.75);
165
+ left: -2px;
166
+ top: 0;
167
+ height: 100%;
168
+ width: 2px;
169
+ background-color: rgba(255, 255, 255, 0.3);
547
170
  }
548
171
  }
549
-
550
- .coupon-tooltip.show {
551
- opacity: 1;
552
- }
553
172
  }