hy-app 0.2.0 → 0.2.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.
Files changed (104) hide show
  1. package/README.md +2 -1
  2. package/components/hy-back-top/index.scss +1 -10
  3. package/components/hy-badge/index.scss +5 -5
  4. package/components/hy-button/hy-button.vue +6 -7
  5. package/components/hy-button/index.scss +4 -11
  6. package/components/hy-calendar/index.scss +21 -24
  7. package/components/hy-calendar/month.vue +28 -6
  8. package/components/hy-calendar/props.ts +1 -1
  9. package/components/hy-card/index.scss +2 -11
  10. package/components/hy-cell/index.scss +9 -22
  11. package/components/hy-checkbox/hy-checkbox.vue +9 -6
  12. package/components/hy-checkbox/index.scss +14 -17
  13. package/components/hy-code-input/hy-code-input.vue +223 -0
  14. package/components/hy-code-input/index.scss +108 -0
  15. package/components/hy-code-input/props.ts +21 -0
  16. package/components/hy-code-input/typing.d.ts +65 -0
  17. package/components/hy-config-provider/hy-config-provider.vue +2 -1
  18. package/components/hy-config-provider/index.scss +2 -6
  19. package/components/hy-count-down/index.scss +0 -9
  20. package/components/hy-count-to/index.scss +1 -9
  21. package/components/hy-divider/index.scss +2 -1
  22. package/components/hy-divider/props.ts +2 -2
  23. package/components/hy-dropdown/index.scss +1 -1
  24. package/components/hy-dropdown/props.ts +1 -1
  25. package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -5
  26. package/components/hy-dropdown-item/index.scss +13 -30
  27. package/components/hy-empty/index.scss +1 -10
  28. package/components/hy-float-button/index.scss +4 -9
  29. package/components/hy-form/index.scss +1 -8
  30. package/components/hy-grid/hy-grid.vue +5 -5
  31. package/components/hy-grid/index.scss +1 -1
  32. package/components/hy-icon/index.scss +4 -9
  33. package/components/hy-image/hy-image.vue +5 -5
  34. package/components/hy-image/index.scss +2 -2
  35. package/components/hy-image/props.ts +1 -1
  36. package/components/hy-input/hy-input.vue +9 -14
  37. package/components/hy-input/index.scss +10 -12
  38. package/components/hy-input/props.ts +1 -1
  39. package/components/hy-line/index.scss +1 -0
  40. package/components/hy-line/props.ts +1 -1
  41. package/components/hy-line-progress/index.scss +1 -12
  42. package/components/hy-loading/index.scss +2 -2
  43. package/components/hy-modal/hy-modal.vue +8 -5
  44. package/components/hy-modal/index.scss +7 -25
  45. package/components/hy-modal/props.ts +3 -3
  46. package/components/hy-navbar/index.scss +3 -14
  47. package/components/hy-notice-bar/index.scss +31 -41
  48. package/components/hy-notice-bar/props.ts +2 -2
  49. package/components/hy-notify/hy-notify.vue +169 -0
  50. package/components/hy-notify/index.scss +25 -0
  51. package/components/hy-notify/props.ts +14 -0
  52. package/components/hy-notify/typing.d.ts +44 -0
  53. package/components/hy-number-step/index.scss +6 -24
  54. package/components/hy-pagination/hy-pagination.vue +125 -0
  55. package/components/hy-pagination/index.scss +46 -0
  56. package/components/hy-pagination/props.ts +15 -0
  57. package/components/hy-pagination/typing.d.ts +44 -0
  58. package/components/hy-picker/index.scss +5 -1
  59. package/components/hy-popup/index.scss +1 -10
  60. package/components/hy-price/index.scss +0 -6
  61. package/components/hy-qrcode/index.scss +1 -1
  62. package/components/hy-radio/hy-radio.vue +8 -5
  63. package/components/hy-radio/index.scss +16 -18
  64. package/components/hy-rate/index.scss +1 -6
  65. package/components/hy-read-more/index.scss +3 -20
  66. package/components/hy-scroll-list/index.scss +1 -1
  67. package/components/hy-search/index.scss +6 -26
  68. package/components/hy-signature/canvasHelper.ts +51 -0
  69. package/components/hy-signature/hy-signature.vue +656 -0
  70. package/components/hy-signature/index.scss +31 -0
  71. package/components/hy-signature/props.ts +28 -0
  72. package/components/hy-signature/typing.d.ts +177 -0
  73. package/components/hy-slider/index.scss +6 -2
  74. package/components/hy-slider/props.ts +2 -2
  75. package/components/hy-steps/hy-steps.vue +38 -20
  76. package/components/hy-steps/index.scss +6 -17
  77. package/components/hy-submit-bar/index.scss +1 -9
  78. package/components/hy-subsection/index.scss +2 -16
  79. package/components/hy-swipe-action/hy-swipe-action.vue +288 -248
  80. package/components/hy-swipe-action/index.scss +32 -7
  81. package/components/hy-swipe-action/index.ts +34 -0
  82. package/components/hy-swipe-action/props.ts +15 -9
  83. package/components/hy-swipe-action/typing.d.ts +20 -22
  84. package/components/hy-swiper/index.scss +5 -10
  85. package/components/hy-switch/index.scss +19 -18
  86. package/components/hy-switch/props.ts +0 -1
  87. package/components/hy-tabs/index.scss +4 -18
  88. package/components/hy-tag/index.scss +3 -3
  89. package/components/hy-text/hy-text.vue +5 -4
  90. package/components/hy-text/index.scss +3 -15
  91. package/components/hy-textarea/hy-textarea.vue +5 -5
  92. package/components/hy-textarea/index.scss +8 -20
  93. package/components/hy-toast/index.scss +5 -22
  94. package/components/hy-tooltip/index.scss +7 -5
  95. package/components/hy-upload/index.scss +5 -15
  96. package/composables/index.ts +1 -0
  97. package/composables/useTouch.ts +48 -0
  98. package/index.scss +1 -0
  99. package/libs/css/mixin.scss +58 -13
  100. package/libs/css/vars.css +53 -0
  101. package/package.json +2 -2
  102. package/theme.scss +42 -54
  103. package/components/hy-swipe-action/index.wxs +0 -235
  104. package/components/hy-swipe-action/wxs.js +0 -15
