hy-app 0.2.5 → 0.2.7
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/common/index.ts +2 -1
- package/common/shakeService.ts +60 -0
- package/components/hy-action-sheet/hy-action-sheet.vue +184 -0
- package/components/hy-action-sheet/index.scss +123 -0
- package/components/hy-action-sheet/props.ts +18 -0
- package/components/hy-action-sheet/typing.d.ts +96 -0
- package/components/hy-address-picker/hy-address-picker.vue +75 -91
- package/components/hy-avatar/hy-avatar.vue +64 -73
- package/components/hy-button/hy-button.vue +3 -3
- package/components/hy-button/typing.d.ts +35 -31
- package/components/hy-cell/typing.d.ts +27 -24
- package/components/hy-empty/hy-empty.vue +30 -37
- package/components/hy-empty/icon.ts +78 -0
- package/components/hy-empty/index.scss +2 -1
- package/components/hy-empty/props.ts +10 -9
- package/components/hy-empty/typing.d.ts +39 -14
- package/components/hy-float-button/hy-float-button.vue +183 -17
- package/components/hy-float-button/props.ts +17 -15
- package/components/hy-float-button/typing.d.ts +51 -27
- package/components/hy-icon/hy-icon.vue +39 -41
- package/components/hy-icon/props.ts +17 -16
- package/components/hy-icon/typing.d.ts +24 -20
- package/components/hy-image/hy-image.vue +69 -104
- package/components/hy-image/index.scss +21 -5
- package/components/hy-image/props.ts +11 -10
- package/components/hy-image/typing.d.ts +23 -19
- package/components/hy-modal/hy-modal.vue +42 -54
- package/components/hy-modal/index.scss +56 -32
- package/components/hy-modal/props.ts +15 -14
- package/components/hy-modal/typing.d.ts +23 -17
- package/components/hy-popover/hy-popover.vue +200 -0
- package/components/hy-popover/index.scss +83 -0
- package/components/hy-popover/props.ts +13 -0
- package/components/hy-popover/typing.d.ts +56 -0
- package/components/hy-popup/index.scss +2 -2
- package/components/hy-popup/props.ts +7 -7
- package/components/hy-popup/typing.d.ts +17 -17
- package/components/hy-qrcode/hy-qrcode.vue +44 -45
- package/components/hy-rate/props.ts +6 -6
- package/components/hy-signature/props.ts +14 -14
- package/components/hy-tooltip/index.scss +2 -2
- package/components/hy-transition/hy-transition.vue +64 -72
- package/components/hy-transition/typing.d.ts +10 -6
- package/composables/index.ts +4 -2
- package/composables/usePopover.ts +221 -0
- package/composables/useQueue.ts +52 -0
- package/libs/css/_config.scss +5 -0
- package/libs/css/_function.scss +89 -0
- package/libs/css/mixin.scss +146 -21
- package/libs/css/vars.css +3 -1
- package/package.json +2 -2
- package/theme.scss +2 -1
- package/utils/inside.ts +96 -108
- package/utils/inspect.ts +48 -40
- package/utils/utils.ts +170 -187
|
@@ -1,122 +1,126 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
2
|
-
import type HyIconProps from
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
|
+
import type HyIconProps from '../hy-icon/typing'
|
|
3
3
|
|
|
4
4
|
export default interface HyButtonProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description 是否显示按钮的细边框 (默认 true )
|
|
7
7
|
* */
|
|
8
|
-
hairline?: boolean
|
|
8
|
+
hairline?: boolean
|
|
9
9
|
/**
|
|
10
10
|
* @description 按钮的预置样式,info,primary,error,warning,success (默认 'primary' )
|
|
11
11
|
* */
|
|
12
|
-
type?: HyApp.ThemeType
|
|
12
|
+
type?: HyApp.ThemeType
|
|
13
13
|
/**
|
|
14
14
|
* @description 按钮尺寸,large,medium,mini (默认 medium)
|
|
15
15
|
* */
|
|
16
|
-
size?: HyApp.SizeType |
|
|
16
|
+
size?: HyApp.SizeType | 'mini'
|
|
17
17
|
/**
|
|
18
18
|
* @description 按钮形状,circle(两边为半圆),square(带圆角) (默认 'square' )
|
|
19
19
|
* */
|
|
20
|
-
shape?: HyApp.ShapeType
|
|
20
|
+
shape?: HyApp.ShapeType
|
|
21
21
|
/**
|
|
22
22
|
* @description 按钮是否镂空,背景色透明 (默认 false)
|
|
23
23
|
* */
|
|
24
|
-
plain?: boolean
|
|
24
|
+
plain?: boolean
|
|
25
25
|
/**
|
|
26
26
|
* @description 是否禁用 (默认 false)
|
|
27
27
|
* */
|
|
28
|
-
disabled?: boolean
|
|
28
|
+
disabled?: boolean
|
|
29
29
|
/**
|
|
30
30
|
* @description 按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈) (默认 false)
|
|
31
31
|
* */
|
|
32
|
-
loading?: boolean
|
|
32
|
+
loading?: boolean
|
|
33
33
|
/**
|
|
34
34
|
* @description 加载中提示文字
|
|
35
35
|
* */
|
|
36
|
-
loadingText?: string
|
|
36
|
+
loadingText?: string
|
|
37
37
|
/**
|
|
38
38
|
* @description 加载状态图标类型 (默认 'spinner' )
|
|
39
39
|
* */
|
|
40
|
-
loadingMode?: HyApp.LoadingMode
|
|
40
|
+
loadingMode?: HyApp.LoadingMode
|
|
41
41
|
/**
|
|
42
42
|
* @description 加载图标大小 (默认 13 )
|
|
43
43
|
* */
|
|
44
|
-
loadingSize?: number
|
|
44
|
+
loadingSize?: number
|
|
45
45
|
/**
|
|
46
46
|
* @description 开放能力,具体请看uniapp稳定关于button组件部分说明
|
|
47
47
|
* */
|
|
48
|
-
openType?: string
|
|
48
|
+
openType?: string
|
|
49
49
|
/**
|
|
50
50
|
* @description 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
|
51
51
|
* */
|
|
52
|
-
formType?: string
|
|
52
|
+
formType?: string
|
|
53
53
|
/**
|
|
54
54
|
* @description 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 (注:只微信小程序、QQ小程序有效)
|
|
55
55
|
* */
|
|
56
|
-
appParameter?: string
|
|
56
|
+
appParameter?: string
|
|
57
57
|
/**
|
|
58
58
|
* @description 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效(默认 true )
|
|
59
59
|
* */
|
|
60
|
-
hoverStopPropagation?: boolean
|
|
60
|
+
hoverStopPropagation?: boolean
|
|
61
61
|
/**
|
|
62
62
|
* @description 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文(默认 en )
|
|
63
63
|
* */
|
|
64
|
-
lang?: string
|
|
64
|
+
lang?: string
|
|
65
65
|
/**
|
|
66
66
|
* @description 会话来源,openType="contact"时有效
|
|
67
67
|
* */
|
|
68
|
-
sessionFrom?: string
|
|
68
|
+
sessionFrom?: string
|
|
69
69
|
/**
|
|
70
70
|
* @description 会话内消息卡片标题,openType="contact"时有效
|
|
71
71
|
* */
|
|
72
|
-
sendMessageTitle?: string
|
|
72
|
+
sendMessageTitle?: string
|
|
73
73
|
/**
|
|
74
74
|
* @description 会话内消息卡片点击跳转小程序路径,openType="contact"时有效
|
|
75
75
|
* */
|
|
76
|
-
sendMessagePath?: string
|
|
76
|
+
sendMessagePath?: string
|
|
77
77
|
/**
|
|
78
78
|
* @description 会话内消息卡片图片,openType="contact"时有效
|
|
79
79
|
* */
|
|
80
|
-
sendMessageImg?: string
|
|
80
|
+
sendMessageImg?: string
|
|
81
81
|
/**
|
|
82
82
|
* @description 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效(默认false)
|
|
83
83
|
* */
|
|
84
|
-
showMessageCard?: boolean
|
|
84
|
+
showMessageCard?: boolean
|
|
85
85
|
/**
|
|
86
86
|
* @description 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
|
87
87
|
* */
|
|
88
|
-
dataName?: string
|
|
88
|
+
dataName?: string
|
|
89
89
|
/**
|
|
90
90
|
* @description 节流时间,一定时间内只能触发一次 (默认 0 )
|
|
91
91
|
* */
|
|
92
|
-
throttleTime?: number
|
|
92
|
+
throttleTime?: number
|
|
93
93
|
/**
|
|
94
94
|
* @description 按住后多久出现点击态,单位毫秒 (默认 0 )
|
|
95
95
|
* */
|
|
96
|
-
hoverStartTime?: number
|
|
96
|
+
hoverStartTime?: number
|
|
97
97
|
/**
|
|
98
98
|
* @description 手指松开后点击态保留时间,单位毫秒 (默认 200 )
|
|
99
99
|
* */
|
|
100
|
-
hoverStayTime?: number
|
|
100
|
+
hoverStayTime?: number
|
|
101
101
|
/**
|
|
102
102
|
* @description 按钮文字,之所以通过props传入,是因为slot传入的话(注:nvue中无法控制文字的样式)
|
|
103
103
|
* */
|
|
104
|
-
text?: string
|
|
104
|
+
text?: string
|
|
105
105
|
/**
|
|
106
106
|
* @description 按钮图标api集合
|
|
107
107
|
* */
|
|
108
|
-
icon?: Partial<HyIconProps
|
|
108
|
+
icon?: Partial<HyIconProps>
|
|
109
109
|
/**
|
|
110
110
|
* @description 按钮颜色,支持传入linear-gradient渐变色
|
|
111
111
|
* */
|
|
112
|
-
color?: string
|
|
112
|
+
color?: string
|
|
113
113
|
/**
|
|
114
114
|
* @description 阻止事件冒泡
|
|
115
115
|
* */
|
|
116
|
-
stop?: boolean
|
|
116
|
+
stop?: boolean
|
|
117
117
|
/**
|
|
118
118
|
* @description 定义需要用到的外部样式
|
|
119
119
|
* @note 类型问题
|
|
120
120
|
* */
|
|
121
|
-
customStyle?: CSSProperties
|
|
121
|
+
customStyle?: CSSProperties
|
|
122
|
+
/**
|
|
123
|
+
* @description 自定义外部类名
|
|
124
|
+
* */
|
|
125
|
+
customClass?: string
|
|
122
126
|
}
|
|
@@ -1,89 +1,92 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
2
|
-
import { HyApp } from
|
|
3
|
-
import type HyIconProps from
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
|
+
import { HyApp } from '@/package/typing/modules/common'
|
|
3
|
+
import type HyIconProps from '../hy-icon/typing'
|
|
4
4
|
|
|
5
5
|
export interface CellContentVo extends AnyObject {
|
|
6
6
|
/**
|
|
7
7
|
* @description 单元格左图标
|
|
8
8
|
* */
|
|
9
|
-
icon?: Partial<HyIconProps
|
|
9
|
+
icon?: Partial<HyIconProps>
|
|
10
10
|
/**
|
|
11
11
|
* @description 单元格标题
|
|
12
12
|
* */
|
|
13
|
-
title?: string
|
|
13
|
+
title?: string
|
|
14
14
|
/**
|
|
15
15
|
* @description 单元格副标题
|
|
16
16
|
* */
|
|
17
|
-
subhead?: string
|
|
17
|
+
subhead?: string
|
|
18
18
|
/**
|
|
19
19
|
* @description 是否禁用单元格
|
|
20
20
|
* */
|
|
21
|
-
disabled?: boolean
|
|
21
|
+
disabled?: boolean
|
|
22
22
|
/**
|
|
23
23
|
* @description 单元格右图标集合
|
|
24
24
|
* */
|
|
25
|
-
rightIcon?: Partial<HyIconProps
|
|
25
|
+
rightIcon?: Partial<HyIconProps>
|
|
26
26
|
/**
|
|
27
27
|
* @description 单元格值
|
|
28
28
|
* */
|
|
29
|
-
value?: string
|
|
29
|
+
value?: string | number | boolean
|
|
30
30
|
/**
|
|
31
31
|
* @description 跳转页面地址
|
|
32
32
|
* */
|
|
33
|
-
url?: string
|
|
33
|
+
url?: string
|
|
34
34
|
/**
|
|
35
35
|
* @description 单元格右侧箭头的方向,可选值为:left,up,down,right
|
|
36
36
|
* */
|
|
37
|
-
arrowDirection?: HyApp.RotateType
|
|
37
|
+
arrowDirection?: HyApp.RotateType
|
|
38
38
|
}
|
|
39
39
|
export default interface HyCellProps {
|
|
40
40
|
/**
|
|
41
41
|
* @description cell列表数据
|
|
42
42
|
* */
|
|
43
|
-
list: CellContentVo[]
|
|
43
|
+
list: CellContentVo[]
|
|
44
44
|
/**
|
|
45
45
|
* @description 头部标题
|
|
46
46
|
* */
|
|
47
|
-
title?: string
|
|
47
|
+
title?: string
|
|
48
48
|
/**
|
|
49
49
|
* @description 是否显示标题前缀竖线
|
|
50
50
|
* */
|
|
51
|
-
showVertical?: boolean
|
|
51
|
+
showVertical?: boolean
|
|
52
52
|
/**
|
|
53
53
|
* @description 是否显示cell下边框 (默认 true )
|
|
54
54
|
* */
|
|
55
|
-
border?: boolean
|
|
56
|
-
|
|
55
|
+
border?: boolean
|
|
56
|
+
/**
|
|
57
|
+
* @description 圆角
|
|
58
|
+
* */
|
|
59
|
+
borderRadius?: string | number
|
|
57
60
|
/**
|
|
58
61
|
* @description 是否禁用cell(默认false)
|
|
59
62
|
* */
|
|
60
|
-
disabled?: boolean
|
|
63
|
+
disabled?: boolean
|
|
61
64
|
/**
|
|
62
65
|
* @description 是否开启点击反馈(表现为点击时加上灰色背景) (默认 false )
|
|
63
66
|
* */
|
|
64
|
-
clickable?: boolean
|
|
67
|
+
clickable?: boolean
|
|
65
68
|
/**
|
|
66
69
|
* @description 单元的大小,可选值为 large,medium,small
|
|
67
70
|
* */
|
|
68
|
-
size?: HyApp.SizeType
|
|
71
|
+
size?: HyApp.SizeType
|
|
69
72
|
/**
|
|
70
73
|
* @description 右侧的内容
|
|
71
74
|
* */
|
|
72
|
-
value?: string
|
|
75
|
+
value?: string
|
|
73
76
|
/**
|
|
74
77
|
* @description 内容是否垂直居中(主要是针对右侧的value部分) (默认 false )
|
|
75
78
|
* */
|
|
76
|
-
arrange?: HyApp.LeftRightType |
|
|
79
|
+
arrange?: HyApp.LeftRightType | 'center'
|
|
77
80
|
/**
|
|
78
81
|
* @description 右侧的图标箭头icon集合
|
|
79
82
|
* */
|
|
80
|
-
rightIcon?: Partial<HyIconProps
|
|
83
|
+
rightIcon?: Partial<HyIconProps>
|
|
81
84
|
/**
|
|
82
85
|
* @description 右侧箭头的方向,可选值为:left,up,down
|
|
83
86
|
* */
|
|
84
|
-
arrowDirection?:
|
|
87
|
+
arrowDirection?: 'left' | 'up' | 'down' | 'right'
|
|
85
88
|
/**
|
|
86
89
|
* @description 定义需要用到的外部样式
|
|
87
90
|
* */
|
|
88
|
-
customStyle?: CSSProperties
|
|
91
|
+
customStyle?: CSSProperties
|
|
89
92
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="hy-empty" v-if="show" :style="emptyStyle">
|
|
3
3
|
<view class="hy-empty__img" :style="imgStyle">
|
|
4
4
|
<HyIcon
|
|
5
|
-
:name="imageUrl"
|
|
5
|
+
:name="imageUrl || emptyIcon[mode].icon"
|
|
6
6
|
:width="width"
|
|
7
7
|
:height="height"
|
|
8
8
|
img-mode="widthFix"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</view>
|
|
14
14
|
<view class="hy-empty__description" v-else>
|
|
15
15
|
<slot v-if="$slots.description" name="description"></slot>
|
|
16
|
-
<text v-else :style="descriptionStyle">{{ emptyDescription }}</text>
|
|
16
|
+
<text v-else :style="descriptionStyle">{{ emptyDescription || emptyIcon[mode].name }}</text>
|
|
17
17
|
<view class="hy-empty__button" v-if="button?.text">
|
|
18
18
|
<HyButton
|
|
19
19
|
:text="button?.text"
|
|
@@ -31,41 +31,34 @@
|
|
|
31
31
|
|
|
32
32
|
<script lang="ts">
|
|
33
33
|
export default {
|
|
34
|
-
name:
|
|
34
|
+
name: 'hy-empty',
|
|
35
35
|
options: {
|
|
36
36
|
addGlobalClass: true,
|
|
37
37
|
virtualHost: true,
|
|
38
|
-
styleIsolation:
|
|
38
|
+
styleIsolation: 'shared',
|
|
39
39
|
},
|
|
40
|
-
}
|
|
40
|
+
}
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<script setup lang="ts">
|
|
44
|
-
import { computed, type CSSProperties, toRefs } from
|
|
45
|
-
import defaultProps from
|
|
46
|
-
import type IProps from
|
|
47
|
-
import { addUnit } from
|
|
44
|
+
import { computed, type CSSProperties, toRefs } from 'vue'
|
|
45
|
+
import defaultProps from './props'
|
|
46
|
+
import type IProps from './typing'
|
|
47
|
+
import { addUnit } from '../../utils'
|
|
48
|
+
import emptyIcon from './icon'
|
|
48
49
|
|
|
49
50
|
// 组件
|
|
50
|
-
import HyButton from
|
|
51
|
-
import HyIcon from
|
|
51
|
+
import HyButton from '../hy-button/hy-button.vue'
|
|
52
|
+
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
52
53
|
|
|
53
|
-
const props = withDefaults(defineProps<IProps>(), defaultProps)
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
height,
|
|
58
|
-
imgMargin,
|
|
59
|
-
navigateUrl,
|
|
60
|
-
desSize,
|
|
61
|
-
desColor,
|
|
62
|
-
customStyle,
|
|
63
|
-
} = toRefs(props);
|
|
64
|
-
const emit = defineEmits(["click"]);
|
|
54
|
+
const props = withDefaults(defineProps<IProps>(), defaultProps)
|
|
55
|
+
const { zIndex, width, height, imgMargin, navigateUrl, desSize, desColor, customStyle } =
|
|
56
|
+
toRefs(props)
|
|
57
|
+
const emit = defineEmits(['click'])
|
|
65
58
|
|
|
66
59
|
const emptyDescription = computed(() => {
|
|
67
|
-
return props.description
|
|
68
|
-
})
|
|
60
|
+
return props.description
|
|
61
|
+
})
|
|
69
62
|
|
|
70
63
|
/**
|
|
71
64
|
* @description 整体样式
|
|
@@ -73,9 +66,9 @@ const emptyDescription = computed(() => {
|
|
|
73
66
|
const emptyStyle = computed<CSSProperties>(() => {
|
|
74
67
|
const style: CSSProperties = {
|
|
75
68
|
zIndex: zIndex.value,
|
|
76
|
-
}
|
|
77
|
-
return Object.assign(style, customStyle.value)
|
|
78
|
-
})
|
|
69
|
+
}
|
|
70
|
+
return Object.assign(style, customStyle.value)
|
|
71
|
+
})
|
|
79
72
|
|
|
80
73
|
/**
|
|
81
74
|
* @description 提示信息样式
|
|
@@ -84,9 +77,9 @@ const descriptionStyle = computed<CSSProperties>(() => {
|
|
|
84
77
|
const style: CSSProperties = {
|
|
85
78
|
fontSize: addUnit(desSize.value),
|
|
86
79
|
color: desColor.value,
|
|
87
|
-
}
|
|
88
|
-
return style
|
|
89
|
-
})
|
|
80
|
+
}
|
|
81
|
+
return style
|
|
82
|
+
})
|
|
90
83
|
|
|
91
84
|
/**
|
|
92
85
|
* @description 图片样式
|
|
@@ -96,21 +89,21 @@ const imgStyle = computed<CSSProperties>(() => {
|
|
|
96
89
|
width: addUnit(width.value),
|
|
97
90
|
height: addUnit(height.value),
|
|
98
91
|
margin: imgMargin.value,
|
|
99
|
-
}
|
|
100
|
-
})
|
|
92
|
+
}
|
|
93
|
+
})
|
|
101
94
|
|
|
102
95
|
/**
|
|
103
96
|
* @description 点击按钮,跳转页面
|
|
104
97
|
* */
|
|
105
98
|
const handleClick = () => {
|
|
106
|
-
emit(
|
|
99
|
+
emit('click')
|
|
107
100
|
if (navigateUrl.value) {
|
|
108
101
|
uni.navigateTo({
|
|
109
102
|
url: navigateUrl.value,
|
|
110
|
-
})
|
|
103
|
+
})
|
|
111
104
|
}
|
|
112
|
-
}
|
|
105
|
+
}
|
|
113
106
|
</script>
|
|
114
107
|
<style scoped lang="scss">
|
|
115
|
-
@import
|
|
108
|
+
@import './index.scss';
|
|
116
109
|
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
car: {
|
|
3
|
+
name: '购物车为空',
|
|
4
|
+
icon: 'https://pic1.imgdb.cn/item/685b54cb58cb8da5c86d0d4c.png',
|
|
5
|
+
},
|
|
6
|
+
page: {
|
|
7
|
+
name: '页面不存在',
|
|
8
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3f58cb8da5c86b6f64.webp',
|
|
9
|
+
},
|
|
10
|
+
search: {
|
|
11
|
+
name: '没有搜索结果',
|
|
12
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b1f58cb8da5c86b6e84.webp',
|
|
13
|
+
},
|
|
14
|
+
address: {
|
|
15
|
+
name: '没有收货地址',
|
|
16
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3558cb8da5c86b6f1a.webp',
|
|
17
|
+
},
|
|
18
|
+
wifi: {
|
|
19
|
+
name: '没有网络',
|
|
20
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b1f58cb8da5c86b6e87.webp',
|
|
21
|
+
},
|
|
22
|
+
order: {
|
|
23
|
+
name: '订单为空',
|
|
24
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b1f58cb8da5c86b6e85.webp',
|
|
25
|
+
},
|
|
26
|
+
coupon: {
|
|
27
|
+
name: '没有优惠券',
|
|
28
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3f58cb8da5c86b6f63.webp',
|
|
29
|
+
},
|
|
30
|
+
favor: {
|
|
31
|
+
name: '暂无收藏',
|
|
32
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3558cb8da5c86b6f1b.webp',
|
|
33
|
+
},
|
|
34
|
+
permission: {
|
|
35
|
+
name: '无权限',
|
|
36
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b4358cb8da5c86b6f85.webp',
|
|
37
|
+
},
|
|
38
|
+
history: {
|
|
39
|
+
name: '无历史记录',
|
|
40
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3f58cb8da5c86b6f62.webp',
|
|
41
|
+
},
|
|
42
|
+
message: {
|
|
43
|
+
name: '消息列表为空',
|
|
44
|
+
icon: 'https://pic1.imgdb.cn/item/685a6aef58cb8da5c86b6d30.webp',
|
|
45
|
+
},
|
|
46
|
+
image: {
|
|
47
|
+
name: '暂无图片',
|
|
48
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3f58cb8da5c86b6f65.webp',
|
|
49
|
+
},
|
|
50
|
+
video: {
|
|
51
|
+
name: '暂无视频',
|
|
52
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3f58cb8da5c86b6f66.webp',
|
|
53
|
+
},
|
|
54
|
+
comment: {
|
|
55
|
+
name: '暂无评论',
|
|
56
|
+
icon: 'https://pic1.imgdb.cn/item/685a6aef58cb8da5c86b6d30.webp',
|
|
57
|
+
},
|
|
58
|
+
integral: {
|
|
59
|
+
name: '暂无积分',
|
|
60
|
+
icon: 'https://pic1.imgdb.cn/item/685a6aef58cb8da5c86b6d2f.webp',
|
|
61
|
+
},
|
|
62
|
+
subscribe: {
|
|
63
|
+
name: '暂无预约',
|
|
64
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b1f58cb8da5c86b6e86.webp',
|
|
65
|
+
},
|
|
66
|
+
earnings: {
|
|
67
|
+
name: '暂无收益',
|
|
68
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3558cb8da5c86b6f1c.webp',
|
|
69
|
+
},
|
|
70
|
+
announcement: {
|
|
71
|
+
name: '暂无公告',
|
|
72
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b3558cb8da5c86b6f1d.webp',
|
|
73
|
+
},
|
|
74
|
+
signIn: {
|
|
75
|
+
name: '暂无打卡',
|
|
76
|
+
icon: 'https://pic1.imgdb.cn/item/685a6b1f58cb8da5c86b6e83.webp',
|
|
77
|
+
},
|
|
78
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import type IProps from
|
|
1
|
+
import type IProps from './typing'
|
|
2
2
|
|
|
3
3
|
const defaultProps: IProps = {
|
|
4
4
|
show: true,
|
|
5
|
-
|
|
5
|
+
mode: 'car',
|
|
6
|
+
imageUrl: '',
|
|
6
7
|
zIndex: 889,
|
|
7
8
|
width: 350,
|
|
8
|
-
height:
|
|
9
|
-
description:
|
|
9
|
+
height: 'auto',
|
|
10
|
+
description: '',
|
|
10
11
|
desSize: 15,
|
|
11
|
-
desColor:
|
|
12
|
-
imgMargin:
|
|
12
|
+
desColor: '',
|
|
13
|
+
imgMargin: '',
|
|
13
14
|
button: {},
|
|
14
|
-
navigateUrl:
|
|
15
|
-
}
|
|
15
|
+
navigateUrl: '',
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
export default defaultProps
|
|
18
|
+
export default defaultProps
|
|
@@ -1,53 +1,78 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
2
|
-
import type HyButtonProps from
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
|
+
import type HyButtonProps from '../hy-button/typing'
|
|
3
|
+
|
|
4
|
+
type EmptyModeType =
|
|
5
|
+
| 'car'
|
|
6
|
+
| 'page'
|
|
7
|
+
| 'search'
|
|
8
|
+
| 'address'
|
|
9
|
+
| 'wifi'
|
|
10
|
+
| 'order'
|
|
11
|
+
| 'coupon'
|
|
12
|
+
| 'favor'
|
|
13
|
+
| 'permission'
|
|
14
|
+
| 'history'
|
|
15
|
+
| 'message'
|
|
16
|
+
| 'image'
|
|
17
|
+
| 'video'
|
|
18
|
+
| 'comment'
|
|
19
|
+
| 'integral'
|
|
20
|
+
| 'subscribe'
|
|
21
|
+
| 'earnings'
|
|
22
|
+
| 'announcement'
|
|
23
|
+
| 'signIn'
|
|
3
24
|
|
|
4
25
|
export default interface HyEmptyProps {
|
|
5
26
|
/**
|
|
6
27
|
* @description 是否显示空状态
|
|
7
28
|
* */
|
|
8
|
-
show?: boolean
|
|
29
|
+
show?: boolean
|
|
30
|
+
/**
|
|
31
|
+
* @description 缺省页内容
|
|
32
|
+
* */
|
|
33
|
+
mode?: EmptyModeType
|
|
9
34
|
/**
|
|
10
35
|
* @description 空状态图片
|
|
11
36
|
* */
|
|
12
|
-
imageUrl?: string
|
|
37
|
+
imageUrl?: string
|
|
13
38
|
/**
|
|
14
39
|
* @description 组件层级
|
|
15
40
|
* */
|
|
16
|
-
zIndex?: number
|
|
41
|
+
zIndex?: number
|
|
17
42
|
/**
|
|
18
43
|
* @description icon宽度
|
|
19
44
|
* */
|
|
20
|
-
width?: number | string
|
|
45
|
+
width?: number | string
|
|
21
46
|
/**
|
|
22
47
|
* @description icon高度
|
|
23
48
|
* */
|
|
24
|
-
height?: number | string
|
|
49
|
+
height?: number | string
|
|
25
50
|
/**
|
|
26
51
|
* @description 提示信息
|
|
27
52
|
* */
|
|
28
|
-
description?: string
|
|
53
|
+
description?: string
|
|
29
54
|
/**
|
|
30
55
|
* @description 提示信息大小
|
|
31
56
|
* */
|
|
32
|
-
desSize?: string | number
|
|
57
|
+
desSize?: string | number
|
|
33
58
|
/**
|
|
34
59
|
* @description 提示信息颜色
|
|
35
60
|
* */
|
|
36
|
-
desColor?: string
|
|
61
|
+
desColor?: string
|
|
37
62
|
/**
|
|
38
63
|
* @description 图片margin
|
|
39
64
|
* */
|
|
40
|
-
imgMargin?: string
|
|
65
|
+
imgMargin?: string
|
|
41
66
|
/**
|
|
42
67
|
* @description 按钮属性只
|
|
43
68
|
* */
|
|
44
|
-
button?: HyButtonProps
|
|
69
|
+
button?: HyButtonProps
|
|
45
70
|
/**
|
|
46
71
|
* @description 跳转地址
|
|
47
72
|
* */
|
|
48
|
-
navigateUrl?: string
|
|
73
|
+
navigateUrl?: string
|
|
49
74
|
/**
|
|
50
75
|
* @description 自定义输入框外部样式
|
|
51
76
|
* */
|
|
52
|
-
customStyle?: CSSProperties
|
|
77
|
+
customStyle?: CSSProperties
|
|
53
78
|
}
|