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
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <view :class="themeClass" :style="themeStyle">
3
+ <slot />
4
+ </view>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ export default {
9
+ name: "hy-config-provider",
10
+ options: {
11
+ addGlobalClass: true,
12
+ virtualHost: true,
13
+ styleIsolation: "shared",
14
+ },
15
+ };
16
+ </script>
17
+
18
+ <script setup lang="ts">
19
+ import { computed, toRefs } from "vue";
20
+ import type IProps from "./typing";
21
+ import defaultProps from "./props";
22
+ import { addUnit } from "@/package";
23
+
24
+ const props = withDefaults(defineProps<IProps>(), defaultProps);
25
+ const {
26
+ theme,
27
+ themeColor,
28
+ themeLightColor,
29
+ customClass,
30
+ customStyle,
31
+ padding,
32
+ } = toRefs(props);
33
+
34
+ const themeClass = computed(() => {
35
+ return [customClass.value, "hy-config-provider", `hy-theme--${theme.value}`];
36
+ });
37
+
38
+ const themeStyle = computed(() => {
39
+ return [
40
+ {
41
+ "--hy-theme-color": themeColor.value,
42
+ "--hy-theme-color--light": themeLightColor.value,
43
+ padding: addUnit(padding.value),
44
+ },
45
+ customStyle.value,
46
+ ];
47
+ });
48
+ </script>
49
+
50
+ <style scoped lang="scss">
51
+ @import "./index.scss";
52
+ </style>
@@ -0,0 +1,21 @@
1
+ @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../theme.scss" as *;
3
+
4
+ @include b(theme) {
5
+ @include m(dark) {
6
+ background-color: $hy-dark-background;
7
+ color: $hy-dark-color;
8
+ }
9
+ }
10
+
11
+ @include b(config-provider) {
12
+ box-sizing: border-box;
13
+ width: 100%;
14
+ /* #ifdef H5 */
15
+ height: calc(100vh - 44px);
16
+ /* #endif */
17
+ /* #ifndef H5 */
18
+ height: 100vh;
19
+ /* #endif */
20
+ overflow: auto;
21
+ }
@@ -0,0 +1,13 @@
1
+ import type IProps from "./typing";
2
+ import { ColorConfig } from "../../config";
3
+
4
+ const defaultProps: IProps = {
5
+ theme: "light",
6
+ themeColor: ColorConfig.primary,
7
+ themeLightColor: "#ecf5ff",
8
+ padding: "10px",
9
+ customClass: "",
10
+ customStyle: {},
11
+ };
12
+
13
+ export default defaultProps;
@@ -0,0 +1,28 @@
1
+ import type { CSSProperties } from "vue";
2
+
3
+ export default interface HyConfigProviderProps {
4
+ /**
5
+ * @description dark-暗色、light-亮色
6
+ * */
7
+ theme?: HyApp.DarkModeType;
8
+ /**
9
+ * @description 主题色(默认 #3c9cff )
10
+ * */
11
+ themeColor?: string;
12
+ /**
13
+ * @description 主题色(默认 #ecf5ff )
14
+ * */
15
+ themeLightColor?: string;
16
+ /**
17
+ * @description 内边距(默认 10px )
18
+ * */
19
+ padding?: string;
20
+ /**
21
+ * @description 定义需要用到的主题类名
22
+ * */
23
+ customClass?: string | string[];
24
+ /**
25
+ * @description 定义需要用到的外部样式
26
+ * */
27
+ customStyle?: CSSProperties;
28
+ }
@@ -6,6 +6,17 @@
6
6
  </view>
7
7
  </template>
8
8
 
9
+ <script lang="ts">
10
+ export default {
11
+ name: 'hy-count-down',
12
+ options: {
13
+ addGlobalClass: true,
14
+ virtualHost: true,
15
+ styleIsolation: 'shared'
16
+ }
17
+ }
18
+ </script>
19
+
9
20
  <script setup lang="ts">
10
21
  import type IProps from "./typing";
11
22
  import defaultProps from "./props";
