hy-app 0.1.1

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 (206) hide show
  1. package/README.md +42 -0
  2. package/api/http.ts +138 -0
  3. package/api/index.ts +1 -0
  4. package/common/index.ts +1 -0
  5. package/common/versionControl.ts +102 -0
  6. package/components/dialog/TheDialog.vue +128 -0
  7. package/components/dialog/index.ts +38 -0
  8. package/components/hy-address-picker/hy-address-picker.vue +262 -0
  9. package/components/hy-address-picker/props.ts +27 -0
  10. package/components/hy-address-picker/typing.d.ts +98 -0
  11. package/components/hy-avatar/hy-avatar.vue +217 -0
  12. package/components/hy-avatar/props.ts +20 -0
  13. package/components/hy-avatar/typing.d.ts +64 -0
  14. package/components/hy-back-top/hy-back-top.vue +71 -0
  15. package/components/hy-back-top/props.ts +23 -0
  16. package/components/hy-back-top/typing.d.ts +49 -0
  17. package/components/hy-badge/hy-badge.vue +155 -0
  18. package/components/hy-badge/props.ts +19 -0
  19. package/components/hy-badge/typing.d.ts +60 -0
  20. package/components/hy-button/hy-button.vue +394 -0
  21. package/components/hy-button/props.ts +36 -0
  22. package/components/hy-button/typing.d.ts +125 -0
  23. package/components/hy-card/hy-card.vue +198 -0
  24. package/components/hy-card/props.ts +29 -0
  25. package/components/hy-card/typing.d.ts +112 -0
  26. package/components/hy-cell/hy-cell.vue +268 -0
  27. package/components/hy-cell/props.ts +20 -0
  28. package/components/hy-cell/typing.d.ts +98 -0
  29. package/components/hy-check-button/hy-check-button.vue +71 -0
  30. package/components/hy-check-button/props.ts +20 -0
  31. package/components/hy-check-button/typing.d.ts +79 -0
  32. package/components/hy-checkbox/hy-checkbox.vue +299 -0
  33. package/components/hy-checkbox/props.ts +28 -0
  34. package/components/hy-checkbox/typing.d.ts +77 -0
  35. package/components/hy-datetime-picker/hy-datetime-picker.vue +584 -0
  36. package/components/hy-datetime-picker/props.ts +36 -0
  37. package/components/hy-datetime-picker/typing.d.ts +135 -0
  38. package/components/hy-divider/hy-divider.vue +164 -0
  39. package/components/hy-divider/props.ts +21 -0
  40. package/components/hy-divider/typing.d.ts +64 -0
  41. package/components/hy-empty/hy-empty.vue +122 -0
  42. package/components/hy-empty/props.ts +21 -0
  43. package/components/hy-empty/typing.d.ts +68 -0
  44. package/components/hy-folding-panel/hy-folding-panel.vue +94 -0
  45. package/components/hy-folding-panel/props.ts +17 -0
  46. package/components/hy-folding-panel/typing.d.ts +59 -0
  47. package/components/hy-form/hy-form.vue +372 -0
  48. package/components/hy-form/props.ts +15 -0
  49. package/components/hy-form/typing.d.ts +51 -0
  50. package/components/hy-grid/hy-grid.vue +126 -0
  51. package/components/hy-grid/props.ts +16 -0
  52. package/components/hy-grid/typing.d.ts +62 -0
  53. package/components/hy-icon/hy-icon.vue +207 -0
  54. package/components/hy-icon/props.ts +24 -0
  55. package/components/hy-icon/typing.d.ts +80 -0
  56. package/components/hy-input/hy-input.vue +402 -0
  57. package/components/hy-input/props.ts +41 -0
  58. package/components/hy-input/typing.d.ts +148 -0
  59. package/components/hy-line/hy-line.vue +44 -0
  60. package/components/hy-line/props.ts +12 -0
  61. package/components/hy-line/typing.d.ts +32 -0
  62. package/components/hy-line-progress/hy-line-progress.vue +118 -0
  63. package/components/hy-line-progress/props.ts +12 -0
  64. package/components/hy-line-progress/typing.d.ts +28 -0
  65. package/components/hy-list/hy-list.vue +250 -0
  66. package/components/hy-list/props.ts +18 -0
  67. package/components/hy-list/typing.d.ts +50 -0
  68. package/components/hy-login/ThePhoneLogin.vue +106 -0
  69. package/components/hy-login/TheUserLogin.vue +391 -0
  70. package/components/hy-login/hy-login.vue +283 -0
  71. package/components/hy-login/props.ts +32 -0
  72. package/components/hy-login/typing.d.ts +60 -0
  73. package/components/hy-modal/hy-modal.vue +240 -0
  74. package/components/hy-modal/props.ts +24 -0
  75. package/components/hy-modal/typing.d.ts +70 -0
  76. package/components/hy-navbar/hy-navbar.vue +194 -0
  77. package/components/hy-navbar/props.ts +24 -0
  78. package/components/hy-navbar/typing.d.ts +81 -0
  79. package/components/hy-notice-bar/hy-column-notice.vue +130 -0
  80. package/components/hy-notice-bar/hy-notice-bar.vue +82 -0
  81. package/components/hy-notice-bar/hy-row-notice.vue +182 -0
  82. package/components/hy-notice-bar/props.ts +19 -0
  83. package/components/hy-notice-bar/typing.d.ts +56 -0
  84. package/components/hy-number-step/hy-number-step.vue +428 -0
  85. package/components/hy-number-step/props.ts +29 -0
  86. package/components/hy-number-step/typing.d.ts +104 -0
  87. package/components/hy-overlay/hy-overlay.vue +54 -0
  88. package/components/hy-overlay/props.ts +10 -0
  89. package/components/hy-overlay/typing.d.ts +24 -0
  90. package/components/hy-picker/hy-picker.vue +499 -0
  91. package/components/hy-picker/props.ts +30 -0
  92. package/components/hy-picker/typing.d.ts +115 -0
  93. package/components/hy-popup/hy-popup.vue +269 -0
  94. package/components/hy-popup/props.ts +21 -0
  95. package/components/hy-popup/typing.d.ts +68 -0
  96. package/components/hy-price/hy-price.vue +86 -0
  97. package/components/hy-price/props.ts +13 -0
  98. package/components/hy-price/typing.d.ts +36 -0
  99. package/components/hy-qrcode/hy-qrcode.vue +153 -0
  100. package/components/hy-qrcode/props.ts +20 -0
  101. package/components/hy-qrcode/qrcode.js +1364 -0
  102. package/components/hy-qrcode/typing.d.ts +64 -0
  103. package/components/hy-radio/hy-radio.vue +319 -0
  104. package/components/hy-radio/props.ts +28 -0
  105. package/components/hy-radio/typing.d.ts +85 -0
  106. package/components/hy-rate/hy-rate.vue +261 -0
  107. package/components/hy-rate/props.ts +18 -0
  108. package/components/hy-rate/typing.d.ts +60 -0
  109. package/components/hy-read-more/hy-read-more.vue +134 -0
  110. package/components/hy-read-more/props.ts +20 -0
  111. package/components/hy-read-more/typing.d.ts +44 -0
  112. package/components/hy-safe-bottom/hy-safe-bottom.vue +64 -0
  113. package/components/hy-scroll-list/hy-scroll-list.vue +146 -0
  114. package/components/hy-scroll-list/props.ts +12 -0
  115. package/components/hy-scroll-list/typing.d.ts +28 -0
  116. package/components/hy-search/hy-search.vue +294 -0
  117. package/components/hy-search/props.ts +29 -0
  118. package/components/hy-search/typing.d.ts +109 -0
  119. package/components/hy-slider/hy-slider.vue +511 -0
  120. package/components/hy-slider/props.ts +21 -0
  121. package/components/hy-slider/typing.d.ts +68 -0
  122. package/components/hy-steps/hy-steps.vue +352 -0
  123. package/components/hy-steps/props.ts +15 -0
  124. package/components/hy-steps/typing.d.ts +58 -0
  125. package/components/hy-subsection/hy-subsection.vue +272 -0
  126. package/components/hy-subsection/props.ts +16 -0
  127. package/components/hy-subsection/typing.d.ts +44 -0
  128. package/components/hy-swiper/hy-swiper-indicator.vue +105 -0
  129. package/components/hy-swiper/hy-swiper.vue +242 -0
  130. package/components/hy-swiper/props.ts +30 -0
  131. package/components/hy-swiper/typing.d.ts +107 -0
  132. package/components/hy-switch/hy-switch.vue +168 -0
  133. package/components/hy-switch/props.ts +16 -0
  134. package/components/hy-switch/typing.d.ts +48 -0
  135. package/components/hy-tabs/hy-tabs.vue +416 -0
  136. package/components/hy-tabs/props.ts +26 -0
  137. package/components/hy-tabs/typing.d.ts +86 -0
  138. package/components/hy-tag/hy-tag.vue +374 -0
  139. package/components/hy-tag/props.ts +22 -0
  140. package/components/hy-tag/typing.d.ts +76 -0
  141. package/components/hy-textarea/hy-textarea.vue +229 -0
  142. package/components/hy-textarea/props.ts +26 -0
  143. package/components/hy-textarea/typing.d.ts +27 -0
  144. package/components/hy-tooltip/hy-tooltip.vue +332 -0
  145. package/components/hy-tooltip/props.ts +17 -0
  146. package/components/hy-tooltip/typing.d.ts +52 -0
  147. package/components/hy-transition/hy-transition.vue +150 -0
  148. package/components/hy-transition/index.scss +113 -0
  149. package/components/hy-transition/props.ts +10 -0
  150. package/components/hy-transition/typing.d.ts +36 -0
  151. package/components/hy-upload/hy-upload.vue +557 -0
  152. package/components/hy-upload/props.ts +29 -0
  153. package/components/hy-upload/typing.d.ts +147 -0
  154. package/components/hy-warn/hy-warn.vue +228 -0
  155. package/components/hy-warn/props.ts +14 -0
  156. package/components/hy-warn/typing.d.ts +40 -0
  157. package/components/hy-waterfall/hy-waterfall.vue +51 -0
  158. package/components/hy-waterfall/props.ts +10 -0
  159. package/components/hy-waterfall/typing.d.ts +20 -0
  160. package/components/index.ts +162 -0
  161. package/components/message/TheMessage.vue +169 -0
  162. package/components/message/index.ts +54 -0
  163. package/components/u-form/form.js +22 -0
  164. package/components/u-form/hy-form.vue +324 -0
  165. package/components/u-form/props.js +49 -0
  166. package/components/u-form/schema.js +1451 -0
  167. package/components/u-form/u-form.vue +267 -0
  168. package/components/u-form/utils.js +65 -0
  169. package/components/u-form-item/formItem.js +24 -0
  170. package/components/u-form-item/hy-form-item.vue +360 -0
  171. package/components/u-form-item/props.js +57 -0
  172. package/components/u-form-item/u-form-item.vue +294 -0
  173. package/components/yk-dialog/yk-dialog.vue +129 -0
  174. package/components/yk-tabbar/props.ts +49 -0
  175. package/components/yk-tabbar/yk-tabbar.vue +224 -0
  176. package/config/color.ts +6 -0
  177. package/config/icon.ts +366 -0
  178. package/config/index.ts +2 -0
  179. package/global/index.ts +6 -0
  180. package/global/register-properties.ts +37 -0
  181. package/index.ts +8 -0
  182. package/libs/css/common.scss +0 -0
  183. package/libs/css/iconfont.css +379 -0
  184. package/libs/css/iconfont.ttf +0 -0
  185. package/libs/css/mixin.scss +15 -0
  186. package/package.json +42 -0
  187. package/public/icons/error.png +0 -0
  188. package/public/icons/success.png +0 -0
  189. package/public/icons/warning.png +0 -0
  190. package/store/index.ts +1 -0
  191. package/store/userInfo.ts +25 -0
  192. package/theme.scss +94 -0
  193. package/typing/index.ts +7 -0
  194. package/typing/modules/common.d.ts +50 -0
  195. package/typing/modules/dialog.ts +17 -0
  196. package/typing/modules/enum.ts +67 -0
  197. package/typing/modules/form.ts +161 -0
  198. package/typing/modules/http.ts +68 -0
  199. package/typing/modules/icon.d.ts +366 -0
  200. package/typing/modules/img.ts +15 -0
  201. package/typing/modules/rect.ts +10 -0
  202. package/utils/address.json +5890 -0
  203. package/utils/base64.ts +119 -0
  204. package/utils/index.ts +3 -0
  205. package/utils/inside.ts +310 -0
  206. package/utils/utils.ts +446 -0
