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
@@ -92,7 +92,7 @@ const install = (Vue: any) => {
92
92
  Vue.component("HyLineProgress", HyLineProgress);
93
93
  Vue.component("HyList", HyList);
94
94
  Vue.component("HyLoading", HyLoading);
95
- Vue.component("YkLogin", YkLogin);
95
+ // Vue.component("YkLogin", YkLogin);
96
96
  Vue.component("HyModal", HyModal);
97
97
  Vue.component("HyNavbar", HyNavbar);
98
98
  Vue.component("HyNoticeBar", HyNoticeBar);
@@ -155,7 +155,7 @@ export {
155
155
  HyLineProgress,
156
156
  HyList,
157
157
  HyLoading,
158
- YkLogin,
158
+ // YkLogin,
159
159
  HyModal,
160
160
  HyNavbar,
161
161
  HyNoticeBar,
package/config/icon.ts CHANGED
@@ -327,6 +327,10 @@ export const IconConfig = {
327
327
  * @description 眼睛
328
328
  * */
329
329
  EYE: "eye",
330
+ /**
331
+ * @description 眼睛-关闭
332
+ * */
333
+ EYE_CLOSE: "eye-close",
330
334
  /**
331
335
  * @description 日历
332
336
  * */
@@ -13,4 +13,13 @@
13
13
 
14
14
  .hy-page {
15
15
  padding: $hy-border-margin-padding-base;
16
+ box-sizing: border-box;
17
+ width: 100%;
18
+ /* #ifdef H5 */
19
+ height: calc(100vh - 44px);
20
+ /* #endif */
21
+ /* #ifndef H5 */
22
+ height: 100vh;
23
+ /* #endif */
24
+ overflow: auto;
16
25
  }
@@ -1,3 +1,54 @@
1
+ @use "../../theme.scss";
2
+ $namespace: hy;
3
+ $modifier-separator: '--';
4
+
5
+ @mixin b($block) {
6
+ $B: $namespace + '-' + $block !global;
7
+
8
+ .#{$B} {
9
+ @content;
10
+ }
11
+ }
12
+
13
+ @mixin m($modifier) {
14
+ $selector: &;
15
+ $currentSelector: '';
16
+ @each $unit in $modifier {
17
+ $currentSelector: #{$currentSelector +
18
+ $selector +
19
+ $modifier-separator +
20
+ $unit +
21
+ ','};
22
+ }
23
+
24
+ @at-root {
25
+ #{$currentSelector} {
26
+ @content;
27
+ }
28
+ }
29
+ }
30
+
31
+ @mixin themeColor($type, $bg-color: transparent, $border-color: transparent, $color: #FFFFFF) {
32
+ @include m($type) {
33
+ background-color: $bg-color;
34
+ border: 1px solid $border-color;
35
+ color: $color;
36
+ }
37
+ }
38
+
39
+ @mixin borderRadio($shape) {
40
+ @include m($shape) {
41
+ @if $shape == circle {
42
+ border-radius: theme.$hy-border-radius-semicircle;
43
+ }
44
+ @else {
45
+ border-radius: theme.$hy-border-radius-sm;
46
+ }
47
+ }
48
+ }
49
+
50
+
51
+ /* flex布局 */
1
52
  @mixin flex($direction: row) {
2
53
  /* #ifndef APP-NVUE */
3
54
  display: flex;
@@ -5,6 +56,17 @@
5
56
  flex-direction: $direction;
6
57
  }
7
58
 
59
+ /* 状态,生成 is-$state 类名 */
60
+ @mixin when($states...) {
61
+ @at-root {
62
+ @each $state in $states {
63
+ &.#{$state-prefix + $state} {
64
+ @content;
65
+ }
66
+ }
67
+ }
68
+ }
69
+
8
70
  /* 几行出现省略号 */
