muzhiyu-ui 1.0.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 (96) hide show
  1. package/README.md +202 -0
  2. package/components/muzhiyu/mu-action-sheet/mu-action-sheet.vue +335 -0
  3. package/components/muzhiyu/mu-alert/mu-alert.vue +220 -0
  4. package/components/muzhiyu/mu-back-top/mu-back-top.vue +161 -0
  5. package/components/muzhiyu/mu-badge/mu-badge.vue +150 -0
  6. package/components/muzhiyu/mu-barcode/mu-barcode.vue +100 -0
  7. package/components/muzhiyu/mu-blank/mu-blank.vue +30 -0
  8. package/components/muzhiyu/mu-bottom-nav/mu-bottom-nav.vue +331 -0
  9. package/components/muzhiyu/mu-bubble/mu-bubble.vue +316 -0
  10. package/components/muzhiyu/mu-button/mu-button.vue +431 -0
  11. package/components/muzhiyu/mu-calendar/mu-calendar.vue +429 -0
  12. package/components/muzhiyu/mu-car-input/mu-car-input.vue +209 -0
  13. package/components/muzhiyu/mu-card/mu-card.vue +317 -0
  14. package/components/muzhiyu/mu-cascader/mu-cascader.vue +336 -0
  15. package/components/muzhiyu/mu-cell/mu-cell.vue +368 -0
  16. package/components/muzhiyu/mu-checkbox/mu-checkbox.vue +116 -0
  17. package/components/muzhiyu/mu-checkbox-group/mu-checkbox-group.vue +40 -0
  18. package/components/muzhiyu/mu-code-input/mu-code-input.vue +264 -0
  19. package/components/muzhiyu/mu-collapse/mu-collapse.vue +316 -0
  20. package/components/muzhiyu/mu-color-picker/mu-color-picker.vue +466 -0
  21. package/components/muzhiyu/mu-config/index.js +34 -0
  22. package/components/muzhiyu/mu-config/mu-config.vue +54 -0
  23. package/components/muzhiyu/mu-countdown/mu-countdown.vue +338 -0
  24. package/components/muzhiyu/mu-cropper/mu-cropper.vue +415 -0
  25. package/components/muzhiyu/mu-date-picker/mu-date-picker.vue +290 -0
  26. package/components/muzhiyu/mu-datetime/mu-datetime.vue +262 -0
  27. package/components/muzhiyu/mu-divider/mu-divider.vue +229 -0
  28. package/components/muzhiyu/mu-drawer/mu-drawer.vue +172 -0
  29. package/components/muzhiyu/mu-dropdown/mu-dropdown.vue +215 -0
  30. package/components/muzhiyu/mu-dropdown-top/mu-dropdown-top.vue +243 -0
  31. package/components/muzhiyu/mu-empty/mu-empty.vue +217 -0
  32. package/components/muzhiyu/mu-fab/mu-fab.vue +324 -0
  33. package/components/muzhiyu/mu-footer/mu-footer.vue +21 -0
  34. package/components/muzhiyu/mu-form/mu-form.vue +170 -0
  35. package/components/muzhiyu/mu-grid/mu-grid.vue +95 -0
  36. package/components/muzhiyu/mu-grid-item/mu-grid-item.vue +247 -0
  37. package/components/muzhiyu/mu-html/mu-html.vue +145 -0
  38. package/components/muzhiyu/mu-icon/mu-icon.vue +822 -0
  39. package/components/muzhiyu/mu-image-grid/mu-image-grid.vue +225 -0
  40. package/components/muzhiyu/mu-image-preview/mu-image-preview.vue +286 -0
  41. package/components/muzhiyu/mu-index-list/mu-index-list.vue +381 -0
  42. package/components/muzhiyu/mu-input/mu-input.vue +570 -0
  43. package/components/muzhiyu/mu-input-number/mu-input-number.vue +193 -0
  44. package/components/muzhiyu/mu-keyboard/mu-keyboard.vue +415 -0
  45. package/components/muzhiyu/mu-list/mu-list.vue +89 -0
  46. package/components/muzhiyu/mu-loading/mu-loading.vue +124 -0
  47. package/components/muzhiyu/mu-loading-page/mu-loading-page.vue +529 -0
  48. package/components/muzhiyu/mu-loadmore/mu-loadmore.vue +26 -0
  49. package/components/muzhiyu/mu-modal/mu-modal.vue +298 -0
  50. package/components/muzhiyu/mu-navbar/mu-navbar.vue +223 -0
  51. package/components/muzhiyu/mu-nomore/mu-nomore.vue +107 -0
  52. package/components/muzhiyu/mu-notice-bar/mu-notice-bar.vue +284 -0
  53. package/components/muzhiyu/mu-notify/mu-notify.vue +202 -0
  54. package/components/muzhiyu/mu-overlay/mu-overlay.vue +94 -0
  55. package/components/muzhiyu/mu-pagination/mu-pagination.vue +330 -0
  56. package/components/muzhiyu/mu-password-input/mu-password-input.vue +119 -0
  57. package/components/muzhiyu/mu-picker/mu-picker.vue +297 -0
  58. package/components/muzhiyu/mu-popup/mu-popup.vue +297 -0
  59. package/components/muzhiyu/mu-progress/mu-progress.vue +156 -0
  60. package/components/muzhiyu/mu-pull-refresh/mu-pull-refresh.vue +54 -0
  61. package/components/muzhiyu/mu-qrcode/mu-qrcode.vue +340 -0
  62. package/components/muzhiyu/mu-qrcode/qrcode.js +2237 -0
  63. package/components/muzhiyu/mu-radio/mu-radio.vue +125 -0
  64. package/components/muzhiyu/mu-radio-group/mu-radio-group.vue +37 -0
  65. package/components/muzhiyu/mu-rate/mu-rate.vue +103 -0
  66. package/components/muzhiyu/mu-search/mu-search.vue +320 -0
  67. package/components/muzhiyu/mu-section/mu-section.vue +206 -0
  68. package/components/muzhiyu/mu-select/mu-select.vue +440 -0
  69. package/components/muzhiyu/mu-share-sheet/mu-share-sheet.vue +269 -0
  70. package/components/muzhiyu/mu-sidebar/mu-sidebar.vue +304 -0
  71. package/components/muzhiyu/mu-signature/mu-signature.vue +449 -0
  72. package/components/muzhiyu/mu-skeleton/mu-skeleton.vue +225 -0
  73. package/components/muzhiyu/mu-slider/mu-slider.vue +228 -0
  74. package/components/muzhiyu/mu-space/mu-space.vue +84 -0
  75. package/components/muzhiyu/mu-steps/mu-steps.vue +311 -0
  76. package/components/muzhiyu/mu-sticky/mu-sticky.vue +57 -0
  77. package/components/muzhiyu/mu-swipe-cell/mu-swipe-cell.vue +281 -0
  78. package/components/muzhiyu/mu-swiper/mu-swiper.vue +107 -0
  79. package/components/muzhiyu/mu-switch/mu-switch.vue +99 -0
  80. package/components/muzhiyu/mu-tabbar/mu-tabbar.vue +382 -0
  81. package/components/muzhiyu/mu-table/mu-table.vue +420 -0
  82. package/components/muzhiyu/mu-tabs/mu-tabs.vue +339 -0
  83. package/components/muzhiyu/mu-tag/mu-tag.vue +65 -0
  84. package/components/muzhiyu/mu-text-ellipsis/mu-text-ellipsis.vue +54 -0
  85. package/components/muzhiyu/mu-timeline/mu-timeline.vue +166 -0
  86. package/components/muzhiyu/mu-tips/mu-tips.vue +36 -0
  87. package/components/muzhiyu/mu-toast/mu-toast.vue +151 -0
  88. package/components/muzhiyu/mu-transfer/mu-transfer.vue +114 -0
  89. package/components/muzhiyu/mu-tree/mu-tree.vue +263 -0
  90. package/components/muzhiyu/mu-upload/mu-upload.vue +415 -0
  91. package/components/muzhiyu/mu-waterfall/mu-waterfall.vue +321 -0
  92. package/components/muzhiyu/mu-watermark/mu-watermark.vue +60 -0
  93. package/index.js +83 -0
  94. package/package.json +38 -0
  95. package/utils/index.js +600 -0
  96. package/utils/request.js +265 -0