@@ -0,0 +1,64 @@
1
+ import { CSSProperties } from "vue";
2
+
3
+ export default interface IProps {
4
+ /**
5
+ * @description 实例ID字符串(必须)
6
+ * */
7
+ cid?: string;
8
+ /**
9
+ * @description 二维码大小
10
+ * */
11
+ size?: string | number;
12
+ /**
13
+ * @description 二维码内容
14
+ * */
15
+ text: string;
16
+ /**
17
+ * @description 是否显示二维码
18
+ * */
19
+ show?: boolean;
20
+ /**
21
+ * @description 二维码背景色
22
+ * */
23
+ background?: string;
24
+ /**
25
+ * @description 二维码颜色
26
+ * */
27
+ foreground?: string;
28
+ /**
29
+ * @description 定位角点颜色
30
+ * */
31
+ pdGround?: string;
32
+ /**
33
+ * @description 容错级别
34
+ * */
35
+ lv?: number;
36
+ /**
37
+ * @description 是否是自定义组件
38
+ * */
39
+ usingComponents?: boolean;
40
+ /**
41
+ * @description 二维码中间图标
42
+ * */
43
+ icon?: string;
44
+ /**
45
+ * @description 二维码中间图标大小
46
+ * */
47
+ iconSize?: string | number;
48
+ /**
49
+ * @description 显示加载状态
50
+ * */
51
+ showLoading?: boolean;
52
+ /**
53
+ * @description 加载中提示语
54
+ * */
55
+ loadingText?: string;
56
+ /**
57
+ * @description 是否预览
58
+ * */
59
+ allowPreview?: boolean;
60
+ /**
61
+ * @description 定义需要用到的外部样式
62
+ * */
63
+ customStyle?: CSSProperties;
64
+ }
@@ -0,0 +1,319 @@
1
+ <template>
2
+ <view class="hy-radio-group" :class="bemClass">
3
+ <template v-for="(item, i) in columns_1" :key="i">
4
+ <view
5
+ class="hy-radio cursor-pointer"
6
+ @tap.stop="wrapperClickHandler($event, item)"
7
+ :style="radioStyle"
8
+ :class="[
9
+ `hy-radio-label--${iconPlacement}`,
10
+ borderBottom && placement === 'column' && 'hy-border-bottom'
11
+ ]"
12
+ >
13
+ <view
14
+ class="hy-radio__icon-wrap cursor-pointer"
15
+ @tap.stop="iconClickHandler($event, item)"
16
+ :class="iconClasses(item)"
17
+ :style="iconWrapStyle(item)"
18
+ >
19
+ <slot
20
+ name="icon"
21
+ :iconColor="iconColor"
22
+ :iconSize="addUnit(iconSize)"
23
+ >
24
+ <HyIcon
25
+ class="hy-radio__icon-wrap__icon"
26
+ :name="IconConfig.CHECK_MASK"
27
+ :size="addUnit(iconSize)"
28
+ :color="iconColorCom(item.checked)"
29
+ />
30
+ </slot>
31
+ </view>
32
+ <view
33
+ class="hy-radio__label-wrap cursor-pointer"
34
+ @tap.stop="labelClickHandler($event, item)"
35
+ >
36
+ <slot name="label" :record="item">
37
+ <text
38
+ class="hy-radio__text"
39
+ :style="{
40
+ color: labelColor,
41
+ fontSize: labelSize
42
+ }"
43
+ >{{ item[fieldNames.label] }}</text
44
+ >
45
+ </slot>
46
+ </view>
47
+ </view>
48
+ </template>
49
+ </view>
50
+ </template>
51
+
52
+ <script setup lang="ts">
53
+ import IProps from "./typing";
54
+ import { CheckboxColumnsVo } from "../hy-check-button/typing";
55
+ import defaultProps from "./props";
56
+ import { computed, CSSProperties, ref, toRefs, watch } from "vue";
57
+ import { addUnit, bem, error } from "../../utils";
58
+ import { IconConfig } from "../../config";
59
+
60
+ // 组件
61
+ import HyIcon from "../hy-icon/hy-icon.vue";
62
+
63
+ const props = withDefaults(defineProps<IProps>(), defaultProps);
64
+ const {
65
+ modelValue,
66
+ columns,
67
+ fieldNames,
68
+ disabled,
69
+ shape,
70
+ size,
71
+ activeColor,
72
+ inactiveColor,
73
+ customStyle,
74
+ borderBottom,
75
+ placement,
76
+ iconColor
77
+ } = toRefs(props);
78
+ const emit = defineEmits(["change", "update:modelValue"]);
79
+
80
+ const columns_1 = ref();
81
+
82
+ watch(
83
+ () => modelValue.value,
84
+ (newValue) => {
85
+ columns_1.value = columns.value.map((item: any) => {
86
+ item[fieldNames.value.checked] = newValue == item[fieldNames.value.value];
87
+ return item;
88
+ });
89
+ },
90
+ { immediate: true }
91
+ );
92
+
93
+ const isDisabled = (disabledVal?: boolean): boolean =>
94
+ disabled.value || !!disabledVal;
95
+
96
+ /**
97
+ * @description icon颜色
98
+ * */
99
+ const iconColorCom = computed(() => {
100
+ return (check: boolean) => {
101
+ if (disabled.value) {
102
+ if (check) {
103
+ return "#c8c9cc";
104
+ } else {
105
+ return "#F5F5F5";
106
+ }
107
+ } else {
108
+ return iconColor.value || "#ffffff";
109
+ }
110
+ };
111
+ });
112
+ /**
113
+ * @description 单选框样式
114
+ * */
115
+ const radioStyle = computed(() => {
116
+ const style: CSSProperties = {};
117
+ if (borderBottom.value && placement.value === "row") {
118
+ error(
119
+ "检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效"
120
+ );
121
+ }
122
+ // 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
123
+ if (borderBottom.value && placement.value === "column") {
124
+ style.paddingBottom = "8px";
125
+ }
126
+ return Object.assign(style, customStyle.value);
127
+ });
128
+ const bemClass = computed(() => {
129
+ return bem("radio-group", props, ["placement"]);
130
+ });
131
+
132
+ /**
133
+ * @description 定义icon的Class类名
134
+ * */
135
+ const iconClasses = computed(() => {
136
+ return (temp: CheckboxColumnsVo): string[] => {
137
+ let classes: string[] = [];
138
+ // 组件的形状
139
+ classes.push("hy-radio__icon-wrap--" + shape.value);
140
+ if (isDisabled(temp?.disabled)) {
141
+ classes.push("hy-radio__icon-wrap--disabled");
142
+ }
143
+ if (temp[fieldNames.value.checked] && isDisabled(temp?.disabled)) {
144
+ classes.push("hy-radio__icon-wrap--disabled--checked");
145
+ }
146
+ return classes;
147
+ };
148
+ });
149
+
150
+ /**
151
+ * @description 定义icon的样式
152
+ * */
153
+ const iconWrapStyle = computed(() => {
154
+ return (temp: CheckboxColumnsVo): CSSProperties => {
155
+ // checkbox的整体样式
156
+ const style: CSSProperties = {};
157
+ style.backgroundColor =
158
+ temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
159
+ ? activeColor.value
160
+ : "#ffffff";
161
+ style.borderColor =
162
+ temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
163
+ ? activeColor.value
164
+ : inactiveColor.value;
165
+ style.width = addUnit(size.value);
166
+ style.height = addUnit(size.value);
167
+ return style;
168
+ };
169
+ });
170
+
171
+ /**
172
+ * @description 点击图标
173
+ * */
174
+ const iconClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
175
+ e.stopPropagation();
176
+ if (!isDisabled(temp?.disabled)) {
177
+ setRadioCheckedStatus(temp);
178
+ }
179
+ };
180
+ const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
181
+ e.stopPropagation();
182
+ if (!isDisabled(temp?.disabled)) {
183
+ setRadioCheckedStatus(temp);
184
+ }
185
+ };
186
+ /**
187
+ * @description 点击label
188
+ * */
189
+ const labelClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
190
+ e.stopPropagation();
191
+ if (!isDisabled(temp?.disabled)) {
192
+ setRadioCheckedStatus(temp);
193
+ }
194
+ };
195
+
196
+ /**
197
+ * @description 执行函数改变状态传给父值
198
+ * */
199
+ const setRadioCheckedStatus = (temp: CheckboxColumnsVo) => {
200
+ // 将本组件标记为与原来相反的状态
201
+ columns_1.value = columns_1.value.map((item) => {
202
+ if (temp[fieldNames.value.value] === item[fieldNames.value.value]) {
203
+ item[fieldNames.value.checked] = true;
204
+ } else {
205
+ item[fieldNames.value.checked] = false;
206
+ }
207
+ return item;
208
+ });
209
+ emit("change", temp);
210
+ emit("update:modelValue", temp[fieldNames.value.value]);
211
+ // 双向绑定
212
+ // if (this.usedAlone) {
213
+ // this.$emit('update:checked', this.isChecked)
214
+ // }
215
+ };
216
+ </script>
217
+
218
+ <style lang="scss" scoped>
219
+ @import "../../libs/css/mixin.scss";
220
+ @import "../../theme.scss";
221
+
222
+ .hy-radio {
223
+ /* #ifndef APP-NVUE */
224
+ @include flex(row);
225
+ /* #endif */
226
+ overflow: hidden;
227
+ flex-direction: row;
228
+ align-items: center;
229
+ margin-bottom: 5px;
230
+ margin-top: 5px;
231
+
232
+ &-group {
233
+ flex: 1;
234
+
235
+ &--row {
236
+ /* #ifndef APP-NVUE */
237
+ display: flex;
238
+ /* #endif */
239
+ flex-flow: row wrap;
240
+ }
241
+
242
+ &--column {
243
+ @include flex(column);
244
+ margin: $hy-border-margin-padding-lg 0;
245
+ }
246
+ }
247
+
248
+ &-label--left {
249
+ flex-direction: row;
250
+ }
251
+
252
+ &-label--right {
253
+ flex-direction: row-reverse;
254
+ justify-content: space-between;
255
+ }
256
+
257
+ &__icon-wrap {
258
+ /* #ifndef APP-NVUE */
259
+ box-sizing: border-box;
260
+ // nvue下,border-color过渡有问题
261
+ transition-property: border-color, background-color, color;
262
+ transition-duration: 0.2s;
263
+ /* #endif */
264
+ @include flex;
265
+ align-items: center;
266
+ justify-content: center;
267
+ color: transparent;
268
+ text-align: center;
269
+ margin-right: $hy-border-margin-padding-sm;
270
+ border: $hy-border-line;
271
+
272
+ /* #ifdef MP-TOUTIAO */
273
+ // 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
274
+ &__icon {
275
+ line-height: 0;
276
+ }
277
+
278
+ /* #endif */
279
+
280
+ &--circle {
281
+ border-radius: 50%;
282
+ }
283
+
284
+ &--square {
285
+ border-radius: 3px;
286
+ }
287
+
288
+ &--checked {
289
+ color: $hy-text-color-inverse;
290
+ background-color: $hy-primary;
291
+ border-color: $hy-primary;
292
+ }
293
+
294
+ &--disabled {
295
+ background-color: $hy-color-disable-bg !important;
296
+ }
297
+
298
+ &--disabled--checked {
299
+ color: $hy-color-disable-icon !important;
300
+ }
301
+ }
302
+
303
+ &__label-wrap {
304
+ /* #ifndef APP-NVUE */
305
+ word-wrap: break-word;
306
+ /* #endif */
307
+ color: $hy-text-color;
308
+ font-size: $hy-font-size-base;
309
+ margin-right: $hy-border-margin-padding-sm;
310
+
311
+ &--disabled {
312
+ color: $hy-text-color-disable;
313
+ }
314
+ }
315
+ }
316
+ .hy-border-bottom {
317
+ border-bottom: $hy-border-line;
318
+ }
319
+ </style>
@@ -0,0 +1,28 @@
1
+ import IProps from "./typing";
2
+ import { ColorConfig } from "../../config";
3
+
4
+ const defaultProps: IProps = {
5
+ modelValue: "",
6
+ columns: [],
7
+ fieldNames: {
8
+ label: "label",
9
+ value: "value",
10
+ checked: "checked"
11
+ },
12
+ shape: "circle",
13
+ size: 20,
14
+ disabled: false,
15
+ activeColor: ColorConfig.primary,
16
+ inactiveColor: "#c8c9cc",
17
+ iconSize: "20",
18
+ iconColor: "",
19
+ iconPlacement: "left",
20
+ borderBottom: false,
21
+ label: "",
22
+ labelSize: "",
23
+ labelColor: "",
24
+ labelDisabled: "",
25
+ placement: "row"
26
+ };
27
+
28
+ export default defaultProps;
@@ -0,0 +1,85 @@
1
+ import type { CSSProperties } from "vue";
2
+ import { CheckboxColumnsVo, IFieldNames } from "../hy-check-button/typing";
3
+
4
+ export default interface IProps {
5
+ /**
6
+ * @description 双向绑定值,数组类型
7
+ * */
8
+ modelValue: string | number;
9
+ /**
10
+ * @description 接受数组值
11
+ * */
12
+ columns: CheckboxColumnsVo[];
13
+ /**
14
+ * @description 自定义接收columns的键
15
+ * */
16
+ fieldNames?: IFieldNames;
17
+ /**
18
+ * @description checkbox组件的标示符
19
+ * */
20
+ name?: string;
21
+ /**
22
+ * @description 形状,square为方形,circle为圆型
23
+ * */
24
+ shape?: HyApp.ShapeType;
25
+ /**
26
+ * @description 整体的大小
27
+ * */
28
+ size?: string | number;
29
+ /**
30
+ * @description 是否默认选中
31
+ * */
32
+ checkbox?: boolean;
33
+ /**
34
+ * @description 是否禁用
35
+ * */
36
+ disabled?: boolean;
37
+ /**
38
+ * @description 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
39
+ * */
40
+ activeColor?: string;
41
+ /**
42
+ * @description 未选中的颜色
43
+ * */
44
+ inactiveColor?: string;
45
+ /**
46
+ * @description 图标的大小,单位px
47
+ * */
48
+ iconSize?: string;
49
+ /**
50
+ * @description 图标颜色
51
+ * */
52
+ iconColor?: string;
53
+ /**
54
+ * @description label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
55
+ * */
56
+ label?: string;
57
+ /**
58
+ * @description label的字体大小,px单位
59
+ * */
60
+ labelSize?: string | number;
61
+ /**
62
+ * @description label的颜色
63
+ * */
64
+ labelColor?: string;
65
+ /**
66
+ * @description 勾选图标的对齐方式,left-左边,right-右边
67
+ * */
68
+ iconPlacement?: HyApp.LeftRightType;
69
+ /**
70
+ * @description 竖向配列时,是否显示下划线
71
+ * */
72
+ borderBottom?: boolean;
73
+ /**
74
+ * @description 是否禁止点击提示语选中复选框
75
+ * */
76
+ labelDisabled?: string;
77
+ /**
78
+ * @description 定义需要用到的外部样式
79
+ * */
80
+ customStyle?: CSSProperties;
81
+ /**
82
+ * @description 布局方式,row-横向,column-纵向
83
+ * */
84
+ placement?: HyApp.PermutationType;
85
+ }