@@ -0,0 +1,223 @@
1
+ <template>
2
+ <view class="hy-code-input">
3
+ <view
4
+ :class="[
5
+ 'hy-code-input--item',
6
+ `hy-code-input--item__${mode}`,
7
+ current > index && `hy-code-input--item__${mode}__border`,
8
+ isFocus && current === index && `hy-code-input--item__${mode}__active`,
9
+ ]"
10
+ :style="[itemStyle(index)]"
11
+ v-for="(item, index) in codeLength"
12
+ :key="index"
13
+ >
14
+ <view
15
+ class="hy-code-input--item__dot"
16
+ v-if="dot && current > index"
17
+ ></view>
18
+ <text
19
+ v-else
20
+ class="hy-code-input--item__text"
21
+ :style="{
22
+ fontSize: addUnit(fontSize),
23
+ fontWeight: bold ? 'bold' : 'normal',
24
+ color: color,
25
+ }"
26
+ >{{ codeArray[index] }}</text
27
+ >
28
+ </view>
29
+ <input
30
+ :disabled="disabledKeyboard"
31
+ type="number"
32
+ :focus="focus"
33
+ :value="inputValue"
34
+ :maxlength="maxlength"
35
+ :adjustPosition="adjustPosition"
36
+ class="hy-code-input__input"
37
+ @input="inputHandler"
38
+ :style="{
39
+ height: boxSize,
40
+ }"
41
+ @focus="isFocus = true"
42
+ @blur="isFocus = false"
43
+ />
44
+ </view>
45
+ </template>
46
+
47
+ <script lang="ts">
48
+ export default {
49
+ name: "hy-code-input",
50
+ options: {
51
+ addGlobalClass: true,
52
+ virtualHost: true,
53
+ styleIsolation: "shared",
54
+ },
55
+ };
56
+ </script>
57
+
58
+ <script setup lang="ts">
59
+ import {
60
+ computed,
61
+ type CSSProperties,
62
+ nextTick,
63
+ onUnmounted,
64
+ ref,
65
+ toRefs,
66
+ watch,
67
+ } from "vue";
68
+ import type IProps from "./typing";
69
+ import defaultProps from "./props";
70
+ import { addUnit, getPx } from "../../utils";
71
+
72
+ const props = withDefaults(defineProps<IProps>(), defaultProps);
73
+ const {
74
+ modelValue,
75
+ focus,
76
+ maxlength,
77
+ disabledDot,
78
+ size,
79
+ mode,
80
+ hairline,
81
+ space,
82
+ borderColor,
83
+ } = toRefs(props);
84
+ const emit = defineEmits(["change", "finish", "update:modelValue"]);
85
+
86
+ const current = ref(0);
87
+ const inputValue = ref("");
88
+ const isFocus = ref(focus.value);
89
+ let timer: ReturnType<typeof setInterval>;
90
+ const opacity = ref(1);
91
+ const borderWidth = computed(() => (hairline.value ? "0.5px" : "2px"));
92
+ const lineHeight = computed(() => (hairline.value ? "2px" : "4px"));
93
+ const boxSize = addUnit(size.value);
94
+
95
+ watch(
96
+ () => modelValue.value,
97
+ (newValue: string | number) => {
98
+ inputValue.value = String(newValue).substring(0, maxlength.value);
99
+ current.value = newValue.toString().length;
100
+ },
101
+ { immediate: true },
102
+ );
103
+
104
+ watch(
105
+ () => isFocus.value,
106
+ (newValue) => {
107
+ // #ifdef APP-NVUE
108
+ if (newValue) {
109
+ timer = setInterval(() => {
110
+ opacity.value = Math.abs(opacity.value - 1);
111
+ }, 600);
112
+ } else {
113
+ clearInterval(timer);
114
+ }
115
+ // #endif
116
+ },
117
+ );
118
+
119
+ onUnmounted(() => {
120
+ // #ifdef APP-NVUE
121
+ clearInterval(timer);
122
+ // #endif
123
+ });
124
+
125
+ // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
126
+ const codeLength = computed(() => {
127
+ return new Array(Number(maxlength.value));
128
+ });
129
+ // 循环item的样式
130
+ const itemStyle = computed(() => {
131
+ return (index: number) => {
132
+ const style: CSSProperties = {
133
+ width: boxSize,
134
+ height: boxSize,
135
+ "--hy-border-color": borderColor.value,
136
+ };
137
+ // 盒子模式下,需要额外进行处理
138
+ if (mode.value === "box") {
139
+ // 设置盒子的边框,如果是细边框,则设置为1px宽度
140
+ style.borderWidth = borderWidth.value;
141
+ style.borderStyle = "solid";
142
+ style.borderColor = borderColor.value;
143
+ // 如果盒子间距为0的话
144
+ if (getPx(space.value) === 0) {
145
+ // 给第一和最后一个盒子设置圆角
146
+ if (index === 0) {
147
+ style.borderTopLeftRadius = "3px";
148
+ style.borderBottomLeftRadius = "3px";
149
+ }
150
+ if (index === codeLength.value.length - 1) {
151
+ style.borderTopRightRadius = "3px";
152
+ style.borderBottomRightRadius = "3px";
153
+ }
154
+ // 最后一个盒子的右边框需要保留
155
+ if (index !== codeLength.value.length - 1) {
156
+ style.borderRight = "none";
157
+ }
158
+ }
159
+ }
160
+ if (index !== codeLength.value.length - 1) {
161
+ // 设置验证码字符之间的距离,通过margin-right设置,最后一个字符,无需右边框
162
+ style.marginRight = addUnit(space.value);
163
+ } else {
164
+ // 最后一个盒子的有边框需要保留
165
+ style.marginRight = 0;
166
+ }
167
+
168
+ return style;
169
+ };
170
+ });
171
+
172
+ /**
173
+ * @description 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素
174
+ */
175
+ const codeArray = computed(() => {
176
+ return String(inputValue.value).split("");
177
+ });
178
+
179
+ /**
180
+ * @description 监听输入框的值发生变化
181
+ * */
182
+ const inputHandler = (e: any) => {
183
+ const value = e.detail.value;
184
+ inputValue.value = value;
185
+ // 是否允许输入“.”符号
186
+ if (disabledDot.value) {
187
+ nextTick(() => {
188
+ inputValue.value = value.replace(".", "");
189
+ });
190
+ }
191
+ // 未达到maxlength之前,发送change事件,达到后发送finish事件
192
+ emit("change", value);
193
+ // 修改通过v-model双向绑定的值
194
+ emit("update:modelValue", value);
195
+ // 达到用户指定输入长度时,发出完成事件
196
+ if (String(value).length >= Number(maxlength.value)) {
197
+ emit("finish", value);
198
+ }
199
+ };
200
+ </script>
201
+
202
+ <style scoped lang="scss">
203
+ @import "./index.scss";
204
+ @import "../../libs/css/mixin.scss";
205
+ @import "../../theme.scss";
206
+ @include b(code-input) {
207
+ @include m(item) {
208
+ &__box {
209
+ &__active {
210
+ width: v-bind(boxSize);
211
+ height: v-bind(boxSize);
212
+ border-width: v-bind(borderWidth);
213
+ }
214
+ }
215
+ &__line {
216
+ &::after {
217
+ height: v-bind(lineHeight);
218
+ background-color: var(--hy-border-color);
219
+ }
220
+ }
221
+ }
222
+ }
223
+ </style>
@@ -0,0 +1,108 @@
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ @include b(code-input) {
5
+ @include flex;
6
+ position: relative;
7
+ overflow: hidden;
8
+
9
+ @include m(item) {
10
+ @include flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ position: relative;
14
+
15
+ &__text {
16
+ font-size: 15px;
17
+ color: $hy-icon-color;
18
+ }
19
+
20
+ &__dot {
21
+ width: 7px;
22
+ height: 7px;
23
+ border-radius: 100px;
24
+ background-color: $hy-icon-color;
25
+ }
26
+
27
+ /* 方块模式 */
28
+ &__box {
29
+ border-color: $hy-border-color--2;
30
+ &__border {
31
+ border-color: $hy-primary !important;
32
+
33
+ @include b(code-input--item__dot) {
34
+ background-color: $hy-primary;
35
+ }
36
+
37
+ text {
38
+ color: $hy-primary;
39
+ }
40
+ }
41
+
42
+ &__active {
43
+ border-color: $hy-primary !important;
44
+ animation: 1.5s hy-cursor-flicker infinite;
45
+ }
46
+ }
47
+
48
+ /* 线条模式 */
49
+ &__line {
50
+ &::after {
51
+ content: "";
52
+ position: absolute;
53
+ bottom: 0;
54
+ border-radius: $hy-border-radius-semicircle;
55
+ width: 40px;
56
+ background-color: $hy-border-color--2;
57
+ }
58
+
59
+ /* 边框 */
60
+ &__border {
61
+ @include b(code-input--item__dot) {
62
+ background-color: $hy-primary;
63
+ }
64
+ &::after {
65
+ content: "";
66
+ background-color: $hy-primary !important;
67
+ }
68
+ text {
69
+ color: $hy-primary;
70
+ }
71
+ }
72
+
73
+ /* 状态 */
74
+ &__active {
75
+ &::after {
76
+ content: "";
77
+ background-color: $hy-primary !important;
78
+ animation: 1.5s hy-cursor-flicker infinite;
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ &__input {
85
+ // 之所以需要input输入框,是因为有它才能唤起键盘
86
+ // 这里将它设置为两倍的屏幕宽度,再将左边的一半移出屏幕,为了不让用户看到输入的内容
87
+ position: absolute;
88
+ left: -750rpx;
89
+ width: 1500rpx;
90
+ top: 0;
91
+ background-color: transparent;
92
+ text-align: left;
93
+ }
94
+ }
95
+
96
+ /* #ifndef APP-NVUE */
97
+ @keyframes hy-cursor-flicker {
98
+ 0% {
99
+ opacity: 0.2;
100
+ }
101
+ 50% {
102
+ opacity: 1;
103
+ }
104
+ 100% {
105
+ opacity: 0.2;
106
+ }
107
+ }
108
+ /* #endif */
@@ -0,0 +1,21 @@
1
+ import type IProps from "./typing";
2
+
3
+ const defaultProps: IProps = {
4
+ modelValue: "",
5
+ adjustPosition: true,
6
+ maxlength: 6,
7
+ dot: false,
8
+ mode: "box",
9
+ hairline: false,
10
+ space: 10,
11
+ focus: false,
12
+ bold: false,
13
+ color: "",
14
+ fontSize: 18,
15
+ size: 35,
16
+ disabledKeyboard: false,
17
+ borderColor: "",
18
+ disabledDot: true,
19
+ };
20
+
21
+ export default defaultProps;
@@ -0,0 +1,65 @@
1
+ import type { CSSProperties } from "vue";
2
+
3
+ export default interface HyOverlayProps {
4
+ modelValue: string | number;
5
+ /**
6
+ * @description 键盘弹起时,是否自动上推页面(默认 true )
7
+ * */
8
+ adjustPosition?: boolean;
9
+ /**
10
+ * @description 最大输入长度(默认 6 )
11
+ * */
12
+ maxlength?: number;
13
+ /**
14
+ * @description 是否用圆点填充(默认 false )
15
+ * */
16
+ dot?: boolean;
17
+ /**
18
+ * @description 显示模式,box-盒子模式,line-底部横线模式 (默认 'box' )
19
+ * */
20
+ mode?: "box" | string;
21
+ /**
22
+ * @description 是否细边框 (默认 false )
23
+ * */
24
+ hairline?: boolean;
25
+ /**
26
+ * @description 字符间的距离 (默认 10 )
27
+ * */
28
+ space?: number;
29
+ /**
30
+ * @description 是否自动获取焦点 (默认 false )
31
+ * */
32
+ focus?: boolean;
33
+ /**
34
+ * @description 字体是否加粗 (默认 false )
35
+ * */
36
+ bold?: boolean;
37
+ /**
38
+ * @description 字体颜色 (默认 '#606266' )
39
+ * */
40
+ color?: string;
41
+ /**
42
+ * @description 字体大小,单位px (默认 18 )
43
+ * */
44
+ fontSize?: number;
45
+ /**
46
+ * @description 输入框的大小,宽等于高 (默认 35 )
47
+ * */
48
+ size?: number | string;
49
+ /**
50
+ * @description 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true (默认 false )
51
+ * */
52
+ disabledKeyboard?: boolean;
53
+ /**
54
+ * @description 边框和线条颜色 (默认 '#c9cacc' )
55
+ * */
56
+ borderColor?: string;
57
+ /**
58
+ * @description 是否禁止输入"."符号 (默认 true )
59
+ * */
60
+ disabledDot?: boolean;
61
+ /**
62
+ * @description 定义需要用到的外部样式
63
+ * */
64
+ customStyle?: CSSProperties;
65
+ }
@@ -20,6 +20,7 @@ import { computed, toRefs } from "vue";
20
20
  import type IProps from "./typing";
21
21
  import defaultProps from "./props";
22
22
  import { addUnit } from "@/package";
23
+ import { colorGradient } from "@/package/utils";
23
24
 
24
25
  const props = withDefaults(defineProps<IProps>(), defaultProps);
25
26
  const {
@@ -39,7 +40,7 @@ const themeStyle = computed(() => {
39
40
  return [
40
41
  {
41
42
  "--hy-theme-color": themeColor.value,
42
- "--hy-theme-color--light": themeLightColor.value,
43
+ "--hy-theme--light": colorGradient(themeColor.value)[90],
43
44
  padding: addUnit(padding.value),
44
45
  },
45
46
  customStyle.value,
@@ -1,12 +1,6 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- @include b(theme) {
5
- @include m(dark) {
6
- background-color: $hy-dark-background;
7
- color: $hy-dark-color;
8
- }
9
- }
10
4
 
11
5
  @include b(config-provider) {
12
6
  box-sizing: border-box;
@@ -18,4 +12,6 @@
18
12
  height: 100vh;
19
13
  /* #endif */
20
14
  overflow: auto;
15
+ background-color: $hy-background;
16
+ color: $hy-text-color;
21
17
  }
@@ -1,15 +1,6 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(count-down) {
8
- color: $hy-dark-color;
9
- }
10
- }
11
- }
12
-
13
4
  @include b(count-down) {
14
5
  &__text {
15
6
  font-size: 15px;
@@ -1,19 +1,11 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(count-to) {
8
- color: $hy-dark-color;
9
- }
10
- }
11
- }
12
4
 
13
5
  @include b(count-to) {
14
6
  /* #ifndef APP-NVUE */
15
7
  display: inline-flex;
16
8
  /* #endif */
17
9
  text-align: center;
18
- color: $hy-tips-color;
10
+ color: $hy-text-color;
19
11
  }
@@ -15,12 +15,13 @@
15
15
  }
16
16
 
17
17
  &__text {
18
+ color: $hy-text-color--3;
18
19
  margin: 0 $hy-border-margin-padding-sm;
19
20
  }
20
21
 
21
22
  &__dot {
22
23
  font-size: $hy-font-size-sm;
23
24
  margin: 0 $hy-border-margin-padding-sm;
24
- color: #c0c4cc;
25
+ color: $hy-text-color--3;
25
26
  }
26
27
  }
@@ -8,8 +8,8 @@ const defaultProps: IProps = {
8
8
  textPosition: "center",
9
9
  text: "",
10
10
  textSize: 14,
11
- textColor: "#909399",
12
- lineColor: "#dcdfe6",
11
+ textColor: "",
12
+ lineColor: "",
13
13
  loadingIcon: IconConfig.LOADING,
14
14
  loadMoreText: "加载更多",
15
15
  loadingText: "正在加载...",
@@ -5,7 +5,7 @@
5
5
  width: 100%;
6
6
  display: flex;
7
7
  align-items: center;
8
- background-color: #fff;
8
+ background-color: $hy-background;
9
9
  box-sizing: border-box;
10
10
  }
11
11
 
@@ -3,7 +3,7 @@ import { IconConfig } from "@/package";
3
3
 
4
4
  const defaultProps: IProps = {
5
5
  activeColor: "",
6
- inactiveColor: "#606266",
6
+ inactiveColor: "",
7
7
  closeOnClickMask: true,
8
8
  sticky: true,
9
9
  height: 40,
@@ -1,10 +1,7 @@
1
1
  <template>
2
2
  <!-- 标题栏 -->
3
3
  <view
4
- :class="[
5
- 'hy-dropdown-item__header',
6
- isOpen && 'hy-dropdown-item__header--active',
7
- ]"
4
+ :class="['hy-dropdown-item__header', isOpen && 'is-active']"
8
5
  @click="handleClick"
9
6
  >
10
7
  <text
@@ -39,7 +36,7 @@
39
36
  <view
40
37
  :class="[
41
38
  'hy-dropdown-item__main--container__list-item',
42
- isOpen && 'hy-dropdown-item__main--container__list--active',
39
+ currentIndex === index && 'is-active',
43
40
  ]"
44
41
  v-for="(item, index) in menus"
45
42
  :key="item.value || index"
@@ -1,21 +1,6 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(dropdown-item) {
8
- color: $hy-dark-color;
9
- &__header {
10
- background-color: $hy-dark-background--container;
11
- }
12
- &__main--container {
13
- background-color: $hy-dark-background--container;
14
- }
15
- }
16
- }
17
- }
18
-
19
4
  @include b(dropdown-item) {
20
5
  &__header {
21
6
  width: 100%;
@@ -30,14 +15,13 @@
30
15
  text-align: center;
31
16
  position: relative;
32
17
  z-index: 999;
33
- background-color: #ffffff;
18
+ background-color: $hy-background--container;
19
+ color: $hy-icon-color;
34
20
 
35
- &--active {
21
+ @include is(active) {
36
22
  color: $hy-primary;
37
- :deep() {
38
- @include b(icon) {
39
- color: $hy-primary;
40
- }
23
+ :deep(.hy-icon) {
24
+ color: $hy-primary;
41
25
  }
42
26
  }
43
27
  }
@@ -53,7 +37,7 @@
53
37
  background-color: rgba(0, 0, 0, 0);
54
38
 
55
39
  &--container {
56
- background-color: #fff;
40
+ background-color: $hy-background--container;
57
41
  min-height: 200rpx;
58
42
  position: absolute;
59
43
  top: -100%;
@@ -72,14 +56,6 @@
72
56
  width: 100%;
73
57
  padding: 0 35rpx;
74
58
  box-sizing: border-box;
75
- &--active {
76
- color: $hy-primary;
77
- :deep() {
78
- @include b(icon) {
79
- color: $hy-primary;
80
- }
81
- }
82
- }
83
59
  &-item {
84
60
  width: 100%;
85
61
  padding: 30rpx 0;
@@ -87,6 +63,13 @@
87
63
  display: flex;
88
64
  align-items: center;
89
65
 
66
+ @include is(active) {
67
+ color: $hy-primary;
68
+ :deep(.hy-icon) {
69
+ color: $hy-primary;
70
+ }
71
+ }
72
+
90
73
  &:not(:last-of-type) {
91
74
  border-bottom: $hy-border-line;
92
75
  }
@@ -1,15 +1,6 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(empty) {
8
- background-color: $hy-dark-background;
9
- color: $hy-dark-color;
10
- }
11
- }
12
- }
13
4
 
14
5
  @include b(empty) {
15
6
  top: 0;
@@ -20,7 +11,7 @@
20
11
  justify-content: center;
21
12
  align-items: center;
22
13
  flex-direction: column;
23
- background: $hy-light-background;
14
+ background: $hy-background;
24
15
  &__description {
25
16
  width: 70%;
26
17
  text-align: center;
@@ -1,19 +1,11 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- @include b(theme){
6
- @include m(dark) {
7
- @include b(float-button) {
8
- //color: $hy-dark-color;
9
- }
10
- }
11
- }
12
4
 
13
5
  @include b(float-button) {
14
6
  position: relative;
15
7
  background-color: $hy-primary;
16
- color: $hy-dark-color;
8
+ color: #FFFFFF;
17
9
  &__circle {
18
10
  border-radius: $hy-border-radius-semicircle;
19
11
  }
@@ -48,6 +40,9 @@
48
40
  align-items: center;
49
41
  transition: 0.4s ease;
50
42
  background-color: $hy-primary;
43
+ :deep(.hy-icon) {
44
+ color: #FFFFFF;
45
+ }
51
46
  }
52
47
 
53
48
  &__menus {