hy-app 0.6.8 → 0.7.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.
- package/attributes.json +1 -1
- package/components/hy-action-sheet/index.scss +2 -2
- package/components/hy-avatar/hy-avatar.vue +12 -5
- package/components/hy-avatar/index.scss +2 -2
- package/components/hy-avatar/props.ts +4 -2
- package/components/hy-avatar/typing.d.ts +8 -1
- package/components/hy-calendar/hy-calendar.vue +1 -0
- package/components/hy-calendar/month.vue +25 -5
- package/components/hy-calendar/props.ts +1 -1
- package/components/hy-cascader/hy-cascader.vue +503 -0
- package/components/hy-cascader/index.scss +84 -0
- package/components/hy-cascader/props.ts +88 -0
- package/components/hy-cascader/typing.d.ts +34 -0
- package/components/hy-cell-item/index.scss +8 -9
- package/components/hy-check-button/typing.d.ts +12 -7
- package/components/hy-code-input/hy-code-input.vue +33 -11
- package/components/hy-code-input/index.scss +2 -2
- package/components/hy-code-input/typing.d.ts +4 -0
- package/components/hy-config-provider/hy-config-provider.vue +58 -53
- package/components/hy-config-provider/props.ts +1 -1
- package/components/hy-datetime-picker/props.ts +1 -1
- package/components/hy-datetime-picker/typing.d.ts +1 -1
- package/components/hy-dropdown/typing.d.ts +5 -0
- package/components/hy-float-button/index.scss +1 -1
- package/components/hy-form/typing.d.ts +6 -0
- package/components/hy-form-item/typing.d.ts +1 -1
- package/components/hy-grid/hy-grid.vue +12 -12
- package/components/hy-grid/index.scss +1 -2
- package/components/hy-grid/props.ts +7 -2
- package/components/hy-grid/typing.d.ts +1 -1
- package/components/hy-icon/typing.d.ts +52 -9
- package/components/hy-index-bar/index.scss +1 -1
- package/components/hy-keyboard/constants.ts +83 -0
- package/components/hy-keyboard/hy-keyboard.vue +375 -0
- package/components/hy-keyboard/index.scss +73 -0
- package/components/hy-keyboard/key/index.scss +79 -0
- package/components/hy-keyboard/key/index.vue +91 -0
- package/components/hy-keyboard/key/types.ts +1 -0
- package/components/hy-keyboard/props.ts +108 -0
- package/components/hy-keyboard/typing.d.ts +18 -0
- package/components/hy-line-progress/index.scss +3 -3
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-modal/index.scss +2 -2
- package/components/hy-modal/typing.d.ts +2 -2
- package/components/hy-notice-bar/hy-column-notice.vue +54 -94
- package/components/hy-notice-bar/hy-notice-bar.vue +128 -96
- package/components/hy-notice-bar/hy-row-notice.vue +89 -121
- package/components/hy-notice-bar/index.scss +1 -1
- package/components/hy-notice-bar/props.ts +86 -85
- package/components/hy-notify/hy-notify.vue +9 -9
- package/components/hy-notify/typing.d.ts +22 -0
- package/components/hy-picker/hy-picker.vue +126 -149
- package/components/hy-picker/props.ts +4 -1
- package/components/hy-picker/typing.d.ts +22 -0
- package/components/hy-popover/index.scss +6 -6
- package/components/hy-popup/index.scss +6 -5
- package/components/hy-price/hy-price.vue +52 -23
- package/components/hy-price/props.ts +54 -54
- package/components/hy-radio/props.ts +1 -1
- package/components/hy-radio/typing.d.ts +5 -1
- package/components/hy-rolling-num/typing.d.ts +1 -0
- package/components/hy-scroll-list/index.scss +2 -2
- package/components/hy-search/index.scss +1 -1
- package/components/hy-signature/index.scss +1 -1
- package/components/hy-skeleton/index.scss +21 -4
- package/components/hy-slider/index.scss +3 -3
- package/components/hy-steps/hy-steps.vue +1 -1
- package/components/hy-steps/index.scss +3 -3
- package/components/hy-submit-bar/typing.d.ts +3 -3
- package/components/hy-subsection/index.scss +8 -8
- package/components/hy-swipe-action/hy-swipe-action.vue +34 -15
- package/components/hy-swipe-action/index.scss +0 -1
- package/components/hy-swiper/index.scss +2 -2
- package/components/hy-switch/index.scss +3 -3
- package/components/hy-switch/typing.d.ts +4 -0
- package/components/hy-tabbar/props.ts +2 -1
- package/components/hy-tabbar/typing.d.ts +5 -4
- package/components/hy-tabbar-group/index.scss +2 -2
- package/components/hy-tabs/hy-tabs.vue +338 -336
- package/components/hy-tabs/index.scss +7 -7
- package/components/hy-tabs/typing.d.ts +41 -33
- package/components/hy-tag/index.scss +1 -1
- package/components/hy-textarea/hy-textarea.vue +2 -2
- package/components/hy-textarea/index.scss +4 -4
- package/components/hy-textarea/typing.d.ts +4 -0
- package/components/hy-toast/hy-toast.vue +14 -6
- package/components/hy-toast/index.scss +1 -1
- package/components/hy-toast/typing.d.ts +42 -36
- package/components/hy-tooltip/hy-tooltip.vue +1 -1
- package/components/hy-tooltip/index.scss +7 -6
- package/components/hy-tooltip/props.ts +1 -1
- package/components/hy-upload/hy-upload.vue +16 -1
- package/components/hy-upload/index.scss +149 -144
- package/components/hy-warn/index.scss +1 -1
- package/components/index.ts +6 -0
- package/global.d.ts +2 -0
- package/libs/config/icon.ts +442 -430
- package/libs/css/_function.scss +7 -13
- package/libs/css/_mixin.scss +3 -3
- package/libs/css/common.scss +1 -1
- package/libs/css/iconfont.css +445 -441
- package/libs/css/theme.scss +54 -25
- package/libs/locale/lang/en-US.ts +4 -0
- package/libs/locale/lang/zh-CN.ts +4 -0
- package/libs/typing/index.ts +80 -0
- package/package.json +5 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
- package/components/hy-qrcode/qrcode.js.bak +0 -1434
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
width: 30px;
|
|
63
63
|
position: absolute;
|
|
64
64
|
bottom: 2px;
|
|
65
|
-
border-radius: $hy-
|
|
65
|
+
border-radius: $hy-radius-semicircle;
|
|
66
66
|
transition-property: transform;
|
|
67
67
|
transition-duration: 300ms;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
}
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
73
|
+
.swiper-item {
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
@include flex(column);
|
|
77
|
+
box-sizing: border-box;
|
|
78
78
|
}
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface TabsItemVo
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* */
|
|
6
|
-
name: string
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* */
|
|
10
|
-
badge?:
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* */
|
|
14
|
-
disabled?: boolean
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* */
|
|
18
|
-
content?: any
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import type { HyBadgeProps } from '../../index'
|
|
2
|
+
export interface TabsItemVo {
|
|
3
|
+
/**
|
|
4
|
+
* tab名称
|
|
5
|
+
* */
|
|
6
|
+
name: string
|
|
7
|
+
/**
|
|
8
|
+
* 徽标接收的props
|
|
9
|
+
* */
|
|
10
|
+
badge?: HyBadgeProps
|
|
11
|
+
/**
|
|
12
|
+
* 是否禁用
|
|
13
|
+
* */
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
/**
|
|
16
|
+
* swiper内容值
|
|
17
|
+
* */
|
|
18
|
+
content?: any
|
|
19
|
+
[key: string]: any
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ITabsExpose {
|
|
23
|
+
/**
|
|
24
|
+
* 计算滑块距离左边距离
|
|
25
|
+
* */
|
|
26
|
+
resize: () => void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TabsParamsVo extends TabsParamsVo {
|
|
30
|
+
index: number
|
|
31
|
+
}
|
|
32
|
+
export interface ITabsEmits {
|
|
33
|
+
/** 点击标签时触发 */
|
|
34
|
+
(e: 'click', params: TabsParamsVo): void
|
|
35
|
+
/** 标签索引改变时触发 */
|
|
36
|
+
(e: 'change', item: TabsItemVo, index: number): void
|
|
37
|
+
/** 长按标签时触发 */
|
|
38
|
+
(e: 'longPress', params: TabsParamsVo): void
|
|
39
|
+
/** 标签索引改变时触发 */
|
|
40
|
+
(e: 'update:current', index: number): void
|
|
41
|
+
}
|
|
@@ -125,7 +125,7 @@ const textareaStyle = computed(() => {
|
|
|
125
125
|
return Object.assign(style, props.customStyle)
|
|
126
126
|
})
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* 边框颜色
|
|
129
129
|
* */
|
|
130
130
|
const borderStyle = computed(() => {
|
|
131
131
|
return (isFocus: boolean) => {
|
|
@@ -173,7 +173,7 @@ const onInput = (e: any) => {
|
|
|
173
173
|
})
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
176
|
+
* 内容发生变化,进行处理
|
|
177
177
|
* */
|
|
178
178
|
const valueChange = () => {
|
|
179
179
|
const value = innerValue.value
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
@include b(textarea) {
|
|
5
|
-
border-radius: $hy-
|
|
5
|
+
border-radius: $hy-radius-sm;
|
|
6
6
|
position: relative;
|
|
7
7
|
@include flex;
|
|
8
8
|
flex: 1;
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@include e(radius) {
|
|
16
|
-
border-radius: $hy-
|
|
16
|
+
border-radius: $hy-radius-sm;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@include e(no-radius) {
|
|
20
|
-
border-radius: $hy-
|
|
20
|
+
border-radius: $hy-radius-no;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@include e(disabled) {
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
font-size: 12px;
|
|
49
49
|
background-color: $hy-background--3;
|
|
50
50
|
padding: 1px 4px;
|
|
51
|
-
border-radius: $hy-
|
|
51
|
+
border-radius: $hy-radius-sm;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -3,6 +3,10 @@ import type {
|
|
|
3
3
|
InputOnConfirmEvent,
|
|
4
4
|
InputOnFocusEvent
|
|
5
5
|
} from '@uni-helper/uni-types'
|
|
6
|
+
import type { ExtractPropTypes } from 'vue'
|
|
7
|
+
import type textareaProps from './props'
|
|
8
|
+
|
|
9
|
+
export interface HyTextareaProps extends ExtractPropTypes<typeof textareaProps> {}
|
|
6
10
|
|
|
7
11
|
export interface ITextareaEmits {
|
|
8
12
|
/** 输入框失去焦点时触发 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<hy-overlay
|
|
3
3
|
:show="isShow"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
4
|
+
:LockScroll="!tmpConfig.overlay"
|
|
5
|
+
:opacity="tmpConfig.cover ? 0.5 : 0"
|
|
6
6
|
:custom-style="overlayStyle"
|
|
7
7
|
>
|
|
8
8
|
<view :style="[contentStyle]" :class="contentClass">
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
v-else-if="iconNameCom"
|
|
19
19
|
:class="['hy-toast__content--icon', `hy-toast__content--icon__${tmpConfig.type}`]"
|
|
20
20
|
>
|
|
21
|
-
<hy-icon
|
|
21
|
+
<hy-icon
|
|
22
|
+
:name="iconNameCom"
|
|
23
|
+
:size="(typeof tmpConfig.icon === 'object' && tmpConfig.icon?.size) || 17"
|
|
24
|
+
:color="
|
|
25
|
+
(typeof tmpConfig.icon === 'object' && tmpConfig.icon?.color) || '#FFFFFF'
|
|
26
|
+
"
|
|
27
|
+
></hy-icon>
|
|
22
28
|
</view>
|
|
23
29
|
<text
|
|
24
30
|
:class="[
|
|
@@ -85,8 +91,6 @@ const overlayStyle = computed(() => {
|
|
|
85
91
|
display: 'flex',
|
|
86
92
|
flexDirection: 'column'
|
|
87
93
|
}
|
|
88
|
-
// 将遮罩设置为100%透明度,避免出现灰色背景
|
|
89
|
-
style.backgroundColor = 'rgba(0, 0, 0, 0)'
|
|
90
94
|
return style
|
|
91
95
|
})
|
|
92
96
|
|
|
@@ -102,7 +106,11 @@ const iconNameCom = computed(() => {
|
|
|
102
106
|
return ''
|
|
103
107
|
}
|
|
104
108
|
} else {
|
|
105
|
-
|
|
109
|
+
const icon = tmpConfig.value.icon
|
|
110
|
+
if (typeof icon === 'string') {
|
|
111
|
+
return icon
|
|
112
|
+
}
|
|
113
|
+
return icon?.name
|
|
106
114
|
}
|
|
107
115
|
})
|
|
108
116
|
|
|
@@ -1,38 +1,44 @@
|
|
|
1
|
+
import type { HyIconProps } from '../hy-icon/typing'
|
|
2
|
+
|
|
1
3
|
export default interface ToastOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 显示文本
|
|
6
|
+
* */
|
|
7
|
+
message?: string
|
|
8
|
+
/**
|
|
9
|
+
* 主题类型,primary,success,error,warning,info
|
|
10
|
+
* */
|
|
11
|
+
type?: HyApp.ThemeType | ''
|
|
12
|
+
/**
|
|
13
|
+
* toast出现的位置
|
|
14
|
+
* */
|
|
15
|
+
position?: HyApp.ColumnCenterType
|
|
16
|
+
/**
|
|
17
|
+
* 显示的图标
|
|
18
|
+
* */
|
|
19
|
+
icon?: boolean | string | HyIconProps
|
|
20
|
+
/**
|
|
21
|
+
* 是否防止触摸穿透
|
|
22
|
+
* */
|
|
23
|
+
overlay?: boolean
|
|
24
|
+
/**
|
|
25
|
+
* 是否显示透明遮罩层
|
|
26
|
+
* */
|
|
27
|
+
cover?: boolean
|
|
28
|
+
/**
|
|
29
|
+
* 是否加载中状态
|
|
30
|
+
* */
|
|
31
|
+
loading?: boolean
|
|
32
|
+
/**
|
|
33
|
+
* 加载状态
|
|
34
|
+
* */
|
|
35
|
+
loadMode?: HyApp.LoadingMode
|
|
36
|
+
/**
|
|
37
|
+
* 显示的时间,毫秒
|
|
38
|
+
* */
|
|
39
|
+
duration?: number
|
|
40
|
+
/**
|
|
41
|
+
* 执行完后的回调函数
|
|
42
|
+
* */
|
|
43
|
+
complete?: Function | null
|
|
38
44
|
}
|
|
@@ -8,7 +8,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
8
8
|
position: relative;
|
|
9
9
|
@include flex;
|
|
10
10
|
|
|
11
|
-
@include squareArrow(6px, $hy-tooltip--background-color, -1, $hy-
|
|
11
|
+
@include squareArrow(6px, $hy-tooltip--background-color, -1, $hy-shadow-base);
|
|
12
12
|
|
|
13
13
|
@include edeep(popup) {
|
|
14
14
|
position: absolute;
|
|
@@ -17,8 +17,8 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
17
17
|
text-align: center;
|
|
18
18
|
min-height: 36px;
|
|
19
19
|
transition: opacity 0.2s;
|
|
20
|
-
box-shadow: $hy-
|
|
21
|
-
border-radius: $hy-
|
|
20
|
+
box-shadow: $hy-shadow-base;
|
|
21
|
+
border-radius: $hy-radius-sm;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
@@ -29,7 +29,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
29
29
|
|
|
30
30
|
@include e(container) {
|
|
31
31
|
position: relative;
|
|
32
|
-
border-radius: $hy-
|
|
32
|
+
border-radius: $hy-radius-sm;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@include e(inner) {
|
|
@@ -37,7 +37,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
37
37
|
padding: $hy-border-margin-padding-base;
|
|
38
38
|
line-height: 22px;
|
|
39
39
|
z-index: $hy-tooltip--z-index;
|
|
40
|
-
border-radius: $hy-
|
|
40
|
+
border-radius: $hy-radius-sm;
|
|
41
41
|
box-sizing: content-box;
|
|
42
42
|
width: 200px;
|
|
43
43
|
}
|
|
@@ -58,7 +58,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
58
58
|
background-color: $hy-tooltip--background-color;
|
|
59
59
|
position: relative;
|
|
60
60
|
flex: 1;
|
|
61
|
-
border-radius: $hy-
|
|
61
|
+
border-radius: $hy-radius-sm;
|
|
62
62
|
padding: 0;
|
|
63
63
|
@include flex(row);
|
|
64
64
|
align-items: center;
|
|
@@ -76,6 +76,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
|
|
|
76
76
|
@include m(text) {
|
|
77
77
|
font-size: 13px;
|
|
78
78
|
color: #ffffff;
|
|
79
|
+
white-space: nowrap;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
@@ -68,7 +68,10 @@
|
|
|
68
68
|
<!-- 删除图片图标 -->
|
|
69
69
|
|
|
70
70
|
<!-- 上传成功图标 -->
|
|
71
|
-
<view
|
|
71
|
+
<view
|
|
72
|
+
class="hy-upload__status hy-upload__success"
|
|
73
|
+
v-if="item.status === 'success'"
|
|
74
|
+
>
|
|
72
75
|
<view class="hy-upload__success--icon">
|
|
73
76
|
<hy-icon
|
|
74
77
|
:name="IconConfig.CHECK_MASK"
|
|
@@ -77,6 +80,18 @@
|
|
|
77
80
|
></hy-icon>
|
|
78
81
|
</view>
|
|
79
82
|
</view>
|
|
83
|
+
<view
|
|
84
|
+
class="hy-upload__status hy-upload__error"
|
|
85
|
+
v-if="item.status === 'failed'"
|
|
86
|
+
>
|
|
87
|
+
<view class="hy-upload__success--icon">
|
|
88
|
+
<hy-icon
|
|
89
|
+
:name="IconConfig.CLOSE_CIRCLE"
|
|
90
|
+
color="#ffffff"
|
|
91
|
+
size="12"
|
|
92
|
+
></hy-icon>
|
|
93
|
+
</view>
|
|
94
|
+
</view>
|
|
80
95
|
<!-- 上传成功图标 -->
|
|
81
96
|
</view>
|
|
82
97
|
</template>
|