@didaoktv/didaoui-uniapp 2.15.0 → 2.16.1
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.
- package/README.md +1 -1
- package/components/dd-action-sheet/dd-action-sheet.vue +21 -4
- package/components/dd-alert/dd-alert.vue +1 -1
- package/components/dd-bill-detail/dd-bill-detail.vue +1 -1
- package/components/dd-card/dd-card.vue +11 -10
- package/components/dd-sticky/dd-sticky.vue +3 -2
- package/package.json +1 -1
- package/scss/_variables.scss +4 -4
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ import { DdButton, DdInput } from '@didaoktv/didaoui-uniapp'
|
|
|
66
66
|
- **帝王金** `#F5A623` — 主操作、强调、高光
|
|
67
67
|
- **皇家蓝** `#2D4BA0` — 辅助色、深色基底
|
|
68
68
|
- **星空黑** `#0A0A0A` — 页面底色
|
|
69
|
-
- 语义色: success `#
|
|
69
|
+
- 语义色: success `#32F08C` / warning `#F9A825` / error `#E53935` / info `#00BCD4`
|
|
70
70
|
|
|
71
71
|
### 字体
|
|
72
72
|
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
:style="{ width: 100 / columns + '%' }"
|
|
22
22
|
@click="onSelect(item, i)"
|
|
23
23
|
>
|
|
24
|
-
<view class="dd-action-sheet__icon">
|
|
25
|
-
<dd-icon v-if="item.icon" :name="item.icon" class="dd-action-sheet__icon-text" />
|
|
26
|
-
<text v-else class="dd-action-sheet__icon-text">{{ item.name.charAt(0) }}</text>
|
|
24
|
+
<view class="dd-action-sheet__icon" :style="iconStyle(item)">
|
|
25
|
+
<dd-icon v-if="item.icon" :name="item.icon" class="dd-action-sheet__icon-text" :color="iconFg(item)" />
|
|
26
|
+
<text v-else class="dd-action-sheet__icon-text" :style="{ color: iconFg(item) }">{{ item.name.charAt(0) }}</text>
|
|
27
27
|
</view>
|
|
28
|
-
<text class="dd-action-sheet__name">{{ item.name }}</text>
|
|
28
|
+
<text class="dd-action-sheet__name" :style="item.color ? { color: item.color } : undefined">{{ item.name }}</text>
|
|
29
29
|
</view>
|
|
30
30
|
</view>
|
|
31
31
|
|
|
@@ -48,6 +48,8 @@ interface ActionItem {
|
|
|
48
48
|
name: string
|
|
49
49
|
icon?: string
|
|
50
50
|
color?: string
|
|
51
|
+
/** 圆底上图标/首字的颜色;默认白。color 为浅色(金/黄等)时必须传深色,否则白字看不清 */
|
|
52
|
+
iconColor?: string
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
interface Props {
|
|
@@ -81,6 +83,21 @@ function close() {
|
|
|
81
83
|
emit('close')
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
/**
|
|
87
|
+
* 图标圆底配色:默认沿用品牌金渐变 + gold glow;item.color 指定时改用该色实心底
|
|
88
|
+
* ponytail: ceiling — color 项放弃 gold glow(glow 变量按语义名静态拼装,无法从任意色值推导),
|
|
89
|
+
* 视觉上仍是实心圆 + 白色图标,足够辨识;若后续需要彩色 glow,改在 item 上传 glow 变体名
|
|
90
|
+
*/
|
|
91
|
+
function iconStyle(item: ActionItem): Record<string, string> | undefined {
|
|
92
|
+
return item.color ? { background: item.color } : undefined
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** 圆底上的图标/首字颜色:仅在自定义底色时接管(默认白),否则返回 undefined 保持原有继承行为 */
|
|
96
|
+
function iconFg(item: ActionItem): string | undefined {
|
|
97
|
+
if (!item.color && !item.iconColor) return undefined
|
|
98
|
+
return item.iconColor ?? '#ffffff'
|
|
99
|
+
}
|
|
100
|
+
|
|
84
101
|
function onMaskClick() {
|
|
85
102
|
if (!props.closeOnClickModal) return
|
|
86
103
|
close()
|
|
@@ -245,7 +245,7 @@ function onClick(item: BillItem, index: number) {
|
|
|
245
245
|
border-radius: $dd-radius-sm;
|
|
246
246
|
|
|
247
247
|
&--unpaid { color: var(--dd-warning-400, #{$dd-warning-400}); background: rgba(249, 168, 37, 0.12); }
|
|
248
|
-
&--paid { color: var(--dd-success-400, #{$dd-success-400}); background: rgba(
|
|
248
|
+
&--paid { color: var(--dd-success-400, #{$dd-success-400}); background: rgba(50, 240, 140, 0.12); }
|
|
249
249
|
&--refunding { color: var(--dd-info-400, #{$dd-info-400}); background: rgba(0, 188, 212, 0.12); }
|
|
250
250
|
&--refunded { color: var(--dd-warning-400, #{$dd-warning-400}); background: rgba(249, 168, 37, 0.12); }
|
|
251
251
|
&--cancelled { color: var(--dd-text-tertiary, #{$dd-text-tertiary}); background: rgba(255, 255, 255, 0.08); }
|
|
@@ -113,7 +113,7 @@ function onClick(e: Event) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&__body {
|
|
116
|
-
padding: $dd-space-5;
|
|
116
|
+
padding: $dd-space-4 $dd-space-5;
|
|
117
117
|
box-sizing: border-box;
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -139,7 +139,7 @@ function onClick(e: Event) {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
// horizontal:
|
|
142
|
+
// horizontal: 行内排布;收窄相邻区块内侧间距,消除双倍缝隙(外缘与区块间均 32rpx)
|
|
143
143
|
.dd-card--horizontal {
|
|
144
144
|
display: flex;
|
|
145
145
|
flex-direction: row;
|
|
@@ -152,15 +152,20 @@ function onClick(e: Event) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
.dd-card__header {
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
padding: $dd-space-4 $dd-space-2 $dd-space-4 $dd-space-4;
|
|
158
|
+
}
|
|
159
|
+
|
|
155
160
|
.dd-card__body {
|
|
156
161
|
flex: 1;
|
|
157
|
-
|
|
162
|
+
min-width: 0;
|
|
163
|
+
padding: $dd-space-4 $dd-space-2;
|
|
158
164
|
}
|
|
159
165
|
|
|
160
|
-
// horizontal 不堆叠 header/footer, 整体作为 row
|
|
161
|
-
.dd-card__header,
|
|
162
166
|
.dd-card__footer {
|
|
163
|
-
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
padding: $dd-space-4 $dd-space-4 $dd-space-4 $dd-space-2;
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
|
|
@@ -191,8 +196,4 @@ function onClick(e: Event) {
|
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
}
|
|
194
|
-
|
|
195
|
-
.dd-card--horizontal.dd-card--active {
|
|
196
|
-
border: 2px solid var(--dd-primary, #{$dd-primary});
|
|
197
|
-
}
|
|
198
199
|
</style>
|
|
@@ -61,8 +61,9 @@ onMounted(() => {
|
|
|
61
61
|
// H5: 使用原生 IntersectionObserver API
|
|
62
62
|
function setupH5Observer() {
|
|
63
63
|
// #ifdef H5
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
// uni H5 模板 ref 拿到的是组件实例包装,真实 DOM 节点在 $el 上
|
|
65
|
+
const el = (rootRef.value as any)?.$el ?? rootRef.value
|
|
66
|
+
if (!(el instanceof Element)) return
|
|
66
67
|
const px = rpxToPx(props.offsetTop)
|
|
67
68
|
const io = new IntersectionObserver(
|
|
68
69
|
(entries) => {
|
package/package.json
CHANGED
package/scss/_variables.scss
CHANGED
|
@@ -50,7 +50,7 @@ $dd-success-100: #c8e6c9 !default;
|
|
|
50
50
|
$dd-success-200: #a5d6a7 !default;
|
|
51
51
|
$dd-success-300: #81c784 !default;
|
|
52
52
|
$dd-success-400: #66bb6a !default;
|
|
53
|
-
$dd-success-500: #
|
|
53
|
+
$dd-success-500: #32f08c !default;
|
|
54
54
|
$dd-success-600: #388e3c !default;
|
|
55
55
|
$dd-success-700: #2e7d32 !default;
|
|
56
56
|
$dd-success-800: #1b5e20 !default;
|
|
@@ -326,12 +326,12 @@ $dd-shadow-glow-blue-lg:
|
|
|
326
326
|
0 0 24px rgba(45, 75, 160, 0.5),
|
|
327
327
|
0 0 48px rgba(45, 75, 160, 0.25) !default;
|
|
328
328
|
// 语义色发光 — md 带暗影托底,lg 为双层霓虹
|
|
329
|
-
$dd-shadow-glow-success-sm: 0 0 8px rgba(
|
|
329
|
+
$dd-shadow-glow-success-sm: 0 0 8px rgba(50, 240, 140, 0.4) !default;
|
|
330
330
|
$dd-shadow-glow-success-md:
|
|
331
|
-
0 0 16px rgba(
|
|
331
|
+
0 0 16px rgba(50, 240, 140, 0.4),
|
|
332
332
|
0 4px 12px rgba(0, 0, 0, 0.3) !default;
|
|
333
333
|
$dd-shadow-glow-success-lg:
|
|
334
|
-
0 0 24px rgba(
|
|
334
|
+
0 0 24px rgba(50, 240, 140, 0.5),
|
|
335
335
|
0 8px 24px rgba(0, 0, 0, 0.4) !default;
|
|
336
336
|
$dd-shadow-glow-warning-sm: 0 0 8px rgba(249, 168, 37, 0.4) !default;
|
|
337
337
|
$dd-shadow-glow-warning-md:
|