@@ -1,4 +1,16 @@
1
- .hy-count-down {
1
+ @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../theme.scss" as *;
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
+ @include b(count-down) {
2
14
  &__text {
3
15
  font-size: 15px;
4
16
  line-height: 22px;
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties } from "vue";
2
2
 
3
- export default interface IProps {
3
+ export default interface HyCountDownProps {
4
4
  /**
5
5
  * @description 倒计时时长,单位ms (默认 0 )
6
6
  * */
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <text
3
- class="hy-count-num"
3
+ class="hy-count-to"
4
4
  :style="{
5
5
  fontSize: addUnit(fontSize),
6
6
  fontWeight: bold ? 'bold' : 'normal',
@@ -10,6 +10,17 @@
10
10
  >
11
11
  </template>
12
12
 
13
+ <script lang="ts">
14
+ export default {
15
+ name: 'hy-count-to',
16
+ options: {
17
+ addGlobalClass: true,
18
+ virtualHost: true,
19
+ styleIsolation: 'shared'
20
+ }
21
+ }
22
+ </script>
23
+
13
24
  <script setup lang="ts">
14
25
  import type IProps from "./typing";
15
26
  import defaultProps from "./props";
@@ -1,6 +1,19 @@
1
- .hy-count-num {
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(count-to) {
8
+ color: $hy-dark-color;
9
+ }
10
+ }
11
+ }
12
+
13
+ @include b(count-to) {
2
14
  /* #ifndef APP-NVUE */
3
15
  display: inline-flex;
4
16
  /* #endif */
5
17
  text-align: center;
18
+ color: $hy-tips-color;
6
19
  }
@@ -8,7 +8,7 @@ const defaultProps: IProps = {
8
8
  decimals: 0,
9
9
  useEasing: true,
10
10
  decimal: ".",
11
- color: "#606266",
11
+ color: "",
12
12
  fontSize: 22,
13
13
  bold: false,
14
14
  separator: "",
@@ -1,6 +1,4 @@
1
- import type { CSSProperties } from "vue";
2
-
3
- export default interface IProps {
1
+ export default interface HyCountToProps {
4
2
  /**
5
3
  * @description 开始的数值,默认从0增长到某一个数(默认 0 )
6
4
  * */
@@ -7,14 +7,23 @@
7
7
  >
8
8
  <slot name="trigger" :value="inputValue">
9
9
  <HyInput
10
- :placeholder="placeholder"
11
- :readonly="true"
12
10
  v-model="inputValue"
13
- :disabled="disabled"
14
- :disabledColor="disabledColor"
15
- :shape="shape"
16
- :border="border"
17
- :customStyle="customStyle"
11
+ :readonly="true"
12
+ :disabled="input?.disabled"
13
+ :disabledColor="input?.disabledColor"
14
+ :shape="input?.shape"
15
+ :border="input?.border"
16
+ :prefixIcon="input?.prefixIcon"
17
+ :suffixIcon="input?.suffixIcon"
18
+ :color="input?.color"
19
+ :fontSize="input?.fontSize"
20
+ :inputAlign="input?.inputAlign"
21
+ :placeholder="input?.placeholder || '请选择时间'"
22
+ :placeholderStyle="input?.placeholderStyle"
23
+ :placeholderClass="input?.placeholderClass"
24
+ :customStyle="
25
+ Object.assign({ 'pointer-events': 'none' }, input?.customStyle)
26
+ "
18
27
  ></HyInput>
19
28
  <view class="input-cover"></view>
20
29
  </slot>
@@ -52,6 +61,17 @@
52
61
  </view>
53
62
  </template>
54
63
 
64
+ <script lang="ts">
65
+ export default {
66
+ name: 'hy-datetime-picker',
67
+ options: {
68
+ addGlobalClass: true,
69
+ virtualHost: true,
70
+ styleIsolation: 'shared'
71
+ }
72
+ }
73
+ </script>
74
+
55
75
  <script setup lang="ts">
56
76
  import { computed, onMounted, ref, toRefs, watch } from "vue";
57
77
  import defaultProps from "./props";
@@ -68,7 +88,7 @@ const {
68
88
  show,
69
89
  modelValue,
70
90
  hasInput,
71
- disabled,
91
+ input,
72
92
  formatter,
73
93
  filter,
74
94
  format,
@@ -416,11 +436,6 @@ const getOriginColumns = () => {
416
436
  if (filter.value) {
417
437
  values = filter.value(type, values);
418
438
  if (!values || (values && values.length == 0)) {
419
- // uni.showToast({
420
- // title: '日期filter结果不能为空',
421
- // icon: 'error',
422
- // mask: true
423
- // })
424
439
  error("日期filter结果不能为空");
425
440
  }
426
441
  }
@@ -547,7 +562,7 @@ const getBoundary = (type: string, innerVal: string | number) => {
547
562
  };
548
563
  };
549
564
  const onShowByClickInput = () => {
550
- if (!disabled.value) {
565
+ if (!input.value.disabled) {
551
566
  showByClickInput.value = !showByClickInput.value;
552
567
  }
553
568
  };
@@ -1,6 +1,6 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
 
3
- .hy-datetime-picker {
3
+ @include b(datetime-picker) {
4
4
  flex: 1;
5
5
  &__has-input {
6
6
  position: relative;
@@ -25,11 +25,9 @@ const defaultProps: IProps = {
25
25
  visibleItemCount: 5,
26
26
  closeOnClickOverlay: false,
27
27
  defaultIndex: [],
28
- disabled: false,
29
28
  hasInput: false,
29
+ input: {},
30
30
  format: "",
31
- placeholder: "请选择日期",
32
- disabledColor: "#F5F5F5",
33
31
  toolbarRightSlot: false,
34
32
  };
35
33
 
@@ -1,7 +1,8 @@
1
1
  import { DateModeEnum } from "../../typing";
2
2
  import type { CSSProperties } from "vue";
3
+ import type HyInputProps from "../hy-input/typing";
3
4
 
4
- export default interface IProps {
5
+ export default interface HyDatetimeProps {
5
6
  /**
6
7
  * @description 用于控制选择器的弹出和收起 ( 默认 false )
7
8
  * */
@@ -96,26 +97,18 @@ export default interface IProps {
96
97
  * @note 类型有问题,需要调整
97
98
  * */
98
99
  defaultIndex?: Array<any>;
99
- /**
100
- * @description 是否禁用输入框 ( 默认 false )
101
- * */
102
- disabled?: boolean;
103
100
  /**
104
101
  * @description 输入框是否显示边框 ( 默认 false )
105
102
  * */
106
103
  hasInput?: boolean;
107
104
  /**
108
- * @description 自定义时间格式
109
- * */
110
- format?: string;
111
- /**
112
- * @description 输入框提示信息
105
+ * @description 输入框集合属性
113
106
  * */
114
- placeholder?: string;
107
+ input?: Partial<HyInputProps>;
115
108
  /**
116
- * @description 禁用时候输入框颜色
109
+ * @description 自定义时间格式
117
110
  * */
118
- disabledColor?: string;
111
+ format?: string;
119
112
  /**
120
113
  * @description 右边插槽
121
114
  * */
@@ -22,6 +22,17 @@
22
22
  </view>
23
23
  </template>
24
24
 
25
+ <script lang="ts">
26
+ export default {
27
+ name: 'hy-divider',
28
+ options: {
29
+ addGlobalClass: true,
30
+ virtualHost: true,
31
+ styleIsolation: 'shared'
32
+ }
33
+ }
34
+ </script>
35
+
25
36
  <script setup lang="ts">
26
37
  import { computed, type CSSProperties, toRefs } from "vue";
27
38
  import defaultProps from "./props";
@@ -1,7 +1,7 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- .hy-divider {
4
+ @include b(divider) {
5
5
  @include flex;
6
6
  flex-direction: row;
7
7
  justify-content: center;
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties } from "vue";
2
2
 
3
- export default interface IProps {
3
+ export default interface HyDividerProps {
4
4
  /**
5
5
  * @description 是否虚线 (默认 false )
6
6
  * */
@@ -4,6 +4,17 @@
4
4
  </view>
5
5
  </template>
6
6
 
7
+ <script lang="ts">
8
+ export default {
9
+ name: 'hy-dropdown',
10
+ options: {
11
+ addGlobalClass: true,
12
+ virtualHost: true,
13
+ styleIsolation: 'shared'
14
+ }
15
+ }
16
+ </script>
17
+
7
18
  <script setup lang="ts">
8
19
  import { provide, ref, computed, type CSSProperties, toRefs } from "vue";
9
20
  import type IProps from "./typing";
@@ -17,7 +28,8 @@ const { height, borderBottom } = toRefs(props);
17
28
  const dropdownStyle = computed(() => {
18
29
  const style: CSSProperties = props.sticky
19
30
  ? {
20
- position: "sticky",
31
+ position: "fixed",
32
+ left: 0,
21
33
  // #ifdef H5
22
34
  top: "44px",
23
35
  // #endif
@@ -1,4 +1,7 @@
1
- .hy-dropdown {
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ @include b(dropdown) {
2
5
  width: 100%;
3
6
  display: flex;
4
7
  align-items: center;
@@ -1,8 +1,8 @@
1
1
  import type IProps from "./typing";
2
- import { ColorConfig, IconConfig } from "@/package";
2
+ import { IconConfig } from "@/package";
3
3
 
4
4
  const defaultProps: IProps = {
5
- activeColor: ColorConfig.primary,
5
+ activeColor: "",
6
6
  inactiveColor: "#606266",
7
7
  closeOnClickMask: true,
8
8
  sticky: true,
@@ -1,6 +1,6 @@
1
1
  import type { CSSProperties } from "vue";
2
2
 
3
- export default interface IProps {
3
+ export default interface HyDropdownProps {
4
4
  /**
5
5
  * @description 标题和选项卡选中的颜色(默认#2979ff)
6
6
  * */
@@ -1,6 +1,12 @@
1
1
  <template>
2
2
  <!-- 标题栏 -->
3
- <view class="hy-dropdown-item__header" @click="handleClick">
3
+ <view
4
+ :class="[
5
+ 'hy-dropdown-item__header',
6
+ isOpen && 'hy-dropdown-item__header--active',
7
+ ]"
8
+ @click="handleClick"
9
+ >
4
10
  <text
5
11
  class="hy-dropdown-item__header--title"
6
12
  :style="{ color: currentColor, fontSize: addUnit(titleSize) }"
@@ -31,7 +37,10 @@
31
37
  <!-- 选项 -->
32
38
  <view class="hy-dropdown-item__main--container__list" v-else>
33
39
  <view
34
- class="hy-dropdown-item__main--container__list-item"
40
+ :class="[
41
+ 'hy-dropdown-item__main--container__list-item',
42
+ isOpen && 'hy-dropdown-item__main--container__list--active',
43
+ ]"
35
44
  v-for="(item, index) in menus"
36
45
  :key="item.value || index"
37
46
  @click="onSelect(item, index)"
@@ -57,7 +66,16 @@
57
66
  </template>
58
67
 
59
68
  <script setup lang="ts">
60
- import {computed, inject, ref, onMounted, watch, useSlots, toRefs, getCurrentInstance} from "vue";
69
+ import {
70
+ computed,
71
+ inject,
72
+ ref,
73
+ onMounted,
74
+ watch,
75
+ useSlots,
76
+ toRefs,
77
+ getCurrentInstance,
78
+ } from "vue";
61
79
  import defaultProps from "./props";
62
80
  import type IProps from "./typing";
63
81
  import type FatherIProps from "../hy-dropdown/typing";
@@ -1,6 +1,22 @@
1
1
  @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
2
3
 
3
- .hy-dropdown-item {
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
+ @include b(dropdown-item) {
4
20
  &__header {
5
21
  width: 100%;
6
22
  height: 100%;
@@ -15,6 +31,15 @@
15
31
  position: relative;
16
32
  z-index: 999;
17
33
  background-color: #ffffff;
34
+
35
+ &--active {
36
+ color: $hy-primary;
37
+ :deep() {
38
+ @include b(icon) {
39
+ color: $hy-primary;
40
+ }
41
+ }
42
+ }
18
43
  }
19
44
 
20
45
  &__main {
@@ -47,6 +72,14 @@
47
72
  width: 100%;
48
73
  padding: 0 35rpx;
49
74
  box-sizing: border-box;
75
+ &--active {
76
+ color: $hy-primary;
77
+ :deep() {
78
+ @include b(icon) {
79
+ color: $hy-primary;
80
+ }
81
+ }
82
+ }
50
83
  &-item {
51
84
  width: 100%;
52
85
  padding: 30rpx 0;
@@ -55,7 +88,7 @@
55
88
  align-items: center;
56
89
 
57
90
  &:not(:last-of-type) {
58
- border-bottom: 1px solid #f2f2f2;
91
+ border-bottom: $hy-border-line;
59
92
  }
60
93
 
61
94
  &--label {
@@ -1,5 +1,3 @@
1
- import type { CSSProperties } from "vue";
2
-
3
1
  export interface DropdownMenuItem {
4
2
  /**
5
3
  * @description 展示标题
@@ -11,7 +9,7 @@ export interface DropdownMenuItem {
11
9
  value: string | number;
12
10
  }
13
11
 
14
- export default interface IProps {
12
+ export default interface HyDropdownItemProps {
15
13
  /**
16
14
  * @description 获取值
17
15
  * */
@@ -14,20 +14,32 @@
14
14
  <view class="hy-empty__description" v-else>
15
15
  <slot v-if="$slots.description" name="description"></slot>
16
16
  <text v-else :style="descriptionStyle">{{ emptyDescription }}</text>
17
- <HyButton
18
- class="hy-empty__button"
19
- v-if="btnText"
20
- :text="btnText"
21
- :size="btnSize"
22
- :type="btnType"
23
- :shape="btnShape"
24
- :plain="btnPlain"
25
- @click="handleClick"
26
- ></HyButton>
17
+ <view class="hy-empty__button" v-if="button?.text">
18
+ <HyButton
19
+ :text="button?.text"
20
+ :size="button?.size"
21
+ :type="button?.type"
22
+ :shape="button?.shape"
23
+ :plain="button?.plain"
24
+ :custom-style="button?.customStyle"
25
+ @click="handleClick"
26
+ ></HyButton>
27
+ </view>
27
28
  </view>
28
29
  </view>
29
30
  </template>
30
31
 
32
+ <script lang="ts">
33
+ export default {
34
+ name: "hy-empty",
35
+ options: {
36
+ addGlobalClass: true,
37
+ virtualHost: true,
38
+ styleIsolation: "shared",
39
+ },
40
+ };
41
+ </script>
42
+
31
43
  <script setup lang="ts">
32
44
  import { computed, type CSSProperties, toRefs } from "vue";
33
45
  import defaultProps from "./props";
@@ -1,4 +1,17 @@
1
- .hy-empty {
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(empty) {
8
+ background-color: $hy-dark-background;
9
+ color: $hy-dark-color;
10
+ }
11
+ }
12
+ }
13
+
14
+ @include b(empty) {
2
15
  top: 0;
3
16
  left: 0;
4
17
  width: 100%;
@@ -7,13 +20,14 @@
7
20
  justify-content: center;
8
21
  align-items: center;
9
22
  flex-direction: column;
10
- background: rgb(255, 255, 255);
23
+ background: $hy-light-background;
11
24
  &__description {
12
25
  width: 70%;
13
26
  text-align: center;
27
+ margin-top: $hy-border-margin-padding-base;
14
28
  }
15
29
 
16
30
  &__button {
17
- margin-top: 80rpx;
31
+ margin-top: 100rpx;
18
32
  }
19
33
  }