hy-app 0.5.1 → 0.5.3

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 (39) hide show
  1. package/components/hy-action-sheet/index.scss +0 -5
  2. package/components/hy-back-top/hy-back-top.vue +10 -9
  3. package/components/hy-back-top/props.ts +5 -3
  4. package/components/hy-badge/hy-badge.vue +2 -1
  5. package/components/hy-badge/props.ts +5 -3
  6. package/components/hy-button/hy-button.vue +5 -5
  7. package/components/hy-button/index.scss +9 -0
  8. package/components/hy-button/props.ts +11 -6
  9. package/components/hy-coupon/hy-coupon.vue +159 -167
  10. package/components/hy-coupon/index.scss +130 -516
  11. package/components/hy-coupon/props.ts +98 -127
  12. package/components/hy-coupon/typing.d.ts +147 -146
  13. package/components/hy-folding-panel-item/hy-folding-panel-item.vue +1 -3
  14. package/components/hy-folding-panel-item/index.scss +0 -8
  15. package/components/hy-form-group/hy-form-group.vue +308 -511
  16. package/components/hy-form-group/index.scss +0 -33
  17. package/components/hy-form-group/props.ts +103 -13
  18. package/components/hy-form-group/typing.d.ts +0 -77
  19. package/components/hy-form-item/hy-form-item.vue +3 -3
  20. package/components/hy-input/hy-input.vue +16 -10
  21. package/components/hy-input/index.scss +4 -0
  22. package/components/hy-input/props.ts +2 -2
  23. package/components/hy-notice-bar/hy-column-notice.vue +63 -70
  24. package/components/hy-notice-bar/hy-row-notice.vue +92 -110
  25. package/components/hy-notice-bar/index.scss +2 -4
  26. package/components/hy-notice-bar/props.ts +4 -1
  27. package/components/hy-qrcode/hy-qrcode.vue +1 -1
  28. package/components/hy-qrcode/index.scss +1 -0
  29. package/components/hy-qrcode/qrcode.js +1208 -1402
  30. package/components/hy-rate/hy-rate.vue +0 -1
  31. package/components/hy-read-more/hy-read-more.vue +1 -1
  32. package/components/hy-textarea/hy-textarea.vue +1 -1
  33. package/components/hy-textarea/index.scss +8 -7
  34. package/components/hy-toast/index.scss +2 -7
  35. package/libs/css/common.scss +0 -5
  36. package/libs/typing/modules/form.ts +159 -163
  37. package/package.json +2 -2
  38. package/web-types.json +1 -1
  39. package/components/hy-coupon/README.md +0 -133
@@ -167,7 +167,6 @@ const clickHandler = (e: TouchEvent) => {
167
167
  // return;
168
168
  // }
169
169
  e.stopPropagation()
170
- console.log(e, '微信')
171
170
  let x = 0
172
171
  // #ifndef APP-NVUE || MP-ALIPAY
173
172
  x = e.detail.x
@@ -62,7 +62,7 @@ export default {
62
62
  import { computed, ref, onMounted, getCurrentInstance } from 'vue'
63
63
  import type { CSSProperties } from 'vue'
64
64
  import type { IReadMoreEmits } from './typing'
65
- import { getRect, guid, sleep, IconConfig } from '../../libs'
65
+ import { getRect, guid, sleep, addUnit, IconConfig } from '../../libs'
66
66
  import readMoreProps from './props'
67
67
  // 组件
68
68
  import HyIcon from '../hy-icon/hy-icon.vue'
@@ -4,7 +4,7 @@
4
4
  :style="[textareaStyle, borderStyle(isFocus)]"
5
5
  >
6
6
  <textarea
7
- class="hy-textarea__field"
7
+ :class="['hy-textarea__field', disabled && 'hy-textarea__disabled-text']"
8
8
  :value="innerValue"
9
9
  :style="`height: ${autoHeight ? 'auto' : addUnit(height)}`"
10
10
  :placeholder="placeholder || ''"
@@ -8,12 +8,6 @@
8
8
  flex: 1;
9
9
  padding: $hy-border-margin-padding-sm;
10
10
 
11
- @include e(field) {
12
- min-height: 50rpx;
13
- max-height: 200rpx;
14
- color: $hy-text-color;
15
- }
16
-
17
11
  @include e(radius) {
18
12
  border-radius: $hy-border-radius-sm;
19
13
  }
@@ -24,10 +18,17 @@
24
18
 
25
19
  @include e(disabled) {
26
20
  background-color: $hy-background--disabled;
27
- color: $hy-text-color--disabled;
21
+ color: $hy-text-color--disabled !important;
22
+
23
+ &-text {
24
+ color: $hy-text-color--disabled !important;
25
+ }
28
26
  }
29
27
 
30
28
  @include e(field) {
29
+ min-height: 50rpx;
30
+ max-height: 200rpx;
31
+ color: $hy-text-color;
31
32
  flex: 1;
32
33
  font-size: 15px;
33
34
  width: 100%;
@@ -20,8 +20,8 @@
20
20
  }
21
21
 
22
22
  @include m(icon) {
23
- width: 32px;
24
- height: 32px;
23
+ width: 60rpx;
24
+ height: 60rpx;
25
25
  border-radius: $hy-border-radius-semicircle;
26
26
  box-sizing: border-box;
27
27
  margin-right: $hy-border-margin-padding-base;
@@ -31,27 +31,22 @@
31
31
 
32
32
  @include e(info) {
33
33
  background: $hy-info;
34
- border: 6rpx solid $hy-info-dark;
35
34
  }
36
35
 
37
36
  @include e(primary) {
38
37
  background: $hy-primary;
39
- border: 6rpx solid $hy-primary-dark;
40
38
  }
41
39
 
42
40
  @include e(success) {
43
41
  background: $hy-success;
44
- border: 6rpx solid $hy-success-dark;
45
42
  }
46
43
 
47
44
  @include e(error) {
48
45
  background: $hy-error;
49
- border: 6rpx solid $hy-error-dark;
50
46
  }
51
47
 
52
48
  @include e(warning) {
53
49
  background: $hy-warning;
54
- border: 6rpx solid $hy-warning-dark;
55
50
  }
56
51
  }
57
52
 
@@ -49,8 +49,3 @@
49
49
  color: transparent;
50
50
  display:none;
51
51
  }
52
-
53
- /* 去除原生按钮边框 */
54
- button:after {
55
- border: none;
56
- }
@@ -1,176 +1,172 @@
1
- import type { DateModeEnum } from "./enum";
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";
1
+ import type { DateModeEnum } from './enum'
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'
9
9
 
10
10
  /**
11
11
  * 类型
12
12
  * */
13
13
  export enum FormTypeEnum {
14
- /**
15
- * 上传文件
16
- * */
17
- UPLOAD = "upload",
18
- /**
19
- * 普通输入框
20
- * */
21
- TEXT = "text",
22
- /**
23
- * 数字输入框
24
- * */
25
- NUMBER = "number",
26
- /**
27
- * 密码输入框
28
- * */
29
- PASSWORD = "password",
30
- /**
31
- * 身份证id输入框
32
- * */
33
- ID_CARD = "idcard",
34
- /**
35
- * 单选
36
- * */
37
- RADIO = "radio",
38
- /**
39
- * 选择按钮(单选/多选)
40
- * */
41
- CHECK_BUTTON = "checkButton",
42
- /**
43
- * 时间选择器
44
- * */
45
- DATE = "date",
46
- /**
47
- * 选择器
48
- * */
49
- SELECT = "select",
50
- /**
51
- * 地址选择器
52
- * */
53
- ADDRESS = "address",
54
- /**
55
- * 开关
56
- * */
57
- SWITCH = "switch",
58
- /**
59
- * 详情
60
- * */
61
- DETAIL = "detail",
62
- /**
63
- * 文本域
64
- * */
65
- TEXTAREA = "textarea",
66
- /**
67
- * 自定义
68
- * */
69
- CUSTOM = "custom",
14
+ /**
15
+ * 上传文件
16
+ * */
17
+ UPLOAD = 'upload',
18
+ /**
19
+ * 普通输入框
20
+ * */
21
+ TEXT = 'text',
22
+ /**
23
+ * 数字输入框
24
+ * */
25
+ NUMBER = 'number',
26
+ /**
27
+ * 密码输入框
28
+ * */
29
+ PASSWORD = 'password',
30
+ /**
31
+ * 身份证id输入框
32
+ * */
33
+ ID_CARD = 'idcard',
34
+ /**
35
+ * 单选
36
+ * */
37
+ RADIO = 'radio',
38
+ /**
39
+ * 选择按钮(单选/多选)
40
+ * */
41
+ CHECK_BUTTON = 'checkButton',
42
+ /**
43
+ * 时间选择器
44
+ * */
45
+ DATE = 'date',
46
+ /**
47
+ * 选择器
48
+ * */
49
+ SELECT = 'select',
50
+ /**
51
+ * 地址选择器
52
+ * */
53
+ ADDRESS = 'address',
54
+ /**
55
+ * 开关
56
+ * */
57
+ SWITCH = 'switch',
58
+ /**
59
+ * 详情
60
+ * */
61
+ DETAIL = 'detail',
62
+ /**
63
+ * 文本域
64
+ * */
65
+ TEXTAREA = 'textarea',
66
+ /**
67
+ * 自定义
68
+ * */
69
+ CUSTOM = 'custom'
70
70
  }
71
71
 
72
72
  export interface FormColumnsType {
73
- /**
74
- * 标题
75
- * */
76
- label: string;
77
- /**
78
- * 字段
79
- * */
80
- field: string;
81
- /**
82
- * 是否需要校验
83
- * */
84
- required?: boolean;
85
- /**
86
- * 右固定
87
- * */
88
- right?: boolean;
89
- /**
90
- * @description 表单类型
91
- * */
92
- type: FormTypeEnum;
93
- /**
94
- * @description 文件最大上传数据
95
- * */
96
- maxCount?: number;
97
- /**
98
- * @description 是否禁用
99
- * */
100
- disabled?: boolean;
73
+ /**
74
+ * 标题
75
+ * */
76
+ label: string
77
+ /**
78
+ * 字段
79
+ * */
80
+ field: string
81
+ /**
82
+ * 右固定
83
+ * */
84
+ right?: boolean
85
+ /**
86
+ * @description 表单类型
87
+ * */
88
+ type: FormTypeEnum
89
+ /**
90
+ * @description 文件最大上传数据
91
+ * */
92
+ maxCount?: number
93
+ /**
94
+ * @description 是否禁用
95
+ * */
96
+ disabled?: boolean
101
97
 
102
- /**
103
- * @description type = select时候必填
104
- * */
105
- select?: string[][] | { text: string; id: string }[][];
106
- /**
107
- * @description type = radio时候必填
108
- * */
109
- actions?: CheckboxColumnsVo[];
110
- /**
111
- * @description 输入框属性api集合
112
- * */
113
- input?: Partial<HyInputProps>;
114
- /**
115
- * @description 文本域属性api集合
116
- * */
117
- textarea?: Partial<HyTextareaProps>;
118
- /**
119
- * @description 开关属性api集合
120
- * */
121
- switchItem?: Partial<HySwitchProps>;
122
- /**
123
- * @description 选择器属性api集合
124
- * */
125
- picker?: Partial<HyPickerProps>;
126
- /**
127
- * @description 单选属性api集合
128
- * */
129
- radio?: Partial<HyRadioProps>;
130
- /**
131
- * @description 选择按钮属性api集合
132
- * */
133
- checkButton?: Partial<HyCheckButtonProps>;
134
- /**
135
- * @description 输入框边框
136
- * */
137
- mode?: DateModeEnum;
138
- /**
139
- * @description 规则校验
140
- * */
141
- rules?: RulesVo | RulesVo[];
98
+ /**
99
+ * @description type = select时候必填
100
+ * */
101
+ select?: string[][] | { text: string; id: string }[][]
102
+ /**
103
+ * @description type = radio时候必填
104
+ * */
105
+ actions?: CheckboxColumnsVo[]
106
+ /**
107
+ * @description 输入框属性api集合
108
+ * */
109
+ input?: Partial<HyInputProps>
110
+ /**
111
+ * @description 文本域属性api集合
112
+ * */
113
+ textarea?: Partial<HyTextareaProps>
114
+ /**
115
+ * @description 开关属性api集合
116
+ * */
117
+ switchItem?: Partial<HySwitchProps>
118
+ /**
119
+ * @description 选择器属性api集合
120
+ * */
121
+ picker?: Partial<HyPickerProps>
122
+ /**
123
+ * @description 单选属性api集合
124
+ * */
125
+ radio?: Partial<HyRadioProps>
126
+ /**
127
+ * @description 选择按钮属性api集合
128
+ * */
129
+ checkButton?: Partial<HyCheckButtonProps>
130
+ /**
131
+ * @description 日期展示的格式
132
+ * */
133
+ mode?: DateModeEnum
134
+ /**
135
+ * @description 规则校验
136
+ * */
137
+ rules?: RulesVo | RulesVo[]
142
138
  }
143
139
 
144
140
  export interface RulesVo {
145
- /**
146
- * @description 是否必填
147
- * */
148
- required?: boolean;
149
- /**
150
- * @description 校验不通过时的提示信息
151
- * */
152
- message?: string;
153
- /**
154
- * @description 表单事件校验
155
- * */
156
- trigger?: ("blur" | "change")[];
157
- /**
158
- * @description 最小值
159
- * */
160
- min?: number;
161
- /**
162
- * @description 最大值
163
- * */
164
- max?: number;
165
- /**
166
- * @description 基础正则校验
167
- * phone - 手机号校验
168
- * email - 邮箱校验
169
- * password - 复杂密码校验
170
- * */
171
- type?: "phone" | "email" | "password";
172
- /**
173
- * @description 自定义校验规则
174
- * */
175
- validator?: (rule: any, value: string, callback?: Function) => boolean;
141
+ /**
142
+ * @description 是否必填
143
+ * */
144
+ required?: boolean
145
+ /**
146
+ * @description 校验不通过时的提示信息
147
+ * */
148
+ message?: string
149
+ /**
150
+ * @description 表单事件校验
151
+ * */
152
+ trigger?: ('blur' | 'change')[]
153
+ /**
154
+ * @description 最小值
155
+ * */
156
+ min?: number
157
+ /**
158
+ * @description 最大值
159
+ * */
160
+ max?: number
161
+ /**
162
+ * @description 基础正则校验
163
+ * phone - 手机号校验
164
+ * email - 邮箱校验
165
+ * password - 复杂密码校验
166
+ * */
167
+ type?: 'phone' | 'email' | 'password'
168
+ /**
169
+ * @description 自定义校验规则
170
+ * */
171
+ validator?: (rule: any, value: string, callback?: Function) => boolean
176
172
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.5.1",
4
- "description": "去掉枚举后面的PropType",
3
+ "version": "0.5.3",
4
+ "description": "fix: 新增优惠券",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},