hy-app 0.5.3 → 0.5.5
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/components/hy-action-sheet/typing.d.ts +1 -63
- package/components/hy-address-picker/hy-address-picker.vue +7 -6
- package/components/hy-address-picker/typing.d.ts +0 -84
- package/components/hy-avatar/hy-avatar.vue +4 -3
- package/components/hy-avatar/typing.d.ts +0 -66
- package/components/hy-back-top/typing.d.ts +0 -47
- package/components/hy-badge/hy-badge.vue +3 -3
- package/components/hy-badge/index.scss +0 -1
- package/components/hy-badge/props.ts +6 -1
- package/components/hy-badge/typing.d.ts +0 -62
- package/components/hy-button/typing.d.ts +28 -162
- package/components/hy-calendar/hy-calendar.vue +2 -2
- package/components/hy-calendar/typing.d.ts +0 -128
- package/components/hy-card/hy-card.vue +12 -12
- package/components/hy-card/index.scss +17 -5
- package/components/hy-card/props.ts +1 -2
- package/components/hy-card/typing.d.ts +1 -114
- package/components/hy-cell/props.ts +1 -1
- package/components/hy-cell/typing.d.ts +0 -55
- package/components/hy-check-button/typing.d.ts +0 -43
- package/components/hy-checkbox/typing.d.ts +1 -73
- package/components/hy-checkbox-group/typing.d.ts +0 -65
- package/components/hy-code-input/typing.d.ts +0 -70
- package/components/hy-count-down/typing.d.ts +1 -20
- package/components/hy-count-to/typing.d.ts +0 -47
- package/components/hy-coupon/index.scss +7 -2
- package/components/hy-coupon/props.ts +7 -4
- package/components/hy-coupon/typing.d.ts +1 -134
- package/components/hy-datetime-picker/props.ts +1 -3
- package/components/hy-datetime-picker/typing.d.ts +0 -119
- package/components/hy-dropdown-item/typing.d.ts +12 -31
- package/components/hy-empty/typing.d.ts +1 -59
- package/components/hy-float-button/typing.d.ts +24 -113
- package/components/hy-folding-panel/props.ts +1 -1
- package/components/hy-folding-panel/typing.d.ts +0 -38
- package/components/hy-folding-panel-item/hy-folding-panel-item.vue +2 -3
- package/components/hy-folding-panel-item/typing.d.ts +14 -0
- package/components/hy-form/typing.d.ts +0 -27
- package/components/hy-form-item/hy-form-item.vue +7 -5
- package/components/hy-form-item/typing.d.ts +0 -19
- package/components/hy-grid/typing.d.ts +0 -43
- package/components/hy-icon/hy-icon.vue +3 -8
- package/components/hy-icon/typing.d.ts +0 -86
- package/components/hy-image/typing.d.ts +0 -80
- package/components/hy-input/typing.d.ts +0 -149
- package/components/hy-list/props.ts +1 -1
- package/components/hy-list/typing.d.ts +0 -51
- package/components/hy-menu/typing.d.ts +0 -35
- package/components/hy-modal/typing.d.ts +9 -84
- package/components/hy-navbar/typing.d.ts +0 -81
- package/components/hy-notice-bar/typing.d.ts +2 -65
- package/components/hy-number-step/typing.d.ts +0 -110
- package/components/hy-overlay/typing.d.ts +2 -27
- package/components/hy-pagination/typing.d.ts +6 -49
- package/components/hy-picker/typing.d.ts +27 -124
- package/components/hy-popover/typing.d.ts +25 -66
- package/components/hy-popup/hy-popup.vue +0 -1
- package/components/hy-popup/typing.d.ts +8 -77
- package/components/hy-price/typing.d.ts +0 -41
- package/components/hy-qrcode/hy-qrcode.vue +67 -2
- package/components/hy-qrcode/index.scss +3 -4
- package/components/hy-qrcode/typing.d.ts +0 -66
- package/components/hy-radio/typing.d.ts +1 -86
- package/components/hy-rate/typing.d.ts +0 -62
- package/components/hy-read-more/typing.d.ts +4 -49
- package/components/hy-scroll-list/typing.d.ts +4 -33
- package/components/hy-search/typing.d.ts +19 -120
- package/components/hy-signature/hy-signature.vue +25 -22
- package/components/hy-signature/index.scss +0 -4
- package/components/hy-signature/typing.d.ts +0 -101
- package/components/hy-slider/typing.d.ts +8 -77
- package/components/hy-steps/typing.d.ts +16 -60
- package/components/hy-submit-bar/typing.d.ts +0 -72
- package/components/hy-subsection/typing.d.ts +0 -49
- package/components/hy-swipe-action/index.ts +13 -22
- package/components/hy-swipe-action/typing.d.ts +1 -38
- package/components/hy-swiper/typing.d.ts +0 -101
- package/components/hy-switch/typing.d.ts +0 -62
- package/components/hy-tabbar/hy-tabbar.vue +137 -0
- package/components/{hy-tabBar → hy-tabbar}/index.scss +31 -31
- package/components/hy-tabbar/props.ts +59 -0
- package/components/hy-tabbar/typing.d.ts +21 -0
- package/components/hy-tabbar-group/hy-tabbar-group.vue +87 -0
- package/components/hy-tabbar-group/index.scss +57 -0
- package/components/hy-tabbar-group/props.ts +78 -0
- package/components/hy-tabbar-group/typing.ts +16 -0
- package/components/hy-tabbar-item/hy-tabbar-item.vue +103 -0
- package/components/hy-tabbar-item/index.scss +43 -0
- package/components/hy-tabbar-item/props.ts +24 -0
- package/components/hy-tabbar-item/typing.ts +10 -0
- package/components/hy-tabs/typing.d.ts +25 -92
- package/components/hy-tag/props.ts +8 -2
- package/components/hy-tag/typing.d.ts +9 -78
- package/components/hy-text/props.ts +8 -2
- package/components/hy-text/typing.d.ts +3 -100
- package/components/hy-textarea/props.ts +4 -1
- package/components/hy-textarea/typing.d.ts +0 -27
- package/components/hy-tooltip/props.ts +1 -4
- package/components/hy-tooltip/typing.d.ts +2 -55
- package/components/hy-transition/typing.d.ts +14 -43
- package/components/hy-upload/props.ts +1 -1
- package/components/hy-upload/typing.d.ts +56 -164
- package/components/hy-warn/typing.d.ts +4 -45
- package/components/index.ts +177 -177
- package/global.d.ts +87 -85
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/components/hy-config-provider/typing.d.ts +0 -24
- package/components/hy-divider/typing.d.ts +0 -64
- package/components/hy-dropdown/typing.d.ts +0 -48
- package/components/hy-form-group/typing.d.ts +0 -0
- package/components/hy-line/typing.d.ts +0 -32
- package/components/hy-line-progress/typing.d.ts +0 -32
- package/components/hy-loading/typing.d.ts +0 -52
- package/components/hy-notify/typing.d.ts +0 -48
- package/components/hy-status-bar/typing.d.ts +0 -12
- package/components/hy-tabBar/hy-tabBar.vue +0 -109
- package/components/hy-tabBar/props.ts +0 -13
- package/components/hy-tabBar/typing.d.ts +0 -54
- package/components/hy-waterfall/typing.d.ts +0 -14
- package/components/hy-watermark/typing.d.ts +0 -76
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyConfigProviderProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description dark-暗色、light-亮色
|
|
6
|
-
* */
|
|
7
|
-
theme?: HyApp.DarkModeType
|
|
8
|
-
/**
|
|
9
|
-
* @description 主题色(默认 #3c9cff )
|
|
10
|
-
* */
|
|
11
|
-
themeColor?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 内边距(默认 10px )
|
|
14
|
-
* */
|
|
15
|
-
padding?: string
|
|
16
|
-
/**
|
|
17
|
-
* @description 定义需要用到的主题类名
|
|
18
|
-
* */
|
|
19
|
-
customClass?: string | string[]
|
|
20
|
-
/**
|
|
21
|
-
* @description 定义需要用到的外部样式
|
|
22
|
-
* */
|
|
23
|
-
customStyle?: CSSProperties | CSSProperties[]
|
|
24
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyDividerProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 是否虚线 (默认 false )
|
|
6
|
-
* */
|
|
7
|
-
dashed?: boolean
|
|
8
|
-
/**
|
|
9
|
-
* @description 是否细线 (默认 true )
|
|
10
|
-
* */
|
|
11
|
-
hairline?: boolean
|
|
12
|
-
/**
|
|
13
|
-
* @description 是否以点替代文字,优先于text字段起作用 (默认 false )
|
|
14
|
-
* */
|
|
15
|
-
dot?: boolean
|
|
16
|
-
/**
|
|
17
|
-
* @description 内容文本的位置,left-左边,center-中间,right-右边 (默认 'center' )
|
|
18
|
-
* */
|
|
19
|
-
textPosition?: HyApp.RowCenterType
|
|
20
|
-
/**
|
|
21
|
-
* @description 文本内容
|
|
22
|
-
* */
|
|
23
|
-
text?: string | 'loadMore' | 'loading' | 'noMore'
|
|
24
|
-
/**
|
|
25
|
-
* @description 文本大小 (默认 14)
|
|
26
|
-
* */
|
|
27
|
-
textSize?: string | number
|
|
28
|
-
/**
|
|
29
|
-
* @description 文本颜色 (默认 '#909399' )
|
|
30
|
-
* */
|
|
31
|
-
textColor?: string
|
|
32
|
-
/**
|
|
33
|
-
* @description 线条颜色 (默认 '#dcdfe6' )
|
|
34
|
-
* */
|
|
35
|
-
lineColor?: string
|
|
36
|
-
/**
|
|
37
|
-
* @description 加载图标(默认 'loading' )
|
|
38
|
-
* */
|
|
39
|
-
loadingIcon?: string
|
|
40
|
-
/**
|
|
41
|
-
* @description 加载前的提示语(默认 '加载更多' )
|
|
42
|
-
* */
|
|
43
|
-
loadMoreText?: string
|
|
44
|
-
/**
|
|
45
|
-
* @description 加载中提示语(默认 '正在加载...' )
|
|
46
|
-
* */
|
|
47
|
-
loadingText?: string
|
|
48
|
-
/**
|
|
49
|
-
* @description 没有更多的提示语(默认 '没有更多了' )
|
|
50
|
-
* */
|
|
51
|
-
noMoreText?: string
|
|
52
|
-
/**
|
|
53
|
-
* @description 上边距 (默认 0 )
|
|
54
|
-
* */
|
|
55
|
-
marginTop?: string | number
|
|
56
|
-
/**
|
|
57
|
-
* @description 下边距 (默认 0 )
|
|
58
|
-
* */
|
|
59
|
-
marginBottom?: string | number
|
|
60
|
-
/**
|
|
61
|
-
* @description 定义需要用到的外部样式
|
|
62
|
-
* */
|
|
63
|
-
customStyle?: CSSProperties
|
|
64
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyDropdownProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 标题和选项卡选中的颜色(默认#2979ff)
|
|
6
|
-
* */
|
|
7
|
-
activeColor?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 标题和选项卡未选中的颜色(默认#606266)
|
|
10
|
-
* */
|
|
11
|
-
inactiveColor?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 点击遮罩是否关闭菜单(默认true)
|
|
14
|
-
* */
|
|
15
|
-
closeOnClickMask?: boolean
|
|
16
|
-
/**
|
|
17
|
-
* @description 是否粘性定位(默认true)
|
|
18
|
-
* */
|
|
19
|
-
sticky?: boolean
|
|
20
|
-
/**
|
|
21
|
-
* @description 标题菜单的高度,单位任意(默认80)
|
|
22
|
-
* */
|
|
23
|
-
height?: number | string
|
|
24
|
-
/**
|
|
25
|
-
* @description 标题菜单是否显示下边框(默认false)
|
|
26
|
-
* */
|
|
27
|
-
borderBottom?: boolean
|
|
28
|
-
/**
|
|
29
|
-
* @description 标题的字体大小,单位任意,数值默认为rpx单位(默认28)
|
|
30
|
-
* */
|
|
31
|
-
titleSize?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description 菜单展开内容下方的圆角值,单位任意(默认0)
|
|
34
|
-
* */
|
|
35
|
-
borderRadius?: number
|
|
36
|
-
/**
|
|
37
|
-
* @description 图标名称
|
|
38
|
-
* */
|
|
39
|
-
menuIcon?: string
|
|
40
|
-
/**
|
|
41
|
-
* @description 图标大小
|
|
42
|
-
* */
|
|
43
|
-
menuIconSize?: number
|
|
44
|
-
/**
|
|
45
|
-
* @description 定义需要用到的外部样式
|
|
46
|
-
* */
|
|
47
|
-
customStyle?: CSSProperties
|
|
48
|
-
}
|
|
File without changes
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyLineProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 线条的颜色 ( 默认 '#d6d7d9' )
|
|
6
|
-
* */
|
|
7
|
-
color?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 ( 默认 '100%' )
|
|
10
|
-
* */
|
|
11
|
-
length?: string | number
|
|
12
|
-
/**
|
|
13
|
-
* @description 线条的方向,row-横向,column-竖向 (默认 'row' )
|
|
14
|
-
* */
|
|
15
|
-
direction?: HyApp.DirectionType
|
|
16
|
-
/**
|
|
17
|
-
* @description 是否显示细线条 (默认 true )
|
|
18
|
-
* */
|
|
19
|
-
hairline?: boolean
|
|
20
|
-
/**
|
|
21
|
-
* @description 线条与上下左右 元素的间距,字符串形式,如"30px" (默认 0 )
|
|
22
|
-
* */
|
|
23
|
-
margin?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 是否虚线,true-虚线,false-实线 (默认 false )
|
|
26
|
-
* */
|
|
27
|
-
dashed?: boolean
|
|
28
|
-
/**
|
|
29
|
-
* @description 定义需要用到的外部样式
|
|
30
|
-
* */
|
|
31
|
-
customStyle?: CSSProperties
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyLineProgressProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 激活部分的颜色 ( 默认 '#19be6b' )
|
|
6
|
-
* */
|
|
7
|
-
activeColor?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 背景色 ( 默认 '#ececec' )
|
|
10
|
-
* */
|
|
11
|
-
inactiveColor?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 进度百分比,数值 ( 默认 0 )
|
|
14
|
-
* */
|
|
15
|
-
percentage: number
|
|
16
|
-
/**
|
|
17
|
-
* @description 是否在进度条内部显示百分比的值 ( 默认 true )
|
|
18
|
-
* */
|
|
19
|
-
showText?: boolean
|
|
20
|
-
/**
|
|
21
|
-
* @description 进度条的高度,单位px ( 默认 12 )
|
|
22
|
-
* */
|
|
23
|
-
height?: string | number
|
|
24
|
-
/**
|
|
25
|
-
* @description 字体大小,单位px ( 默认 10 )
|
|
26
|
-
* */
|
|
27
|
-
fontSize?: string | number
|
|
28
|
-
/**
|
|
29
|
-
* @description 自定义样式
|
|
30
|
-
* */
|
|
31
|
-
customStyle?: CSSProperties
|
|
32
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyLoadingProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 是否显示组件 (默认 true)
|
|
6
|
-
* */
|
|
7
|
-
show?: boolean
|
|
8
|
-
/**
|
|
9
|
-
* @description 动画活动区域的颜色,只对 mode = flower 模式有效
|
|
10
|
-
* */
|
|
11
|
-
color?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 提示文本的颜色
|
|
14
|
-
* */
|
|
15
|
-
textColor?: string
|
|
16
|
-
/**
|
|
17
|
-
* @description 文字和图标是否垂直排列 (默认 false )
|
|
18
|
-
* */
|
|
19
|
-
vertical?: boolean
|
|
20
|
-
/**
|
|
21
|
-
* @description 模式选择,见官网说明(默认 'circle' )
|
|
22
|
-
* */
|
|
23
|
-
mode?: HyApp.LoadingMode
|
|
24
|
-
/**
|
|
25
|
-
* @description 加载图标的大小,单位px (默认 24 )
|
|
26
|
-
* */
|
|
27
|
-
size?: number | string
|
|
28
|
-
/**
|
|
29
|
-
* @description 文字大小(默认 15 )
|
|
30
|
-
* */
|
|
31
|
-
textSize?: number | string
|
|
32
|
-
/**
|
|
33
|
-
* @description 文字内容
|
|
34
|
-
* */
|
|
35
|
-
text?: string
|
|
36
|
-
/**
|
|
37
|
-
* @description 动画模式 (默认 'ease-in-out' )
|
|
38
|
-
* */
|
|
39
|
-
timingFunction?: 'ease-in-out' | 'linear' | 'ease-in' | 'ease-out' | 'ease'
|
|
40
|
-
/**
|
|
41
|
-
* @description 动画执行周期时间(默认 1200)
|
|
42
|
-
* */
|
|
43
|
-
duration?: number
|
|
44
|
-
/**
|
|
45
|
-
* @description mode=circle时的暗边颜色
|
|
46
|
-
* */
|
|
47
|
-
inactiveColor?: string
|
|
48
|
-
/**
|
|
49
|
-
* @description 定义需要用到的外部样式
|
|
50
|
-
* */
|
|
51
|
-
customStyle?: CSSProperties
|
|
52
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyNotifyProps {
|
|
4
|
-
/**
|
|
5
|
-
* 到顶部的距离 ( 默认 0 )
|
|
6
|
-
* */
|
|
7
|
-
top?: number
|
|
8
|
-
/**
|
|
9
|
-
* 主题,primary,success,warning,error ( 默认 'primary' )
|
|
10
|
-
* */
|
|
11
|
-
type?: HyApp.ThemeType
|
|
12
|
-
/**
|
|
13
|
-
* 字体颜色 ( 默认 '#ffffff' )
|
|
14
|
-
* */
|
|
15
|
-
color?: string
|
|
16
|
-
/**
|
|
17
|
-
* 背景颜色
|
|
18
|
-
* */
|
|
19
|
-
bgColor?: string
|
|
20
|
-
/**
|
|
21
|
-
* 图标名称
|
|
22
|
-
* */
|
|
23
|
-
icon?: string
|
|
24
|
-
/**
|
|
25
|
-
* 展示的文字内容
|
|
26
|
-
* */
|
|
27
|
-
message?: string
|
|
28
|
-
/**
|
|
29
|
-
* 展示时长,为0时不消失,单位ms ( 默认 3000 )
|
|
30
|
-
* */
|
|
31
|
-
duration?: number
|
|
32
|
-
/**
|
|
33
|
-
* 字体大小 ( 默认 15 )
|
|
34
|
-
* */
|
|
35
|
-
fontSize?: number | string
|
|
36
|
-
/**
|
|
37
|
-
* 回调方法
|
|
38
|
-
* */
|
|
39
|
-
complete?: Function
|
|
40
|
-
/**
|
|
41
|
-
* 是否留出顶部安全距离(状态栏高度) ( 默认 false )
|
|
42
|
-
* */
|
|
43
|
-
safeAreaInsetTop?: boolean
|
|
44
|
-
/**
|
|
45
|
-
* 定义需要用到的外部样式
|
|
46
|
-
* */
|
|
47
|
-
customStyle?: CSSProperties
|
|
48
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="hy-tabBar--placeholder"></view>
|
|
3
|
-
<view class="hy-tabBar">
|
|
4
|
-
<view class="hy-tabBar--box" :style="{ backgroundColor: barBgColor }">
|
|
5
|
-
<view class="hy-tabBar--container">
|
|
6
|
-
<view
|
|
7
|
-
:class="[
|
|
8
|
-
'hy-tabBar--container__item',
|
|
9
|
-
'list',
|
|
10
|
-
current === i ? 'is-active' : ''
|
|
11
|
-
]"
|
|
12
|
-
v-for="(item, i) in list"
|
|
13
|
-
:key="i"
|
|
14
|
-
@click="checkItem(i)"
|
|
15
|
-
>
|
|
16
|
-
<view class="hy-tabBar--container__item--bar">
|
|
17
|
-
<view class="icon">
|
|
18
|
-
<hy-badge
|
|
19
|
-
:value="item?.badge"
|
|
20
|
-
absolute
|
|
21
|
-
:offset="[-13, 25]"
|
|
22
|
-
:max="badge?.max"
|
|
23
|
-
:is-dot="badge?.isDot"
|
|
24
|
-
:inverted="badge?.inverted"
|
|
25
|
-
:bg-color="badge?.bgColor"
|
|
26
|
-
:type="badge?.type"
|
|
27
|
-
:number-type="badge?.numberType"
|
|
28
|
-
:shape="badge?.shape"
|
|
29
|
-
:show-zero="badge?.showZero"
|
|
30
|
-
:show="!!item?.badge"
|
|
31
|
-
></hy-badge>
|
|
32
|
-
<hy-icon :name="item.icon" :color="color" size="25"></hy-icon>
|
|
33
|
-
</view>
|
|
34
|
-
<text class="text" :style="[{ color: color }]">{{ item.name }}</text>
|
|
35
|
-
<text class="circle"></text>
|
|
36
|
-
</view>
|
|
37
|
-
</view>
|
|
38
|
-
<view
|
|
39
|
-
class="hy-tabBar--indicator"
|
|
40
|
-
:style="{
|
|
41
|
-
'--num': `translateX(calc(((100vw - 110rpx - ${list.length} * 70rpx) / ${list.length - 1} + 70rpx) * ${current}))`,
|
|
42
|
-
background: activeColor
|
|
43
|
-
}"
|
|
44
|
-
></view>
|
|
45
|
-
</view>
|
|
46
|
-
</view>
|
|
47
|
-
</view>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script lang="ts">
|
|
51
|
-
export default {
|
|
52
|
-
name: 'hy-switch',
|
|
53
|
-
options: {
|
|
54
|
-
addGlobalClass: true,
|
|
55
|
-
virtualHost: true,
|
|
56
|
-
styleIsolation: 'shared'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<script setup lang="ts">
|
|
62
|
-
import { ref, toRefs, watch } from 'vue'
|
|
63
|
-
import defaultProps from './props'
|
|
64
|
-
import type IProps from './typing'
|
|
65
|
-
|
|
66
|
-
// 组件
|
|
67
|
-
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
68
|
-
import HyBadge from '../hy-badge/hy-badge.vue'
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 一般用于导航轮播,广告展示等场景,可开箱即用
|
|
72
|
-
* @displayName hy-swiper
|
|
73
|
-
*/
|
|
74
|
-
defineOptions({})
|
|
75
|
-
|
|
76
|
-
const props = withDefaults(defineProps<IProps>(), defaultProps)
|
|
77
|
-
const { modelValue, baseBgColor } = toRefs(props)
|
|
78
|
-
const emit = defineEmits(['clickTab'])
|
|
79
|
-
|
|
80
|
-
const baseBackgroundColor = baseBgColor.value ? baseBgColor.value : 'var(--hy-background)'
|
|
81
|
-
const current = ref(0)
|
|
82
|
-
watch(
|
|
83
|
-
() => modelValue.value,
|
|
84
|
-
(newVal) => {
|
|
85
|
-
current.value = newVal
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
const checkItem = (index: number) => {
|
|
90
|
-
current.value = index
|
|
91
|
-
emit('clickTab', index)
|
|
92
|
-
}
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<style lang="scss" scoped>
|
|
96
|
-
@import './index.scss';
|
|
97
|
-
.hy-tabBar {
|
|
98
|
-
background: v-bind(baseBackgroundColor);
|
|
99
|
-
&--indicator {
|
|
100
|
-
border: 12rpx solid v-bind(baseBackgroundColor);
|
|
101
|
-
&::before {
|
|
102
|
-
box-shadow: 1px -15rpx 0 v-bind(baseBackgroundColor);
|
|
103
|
-
}
|
|
104
|
-
&::after {
|
|
105
|
-
box-shadow: -1px -15rpx 0 v-bind(baseBackgroundColor);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
</style>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type HyBadgeProps from "../hy-badge/typing";
|
|
2
|
-
|
|
3
|
-
export interface TabListVo {
|
|
4
|
-
/**
|
|
5
|
-
* @description 标题
|
|
6
|
-
* */
|
|
7
|
-
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* @description icon图标或者图片
|
|
10
|
-
* */
|
|
11
|
-
icon: string;
|
|
12
|
-
/**
|
|
13
|
-
* @description 徽标值
|
|
14
|
-
* */
|
|
15
|
-
badge?: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default interface HyTabBarProps {
|
|
19
|
-
/**
|
|
20
|
-
* @description tab当前值
|
|
21
|
-
* */
|
|
22
|
-
modelValue: number;
|
|
23
|
-
/**
|
|
24
|
-
* @description 导航栏值
|
|
25
|
-
* {
|
|
26
|
-
* name: 中文名,
|
|
27
|
-
* icon: uview-plus里面的矢量图标库
|
|
28
|
-
* }
|
|
29
|
-
* */
|
|
30
|
-
list: TabListVo[];
|
|
31
|
-
/**
|
|
32
|
-
* @description 文字颜色
|
|
33
|
-
* */
|
|
34
|
-
color?: string;
|
|
35
|
-
/**
|
|
36
|
-
* @description 底部导航栏底部背景颜色(颜色设置必须要和页面背景颜色一样,才有重合感觉)
|
|
37
|
-
* 支持渐变色--linear-gradient(155deg, #192b6e, #a6307c)
|
|
38
|
-
* */
|
|
39
|
-
baseBgColor?: string;
|
|
40
|
-
/**
|
|
41
|
-
* @description 底部导航栏背景颜色
|
|
42
|
-
* 支持渐变色--linear-gradient(155deg, #192b6e, #a6307c)
|
|
43
|
-
* */
|
|
44
|
-
barBgColor?: string;
|
|
45
|
-
/**
|
|
46
|
-
* @description 点击突出按钮的背景颜色
|
|
47
|
-
* 支持渐变色--linear-gradient(0deg, #ffa576,#0951eb)
|
|
48
|
-
* */
|
|
49
|
-
activeColor?: string;
|
|
50
|
-
/**
|
|
51
|
-
* @description 徽标属性集合
|
|
52
|
-
* */
|
|
53
|
-
badge?: Partial<HyBadgeProps>;
|
|
54
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default interface HyWaterfallProps {
|
|
2
|
-
/**
|
|
3
|
-
* @description 数据列表
|
|
4
|
-
* */
|
|
5
|
-
modelValue: Array<any>;
|
|
6
|
-
/**
|
|
7
|
-
* @description 每次向结构插入数据的时间间隔,间隔越长,越能保证两列高度相近,但是对用户体验越不好
|
|
8
|
-
* */
|
|
9
|
-
addTime?: number;
|
|
10
|
-
/**
|
|
11
|
-
* @description id值
|
|
12
|
-
* */
|
|
13
|
-
idKey?: string;
|
|
14
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyOverlayProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 显示内容
|
|
6
|
-
* */
|
|
7
|
-
content?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 显示图片的地址,支持网络图片和base64(钉钉小程序仅支持网络图片)
|
|
10
|
-
* */
|
|
11
|
-
image?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 图片高度
|
|
14
|
-
* */
|
|
15
|
-
imageHeight?: number
|
|
16
|
-
/**
|
|
17
|
-
* @description 图片宽度
|
|
18
|
-
* */
|
|
19
|
-
imageWidth?: number
|
|
20
|
-
/**
|
|
21
|
-
* @description X轴间距,单位px
|
|
22
|
-
* */
|
|
23
|
-
gutterX?: number
|
|
24
|
-
/**
|
|
25
|
-
* @description Y轴间距,单位px
|
|
26
|
-
* */
|
|
27
|
-
gutterY?: number
|
|
28
|
-
/**
|
|
29
|
-
* @description canvas画布宽度,单位px
|
|
30
|
-
* */
|
|
31
|
-
width?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description canvas画布高度,单位px
|
|
34
|
-
* */
|
|
35
|
-
height?: number
|
|
36
|
-
/**
|
|
37
|
-
* @description 是否为全屏水印
|
|
38
|
-
* */
|
|
39
|
-
fullScreen?: boolean
|
|
40
|
-
/**
|
|
41
|
-
* @description 水印字体颜色
|
|
42
|
-
* */
|
|
43
|
-
color?: string
|
|
44
|
-
/**
|
|
45
|
-
* @description 水印字体大小,单位px
|
|
46
|
-
* */
|
|
47
|
-
size?: number
|
|
48
|
-
/**
|
|
49
|
-
* @description 水印字体样式(仅微信和h5支持),可能的值:normal、italic、oblique
|
|
50
|
-
* */
|
|
51
|
-
fontStyle?: string
|
|
52
|
-
/**
|
|
53
|
-
* @description 水印字体的粗细(仅微信和h5支持)
|
|
54
|
-
* */
|
|
55
|
-
fontWeight?: string
|
|
56
|
-
/**
|
|
57
|
-
* @description 水印字体系列(仅微信和h5支持)
|
|
58
|
-
* */
|
|
59
|
-
fontFamily?: string
|
|
60
|
-
/**
|
|
61
|
-
* @description 水印旋转角度
|
|
62
|
-
* */
|
|
63
|
-
rotate?: number
|
|
64
|
-
/**
|
|
65
|
-
* @description 自定义层级
|
|
66
|
-
* */
|
|
67
|
-
zIndex?: number
|
|
68
|
-
/**
|
|
69
|
-
* @description 自定义透明度,取值 0~1
|
|
70
|
-
* */
|
|
71
|
-
opacity?: number
|
|
72
|
-
/**
|
|
73
|
-
* @description 定义需要用到的外部样式
|
|
74
|
-
* */
|
|
75
|
-
customStyle?: CSSProperties
|
|
76
|
-
}
|