hy-app 0.6.2 → 0.6.4

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.
@@ -2,15 +2,6 @@
2
2
  @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(watermark) {
5
- position: absolute;
6
- z-index: 1100;
7
- opacity: 0.5;
8
- left: 0;
9
- right: 0;
10
- top: 0;
11
- bottom: 0;
12
- pointer-events: none;
13
- background-repeat: repeat;
14
5
  @include is(fullscreen) {
15
6
  position: fixed;
16
7
  }
@@ -1,104 +1,109 @@
1
- const watermarkProps = {
2
- /** 显示主标题 */
3
- title: {
4
- type: String,
5
- default: ''
6
- },
7
- /** 主标题颜色 */
8
- titleColor: {
9
- type: String,
10
- default: ''
11
- },
12
- /** 主标题字体大小,单位px */
13
- titleSize: {
14
- type: Number,
15
- default: 0
16
- },
17
- /** 显示副标题内容 */
18
- content: {
19
- type: String,
20
- default: ''
21
- },
22
- /** 显示图片的地址,支持网络图片和base64(钉钉小程序仅支持网络图片) */
23
- image: {
24
- type: String,
25
- default: ''
26
- },
27
- /** 图片高度 */
28
- imageHeight: {
29
- type: Number,
30
- default: 50
31
- },
32
- /** 图片宽度 */
33
- imageWidth: {
34
- type: Number,
35
- default: 70
36
- },
37
- /** X轴间距,单位px */
38
- gutterX: {
39
- type: Number,
40
- default: 0
41
- },
42
- /** Y轴间距,单位px */
43
- gutterY: {
44
- type: Number,
45
- default: 0
46
- },
47
- /** canvas画布宽度,单位px */
48
- width: {
49
- type: Number,
50
- default: 100
51
- },
52
- /** canvas画布高度,单位px */
53
- height: {
54
- type: Number,
55
- default: 100
56
- },
57
- /** 是否为全屏水印 */
58
- fullScreen: {
59
- type: Boolean,
60
- default: true
61
- },
62
- /** 水印字体颜色 */
63
- color: {
64
- type: String,
65
- default: '#8c8c8c'
66
- },
67
- /** 水印字体大小,单位px */
68
- size: {
69
- type: Number,
70
- default: 14
71
- },
72
- /** 水印字体样式(仅微信和h5支持) */
73
- fontStyle: {
74
- type: String,
75
- default: ''
76
- },
77
- /** 水印字体的粗细 */
78
- fontWeight: {
79
- type: String,
80
- default: ''
81
- },
82
- /** 水印字体系列(仅微信和h5支持) */
83
- fontFamily: {
84
- type: String,
85
- default: 'PingFang SC'
86
- },
87
- /** 水印旋转角度 */
88
- rotate: {
89
- type: Number,
90
- default: -25
91
- },
92
- /** 自定义层级 */
93
- zIndex: {
94
- type: Number,
95
- default: 10086
96
- },
97
- /** 自定义透明度,取值 0~1 */
98
- opacity: {
99
- type: Number,
100
- default: 0.5
101
- }
102
- }
103
-
104
- export default watermarkProps
1
+ const watermarkProps = {
2
+ /** 显示主标题 */
3
+ title: {
4
+ type: String,
5
+ default: ''
6
+ },
7
+ /** 主标题颜色 */
8
+ titleColor: {
9
+ type: String,
10
+ default: ''
11
+ },
12
+ /** 主标题字体大小,单位px */
13
+ titleSize: {
14
+ type: Number,
15
+ default: 0
16
+ },
17
+ /** 显示副标题内容 */
18
+ content: {
19
+ type: String,
20
+ default: ''
21
+ },
22
+ /** 显示图片的地址,支持网络图片和base64(钉钉小程序仅支持网络图片) */
23
+ image: {
24
+ type: String,
25
+ default: ''
26
+ },
27
+ /** 图片高度 */
28
+ imageHeight: {
29
+ type: Number,
30
+ default: 50
31
+ },
32
+ /** 图片宽度 */
33
+ imageWidth: {
34
+ type: Number,
35
+ default: 70
36
+ },
37
+ /** X轴间距,单位px */
38
+ gutterX: {
39
+ type: Number,
40
+ default: 0
41
+ },
42
+ /** Y轴间距,单位px */
43
+ gutterY: {
44
+ type: Number,
45
+ default: 0
46
+ },
47
+ /** canvas画布宽度,单位px */
48
+ width: {
49
+ type: Number,
50
+ default: 100
51
+ },
52
+ /** canvas画布高度,单位px */
53
+ height: {
54
+ type: Number,
55
+ default: 100
56
+ },
57
+ /** 是否为全屏水印 */
58
+ fullScreen: {
59
+ type: Boolean,
60
+ default: true
61
+ },
62
+ /** 水印字体颜色 */
63
+ color: {
64
+ type: String,
65
+ default: '#8c8c8c'
66
+ },
67
+ /** 水印字体大小,单位px */
68
+ size: {
69
+ type: Number,
70
+ default: 24
71
+ },
72
+ /** 水印字体样式(仅微信和h5支持) */
73
+ fontStyle: {
74
+ type: String,
75
+ default: ''
76
+ },
77
+ /** 水印字体的粗细 */
78
+ fontWeight: {
79
+ type: String,
80
+ default: ''
81
+ },
82
+ /** 水印字体系列(仅微信和h5支持) */
83
+ fontFamily: {
84
+ type: String,
85
+ default: 'PingFang SC'
86
+ },
87
+ /** 水印旋转角度 */
88
+ rotate: {
89
+ type: Number,
90
+ default: -25
91
+ },
92
+ /** 自定义层级 */
93
+ zIndex: {
94
+ type: Number,
95
+ default: 10086
96
+ },
97
+ /** 自定义透明度,取值 0~1 */
98
+ opacity: {
99
+ type: Number,
100
+ default: 0.5
101
+ },
102
+ /** 是否防盗 */
103
+ isAntiTheft: {
104
+ type: Boolean,
105
+ default: false
106
+ }
107
+ }
108
+
109
+ export default watermarkProps
package/global.d.ts CHANGED
@@ -30,7 +30,7 @@ declare module 'vue' {
30
30
  HyFloatButton: (typeof import('./components/hy-float-button/hy-float-button.vue'))['default']
31
31
  HyFloatingPanel: (typeof import('./components/hy-floating-panel/hy-floating-panel.vue'))['default']
32
32
  HyFloatingPanelItem: (typeof import('./components/hy-floating-panel-item/hy-floating-panel-item.vue'))['default']
33
- HyForm: (typeof import('@/package/components/hy-form-group/hy-form.vue'))['default']
33
+ HyForm: (typeof import('@/package/components/hy-form/hy-form.vue'))['default']
34
34
  HyFormItem: (typeof import('./components/hy-form-item/hy-form-item.vue'))['default']
35
35
  HyFormGroup: (typeof import('./components/hy-form-group/hy-form-group.vue'))['default']
36
36
  HyGrid: (typeof import('./components/hy-grid/hy-grid.vue'))['default']
@@ -1,45 +1,45 @@
1
- /**
2
- * 消息提示hooks
3
- * */
4
-
5
- import type ToastOptions from "../../components/hy-toast/typing";
6
- import { error } from "../../libs";
7
-
8
- // 用于缓存全局唯一实例
9
- let toastInstance: any = null;
10
-
11
- /**
12
- * useToast 适用于任意页面直接调用 toast
13
- * 兼容 H5 + 微信小程序 + App
14
- */
15
- export const useToast = () => {
16
- const show = (msg: string, opt?: ToastOptions) =>
17
- openToast({ message: msg, icon: false, type: "", ...opt });
18
- const info = (msg: string, opt?: ToastOptions) =>
19
- openToast({ message: msg, type: "info", icon: true, ...opt });
20
- const success = (msg: string, opt?: ToastOptions) =>
21
- openToast({ message: msg, type: "success", icon: true, ...opt });
22
- const error = (msg: string, opt?: ToastOptions) =>
23
- openToast({ message: msg, type: "error", icon: true, ...opt });
24
- const warning = (msg: string, opt?: ToastOptions) =>
25
- openToast({ message: msg, type: "warning", icon: true, ...opt });
26
- const primary = (msg: string, opt?: ToastOptions) =>
27
- openToast({ message: msg, type: "primary", icon: true, ...opt });
28
- const loading = (msg: string = "加载中...", opt?: ToastOptions) =>
29
- openToast({ message: msg, loading: true, ...opt });
30
- const close = (all?: boolean) => closeToast();
31
-
32
- return { show, info, success, error, warning, primary, loading, close };
33
- };
34
-
35
- /**
36
- * ✅ 实现
37
- * 页面创建总事件,调用方法实现
38
- */
39
- const openToast = (opt: ToastOptions) => {
40
- uni.$emit("__hy_toast_open__", opt);
41
- };
42
-
43
- const closeToast = () => {
44
- uni.$emit("__hy_toast_close__");
45
- };
1
+ /**
2
+ * 消息提示hooks
3
+ * */
4
+
5
+ import type ToastOptions from '../../components/hy-toast/typing'
6
+ import { error } from '../../libs'
7
+
8
+ // 用于缓存全局唯一实例
9
+ let toastInstance: any = null
10
+
11
+ /**
12
+ * useToast 适用于任意页面直接调用 toast
13
+ * 兼容 H5 + 微信小程序 + App
14
+ */
15
+ export const useToast = () => {
16
+ const show = (msg: string, opt?: ToastOptions) =>
17
+ openToast({ message: msg, icon: false, type: '', ...opt })
18
+ const info = (msg: string, opt?: ToastOptions) =>
19
+ openToast({ message: msg, type: 'info', icon: true, ...opt })
20
+ const success = (msg: string, opt?: ToastOptions) =>
21
+ openToast({ message: msg, type: 'success', icon: true, ...opt })
22
+ const error = (msg: string, opt?: ToastOptions) =>
23
+ openToast({ message: msg, type: 'error', icon: true, ...opt })
24
+ const warning = (msg: string, opt?: ToastOptions) =>
25
+ openToast({ message: msg, type: 'warning', icon: true, ...opt })
26
+ const primary = (msg: string, opt?: ToastOptions) =>
27
+ openToast({ message: msg, type: 'primary', icon: true, ...opt })
28
+ const loading = (msg: string = '加载中...', opt?: ToastOptions) =>
29
+ openToast({ message: msg, type: 'primary', loading: true, ...opt })
30
+ const close = (all?: boolean) => closeToast()
31
+
32
+ return { show, info, success, error, warning, primary, loading, close }
33
+ }
34
+
35
+ /**
36
+ * ✅ 实现
37
+ * 页面创建总事件,调用方法实现
38
+ */
39
+ const openToast = (opt: ToastOptions) => {
40
+ uni.$emit('__hy_toast_open__', opt)
41
+ }
42
+
43
+ const closeToast = () => {
44
+ uni.$emit('__hy_toast_close__')
45
+ }
@@ -7,8 +7,8 @@
7
7
  font-style: normal;
8
8
  }
9
9
 
10
- .iconfont {
11
- font-family: "hy-icon" !important;
10
+ .hy-icon {
11
+ font-family: "hy-icon";
12
12
  font-size: 16px;
13
13
  font-style: normal;
14
14
  -webkit-font-smoothing: antialiased;
@@ -87,90 +87,90 @@ export interface FormColumnsType {
87
87
  * */
88
88
  right?: boolean
89
89
  /**
90
- * @description 表单类型
90
+ * 表单类型
91
91
  * */
92
92
  type: FormTypeEnum
93
93
  /**
94
- * @description 文件最大上传数据
94
+ * 文件最大上传数据
95
95
  * */
96
96
  maxCount?: number
97
97
  /**
98
- * @description 是否禁用
98
+ * 是否禁用
99
99
  * */
100
100
  disabled?: boolean
101
101
 
102
102
  /**
103
- * @description type = select时候必填
103
+ * type = select时候必填
104
104
  * */
105
105
  select?: string[][] | { text: string; id: string }[][]
106
106
  /**
107
- * @description type = radio时候必填
107
+ * type = radio时候必填
108
108
  * */
109
109
  actions?: CheckboxColumnsVo[]
110
110
  /**
111
- * @description 输入框属性api集合
111
+ * 输入框属性api集合
112
112
  * */
113
113
  input?: Partial<HyInputProps>
114
114
  /**
115
- * @description 文本域属性api集合
115
+ * 文本域属性api集合
116
116
  * */
117
117
  textarea?: Partial<HyTextareaProps>
118
118
  /**
119
- * @description 开关属性api集合
119
+ * 开关属性api集合
120
120
  * */
121
121
  switchItem?: Partial<HySwitchProps>
122
122
  /**
123
- * @description 选择器属性api集合
123
+ * 选择器属性api集合
124
124
  * */
125
125
  picker?: Partial<HyPickerProps>
126
126
  /**
127
- * @description 单选属性api集合
127
+ * 单选属性api集合
128
128
  * */
129
129
  radio?: Partial<HyRadioProps>
130
130
  /**
131
- * @description 选择按钮属性api集合
131
+ * 选择按钮属性api集合
132
132
  * */
133
133
  checkButton?: Partial<HyCheckButtonProps>
134
134
  /**
135
- * @description 日期展示的格式
135
+ * 日期展示的格式
136
136
  * */
137
137
  mode?: DateModeEnum
138
138
  /**
139
- * @description 规则校验
139
+ * 规则校验
140
140
  * */
141
141
  rules?: RulesVo | RulesVo[]
142
142
  }
143
143
 
144
144
  export interface RulesVo {
145
145
  /**
146
- * @description 是否必填
146
+ * 是否必填
147
147
  * */
148
148
  required?: boolean
149
149
  /**
150
- * @description 校验不通过时的提示信息
150
+ * 校验不通过时的提示信息
151
151
  * */
152
152
  message?: string
153
153
  /**
154
- * @description 表单事件校验
154
+ * 表单事件校验
155
155
  * */
156
156
  trigger?: ('blur' | 'change')[]
157
157
  /**
158
- * @description 最小值
158
+ * 最小值
159
159
  * */
160
160
  min?: number
161
161
  /**
162
- * @description 最大值
162
+ * 最大值
163
163
  * */
164
164
  max?: number
165
165
  /**
166
- * @description 基础正则校验
166
+ * 基础正则校验
167
167
  * phone - 手机号校验
168
168
  * email - 邮箱校验
169
169
  * password - 复杂密码校验
170
170
  * */
171
171
  type?: 'phone' | 'email' | 'password'
172
172
  /**
173
- * @description 自定义校验规则
173
+ * 自定义校验规则
174
174
  * */
175
175
  validator?: (rule: any, value: string, callback?: Function) => boolean
176
176
  }
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "hy-app",
3
- "version": "0.6.2",
4
- "description": "📱一个基于vue3+ts构建的uni-app组件库,拥有八十多个精美组件,适配多端,支持自定义主题",
5
- "main": "./index.ts",
6
- "private": false,
7
- "scripts": {},
8
- "keywords": [
9
- "华玥组件库",
10
- "精美ui库",
11
- "移动端组件库",
12
- "适配多端小程序",
13
- "暗黑模式"
14
- ],
15
- "vetur":{
16
- "tags":"./tags.json",
17
- "attributes":"./attributes.json"
18
- },
19
- "web-types": "./web-types.json",
20
- "author": "华玥作者",
21
- "license": "MIT",
22
- "uni_modules": {
23
- "dependencies": [],
24
- "encrypt": [],
25
- "platforms": {
26
- "cloud": {
27
- "tcb": "√",
28
- "aliyun": "√",
29
- "alipay": "√"
30
- },
31
- "client": {
32
- "uni-app": {
33
- "vue": {
34
- "vue2": "x",
35
- "vue3": "√"
36
- },
37
- "web": {
38
- "safari": "√",
39
- "chrome": "√"
40
- },
41
- "app": {
42
- "vue": "√",
43
- "nvue": "-",
44
- "android": "√",
45
- "ios": "√",
46
- "harmony": "√"
47
- },
48
- "mp": {
49
- "weixin": "√",
50
- "alipay": "√",
51
- "toutiao": "√",
52
- "baidu": "-",
53
- "kuaishou": "-",
54
- "jd": "-",
55
- "harmony": "√",
56
- "qq": "√",
57
- "lark": "-"
58
- },
59
- "quickapp": {
60
- "huawei": "-",
61
- "union": "-"
62
- }
63
- },
64
- "uni-app-x": {
65
- "web": {
66
- "safari": "-",
67
- "chrome": "-"
68
- },
69
- "app": {
70
- "android": "-",
71
- "ios": "-",
72
- "harmony": "-"
73
- },
74
- "mp": {
75
- "weixin": "-"
76
- }
77
- }
78
- }
79
- }
80
- }
81
- }
1
+ {
2
+ "name": "hy-app",
3
+ "version": "0.6.4",
4
+ "description": "📱一个基于vue3+ts构建的uni-app组件库,拥有八十多个精美组件,适配多端,支持自定义主题",
5
+ "main": "./index.ts",
6
+ "private": false,
7
+ "scripts": {},
8
+ "keywords": [
9
+ "华玥组件库",
10
+ "精美ui库",
11
+ "移动端组件库",
12
+ "适配多端小程序",
13
+ "暗黑模式"
14
+ ],
15
+ "vetur": {
16
+ "tags": "./tags.json",
17
+ "attributes": "./attributes.json"
18
+ },
19
+ "web-types": "./web-types.json",
20
+ "author": "华玥作者",
21
+ "license": "MIT",
22
+ "uni_modules": {
23
+ "dependencies": [],
24
+ "encrypt": [],
25
+ "platforms": {
26
+ "cloud": {
27
+ "tcb": "√",
28
+ "aliyun": "√",
29
+ "alipay": "√"
30
+ },
31
+ "client": {
32
+ "uni-app": {
33
+ "vue": {
34
+ "vue2": "x",
35
+ "vue3": "√"
36
+ },
37
+ "web": {
38
+ "safari": "√",
39
+ "chrome": "√"
40
+ },
41
+ "app": {
42
+ "vue": "√",
43
+ "nvue": "-",
44
+ "android": "√",
45
+ "ios": "√",
46
+ "harmony": "√"
47
+ },
48
+ "mp": {
49
+ "weixin": "√",
50
+ "alipay": "√",
51
+ "toutiao": "√",
52
+ "baidu": "-",
53
+ "kuaishou": "-",
54
+ "jd": "-",
55
+ "harmony": "√",
56
+ "qq": "√",
57
+ "lark": "-"
58
+ },
59
+ "quickapp": {
60
+ "huawei": "-",
61
+ "union": "-"
62
+ }
63
+ },
64
+ "uni-app-x": {
65
+ "web": {
66
+ "safari": "-",
67
+ "chrome": "-"
68
+ },
69
+ "app": {
70
+ "android": "-",
71
+ "ios": "-",
72
+ "harmony": "-"
73
+ },
74
+ "mp": {
75
+ "weixin": "-"
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }