hy-app 0.1.4 → 0.2.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 (229) hide show
  1. package/components/hy-address-picker/hy-address-picker.vue +31 -10
  2. package/components/hy-address-picker/index.scss +1 -1
  3. package/components/hy-address-picker/props.ts +1 -3
  4. package/components/hy-address-picker/typing.d.ts +4 -11
  5. package/components/hy-avatar/hy-avatar.vue +11 -0
  6. package/components/hy-avatar/index.scss +8 -8
  7. package/components/hy-avatar/typing.d.ts +1 -1
  8. package/components/hy-back-top/hy-back-top.vue +27 -2
  9. package/components/hy-back-top/index.scss +11 -1
  10. package/components/hy-back-top/props.ts +1 -6
  11. package/components/hy-back-top/typing.d.ts +4 -7
  12. package/components/hy-badge/hy-badge.vue +11 -0
  13. package/components/hy-badge/index.scss +18 -40
  14. package/components/hy-badge/typing.d.ts +1 -1
  15. package/components/hy-button/hy-button.vue +44 -17
  16. package/components/hy-button/index.scss +25 -45
  17. package/components/hy-button/props.ts +1 -2
  18. package/components/hy-button/typing.d.ts +4 -7
  19. package/components/hy-calendar/header.vue +12 -12
  20. package/components/hy-calendar/hy-calendar.vue +11 -2
  21. package/components/hy-calendar/index.scss +140 -131
  22. package/components/hy-calendar/month.vue +18 -18
  23. package/components/hy-calendar/typing.d.ts +1 -1
  24. package/components/hy-card/hy-card.vue +11 -0
  25. package/components/hy-card/index.scss +12 -12
  26. package/components/hy-card/props.ts +2 -2
  27. package/components/hy-card/typing.d.ts +1 -1
  28. package/components/hy-cell/hy-cell.vue +57 -19
  29. package/components/hy-cell/index.scss +55 -28
  30. package/components/hy-cell/props.ts +4 -5
  31. package/components/hy-cell/typing.d.ts +11 -21
  32. package/components/hy-check-button/hy-check-button.vue +13 -2
  33. package/components/hy-check-button/index.scss +0 -5
  34. package/components/hy-check-button/typing.d.ts +1 -1
  35. package/components/hy-checkbox/hy-checkbox.vue +34 -10
  36. package/components/hy-checkbox/index.scss +15 -5
  37. package/components/hy-checkbox/props.ts +2 -3
  38. package/components/hy-checkbox/typing.d.ts +3 -3
  39. package/components/hy-config-provider/hy-config-provider.vue +52 -0
  40. package/components/hy-config-provider/index.scss +21 -0
  41. package/components/hy-config-provider/props.ts +13 -0
  42. package/components/hy-config-provider/typing.d.ts +28 -0
  43. package/components/hy-count-down/hy-count-down.vue +11 -0
  44. package/components/hy-count-down/index.scss +13 -1
  45. package/components/hy-count-down/typing.d.ts +1 -1
  46. package/components/hy-count-to/hy-count-to.vue +12 -1
  47. package/components/hy-count-to/index.scss +14 -1
  48. package/components/hy-count-to/props.ts +1 -1
  49. package/components/hy-count-to/typing.d.ts +1 -3
  50. package/components/hy-datetime-picker/hy-datetime-picker.vue +29 -14
  51. package/components/hy-datetime-picker/index.scss +1 -1
  52. package/components/hy-datetime-picker/props.ts +1 -3
  53. package/components/hy-datetime-picker/typing.d.ts +6 -13
  54. package/components/hy-divider/hy-divider.vue +11 -0
  55. package/components/hy-divider/index.scss +1 -1
  56. package/components/hy-divider/typing.d.ts +1 -1
  57. package/components/hy-dropdown/hy-dropdown.vue +13 -1
  58. package/components/hy-dropdown/index.scss +4 -1
  59. package/components/hy-dropdown/props.ts +2 -2
  60. package/components/hy-dropdown/typing.d.ts +1 -1
  61. package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
  62. package/components/hy-dropdown-item/index.scss +35 -2
  63. package/components/hy-dropdown-item/typing.d.ts +1 -3
  64. package/components/hy-empty/hy-empty.vue +22 -10
  65. package/components/hy-empty/index.scss +17 -3
  66. package/components/hy-empty/props.ts +1 -5
  67. package/components/hy-empty/typing.d.ts +4 -19
  68. package/components/hy-float-button/hy-float-button.vue +11 -0
  69. package/components/hy-float-button/index.scss +13 -2
  70. package/components/hy-float-button/props.ts +3 -3
  71. package/components/hy-float-button/typing.d.ts +1 -1
  72. package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
  73. package/components/hy-folding-panel/index.scss +4 -1
  74. package/components/hy-folding-panel/typing.d.ts +1 -1
  75. package/components/hy-form/hy-form.vue +214 -36
  76. package/components/hy-form/index.scss +13 -3
  77. package/components/hy-form/props.ts +0 -2
  78. package/components/hy-form/typing.d.ts +25 -7
  79. package/components/hy-grid/hy-grid.vue +27 -5
  80. package/components/hy-grid/index.scss +1 -1
  81. package/components/hy-grid/props.ts +1 -3
  82. package/components/hy-grid/typing.d.ts +13 -16
  83. package/components/hy-icon/hy-icon.vue +17 -10
  84. package/components/hy-icon/index.scss +16 -7
  85. package/components/hy-icon/props.ts +2 -2
  86. package/components/hy-icon/typing.d.ts +1 -1
  87. package/components/hy-image/hy-image.vue +11 -0
  88. package/components/hy-image/index.scss +4 -3
  89. package/components/hy-image/typing.d.ts +1 -1
  90. package/components/hy-input/hy-input.vue +58 -19
  91. package/components/hy-input/index.scss +12 -2
  92. package/components/hy-input/props.ts +3 -5
  93. package/components/hy-input/typing.d.ts +13 -12
  94. package/components/hy-line/hy-line.vue +11 -0
  95. package/components/hy-line/index.scss +4 -1
  96. package/components/hy-line/typing.d.ts +1 -1
  97. package/components/hy-line-progress/hy-line-progress.vue +17 -2
  98. package/components/hy-line-progress/index.scss +20 -8
  99. package/components/hy-line-progress/props.ts +4 -4
  100. package/components/hy-line-progress/typing.d.ts +5 -1
  101. package/components/hy-list/hy-list.vue +23 -8
  102. package/components/hy-list/index.scss +1 -4
  103. package/components/hy-list/typing.d.ts +1 -1
  104. package/components/hy-loading/hy-loading.vue +11 -0
  105. package/components/hy-loading/index.scss +2 -2
  106. package/components/hy-loading/typing.d.ts +1 -2
  107. package/components/hy-login/TheUserLogin.vue +63 -106
  108. package/components/hy-login/hy-login.vue +15 -10
  109. package/components/hy-login/props.ts +1 -1
  110. package/components/hy-login/typing.d.ts +6 -1
  111. package/components/hy-modal/hy-modal.vue +15 -7
  112. package/components/hy-modal/index.scss +19 -3
  113. package/components/hy-modal/typing.d.ts +1 -1
  114. package/components/hy-navbar/hy-navbar.vue +11 -0
  115. package/components/hy-navbar/index.scss +14 -3
  116. package/components/hy-navbar/props.ts +1 -1
  117. package/components/hy-navbar/typing.d.ts +1 -2
  118. package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
  119. package/components/hy-notice-bar/index.scss +35 -35
  120. package/components/hy-notice-bar/typing.d.ts +1 -1
  121. package/components/hy-number-step/hy-number-step.vue +40 -18
  122. package/components/hy-number-step/index.scss +34 -25
  123. package/components/hy-number-step/props.ts +4 -4
  124. package/components/hy-number-step/typing.d.ts +8 -3
  125. package/components/hy-overlay/index.scss +3 -1
  126. package/components/hy-overlay/typing.d.ts +1 -1
  127. package/components/hy-parse/typing.d.ts +1 -1
  128. package/components/hy-picker/hy-picker.vue +30 -8
  129. package/components/hy-picker/index.scss +7 -3
  130. package/components/hy-picker/props.ts +2 -5
  131. package/components/hy-picker/typing.d.ts +4 -15
  132. package/components/hy-popup/hy-popup.vue +11 -0
  133. package/components/hy-popup/index.scss +10 -1
  134. package/components/hy-popup/typing.d.ts +1 -1
  135. package/components/hy-price/hy-price.vue +11 -0
  136. package/components/hy-price/index.scss +4 -1
  137. package/components/hy-price/typing.d.ts +1 -1
  138. package/components/hy-qrcode/hy-qrcode.vue +11 -0
  139. package/components/hy-qrcode/index.scss +4 -1
  140. package/components/hy-qrcode/typing.d.ts +1 -1
  141. package/components/hy-radio/hy-radio.vue +25 -5
  142. package/components/hy-radio/index.scss +17 -5
  143. package/components/hy-radio/props.ts +2 -3
  144. package/components/hy-radio/typing.d.ts +2 -2
  145. package/components/hy-rate/hy-rate.vue +11 -0
  146. package/components/hy-rate/index.scss +6 -6
  147. package/components/hy-rate/typing.d.ts +1 -1
  148. package/components/hy-read-more/hy-read-more.vue +23 -2
  149. package/components/hy-read-more/index.scss +29 -2
  150. package/components/hy-read-more/props.ts +2 -7
  151. package/components/hy-read-more/typing.d.ts +1 -1
  152. package/components/hy-scroll-list/hy-scroll-list.vue +31 -9
  153. package/components/hy-scroll-list/index.scss +10 -1
  154. package/components/hy-scroll-list/props.ts +2 -2
  155. package/components/hy-scroll-list/typing.d.ts +1 -1
  156. package/components/hy-search/hy-search.vue +23 -3
  157. package/components/hy-search/index.scss +25 -4
  158. package/components/hy-search/props.ts +3 -5
  159. package/components/hy-search/typing.d.ts +6 -13
  160. package/components/hy-slider/hy-slider.vue +11 -0
  161. package/components/hy-slider/index.scss +3 -2
  162. package/components/hy-slider/props.ts +1 -1
  163. package/components/hy-slider/typing.d.ts +1 -1
  164. package/components/hy-status-bar/typing.d.ts +1 -1
  165. package/components/hy-steps/hy-steps.vue +38 -20
  166. package/components/hy-steps/index.scss +57 -17
  167. package/components/hy-steps/props.ts +2 -2
  168. package/components/hy-steps/typing.d.ts +1 -1
  169. package/components/{hy-submitBar/hy-submitBar.vue → hy-submit-bar/hy-submit-bar.vue} +13 -34
  170. package/components/hy-submit-bar/index.scss +45 -0
  171. package/components/{hy-submitBar → hy-submit-bar}/typing.d.ts +1 -1
  172. package/components/hy-subsection/hy-subsection.vue +12 -0
  173. package/components/hy-subsection/index.scss +28 -8
  174. package/components/hy-subsection/props.ts +3 -3
  175. package/components/hy-subsection/typing.d.ts +1 -1
  176. package/components/hy-swipe-action/typing.d.ts +1 -1
  177. package/components/hy-swiper/hy-swiper.vue +11 -0
  178. package/components/hy-swiper/index.scss +13 -2
  179. package/components/hy-swiper/typing.d.ts +2 -5
  180. package/components/hy-switch/hy-switch.vue +28 -5
  181. package/components/hy-switch/index.scss +25 -7
  182. package/components/hy-switch/props.ts +1 -3
  183. package/components/hy-switch/typing.d.ts +6 -5
  184. package/components/hy-tabs/hy-tabs.vue +27 -15
  185. package/components/hy-tabs/index.scss +25 -4
  186. package/components/hy-tabs/props.ts +4 -10
  187. package/components/hy-tabs/typing.d.ts +1 -1
  188. package/components/hy-tag/hy-tag.vue +38 -22
  189. package/components/hy-tag/index.scss +27 -115
  190. package/components/hy-tag/props.ts +1 -2
  191. package/components/hy-tag/typing.d.ts +3 -10
  192. package/components/hy-text/hy-text.vue +12 -1
  193. package/components/hy-text/index.scss +20 -37
  194. package/components/hy-text/typing.d.ts +1 -1
  195. package/components/hy-textarea/hy-textarea.vue +17 -6
  196. package/components/hy-textarea/index.scss +16 -5
  197. package/components/hy-textarea/typing.d.ts +2 -2
  198. package/components/hy-toast/hy-toast.vue +13 -2
  199. package/components/hy-toast/index.scss +26 -26
  200. package/components/hy-toast/typing.d.ts +1 -1
  201. package/components/hy-tooltip/hy-tooltip.vue +11 -0
  202. package/components/hy-tooltip/index.scss +3 -3
  203. package/components/hy-tooltip/props.ts +1 -1
  204. package/components/hy-tooltip/typing.d.ts +1 -1
  205. package/components/hy-transition/typing.d.ts +1 -1
  206. package/components/hy-upload/hy-upload.vue +11 -0
  207. package/components/hy-upload/index.scss +12 -1
  208. package/components/hy-upload/typing.d.ts +1 -1
  209. package/components/hy-warn/hy-warn.vue +22 -11
  210. package/components/hy-warn/index.scss +46 -1
  211. package/components/hy-warn/typing.d.ts +1 -1
  212. package/components/hy-waterfall/hy-waterfall.vue +11 -0
  213. package/components/hy-waterfall/index.scss +1 -1
  214. package/components/hy-waterfall/typing.d.ts +1 -3
  215. package/components/index.ts +2 -2
  216. package/config/icon.ts +4 -0
  217. package/libs/css/common.scss +9 -0
  218. package/libs/css/mixin.scss +78 -0
  219. package/package.json +3 -3
  220. package/public/font/iconfont.css +3 -3
  221. package/store/userInfo.ts +26 -25
  222. package/theme.scss +76 -60
  223. package/typing/modules/common.d.ts +5 -1
  224. package/typing/modules/form.ts +29 -14
  225. package/utils/colorGradient.ts +1 -1
  226. package/utils/inside.ts +3 -0
  227. package/components/hy-submitBar/Index.vue +0 -17
  228. package/components/hy-submitBar/index.scss +0 -9
  229. /package/components/{hy-submitBar → hy-submit-bar}/props.ts +0 -0