@@ -0,0 +1,264 @@
1
+ <template>
2
+ <view class="mu-code-input">
3
+ <!-- 原生隐藏输入框 (普通模式下软键盘唤起) -->
4
+ <input
5
+ v-if="!useVirtualKeyboard && mode !== 'car'"
6
+ class="mu-code-input__hidden-input"
7
+ :type="mode === 'password' ? 'password' : 'text'"
8
+ :maxlength="computedLength"
9
+ :value="modelValue"
10
+ :focus="autoFocus"
11
+ @input="onNativeInput"
12
+ />
13
+
14
+ <!-- 拆分展示的多格 Box 区域 -->
15
+ <view class="mu-code-input__boxes" @tap="focusInput">
16
+ <view
17
+ v-for="i in computedLength"
18
+ :key="i"
19
+ class="mu-code-input__box"
20
+ :class="[
21
+ `mu-code-input__box--${shape}`,
22
+ mode === 'car' && i === 8 && 'mu-code-input__box--new-energy',
23
+ getValueChar(i - 1) && 'mu-code-input__box--filled',
24
+ isCurrentFocus(i - 1) && 'mu-code-input__box--focus'
25
+ ]"
26
+ >
27
+ <!-- 已填写的字符 (加密● 或 原样文字) -->
28
+ <text v-if="getValueChar(i - 1)" class="mu-code-input__text">
29
+ {{ (mask || mode === 'password') ? '●' : getValueChar(i - 1) }}
30
+ </text>
31
+
32
+ <!-- 车牌号第 8 位新能源特殊提示图标 -->
33
+ <view v-else-if="mode === 'car' && i === 8" class="mu-code-input__new-energy-badge">
34
+ <text class="mu-code-input__new-energy-plus">+</text>
35
+ <text class="mu-code-input__new-energy-text">新能源</text>
36
+ </view>
37
+
38
+ <!-- 聚焦闪烁光标 -->
39
+ <view v-else-if="isCurrentFocus(i - 1)" class="mu-code-input__cursor"></view>
40
+ </view>
41
+ </view>
42
+
43
+ <!-- 虚拟键盘弹出控制 -->
44
+ <mu-keyboard
45
+ v-model:show="showVirtualKeyboard"
46
+ v-model:value="innerKeyboardValue"
47
+ :mode="computedKeyboardMode"
48
+ :maxlength="computedLength"
49
+ :title="keyboardTitle || (mode === 'car' ? '请输入车牌号码' : '请输入验证码')"
50
+ @change="onKeyboardChange"
51
+ @finish="onKeyboardFinish"
52
+ />
53
+ </view>
54
+ </template>
55
+
56
+ <script setup>
57
+ import { ref, watch, computed } from 'vue'
58
+
59
+ const props = defineProps({
60
+ modelValue: { type: String, default: '' },
61
+ mode: { type: String, default: 'code' }, // code (验证码) | password (密码框) | car (车牌号输入框)
62
+ length: { type: Number, default: 0 }, // 验证码位数 (code/password 默认 4/6, car 默认 8)
63
+ shape: { type: String, default: 'radius' }, // square (微直角) | radius (圆角) | round (圆圈) | underline (下划线)
64
+ mask: { type: Boolean, default: false }, // 是否加密隐藏数字
65
+ autoFocus: { type: Boolean, default: false },
66
+ useVirtualKeyboard: { type: Boolean, default: false }, // 是否使用自定义底部虚拟键盘
67
+ keyboardTitle: { type: String, default: '' }
68
+ })
69
+
70
+ const emit = defineEmits(['update:modelValue', 'change', 'finish'])
71
+
72
+ const showVirtualKeyboard = ref(false)
73
+ const innerKeyboardValue = ref(props.modelValue || '')
74
+
75
+ watch(() => props.modelValue, (val) => {
76
+ innerKeyboardValue.value = val || ''
77
+ })
78
+
79
+ const computedLength = computed(() => {
80
+ if (props.length > 0) return props.length
81
+ if (props.mode === 'car') return 8
82
+ return 4
83
+ })
84
+
85
+ const computedKeyboardMode = computed(() => {
86
+ if (props.mode === 'car') return 'car'
87
+ if (props.mode === 'password') return 'number'
88
+ return 'number'
89
+ })
90
+
91
+ function getValueChar(index) {
92
+ return (props.modelValue || '').charAt(index) || ''
93
+ }
94
+
95
+ function isCurrentFocus(index) {
96
+ const len = (props.modelValue || '').length
97
+ return len === index
98
+ }
99
+
100
+ function focusInput() {
101
+ if (props.useVirtualKeyboard || props.mode === 'car') {
102
+ showVirtualKeyboard.value = true
103
+ }
104
+ }
105
+
106
+ function onNativeInput(e) {
107
+ let val = e.detail.value || ''
108
+ if (val.length > computedLength.value) {
109
+ val = val.slice(0, computedLength.value)
110
+ }
111
+ emit('update:modelValue', val)
112
+ emit('change', val)
113
+ if (val.length === computedLength.value) {
114
+ emit('finish', val)
115
+ }
116
+ }
117
+
118
+ function onKeyboardChange(val) {
119
+ emit('update:modelValue', val)
120
+ emit('change', val)
121
+ if (val.length === computedLength.value) {
122
+ emit('finish', val)
123
+ showVirtualKeyboard.value = false
124
+ }
125
+ }
126
+
127
+ function onKeyboardFinish(val) {
128
+ emit('finish', val)
129
+ showVirtualKeyboard.value = false
130
+ }
131
+ </script>
132
+
133
+ <style lang="scss" scoped>
134
+ @import "@/uni.scss";
135
+
136
+ .mu-code-input {
137
+ position: relative;
138
+ width: 100%;
139
+ display: flex;
140
+ justify-content: center;
141
+
142
+ &__hidden-input {
143
+ position: absolute;
144
+ top: 0;
145
+ left: -100vw;
146
+ width: 200vw;
147
+ height: 100%;
148
+ opacity: 0;
149
+ z-index: 1;
150
+ }
151
+
152
+ &__boxes {
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: space-between;
156
+ gap: 14rpx;
157
+ width: 100%;
158
+ }
159
+
160
+ &__box {
161
+ flex: 1;
162
+ height: 96rpx;
163
+ background: rgba(255, 255, 255, 0.95);
164
+ border: 2rpx solid $mu-border;
165
+ display: flex;
166
+ align-items: center;
167
+ justify-content: center;
168
+ transition: all 0.2s $mu-ease;
169
+ box-sizing: border-box;
170
+
171
+ &--square { border-radius: 8rpx; }
172
+ &--radius { border-radius: 16rpx; }
173
+ &--round { border-radius: 50%; max-width: 88rpx; }
174
+ &--underline {
175
+ border: none;
176
+ border-bottom: 4rpx solid $mu-border;
177
+ background: transparent;
178
+ border-radius: 0;
179
+ }
180
+
181
+ /* 车牌号新能源专属插槽样式 */
182
+ &--new-energy {
183
+ border-style: dashed;
184
+ border-color: #10B981;
185
+ background: rgba(16, 185, 129, 0.04);
186
+ }
187
+
188
+ &--filled {
189
+ border-color: $mu-primary;
190
+ background: #ffffff;
191
+ }
192
+
193
+ &--focus {
194
+ border-color: $mu-primary;
195
+ box-shadow: 0 0 16rpx rgba(99, 102, 241, 0.3);
196
+ animation: mu-box-pulse 1.5s infinite ease-in-out;
197
+ }
198
+ }
199
+
200
+ &__text {
201
+ font-size: 36rpx;
202
+ font-weight: 800;
203
+ color: $mu-text-primary;
204
+ }
205
+
206
+ &__new-energy-badge {
207
+ display: flex;
208
+ flex-direction: column;
209
+ align-items: center;
210
+ justify-content: center;
211
+ line-height: 1;
212
+ }
213
+
214
+ &__new-energy-plus {
215
+ font-size: 22rpx;
216
+ color: #10B981;
217
+ font-weight: 800;
218
+ }
219
+
220
+ &__new-energy-text {
221
+ font-size: 16rpx;
222
+ color: #10B981;
223
+ font-weight: 700;
224
+ margin-top: 4rpx;
225
+ }
226
+
227
+ &__cursor {
228
+ width: 4rpx;
229
+ height: 36rpx;
230
+ background: $mu-primary;
231
+ animation: mu-cursor-blink 1s infinite;
232
+ }
233
+ }
234
+
235
+ @keyframes mu-cursor-blink {
236
+ 0%, 100% { opacity: 1; }
237
+ 50% { opacity: 0; }
238
+ }
239
+
240
+ @keyframes mu-box-pulse {
241
+ 0%, 100% { border-color: $mu-primary; }
242
+ 50% { border-color: rgba(99, 102, 241, 0.4); }
243
+ }
244
+
245
+ .mu-dark, page.mu-dark {
246
+ .mu-code-input {
247
+ &__box {
248
+ background: rgba(255, 255, 255, 0.04);
249
+ border-color: $mu-dark-border;
250
+ }
251
+ &__text { color: $mu-dark-text-primary; }
252
+ }
253
+ }
254
+
255
+ @media (prefers-color-scheme: dark) {
256
+ .mu-code-input {
257
+ &__box {
258
+ background: rgba(255, 255, 255, 0.04);
259
+ border-color: $mu-dark-border;
260
+ }
261
+ &__text { color: $mu-dark-text-primary; }
262
+ }
263
+ }
264
+ </style>
@@ -0,0 +1,316 @@
1
+ <template>
2
+ <view class="mu-collapse" :class="[`mu-collapse--${variant}`, bordered && 'mu-collapse--bordered']">
3
+ <view
4
+ v-for="(item, index) in items"
5
+ :key="index"
6
+ class="mu-collapse__item"
7
+ :class="[
8
+ isOpen(index) && 'mu-collapse__item--open',
9
+ item.disabled && 'mu-collapse__item--disabled'
10
+ ]"
11
+ >
12
+ <!-- 头部 Header -->
13
+ <view class="mu-collapse__header mu-touchable-flat" @tap="toggle(index)">
14
+ <!-- 左侧 Icon 图标 -->
15
+ <view v-if="item.icon || $slots[`icon-${index}`]" class="mu-collapse__icon">
16
+ <slot :name="`icon-${index}`">
17
+ <mu-icon :name="item.icon" :size="18" :color="isOpen(index) ? '#171717' : '#64748B'" />
18
+ </slot>
19
+ </view>
20
+
21
+ <!-- 标题 -->
22
+ <view class="mu-collapse__title">
23
+ <slot :name="`title-${index}`" :item="item" :is-open="isOpen(index)">
24
+ <text class="mu-collapse__title-text" :class="{ 'mu-collapse__title-text--active': isOpen(index) }">
25
+ {{ item.title }}
26
+ </text>
27
+ </slot>
28
+ </view>
29
+
30
+ <!-- 右侧数值或插槽 -->
31
+ <view v-if="item.value || $slots[`right-${index}`]" class="mu-collapse__right">
32
+ <slot :name="`right-${index}`">
33
+ <text class="mu-collapse__value">{{ item.value }}</text>
34
+ </slot>
35
+ </view>
36
+
37
+ <!-- 旋转箭头 -->
38
+ <view class="mu-collapse__arrow" :class="{ 'mu-collapse__arrow--open': isOpen(index) }">
39
+ <mu-icon name="chevron_right" :size="16" :color="isOpen(index) ? '#171717' : '#94A3B8'" />
40
+ </view>
41
+ </view>
42
+
43
+ <!-- 内容展开区域 Body -->
44
+ <view v-show="isOpen(index)" class="mu-collapse__body">
45
+ <view class="mu-collapse__content">
46
+ <slot :name="`content-${index}`" :item="item">
47
+ <text class="mu-collapse__content-text">{{ item.content }}</text>
48
+ </slot>
49
+ </view>
50
+ </view>
51
+ </view>
52
+ </view>
53
+ </template>
54
+
55
+ <script setup>
56
+ import { ref, watch } from 'vue'
57
+
58
+ const props = defineProps({
59
+ items: { type: Array, default: () => [] },
60
+ modelValue: { type: [Number, String, Array], default: -1 },
61
+ activeIndex: { type: [Number, String, Array], default: -1 }, // 兼容旧属性
62
+ accordion: { type: Boolean, default: false }, // 手风琴单开模式
63
+ bordered: { type: Boolean, default: true },
64
+ variant: { type: String, default: 'card' } // card (卡片分隔) | line (连贯下划线)
65
+ })
66
+
67
+ const emit = defineEmits(['change', 'update:modelValue', 'update:activeIndex'])
68
+
69
+ const activeList = ref([])
70
+
71
+ function init() {
72
+ const currentVal = props.modelValue !== -1 ? props.modelValue : props.activeIndex
73
+ if (Array.isArray(currentVal)) {
74
+ activeList.value = [...currentVal]
75
+ } else if (currentVal >= 0 && currentVal !== '' && currentVal !== null) {
76
+ activeList.value = [Number(currentVal)]
77
+ } else {
78
+ activeList.value = []
79
+ }
80
+ }
81
+
82
+ init()
83
+
84
+ watch(() => [props.modelValue, props.activeIndex], init)
85
+
86
+ function isOpen(index) {
87
+ return activeList.value.includes(index)
88
+ }
89
+
90
+ function toggle(index) {
91
+ if ((props.items[index] && props.items[index].disabled)) return
92
+
93
+ if (props.accordion) {
94
+ activeList.value = isOpen(index) ? [] : [index]
95
+ } else {
96
+ const i = activeList.value.indexOf(index)
97
+ if (i >= 0) {
98
+ activeList.value.splice(i, 1)
99
+ } else {
100
+ activeList.value.push(index)
101
+ }
102
+ }
103
+
104
+ const res = props.accordion ? ((activeList.value[0] !== undefined ? activeList.value[0] : -1)) : [...activeList.value]
105
+ emit('change', res)
106
+ emit('update:modelValue', res)
107
+ emit('update:activeIndex', res)
108
+ }
109
+ </script>
110
+
111
+ <style lang="scss" scoped>
112
+ @import "@/uni.scss";
113
+
114
+ .mu-collapse {
115
+ width: 100%;
116
+ box-sizing: border-box;
117
+
118
+ /* 1. 卡片形态 (card) */
119
+ &--card {
120
+ display: flex;
121
+ flex-direction: column;
122
+ gap: 16rpx;
123
+
124
+ .mu-collapse__item {
125
+ background: #ffffff;
126
+ border: 1rpx solid rgba(226, 232, 240, 0.8);
127
+ border-radius: 20rpx;
128
+ overflow: hidden;
129
+ transition: all 0.25s ease;
130
+ box-shadow: 0 2rpx 8rpx rgba(15, 23, 42, 0.03);
131
+
132
+ &--open {
133
+ border-color: rgba(99, 102, 241, 0.3);
134
+ box-shadow: 0 6rpx 20rpx -4rpx rgba(99, 102, 241, 0.1);
135
+ }
136
+ }
137
+
138
+ .mu-collapse__header {
139
+ padding: 24rpx 28rpx;
140
+ }
141
+
142
+ .mu-collapse__content {
143
+ padding: 0 28rpx 28rpx 28rpx;
144
+ }
145
+ }
146
+
147
+ /* 2. 下划线连贯形态 (line) */
148
+ &--line {
149
+ background: #ffffff;
150
+ border-radius: 20rpx;
151
+ overflow: hidden;
152
+ border: 1rpx solid rgba(226, 232, 240, 0.8);
153
+
154
+ .mu-collapse__item {
155
+ border-bottom: 1rpx solid rgba(226, 232, 240, 0.6);
156
+
157
+ &:last-child {
158
+ border-bottom: none;
159
+ }
160
+ }
161
+
162
+ .mu-collapse__header {
163
+ padding: 26rpx 28rpx;
164
+ }
165
+
166
+ .mu-collapse__content {
167
+ padding: 0 28rpx 24rpx 28rpx;
168
+ }
169
+ }
170
+
171
+ &__item {
172
+ &--disabled {
173
+ opacity: 0.5;
174
+ pointer-events: none;
175
+ }
176
+ }
177
+
178
+ &__header {
179
+ display: flex;
180
+ align-items: center;
181
+ cursor: pointer;
182
+ background: transparent;
183
+ box-sizing: border-box;
184
+ }
185
+
186
+ &__icon {
187
+ margin-right: 18rpx;
188
+ display: flex;
189
+ align-items: center;
190
+ justify-content: center;
191
+ flex-shrink: 0;
192
+ }
193
+
194
+ &__title {
195
+ flex: 1;
196
+ min-width: 0;
197
+
198
+ &-text {
199
+ font-size: 28rpx;
200
+ font-weight: 600;
201
+ color: $mu-text-primary;
202
+ transition: color 0.2s ease;
203
+
204
+ &--active {
205
+ color: #171717;
206
+ }
207
+ }
208
+ }
209
+
210
+ &__right {
211
+ margin-left: 16rpx;
212
+ flex-shrink: 0;
213
+ }
214
+
215
+ &__value {
216
+ font-size: 24rpx;
217
+ color: #94A3B8;
218
+ }
219
+
220
+ &__arrow {
221
+ margin-left: 16rpx;
222
+ flex-shrink: 0;
223
+ display: flex;
224
+ align-items: center;
225
+ justify-content: center;
226
+ transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
227
+
228
+ &--open {
229
+ transform: rotate(90deg);
230
+ }
231
+ }
232
+
233
+ &__body {
234
+ overflow: hidden;
235
+ }
236
+
237
+ &__content {
238
+ &-text {
239
+ font-size: 26rpx;
240
+ color: #64748B;
241
+ line-height: 1.6;
242
+ word-break: break-all;
243
+ }
244
+ }
245
+ }
246
+
247
+ .mu-dark, page.mu-dark {
248
+
249
+ .mu-collapse {
250
+ &--card {
251
+ .mu-collapse__item {
252
+ background: $mu-dark-bg-base;
253
+ border-color: rgba(255, 255, 255, 0.08);
254
+
255
+ &--open {
256
+ border-color: rgba(99, 102, 241, 0.4);
257
+ box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.3);
258
+ }
259
+ }
260
+ }
261
+
262
+ &--line {
263
+ background: $mu-dark-bg-base;
264
+ border-color: rgba(255, 255, 255, 0.08);
265
+
266
+ .mu-collapse__item {
267
+ border-color: rgba(255, 255, 255, 0.06);
268
+ }
269
+ }
270
+
271
+ &__title-text {
272
+ color: $mu-dark-text-primary;
273
+ &--active { color: #FFFFFF; }
274
+ }
275
+
276
+ &__content-text {
277
+ color: $mu-dark-text-secondary;
278
+ }
279
+ }
280
+ }
281
+
282
+ @media (prefers-color-scheme: dark) {
283
+
284
+ .mu-collapse {
285
+ &--card {
286
+ .mu-collapse__item {
287
+ background: $mu-dark-bg-base;
288
+ border-color: rgba(255, 255, 255, 0.08);
289
+
290
+ &--open {
291
+ border-color: rgba(99, 102, 241, 0.4);
292
+ box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.3);
293
+ }
294
+ }
295
+ }
296
+
297
+ &--line {
298
+ background: $mu-dark-bg-base;
299
+ border-color: rgba(255, 255, 255, 0.08);
300
+
301
+ .mu-collapse__item {
302
+ border-color: rgba(255, 255, 255, 0.06);
303
+ }
304
+ }
305
+
306
+ &__title-text {
307
+ color: $mu-dark-text-primary;
308
+ &--active { color: #FFFFFF; }
309
+ }
310
+
311
+ &__content-text {
312
+ color: $mu-dark-text-secondary;
313
+ }
314
+ }
315
+ }
316
+ </style>