@didaoktv/didaoui-uniapp 1.4.1 → 1.4.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.
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
>
|
|
13
13
|
<view class="dd-sidebar-item__text">
|
|
14
14
|
<slot name="title">{{ title }}</slot>
|
|
15
|
+
<view v-if="badge" class="dd-sidebar-item__badge">
|
|
16
|
+
<text class="dd-sidebar-item__badge-text">{{ badge }}</text>
|
|
17
|
+
</view>
|
|
18
|
+
<view v-else-if="dot" class="dd-sidebar-item__dot"></view>
|
|
15
19
|
</view>
|
|
16
|
-
<view v-if="badge" class="dd-sidebar-item__badge">
|
|
17
|
-
<text class="dd-sidebar-item__badge-text">{{ badge }}</text>
|
|
18
|
-
</view>
|
|
19
|
-
<view v-else-if="dot" class="dd-sidebar-item__dot"></view>
|
|
20
20
|
</view>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
@@ -91,23 +91,26 @@ function onClick() {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
&--disabled {
|
|
94
|
+
// ponytail: 用透明度淡化,随主题自适应;文字对比度随之下降以强化「禁用」观感
|
|
95
|
+
opacity: 0.45;
|
|
94
96
|
color: var(--dd-text-tertiary, #{$dd-text-tertiary});
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
&__text {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
98
102
|
@include dd-ellipsis(1);
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
&__badge {
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: $dd-space-2;
|
|
104
|
-
right: $dd-space-2;
|
|
105
106
|
min-width: $dd-space-4;
|
|
106
107
|
height: $dd-space-4;
|
|
108
|
+
margin-left: $dd-space-1;
|
|
107
109
|
padding: 0 $dd-space-1;
|
|
108
110
|
border-radius: $dd-radius-full;
|
|
109
111
|
background: var(--dd-error, #{$dd-error});
|
|
110
112
|
@include dd-flex-center;
|
|
113
|
+
flex-shrink: 0;
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
&__badge-text {
|
|
@@ -117,11 +120,10 @@ function onClick() {
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
&__dot {
|
|
120
|
-
|
|
121
|
-
top: $dd-space-2;
|
|
122
|
-
right: $dd-space-2;
|
|
123
|
+
flex-shrink: 0;
|
|
123
124
|
width: $dd-space-2;
|
|
124
125
|
height: $dd-space-2;
|
|
126
|
+
margin-left: $dd-space-1;
|
|
125
127
|
border-radius: 50%;
|
|
126
128
|
background: var(--dd-error, #{$dd-error});
|
|
127
129
|
}
|
|
@@ -164,10 +164,12 @@ function onItemClick(child: TreeSelectChild) {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
&__item {
|
|
167
|
+
position: relative;
|
|
167
168
|
display: flex;
|
|
168
169
|
align-items: center;
|
|
170
|
+
justify-content: space-between;
|
|
169
171
|
min-height: 96rpx;
|
|
170
|
-
padding: 0 $dd-space-4;
|
|
172
|
+
padding: 0 88rpx 0 $dd-space-4;
|
|
171
173
|
font-weight: 600;
|
|
172
174
|
color: var(--dd-text-primary, #{$dd-text-primary});
|
|
173
175
|
|
|
@@ -176,8 +178,7 @@ function onItemClick(child: TreeSelectChild) {
|
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
&--active {
|
|
179
|
-
|
|
180
|
-
color: $dd-neutral-50;
|
|
181
|
+
color: var(--dd-primary, #{$dd-primary});
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
&--disabled {
|
|
@@ -196,9 +197,12 @@ function onItemClick(child: TreeSelectChild) {
|
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
&__selected {
|
|
199
|
-
|
|
200
|
+
position: absolute;
|
|
201
|
+
top: 50%;
|
|
202
|
+
right: $dd-space-4;
|
|
203
|
+
transform: translateY(-50%);
|
|
200
204
|
font-size: 32rpx;
|
|
201
|
-
color: $dd-
|
|
205
|
+
color: var(--dd-primary, #{$dd-primary});
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
208
|
</style>
|
package/package.json
CHANGED
package/scss/_variables.scss
CHANGED
|
@@ -116,7 +116,7 @@ $dd-surface-container-low: $dd-neutral-800 !default;
|
|
|
116
116
|
$dd-surface-container: $dd-neutral-800 !default;
|
|
117
117
|
$dd-surface-container-high: $dd-neutral-700 !default;
|
|
118
118
|
$dd-surface-container-highest: $dd-neutral-600 !default;
|
|
119
|
-
$dd-bg-section: $dd-neutral-
|
|
119
|
+
$dd-bg-section: $dd-neutral-900 !default;
|
|
120
120
|
$dd-bg-card: $dd-neutral-800 !default;
|
|
121
121
|
$dd-bg-elevated: $dd-neutral-800 !default;
|
|
122
122
|
// 弹出层专用底色:比卡片(neutral-800)亮一档,形成 页面→卡片→弹出层 的抬升层级
|