@@ -1,7 +1,8 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- .hy-slider {
4
+
5
+ @include b(slider) {
5
6
  position: relative;
6
7
  @include flex;
7
8
  align-items: center;
@@ -71,7 +72,7 @@
71
72
  // transform: translate3d(50%, -50%, 0);
72
73
  }
73
74
 
74
- &--disabled {
75
+ @include m(disabled) {
75
76
  opacity: 0.5;
76
77
  }
77
78
  }
@@ -7,7 +7,7 @@ const defaultProps: IProps = {
7
7
  min: 0,
8
8
  max: 100,
9
9
  step: 1,
10
- activeColor: ColorConfig.primary,
10
+ activeColor: "",
11
11
  inactiveColor: "#c0c4cc",
12
12
  blockColor: "#ffffff",
13
13
  showValue: false,
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties } from "vue";
2
2
 
3
- export default interface IProps {
3
+ export default interface HySliderProps {
4
4
  /**
5
5
  * @description 滑块默认值(默认0)
6
6
  * */
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties } from "vue";
2
2
 
3
- export default interface IProps {
3
+ export default interface HyStatusBarProps {
4
4
  /**
5
5
  * @description 背景色 (默认 'transparent' )
6
6
  * */
@@ -7,8 +7,8 @@
7
7
  >
8
8
  <!-- 线条 -->
9
9
  <view
10
- v-if="i + 1 < list.length"
11
- :class="[`hy-steps-item__line--${direction}`, 'hy-steps-item__line']"
10
+ v-if="i > 0"
11
+ :class="[`hy-steps-item__line--${direction}`, 'hy-steps-item__line', statusClass(i, item.error)]"
12
12
  :style="lineStyle(item, i)"
13
13
  ></view>
14
14
  <!-- 线条 -->
@@ -17,14 +17,14 @@
17
17
  <view
18
18
  :class="[
19
19
  `hy-steps-item__wrapper--${direction}`,
20
- dot && `hy-steps-item__wrapper--${direction}--dot`,
21
- 'hy-steps-item__wrapper',
20
+ dot ? `hy-steps-item__wrapper--dot` : statusClass(i, item.error),
21
+ 'hy-steps-item__wrapper'
22
22
  ]"
23
23
  :style="itemStyleInner"
24
24
  >
25
25
  <slot name="icon" :error="item?.error" :index="i">
26
26
  <view
27
- class="hy-steps-item__wrapper__dot"
27
+ :class="['hy-steps-item__wrapper--dot__item', `hy-steps-item__wrapper--dot__${statusClass(i, item.error)}`]"
28
28
  v-if="dot"
29
29
  :style="{
30
30
  backgroundColor: statusColor(i, item?.error),
@@ -111,19 +111,30 @@
111
111
  </view>
112
112
  </template>
113
113
 
114
+ <script lang="ts">
115
+ export default {
116
+ name: 'hy-steps',
117
+ options: {
118
+ addGlobalClass: true,
119
+ virtualHost: true,
120
+ styleIsolation: 'shared'
121
+ }
122
+ }
123
+ </script>
124
+
114
125
  <script setup lang="ts">
115
- import {computed, type CSSProperties, toRefs, ref, onMounted, getCurrentInstance} from "vue";
126
+ import {computed, type CSSProperties, toRefs, ref, onMounted, getCurrentInstance, watch} from "vue";
116
127
  import defaultProps from "./props";
117
128
  import type IProps from "./typing";
118
129
  import type { StepListVo } from "./typing";
119
- import { addUnit, getRect } from "../../utils";
130
+ import {addUnit, getRect} from "../../utils";
120
131
  import { ColorConfig, IconConfig } from "../../config";
121
132
 
122
133
  // 组件
123
134
  import HyIcon from "../hy-icon/hy-icon.vue";
124
135
 
125
136
  const props = withDefaults(defineProps<IProps>(), defaultProps);
126
- const { current, direction, dot, inactiveColor, activeColor } = toRefs(props);
137
+ const { current, list, direction, dot, inactiveColor, activeColor } = toRefs(props);
127
138
  const emit = defineEmits(["click", "update:current"]);
128
139
 
129
140
  const size = ref<UniApp.NodeInfo>({
@@ -132,29 +143,38 @@ const size = ref<UniApp.NodeInfo>({
132
143
  });
133
144
  const instance = getCurrentInstance();
134
145
 
146
+ watch(
147
+ () => current.value,
148
+ (newVal: number) => {
149
+ if(list.value[newVal - 1]?.error) {
150
+ const index = list.value.findIndex(item => item.error);
151
+ emit("update:current", index);
152
+ }
153
+ }
154
+ )
155
+
156
+ /**
157
+ * @description 线条样式
158
+ * */
135
159
  const lineStyle = computed(() => {
136
160
  return (temp: StepListVo, index: number): CSSProperties => {
137
161
  const style: CSSProperties = {};
138
162
  if (direction.value === "row") {
139
- style.width = addUnit(size.value.width);
140
- style.left = addUnit(size.value.width! / 2);
163
+ style.width = addUnit(size.value.width! - 25);
164
+ style.left = addUnit(-size.value.width! / 2 + 12);
141
165
  } else {
142
- style.height = addUnit(size.value.height);
143
- // style.top = addUnit(size.width / 2)
166
+ style.height = addUnit(size.value.height! - 30);
167
+ style.top = addUnit(25)
144
168
  }
145
169
  style.backgroundColor = temp.error
146
- ? ColorConfig.error
170
+ ? ''
147
171
  : index < current.value
148
172
  ? activeColor.value
149
173
  : inactiveColor.value;
150
174
  return style;
151
175
  };
152
176
  });
153
- // const itemStyleInner = () => {
154
- // return {
155
- // ...itemStyle.value
156
- // }
157
- // }
177
+
158
178
  const itemStyleInner = computed(() => {
159
179
  return {};
160
180
  });
@@ -165,8 +185,6 @@ const statusClass = computed(() => {
165
185
  return (index: number, error: boolean = false) => {
166
186
  if (current.value == index) {
167
187
  return error ? "error" : "process";
168
- } else if (error) {
169
- return "error";
170
188
  } else if (current.value > index) {
171
189
  return "finish";
172
190
  } else {
@@ -1,8 +1,21 @@
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(steps) {
8
+ //color: $hy-dark-color;
9
+ &__wrapper__nav__item--active {
10
+ .hy-tabs__wrapper__nav__item--text {
11
+ color: $hy-dark-color;
12
+ }
13
+ }
14
+ }
15
+ }
16
+ }
4
17
 
5
- .hy-steps {
18
+ @include b(steps) {
6
19
  @include flex;
7
20
 
8
21
  &--column {
@@ -40,26 +53,46 @@
40
53
  justify-content: center;
41
54
  align-items: center;
42
55
  position: relative;
43
- background-color: #fff;
56
+ background-color: transparent;
44
57
  border-radius: $hy-border-radius-semicircle;
45
58
 
59
+ /* 选择 */
60
+ &.process {
61
+ background-color: $hy-primary;
62
+ }
63
+
64
+ /* 已完成 */
65
+ &.finish {
66
+ border: 1px solid $hy-primary;
67
+ :deep(.hy-icon) {
68
+ color: $hy-primary;
69
+ }
70
+ }
71
+
46
72
  &--column {
47
73
  width: 20px;
48
74
  height: 20px;
49
-
50
- &--dot {
51
- height: 20px;
52
- width: 20px;
53
- }
54
75
  }
55
76
 
56
77
  &--row {
57
78
  width: 20px;
58
79
  height: 20px;
80
+ }
59
81
 
60
- &--dot {
61
- width: 20px;
62
- height: 20px;
82
+ /* 点形状 */
83
+ &--dot {
84
+ &__item {
85
+ width: 10px;
86
+ height: 10px;
87
+ border-radius: $hy-border-radius-circle;
88
+ background-color: $hy-info;
89
+ border: none;
90
+ }
91
+ &__finish {
92
+ background-color: $hy-primary;
93
+ }
94
+ &__process {
95
+ background-color: $hy-primary;
63
96
  }
64
97
  }
65
98
 
@@ -87,13 +120,6 @@
87
120
  line-height: 11px;
88
121
  }
89
122
  }
90
-
91
- &__dot {
92
- width: 10px;
93
- height: 10px;
94
- border-radius: $hy-border-radius-semicircle;
95
- background-color: $hy-color-subtitle;
96
- }
97
123
  }
98
124
 
99
125
  &__content {
@@ -113,10 +139,24 @@
113
139
  }
114
140
  }
115
141
 
142
+ /* 线条样式 */
116
143
  &__line {
117
144
  position: absolute;
118
145
  background: $hy-tips-color;
119
146
 
147
+ &.finish {
148
+ background-color: $hy-primary;
149
+ }
150
+ &.process {
151
+ background-color: $hy-primary;
152
+ }
153
+ &.error {
154
+ background-color: $hy-error;
155
+ }
156
+ &.wait {
157
+ background-color: $hy-info;
158
+ }
159
+
120
160
  &--row {
121
161
  top: $hy-border-margin-padding-base;
122
162
  height: 1px;
@@ -4,8 +4,8 @@ const defaultProps: IProps = {
4
4
  list: [],
5
5
  direction: "row",
6
6
  current: 0,
7
- activeColor: "#3c9cff",
8
- inactiveColor: "#969799",
7
+ activeColor: "",
8
+ inactiveColor: "",
9
9
  activeIcon: "",
10
10
  inactiveIcon: "",
11
11
  dot: false,
@@ -14,7 +14,7 @@ export interface StepListVo {
14
14
  * */
15
15
  error?: boolean;
16
16
  }
17
- export default interface IProps {
17
+ export default interface HyStepsProps {
18
18
  /**
19
19
  * @description 设置当前处于第几步 (默认 0 )
20
20
  * */
@@ -69,6 +69,17 @@
69
69
  </view>
70
70
  </template>
71
71
 
72
+ <script lang="ts">
73
+ export default {
74
+ name: "hy-submit-bar",
75
+ options: {
76
+ addGlobalClass: true,
77
+ virtualHost: true,
78
+ styleIsolation: "shared",
79
+ },
80
+ };
81
+ </script>
82
+
72
83
  <script setup lang="ts">
73
84
  import type IProps from "./typing";
74
85
  import defaultProps from "./props";
@@ -102,6 +113,7 @@ const emit = defineEmits(["click", "menuClick"]);
102
113
  const submitBarStyle = computed(() => {
103
114
  const style: CSSProperties = {
104
115
  bottom: 0,
116
+ left: 0,
105
117
  };
106
118
  if (fixed.value) style.position = "fixed";
107
119
  return Object.assign(style, customStyle.value);
@@ -179,38 +191,5 @@ const confirmClickFn = debounce((i: number) => {
179
191
  </script>
180
192
 
181
193
  <style lang="scss" scoped>
182
- @import "../../theme.scss";
183
- .hy-submit-bar {
184
- display: flex;
185
- background-color: #ffffff;
186
- padding: $hy-border-margin-padding-base;
187
- width: 100%;
188
- box-sizing: border-box;
189
- /*左边内容*/
190
- &__left {
191
- display: flex;
192
- font-size: 20rpx;
193
- flex: 1;
194
- &--item {
195
- margin: 0 $hy-border-margin-padding-base;
196
- position: relative;
197
- }
198
- }
199
-
200
- /*右边内容*/
201
- &__right {
202
- display: flex;
203
- justify-content: flex-end;
204
- font-size: 26rpx;
205
- align-items: center;
206
- width: 400rpx;
207
- &--button {
208
- padding: $hy-border-margin-padding-base $hy-border-margin-padding-lg;
209
- color: #ffffff;
210
- display: flex;
211
- justify-content: center;
212
- align-items: center;
213
- }
214
- }
215
- }
194
+ @import "./index.scss";
216
195
  </style>
@@ -0,0 +1,45 @@
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ /* 暗色主题 */
5
+ @include b(theme){
6
+ @include m(dark) {
7
+ @include b(submit-bar) {
8
+ background-color: $hy-dark-background;
9
+ }
10
+ }
11
+ }
12
+
13
+ @include b(submit-bar) {
14
+ display: flex;
15
+ background-color: $hy-light-background-color;
16
+ padding: $hy-border-margin-padding-base;
17
+ width: 100%;
18
+ box-sizing: border-box;
19
+ /*左边内容*/
20
+ &__left {
21
+ display: flex;
22
+ font-size: 20rpx;
23
+ flex: 1;
24
+ &--item {
25
+ margin: 0 $hy-border-margin-padding-base;
26
+ position: relative;
27
+ }
28
+ }
29
+
30
+ /*右边内容*/
31
+ &__right {
32
+ display: flex;
33
+ justify-content: flex-end;
34
+ font-size: 26rpx;
35
+ align-items: center;
36
+ width: 400rpx;
37
+ &--button {
38
+ padding: $hy-border-margin-padding-base $hy-border-margin-padding-lg;
39
+ color: #ffffff;
40
+ display: flex;
41
+ justify-content: center;
42
+ align-items: center;
43
+ }
44
+ }
45
+ }
@@ -16,7 +16,7 @@ interface IconMenus {
16
16
  badge?: BadgeProps["badge"];
17
17
  }
18
18
 
19
- export default interface IProps {
19
+ export default interface HySubmitBarProps {
20
20
  /**
21
21
  * @description 左边菜单栏
22
22
  * */
@@ -20,6 +20,17 @@
20
20
  </view>
21
21
  </template>
22
22
 
23
+ <script lang="ts">
24
+ export default {
25
+ name: 'hy-subsection',
26
+ options: {
27
+ addGlobalClass: true,
28
+ virtualHost: true,
29
+ styleIsolation: 'shared'
30
+ }
31
+ }
32
+ </script>
33
+
23
34
  <script setup lang="ts">
24
35
  import {computed, toRefs, ref, onMounted, watch, getCurrentInstance} from "vue";
25
36
  import type { CSSProperties } from "vue";
@@ -72,6 +83,7 @@ const wrapperClass = computed(() => {
72
83
  "hy-subsection__item",
73
84
  "cursor-pointer",
74
85
  `hy-subsection__item--${innerCurrent.value}__${guidClass}`,
86
+ `hy-subsection__item--${mode.value}`,
75
87
  index < list.value.length - 1 && "hy-subsection__item--no-border-right",
76
88
  index === 0 && "hy-subsection__item--first",
77
89
  index === list.value.length - 1 && "hy-subsection__item--last",
@@ -1,7 +1,22 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- .hy-subsection {
4
+ /* 暗色主题 */
5
+ @include b(theme){
6
+ @include m(dark) {
7
+ @include b(subsection) {
8
+ color: $hy-dark-color;
9
+ @include m(button) {
10
+ background-color: $hy-dark-background--track;
11
+ &__bar {
12
+ background-color: $hy-dark-background--container;
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
18
+
19
+ @include b(subsection) {
5
20
  @include flex;
6
21
  position: relative;
7
22
  overflow: hidden;
@@ -10,7 +25,7 @@
10
25
  box-sizing: border-box;
11
26
  /* #endif */
12
27
 
13
- &--button {
28
+ @include m(button) {
14
29
  height: 35px;
15
30
  background-color: rgb(238, 238, 239);
16
31
  padding: 3px;
@@ -23,7 +38,7 @@
23
38
  }
24
39
  }
25
40
 
26
- &--subsection {
41
+ @include m(subsection) {
27
42
  height: 32px;
28
43
  }
29
44
 
@@ -34,16 +49,17 @@
34
49
  transition-duration: 0.3s;
35
50
  transition-timing-function: ease-in-out;
36
51
  /* #endif */
52
+ background-color: $hy-primary;
37
53
 
38
- &--first {
54
+ @include m(first) {
39
55
  border-radius: $hy-border-radius-sm 0 0 $hy-border-radius-sm;
40
56
  }
41
57
 
42
- &--center {
58
+ @include m(center) {
43
59
  border-radius: 0;
44
60
  }
45
61
 
46
- &--last {
62
+ @include m(last) {
47
63
  border-radius: 0 $hy-border-radius-sm $hy-border-radius-sm 0;
48
64
  }
49
65
  }
@@ -56,16 +72,20 @@
56
72
  // vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
57
73
  position: relative;
58
74
 
75
+ @include m(subsection) {
76
+ border: 1px solid $hy-primary;
77
+ }
78
+
59
79
  &--no-border-right {
60
80
  border-right-width: 0 !important;
61
81
  }
62
82
 
63
- &--first {
83
+ @include m(first) {
64
84
  border-top-left-radius: $hy-border-radius-sm;
65
85
  border-bottom-left-radius: $hy-border-radius-sm;
66
86
  }
67
87
 
68
- &--last {
88
+ @include m(last) {
69
89
  border-top-right-radius: $hy-border-radius-sm;
70
90
  border-bottom-right-radius: $hy-border-radius-sm;
71
91
  }
@@ -9,12 +9,12 @@ const defaultProps: IProps = {
9
9
  label: "name",
10
10
  value: "value",
11
11
  },
12
- activeColor: ColorConfig.success,
13
- inactiveColor: "#303133",
12
+ activeColor: "",
13
+ inactiveColor: "",
14
14
  mode: "button",
15
15
  fontSize: 12,
16
16
  bold: true,
17
- bgColor: "#eeeeef",
17
+ bgColor: "",
18
18
  };
19
19
 
20
20
  export default defaultProps;
@@ -8,7 +8,7 @@ export interface SubSectionItemVo extends HyApp.FieldNamesType {
8
8
 
9
9
  export type SubSectionVo = string | number | SubSectionItemVo;
10
10
 
11
- export default interface IProps {
11
+ export default interface HySubsectionProps {
12
12
  /**
13
13
  * @description 接收值
14
14
  * */
@@ -7,7 +7,7 @@ interface SwipeActionOptionsVo {
7
7
  iconSize?: string | number;
8
8
  }
9
9
 
10
- export default interface IProps {
10
+ export default interface SwipeActionProps {
11
11
  /**
12
12
  * @description 数据列表
13
13
  * */
@@ -91,6 +91,17 @@
91
91
  </view>
92
92
  </template>
93
93
 
94
+ <script lang="ts">
95
+ export default {
96
+ name: 'hy-swiper',
97
+ options: {
98
+ addGlobalClass: true,
99
+ virtualHost: true,
100
+ styleIsolation: 'shared'
101
+ }
102
+ }
103
+ </script>
104
+
94
105
  <script setup lang="ts">
95
106
  import {
96
107
  computed,
@@ -1,7 +1,18 @@
1
1
  @use "../../theme.scss" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- .hy-swiper {
4
+ /* 暗色主题 */
5
+ @include b(theme) {
6
+ @include m(dark) {
7
+ @include b(swiper__wrapper) {
8
+ :deep(.uni-swiper-wrapper) {
9
+ background-color: $hy-dark-background--container;
10
+ }
11
+ }
12
+ }
13
+ }
14
+
15
+ @include b(swiper) {
5
16
  @include flex;
6
17
  justify-content: center;
7
18
  align-items: center;
@@ -51,7 +62,7 @@
51
62
  }
52
63
 
53
64
 
54
- .hy-swiper-indicator {
65
+ @include b(swiper-indicator) {
55
66
  &__wrapper {
56
67
  @include flex;
57
68
 
@@ -1,10 +1,7 @@
1
1
  import type { CSSProperties, PropType } from "vue";
2
- import {
3
- HyApp,
4
- type SwiperIndicatorModeType,
5
- } from "@/package/typing/modules/common";
2
+ import { HyApp } from "@/package/typing/modules/common";
6
3
 
7
- export default interface IProps {
4
+ export default interface HySwiperProps {
8
5
  /**
9
6
  * @description 轮播图数据
10
7
  * */