9
71
  @mixin line-feed($line: 1) {
10
72
  display: -webkit-box;
@@ -12,4 +74,20 @@
12
74
  -webkit-line-clamp: $line;
13
75
  overflow: hidden;
14
76
  text-overflow: ellipsis;
77
+ }
78
+
79
+ /* 单行超出隐藏 */
80
+ @mixin lineEllipsis {
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ }
85
+
86
+ /* 多行超出隐藏 */
87
+ @mixin multiEllipsis($lineNumber: 3) {
88
+ display: -webkit-box;
89
+ -webkit-box-orient: vertical;
90
+ -webkit-line-clamp: $lineNumber;
91
+ overflow: hidden;
92
+ text-overflow: ellipsis;
15
93
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.1.4",
4
- "description": "瀑布流组件",
3
+ "version": "0.2.0",
4
+ "description": "全局主题色配置",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "keywords": [
38
38
  "华玥组件库",
39
- "gxh"
39
+ "ui组件库"
40
40
  ],
41
41
  "author": "gaoxianhua",
42
42
  "license": "ISC"
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: 'iconfont'; /* Project id 4305932 */
3
- src: url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff2?t=1745506339367') format('woff2'),
4
- url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff?t=1745506339367') format('woff'),
5
- url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.ttf?t=1745506339367') format('truetype');
3
+ src: url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.woff2?t=1747792820979') format('woff2'),
4
+ url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.woff?t=1747792820979') format('woff'),
5
+ url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.ttf?t=1747792820979') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
package/store/userInfo.ts CHANGED
@@ -1,25 +1,26 @@
1
- import { defineStore } from "pinia";
2
-
3
- export const useUserInfo = defineStore("gxh_userInfo", {
4
- state:() => ({
5
- userForm: {
6
- name: '',
7
- pwd: ''
8
- },
9
- phoneForm: {
10
- phone: '',
11
- code: ''
12
- },
13
- rememberPsw: 0,
14
- // 历史账户列表
15
- choiceList:[],
16
- // 选中账户信息
17
- choiceIndex: 0,
18
- secretKey: "hfyk"
19
- }),
20
- actions: {
21
- saveHistoriesList() {
22
- this.choiceList
23
- }
24
- }
25
- })
1
+ import { defineStore } from "pinia";
2
+ import type { UserLoginInfoVo } from "../components/hy-login/typing";
3
+
4
+ export const useUserInfo = defineStore("gxh_userInfo", {
5
+ state: () => ({
6
+ userForm: {
7
+ userName: "",
8
+ password: "",
9
+ } as UserLoginInfoVo,
10
+ phoneForm: {
11
+ phone: "",
12
+ code: "",
13
+ },
14
+ rememberPsw: false,
15
+ // 历史账户列表
16
+ choiceList: [] as UserLoginInfoVo[],
17
+ // 选中账户信息
18
+ choiceIndex: 0,
19
+ secretKey: "hy",
20
+ }),
21
+ actions: {
22
+ saveHistoriesList() {
23
+ this.choiceList;
24
+ },
25
+ },
26
+ });
package/theme.scss CHANGED
@@ -1,39 +1,64 @@
1
1
  /* 主题是相关颜色 */
2
- $hy-primary: #2979ff;
3
- $hy-primary-dark: #2b85e4;
4
- $hy-primary-disabled: #a0cfff;
5
- $hy-primary-light: #ecf5ff;
6
-
7
- $hy-warning: #ff9900;
8
- $hy-warning-dark: #f29100;
9
- $hy-warning-disabled: #fcbd71;
10
- $hy-warning-light: #fdf6ec;
11
-
12
- $hy-success: #19be6b;
13
- $hy-success-dark: #18b566;
14
- $hy-success-disabled: #71d5a1;
15
- $hy-success-light: #dbf1e1;
16
-
17
- $hy-error: #fa3534;
18
- $hy-error-dark: #dd6161;
19
- $hy-error-disabled: #fab6b6;
20
- $hy-error-light: #fef0f0;
21
-
22
- $hy-info: #909399;
23
- $hy-info-dark: #82848a;
24
- $hy-info-disabled: #c8c9cc;
25
- $hy-info-light: #f4f4f5;
2
+ $hy-primary: var(--hy-theme-color, #2979ff) !default;
3
+ $hy-primary-dark: var(--hy-theme-dark, #2b85e4) !default;
4
+ $hy-primary-disabled: var(--hy-theme-disabled, #a0cfff) !default;
5
+ $hy-primary-light: var(--hy-theme-color--light, #ecf5ff) !default;
6
+
7
+ $hy-warning: var(--hy-warning, #ff9900) !default;
8
+ $hy-warning-dark: var(--hy-warning-dark, #f29100) !default;
9
+ $hy-warning-disabled: var(--hy-warning-disabled, #fcbd71) !default;
10
+ $hy-warning-light: var(--hy-warning-light, #fdf6ec) !default;
11
+
12
+ $hy-success: var(--hy-success, #19be6b) !default;
13
+ $hy-success-dark: var(--hy-success-dark, #18b566) !default;
14
+ $hy-success-disabled: var(--hy-success-disabled, #71d5a1) !default;
15
+ $hy-success-light: var(--hy-success-light, #dbf1e1) !default;
16
+
17
+ $hy-error: var(--hy-error, #fa3534) !default;
18
+ $hy-error-dark: var(--hy-error-dark, #dd6161) !default;
19
+ $hy-error-disabled: var(--hy-error-disabled, #fab6b6) !default;
20
+ $hy-error-light: var(--hy-error-light, #fef0f0) !default;
21
+
22
+ $hy-info: var(--hy-info, #909399) !default;
23
+ $hy-info-dark: var(--hy-info-dark, #82848a) !default;
24
+ $hy-info-disabled: var(--hy-info-disabled, #c8c9cc) !default;
25
+ $hy-info-light: var(--hy-info-light, #f4f4f5) !default;
26
+
27
+ /* 暗黑模式 */
28
+ $hy-dark-background: var(--hy-dark-background, #131313) !default; // 背景色
29
+ $hy-dark-background--2: var(--hy-dark-background--2, #161616) !default; // 弹窗背景色
30
+ $hy-dark-background--container: var(--hy-dark-background--container, #242424) !default;
31
+ $hy-dark-background--track: var(--hy-dark-background--track, #646566) !default;
32
+ $hy-dark-background--empty: var(--hy-dark-background--empty, #3A3A44) !default; // 搜索背景色
33
+ $hy-dark-background--hover: var(--hy-dark-background--hover, #707070) !default; // 点击状态
34
+ $hy-dark-background3: #141414 !default;
35
+ $hy-dark-background6: #380e08 !default;
36
+
37
+ $hy-dark-bg-disabled: rgba(48, 48, 56, 0.51) !default;
38
+ $hy-dark-color: #ffffff !default;
39
+ $hy-dark-icon: #7C7C7C !default;
40
+ $hy-dark-color2: var(#f2270c) !default;
41
+ $hy-dark-color3: var(rgba(232, 230, 227, 0.8)) !default;
42
+ $hy-dark-color-gray: var(#c0c0c0) !default;
43
+ $hy-dark-text-disabled: #c0c0c0 !default;
44
+ $hy-dark-border-color: var(#3a3a3c) !default;
45
+
46
+ /* 亮色背景颜色 */
47
+ $hy-light-background: var(--hy-light-background, #F8F8F8) !default;
48
+ $hy-light-background-color: var(--hy-light-background-color, #FFFFFF) !default;
49
+ $hy-light-background-disabled: var(--hy-light-background-disabled, #F5F5F5) !default;
50
+ $hy-light-background-hover: var(--hy-light-background-hover, #f1f1f1) !default; //点击状态颜色
51
+ $hy-light-background-mask: var(--hy-light-background-mask, rgba(0, 0, 0, 0.5)); //遮罩颜色
52
+ $hy-light-background-image: var(--hy-light-background-image, #F3F3F3) !default; // 图片背景色
26
53
 
27
54
  /* 文字基本颜色 */
28
- $hy-text-color: #333; //基本色
29
- $hy-text-color-inverse: #fff; //反色
30
- $hy-text-color-grey: #999; //辅助灰色,如加载更多的提示信息
31
- $hy-text-color-placeholder: #808080;
32
- $hy-text-color-disable: #c0c0c0;
33
- $hy-text-color-light: rgba(192, 192, 192, 0.38);
55
+ $hy-light-color: var(--hy-light-color, #333) !default; //基本色
56
+ $hy-text-color-grey: var(--hy-text-color-grey, #999) !default; //辅助灰色,如加载更多的提示信息
57
+ $hy-text-color-placeholder: var(--hy-text-color-placeholder, #808080) !default; // 输入框提示颜色
58
+ $hy-text-color-disable: var(--hy-text-color-disable, #c0c0c0) !default; // 禁用文字颜色
59
+ $hy-text-color-hover: var(--hy-text-color-hover, #58595b)!default;
34
60
 
35
61
  $hy-tips-color: #909193FF;
36
- $hy-color-disable-bg: #F5F5F5;
37
62
  $hy-color-disable-icon: #c8c9cc;
38
63
 
39
64
  /* 文字尺寸 */
@@ -41,15 +66,6 @@ $hy-font-size-sm: 12px;
41
66
  $hy-font-size-base: 16px;
42
67
  $hy-font-size-lg: 20px;
43
68
 
44
- /* 背景颜色 */
45
- $hy-bg-color: #F8F8F8;
46
- $hy-bg-color-disabled: #87BAF3;
47
- $hy-bg-color-light: #a7cff9a5;
48
- $hy-bg-color-grey: #f8f8f8;
49
- $hy-bg-color-hover: #f1f1f1; //点击状态颜色
50
- $hy-bg-color-mask: rgba(0, 0, 0, 0.5); //遮罩颜色
51
- $hy-image-bg-color: #F3F3F3;
52
-
53
69
  /* 文章场景相关 */
54
70
  $hy-color-title: #2c405a; // 文章标题颜色
55
71
  $hy-weight-title: 700;
@@ -63,34 +79,34 @@ $hy-font-size-hint: 26rpx;
63
79
 
64
80
 
65
81
  /* 边框颜色 */
66
- $k-border-color-light: #c8c7cc;
67
- $hy-border-color: #c8c7cc66;
82
+ $hy-border-color-light: var(--hy-border-color-light, #c8c7cc) !default;
83
+ $hy-border-color: var(--hy-border-color, #c8c7cc66) !default;
68
84
 
69
85
  /* 图片尺寸 */
70
- $hy-img-size-sm: 45rpx;
71
- $hy-img-size-base: 80rpx;
72
- $hy-img-size-lg: 120rpx;
86
+ $hy-img-size-sm: var(--hy-img-size-sm, 45rpx) !default;
87
+ $hy-img-size-base: var(--hy-img-size-base, 80rpx) !default;
88
+ $hy-img-size-lg: var(--hy-img-size-lg, 120rpx) !default;
73
89
 
74
90
  /* 头像大小 */
75
- $hy-avatar-size-sm: 80rpx;
76
- $hy-avatar-size-base: 100rpx;
77
- $hy-avatar-size-lg: 120rpx;
91
+ $hy-avatar-size-sm: var(--hy-avatar-size-sm, 80rpx) !default;
92
+ $hy-avatar-size-base: 100rpx var(--hy-avatar-size-base, 100rpx) !default;
93
+ $hy-avatar-size-lg: var(--hy-avatar-size-lg, 120rpx) !default;
78
94
 
79
95
  /* 透明度 */
80
- $hy-opacity-disabled: 0.3; // 组件禁用态的透明度
96
+ $hy-opacity-disabled: var(--hy-opacity-disabled, 0.3) !default; // 组件禁用态的透明度
81
97
 
82
98
  /* 盒子的圆角 */
83
- $hy-border-radius-no: 0;
84
- $hy-border-radius-sm: 8rpx;
85
- $hy-border-radius-base: 20rpx;
86
- $hy-border-radius-lg: 32rpx;
87
- $hy-border-radius-circle: 50%;
88
- $hy-border-radius-semicircle: 100px;
99
+ $hy-border-radius-no: var(--hy-border-radius-no, 0) !default;
100
+ $hy-border-radius-sm: var(--hy-border-radius-sm, 8rpx) !default;
101
+ $hy-border-radius-base: var(--hy-border-radius-base, 20rpx) !default;
102
+ $hy-border-radius-lg: var(--hy-border-radius-lg, 32rpx) !default;
103
+ $hy-border-radius-circle: var(--hy-border-radius-circle, 50%) !default;
104
+ $hy-border-radius-semicircle: var(--hy-border-radius-semicircle, 100px) !default;
89
105
  /* 盒子阴影 */
90
- $hy-box-shadow: 0 0 10rpx 4rpx rgba(0, 0, 0, 0.16);
106
+ $hy-box-shadow: var(--hy-box-shadow, 0 0 10rpx 4rpx rgba(0, 0, 0, 0.16)) !default;
91
107
  /* 盒内盒外间距 */
92
- $hy-border-margin-padding-sm: 10rpx;
93
- $hy-border-margin-padding-base: 20rpx;
94
- $hy-border-margin-padding-lg: 30rpx;
108
+ $hy-border-margin-padding-sm: var(--hy-border-margin-padding-sm, 10rpx) !default;
109
+ $hy-border-margin-padding-base: var(--hy-border-margin-padding-base, 20rpx) !default;
110
+ $hy-border-margin-padding-lg: var(--hy-border-margin-padding-lg, 30rpx) !default;
95
111
  /* 底部线条 */
96
- $hy-border-line: 1px solid #dadbde;
112
+ $hy-border-line: var(--hy-border-line, 1rpx solid #dadbde) !default;
@@ -1,6 +1,10 @@
1
1
  import type { IFieldNames } from "@/package/components/hy-check-button/typing";
2
2
 
3
3
  declare namespace HyApp {
4
+ /**
5
+ * @description dark:暗色、light:亮色
6
+ * */
7
+ type DarkModeType = "dark" | "light";
4
8
  /**
5
9
  * @description 主题类型 primary-默认,success-错误,warning-警告,error-错误,info-信息
6
10
  * */
@@ -94,7 +98,7 @@ declare namespace HyApp {
94
98
  /**
95
99
  * @description 旋转方向
96
100
  * */
97
- type RotateType = "left" | "up" | "down";
101
+ type RotateType = "left" | "up" | "down" | "right";
98
102
  /**
99
103
  * @description 上传类型
100
104
  * */
@@ -1,5 +1,11 @@
1
1
  import type { DateModeEnum } from "./enum";
2
2
  import type { CheckboxColumnsVo } from "../../components/hy-check-button/typing";
3
+ import type HyInputProps from "../../components/hy-input/typing";
4
+ import type HyTextareaProps from "../../components/hy-textarea/typing";
5
+ import type HySwitchProps from "../../components/hy-switch/typing";
6
+ import type HyPickerProps from "../../components/hy-picker/typing";
7
+ import type HyRadioProps from "../../components/hy-radio/typing";
8
+ import type HyCheckButtonProps from "../../components/hy-check-button/typing";
3
9
 
4
10
  /**
5
11
  * 类型
@@ -29,6 +35,10 @@ export enum FormTypeEnum {
29
35
  * 单选
30
36
  * */
31
37
  RADIO = "radio",
38
+ /**
39
+ * 选择按钮(单选/多选)
40
+ * */
41
+ CHECK_BUTTON = "checkButton",
32
42
  /**
33
43
  * 时间选择器
34
44
  * */
@@ -88,34 +98,39 @@ export interface FormColumnsType {
88
98
  * @description 是否禁用
89
99
  * */
90
100
  disabled?: boolean;
101
+
102
+ /**
103
+ * @description type = select时候必填
104
+ * */
105
+ select?: string[][] | { text: string; id: string }[][];
91
106
  /**
92
- * @description 输入框为空时的占位符
107
+ * @description type = radio时候必填
93
108
  * */
94
- placeholder?: string;
109
+ actions?: CheckboxColumnsVo[];
95
110
  /**
96
- * @description 清除输入框
111
+ * @description 输入框属性api集合
97
112
  * */
98
- clearable?: boolean;
113
+ input?: Partial<HyInputProps>;
99
114
  /**
100
- * @description 只读
115
+ * @description 文本域属性api集合
101
116
  * */
102
- readonly?: boolean;
117
+ textarea?: Partial<HyTextareaProps>;
103
118
  /**
104
- * @description type = select时候必填
119
+ * @description 开关属性api集合
105
120
  * */
106
- select?: string[][] | { text: string; id: string }[][];
121
+ switchItem?: Partial<HySwitchProps>;
107
122
  /**
108
- * @description type = radio时候必填
123
+ * @description 选择器属性api集合
109
124
  * */
110
- actions?: CheckboxColumnsVo[];
125
+ picker?: Partial<HyPickerProps>;
111
126
  /**
112
- * @description 输入框形状
127
+ * @description 单选属性api集合
113
128
  * */
114
- shape?: HyApp.ShapeType;
129
+ radio?: Partial<HyRadioProps>;
115
130
  /**
116
- * @description 输入框边框
131
+ * @description 选择按钮属性api集合
117
132
  * */
118
- border?: HyApp.BorderType;
133
+ checkButton?: Partial<HyCheckButtonProps>;
119
134
  /**
120
135
  * @description 输入框边框
121
136
  * */
@@ -7,7 +7,7 @@
7
7
  export const colorGradient = (
8
8
  startColor: string = "rgb(0, 0, 0)",
9
9
  endColor: string = "rgb(255, 255, 255)",
10
- step: number = 10,
10
+ step: number = 100,
11
11
  ): any[] => {
12
12
  const startRGB = hexToRgb(startColor, false); // 转换为rgb数组模式
13
13
 
package/utils/inside.ts CHANGED
@@ -24,6 +24,9 @@ export const bem = (
24
24
  fixed.map((item: string) => {
25
25
  // 这里的类名,会一直存在
26
26
  classes[prefix + props[item]] = true;
27
+ if (item === "type" && props["plain"]) {
28
+ classes[prefix + props[item] + "__plain"] = true;
29
+ }
27
30
  });
28
31
  }
29
32
  if (change) {
@@ -1,17 +0,0 @@
1
- <template>
2
- <Hy-cell title="基础组件" :list="list_1"></Hy-cell>
3
- <hy-cell title="表单组件" :list="list_2"></hy-cell>
4
- <hy-cell title="布局组件" :list="list_3"></hy-cell>
5
- <hy-cell title="反馈组件" :list="list_4"></hy-cell>
6
- <hy-cell title="导航组件" :list="list_5"></hy-cell>
7
- <hy-cell title="其他组件" :list="list_6"></hy-cell>
8
- <hy-cell title="业务组件" :list="list_7"></hy-cell>
9
- </template>
10
-
11
- <script setup lang="ts">
12
- import HyCell from "hy-app/components/hy-cell/hy-cell.vue";
13
-
14
- import { list_1, list_2, list_3, list_4, list_5, list_6, list_7 } from "./index1";
15
- </script>
16
-
17
- <style lang="scss" scoped></style>
@@ -1,9 +0,0 @@
1
-
2
- .hy-overlay {
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- background-color: rgba(0, 0, 0, 0.7);
9
- }