hy-app 0.5.4 → 0.5.6
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/typing.d.ts +0 -66
- package/components/hy-back-top/props.ts +2 -3
- package/components/hy-back-top/typing.d.ts +0 -47
- package/components/hy-badge/props.ts +1 -1
- package/components/hy-badge/typing.d.ts +3 -60
- package/components/hy-button/props.ts +1 -1
- 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 +14 -13
- package/components/hy-card/props.ts +4 -6
- package/components/hy-card/typing.d.ts +1 -114
- package/components/hy-cell/hy-cell.vue +9 -190
- package/components/hy-cell/props.ts +7 -26
- package/components/hy-cell/typing.d.ts +2 -96
- package/components/hy-cell-item/hy-cell-item.vue +160 -0
- package/components/hy-cell-item/index.scss +100 -0
- package/components/hy-cell-item/props.ts +66 -0
- package/components/hy-cell-item/typing.d.ts +7 -0
- package/components/hy-check-button/typing.d.ts +0 -43
- package/components/hy-checkbox/typing.d.ts +1 -73
- package/components/hy-checkbox-group/props.ts +1 -1
- package/components/hy-checkbox-group/typing.d.ts +0 -65
- package/components/hy-checkbox-item/typing.d.ts +3 -3
- 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/typing.d.ts +0 -133
- 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-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/props.ts +1 -1
- package/components/hy-grid/typing.d.ts +1 -45
- package/components/hy-icon/props.ts +1 -1
- package/components/hy-icon/typing.d.ts +3 -84
- package/components/hy-image/typing.d.ts +0 -80
- package/components/hy-input/hy-input.vue +19 -22
- package/components/hy-input/props.ts +1 -1
- package/components/hy-input/typing.d.ts +0 -149
- package/components/hy-list/typing.d.ts +0 -51
- package/components/hy-menu/props.ts +2 -2
- 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 +0 -65
- package/components/hy-number-step/props.ts +1 -1
- 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/typing.d.ts +8 -77
- package/components/hy-price/hy-price.vue +9 -2
- package/components/hy-price/typing.d.ts +0 -41
- package/components/hy-qrcode/hy-qrcode.vue +3 -4
- package/components/hy-qrcode/index.scss +3 -3
- package/components/hy-qrcode/qrcode.js +0 -138
- 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/props.ts +1 -2
- package/components/hy-search/typing.d.ts +19 -120
- 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/props.ts +1 -1
- package/components/hy-switch/typing.d.ts +0 -62
- package/components/hy-tabbar/index.scss +1 -1
- package/components/hy-tabbar/props.ts +1 -1
- package/components/hy-tabbar/typing.d.ts +0 -40
- package/components/hy-tabbar-group/props.ts +1 -1
- package/components/hy-tabbar-item/typing.ts +0 -12
- package/components/hy-tabs/props.ts +1 -1
- package/components/hy-tabs/typing.d.ts +25 -92
- package/components/hy-tag/props.ts +1 -1
- package/components/hy-tag/typing.d.ts +9 -78
- package/components/hy-text/typing.d.ts +3 -100
- package/components/hy-textarea/typing.d.ts +0 -27
- package/components/hy-tooltip/props.ts +0 -1
- package/components/hy-tooltip/typing.d.ts +2 -55
- package/components/hy-transition/typing.d.ts +14 -43
- package/components/hy-upload/typing.d.ts +56 -164
- package/components/hy-warn/typing.d.ts +4 -45
- package/global.d.ts +1 -0
- package/libs/css/theme.scss +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/components/hy-card/index.scss +0 -57
- package/components/hy-cell/index.scss +0 -136
- 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-group/README.md +0 -326
- package/components/hy-waterfall/typing.d.ts +0 -14
- package/components/hy-watermark/typing.d.ts +0 -76
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
1
|
import type BadgeProps from '../hy-badge/props'
|
|
3
2
|
|
|
4
3
|
export interface SubmitBarIconMenus {
|
|
@@ -17,77 +16,6 @@ export interface SubmitBarIconMenus {
|
|
|
17
16
|
[key: string]: any
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
export default interface HySubmitBarProps {
|
|
21
|
-
/**
|
|
22
|
-
* @description 左边菜单栏
|
|
23
|
-
* */
|
|
24
|
-
menus?: IconMenus[]
|
|
25
|
-
/**
|
|
26
|
-
* @description 绝对定位
|
|
27
|
-
* */
|
|
28
|
-
fixed?: boolean
|
|
29
|
-
/**
|
|
30
|
-
* @description 是否显示边框
|
|
31
|
-
* */
|
|
32
|
-
border?: boolean
|
|
33
|
-
/**
|
|
34
|
-
* @description 加载左边按钮loading
|
|
35
|
-
* */
|
|
36
|
-
leftLoading?: boolean
|
|
37
|
-
/**
|
|
38
|
-
* @description 加载右边按钮loading
|
|
39
|
-
* */
|
|
40
|
-
rightLoading?: boolean
|
|
41
|
-
/**
|
|
42
|
-
* @description 左边icon的颜色
|
|
43
|
-
* */
|
|
44
|
-
iconColor?: string
|
|
45
|
-
/**
|
|
46
|
-
* @description 左边文字的颜色
|
|
47
|
-
* */
|
|
48
|
-
iconLabelColor?: string
|
|
49
|
-
/**
|
|
50
|
-
* @description 右边按钮文字颜色
|
|
51
|
-
* */
|
|
52
|
-
textColor?: string
|
|
53
|
-
/**
|
|
54
|
-
* @description 显示左边按钮
|
|
55
|
-
* */
|
|
56
|
-
showLeftBtn?: boolean
|
|
57
|
-
/**
|
|
58
|
-
* @description 显示右边按钮
|
|
59
|
-
* */
|
|
60
|
-
showRightBtn?: boolean
|
|
61
|
-
/**
|
|
62
|
-
* @description 左边按钮文字
|
|
63
|
-
* */
|
|
64
|
-
leftBtnText?: string
|
|
65
|
-
/**
|
|
66
|
-
* @description 右边按钮文字
|
|
67
|
-
* */
|
|
68
|
-
rightBtnText?: string
|
|
69
|
-
/**
|
|
70
|
-
* @description 左边按钮颜色,支持渐变色
|
|
71
|
-
* */
|
|
72
|
-
leftBtnColor?: string
|
|
73
|
-
/**
|
|
74
|
-
* @description 有边按钮颜色,支持渐变色
|
|
75
|
-
* */
|
|
76
|
-
rightBtnColor?: string
|
|
77
|
-
/**
|
|
78
|
-
* @description 按钮的形状
|
|
79
|
-
* */
|
|
80
|
-
shape?: HyApp.ShapeType
|
|
81
|
-
/**
|
|
82
|
-
* @description 按钮点击等待时长(运用了节流方法)
|
|
83
|
-
* */
|
|
84
|
-
warn?: number
|
|
85
|
-
/**
|
|
86
|
-
* @description 定义需要用到的外部样式
|
|
87
|
-
* */
|
|
88
|
-
customStyle?: CSSProperties
|
|
89
|
-
}
|
|
90
|
-
|
|
91
19
|
export interface ISubmitBarEmits {
|
|
92
20
|
/** 点击按钮触发 */
|
|
93
21
|
(e: 'click', index: number): void
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
1
|
export interface SubSectionItemVo extends AnyObject {
|
|
4
2
|
name: string
|
|
5
3
|
value: string | number
|
|
@@ -7,53 +5,6 @@ export interface SubSectionItemVo extends AnyObject {
|
|
|
7
5
|
|
|
8
6
|
export type SubSectionVo = string | number | SubSectionItemVo
|
|
9
7
|
|
|
10
|
-
export default interface HySubsectionProps {
|
|
11
|
-
/**
|
|
12
|
-
* @description 接收值
|
|
13
|
-
* */
|
|
14
|
-
modelValue: string | number
|
|
15
|
-
/**
|
|
16
|
-
* @description 默认值 (默认0)
|
|
17
|
-
* */
|
|
18
|
-
current?: number
|
|
19
|
-
/**
|
|
20
|
-
* @description tab的数据
|
|
21
|
-
* */
|
|
22
|
-
list: SubSectionVo[]
|
|
23
|
-
/**
|
|
24
|
-
* @description list的键值
|
|
25
|
-
* */
|
|
26
|
-
customKeys?: HyApp.IFieldNames
|
|
27
|
-
/**
|
|
28
|
-
* @description 激活时的颜色(默认 '#3c9cff' )
|
|
29
|
-
* */
|
|
30
|
-
activeColor?: string
|
|
31
|
-
/**
|
|
32
|
-
* @description 未激活时的颜色(默认 '#303133' )
|
|
33
|
-
* */
|
|
34
|
-
inactiveColor?: string
|
|
35
|
-
/**
|
|
36
|
-
* @description 模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
|
|
37
|
-
* */
|
|
38
|
-
mode?: 'button' | 'subsection'
|
|
39
|
-
/**
|
|
40
|
-
* @description 字体大小,单位px(默认 12 )
|
|
41
|
-
* */
|
|
42
|
-
fontSize?: number | string
|
|
43
|
-
/**
|
|
44
|
-
* @description 激活选项的字体是否加粗(默认 true )
|
|
45
|
-
* */
|
|
46
|
-
bold?: boolean
|
|
47
|
-
/**
|
|
48
|
-
* @description 组件背景颜色,mode为button时有效(默认 '#eeeeef' )
|
|
49
|
-
* */
|
|
50
|
-
bgColor?: string
|
|
51
|
-
/**
|
|
52
|
-
* @description 定义需要用到的外部样式
|
|
53
|
-
* */
|
|
54
|
-
customStyle?: CSSProperties
|
|
55
|
-
}
|
|
56
|
-
|
|
57
8
|
export interface ISubsectionEmits {
|
|
58
9
|
/** 改变触发 */
|
|
59
10
|
(e: 'change', index: number): void
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author: weisheng
|
|
3
|
-
* @Date: 2023-07-02 22:51:06
|
|
4
|
-
* @LastEditTime: 2024-03-16 19:59:07
|
|
5
|
-
* @LastEditors: weisheng
|
|
6
|
-
* @Description:
|
|
7
|
-
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/common/clickoutside.ts
|
|
8
|
-
* 记得注释
|
|
9
|
-
*/
|
|
10
|
-
let queue: any[] = [];
|
|
1
|
+
let queue: any[] = []
|
|
11
2
|
|
|
12
3
|
export function pushToQueue(comp: any) {
|
|
13
|
-
|
|
4
|
+
queue.push(comp)
|
|
14
5
|
}
|
|
15
6
|
|
|
16
7
|
export function removeFromQueue(comp: any) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
queue = queue.filter((item) => {
|
|
9
|
+
return item.$.uid !== comp.$.uid
|
|
10
|
+
})
|
|
20
11
|
}
|
|
21
12
|
|
|
22
13
|
export function closeOther(comp: any) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
queue.forEach((item) => {
|
|
15
|
+
if (item.$.uid !== comp.$.uid) {
|
|
16
|
+
item.$.exposed.close()
|
|
17
|
+
}
|
|
18
|
+
})
|
|
28
19
|
}
|
|
29
20
|
|
|
30
21
|
export function closeOutside() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
queue.forEach((item) => {
|
|
23
|
+
item.$.exposed.close()
|
|
24
|
+
})
|
|
34
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CSSProperties
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
2
|
|
|
3
3
|
export interface SwipeActionOptionsVo {
|
|
4
4
|
text: string
|
|
@@ -15,43 +15,6 @@ export type SwipeActionBeforeClose = (
|
|
|
15
15
|
position: SwipeActionPosition
|
|
16
16
|
) => void
|
|
17
17
|
|
|
18
|
-
export default interface SwipeActionProps {
|
|
19
|
-
/**
|
|
20
|
-
* @description 滑动按钮的状态,使用v-model进行双向绑定。
|
|
21
|
-
* 选值为:'left'(左滑)、'close'(关闭状态)、'right'(右滑)。
|
|
22
|
-
* */
|
|
23
|
-
modelValue?: SwipeActionStatus
|
|
24
|
-
/**
|
|
25
|
-
* @description 是否禁用滑动操作
|
|
26
|
-
* */
|
|
27
|
-
disabled?: boolean
|
|
28
|
-
/**
|
|
29
|
-
* @description 是否自动关闭其他swipe按钮组(默认 true )
|
|
30
|
-
* */
|
|
31
|
-
autoClose?: boolean
|
|
32
|
-
/**
|
|
33
|
-
* @description 显示底部边框
|
|
34
|
-
* */
|
|
35
|
-
borderBottom?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 右侧按钮内容
|
|
38
|
-
* */
|
|
39
|
-
options?: SwipeActionOptionsVo[]
|
|
40
|
-
/**
|
|
41
|
-
* @description 动画过渡时间,单位ms(默认 350 )
|
|
42
|
-
* */
|
|
43
|
-
duration?: number
|
|
44
|
-
/**
|
|
45
|
-
* @description 在关闭滑动按钮前调用的钩子函数
|
|
46
|
-
* @desc 可以在此函数中执行一些关闭前的操作,如确认提示等。
|
|
47
|
-
* */
|
|
48
|
-
beforeClose?: funtion | PropType<SwipeActionBeforeClose>
|
|
49
|
-
/**
|
|
50
|
-
* @description 定义需要用到的外部样式
|
|
51
|
-
* */
|
|
52
|
-
customStyle?: CSSProperties
|
|
53
|
-
}
|
|
54
|
-
|
|
55
18
|
export interface ISwipeActionEmits {
|
|
56
19
|
/** 当滑动按钮打开时,点击整个滑动操作容器触发 click 事件 */
|
|
57
20
|
(e: 'click', value: SwipeActionPosition): void
|
|
@@ -1,104 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HySwiperProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 轮播图数据
|
|
6
|
-
* */
|
|
7
|
-
list: (string | Record<string, unknown>)[]
|
|
8
|
-
/**
|
|
9
|
-
* @description list数组中指定对象的目标属性名(默认 'url' )
|
|
10
|
-
* */
|
|
11
|
-
keyName?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 是否显示面板指示器(默认 false )
|
|
14
|
-
* */
|
|
15
|
-
indicator?: boolean
|
|
16
|
-
/**
|
|
17
|
-
* @description 指示器非激活颜色(默认 '#FFFFFF' )
|
|
18
|
-
* */
|
|
19
|
-
indicatorActiveColor?: string
|
|
20
|
-
/**
|
|
21
|
-
* @description 指示器的激活颜色(默认 'rgba(255, 255, 255, 0.35)' )
|
|
22
|
-
* */
|
|
23
|
-
indicatorInactiveColor?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 指示器样式,可通过bottom,left,right进行定位
|
|
26
|
-
* */
|
|
27
|
-
indicatorStyle?: CSSProperties
|
|
28
|
-
/**
|
|
29
|
-
* @description 指示器模式(默认 'line' )
|
|
30
|
-
* */
|
|
31
|
-
indicatorMode?: HyApp.SwiperIndicatorModeType
|
|
32
|
-
/**
|
|
33
|
-
* @description 是否自动切换(默认 true )
|
|
34
|
-
* */
|
|
35
|
-
autoplay?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 当前所在滑块的 index(默认 0 )
|
|
38
|
-
* */
|
|
39
|
-
current?: number | string
|
|
40
|
-
/**
|
|
41
|
-
* @description 当前所在滑块的 item-id ,不能与 current 被同时指定
|
|
42
|
-
* */
|
|
43
|
-
currentItemId?: string
|
|
44
|
-
/**
|
|
45
|
-
* @description 滑块自动切换时间间隔(ms)(默认 3000 )
|
|
46
|
-
* */
|
|
47
|
-
interval?: number
|
|
48
|
-
/**
|
|
49
|
-
* @description 滑块切换过程所需时间(ms)(默认 300 )
|
|
50
|
-
* */
|
|
51
|
-
duration?: number
|
|
52
|
-
/**
|
|
53
|
-
* @description 播放到末尾后是否重新回到开头(默认 false )
|
|
54
|
-
* */
|
|
55
|
-
circular?: boolean
|
|
56
|
-
/**
|
|
57
|
-
* @description 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持(默认 0 )
|
|
58
|
-
* */
|
|
59
|
-
previousMargin?: number | string
|
|
60
|
-
/**
|
|
61
|
-
* @description 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持(默认 0 )
|
|
62
|
-
* */
|
|
63
|
-
nextMargin?: number | string
|
|
64
|
-
/**
|
|
65
|
-
* @description 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持(默认 false )
|
|
66
|
-
* */
|
|
67
|
-
acceleration?: boolean
|
|
68
|
-
/**
|
|
69
|
-
* @description 同时显示的滑块数量,nvue、支付宝小程序不支持(默认 1 )
|
|
70
|
-
* */
|
|
71
|
-
displayMultipleItems?: number
|
|
72
|
-
/**
|
|
73
|
-
* @description 指定swiper切换缓动动画类型, 只对微信小程序有效(默认 'default' )
|
|
74
|
-
* */
|
|
75
|
-
easingFunction?: string
|
|
76
|
-
/**
|
|
77
|
-
* @description 图片的裁剪模式(默认 'aspectFill' )
|
|
78
|
-
* */
|
|
79
|
-
imgMode?: HyApp.ImageModeVo
|
|
80
|
-
/**
|
|
81
|
-
* @description 组件高度(默认 130 )
|
|
82
|
-
* */
|
|
83
|
-
height?: number
|
|
84
|
-
/**
|
|
85
|
-
* @description 背景颜色(默认 '#f3f4f6' )
|
|
86
|
-
* */
|
|
87
|
-
bgColor?: string
|
|
88
|
-
/**
|
|
89
|
-
* @description 组件圆角,数值或带单位的字符串(默认 4 )
|
|
90
|
-
* */
|
|
91
|
-
radius?: number | string
|
|
92
|
-
/**
|
|
93
|
-
* @description 是否加载中(默认 false )
|
|
94
|
-
* */
|
|
95
|
-
loading?: boolean
|
|
96
|
-
/**
|
|
97
|
-
* @description 是否显示标题,要求数组对象中有title属性(默认 false )
|
|
98
|
-
* */
|
|
99
|
-
showTitle?: boolean
|
|
100
|
-
}
|
|
101
|
-
|
|
102
1
|
export interface SwiperList {
|
|
103
2
|
[key: string]: any
|
|
104
3
|
/** 线上地址 */
|
|
@@ -1,65 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
import type IconProps from '../hy-icon/typing'
|
|
3
|
-
|
|
4
|
-
export default interface HySwitchProps {
|
|
5
|
-
/**
|
|
6
|
-
* @description 通过v-model双向绑定的值 (默认 false )
|
|
7
|
-
* */
|
|
8
|
-
modelValue: boolean | string | number
|
|
9
|
-
/**
|
|
10
|
-
* @description 是否处于加载中(默认 false )
|
|
11
|
-
* */
|
|
12
|
-
loading?: boolean
|
|
13
|
-
/**
|
|
14
|
-
* @description 是否禁用(默认 false )
|
|
15
|
-
* */
|
|
16
|
-
disabled?: boolean
|
|
17
|
-
/**
|
|
18
|
-
* @description 开关尺寸,单位px (默认 25 )
|
|
19
|
-
* */
|
|
20
|
-
size?: HyApp.SizeType | string | number
|
|
21
|
-
/**
|
|
22
|
-
* @description 打开时的背景色 (默认 '#2979ff' )
|
|
23
|
-
* */
|
|
24
|
-
activeColor?: string
|
|
25
|
-
/**
|
|
26
|
-
* @description 关闭时的背景色 (默认 '#ffffff' )
|
|
27
|
-
* */
|
|
28
|
-
inactiveColor?: string
|
|
29
|
-
/**
|
|
30
|
-
* @description 打开选择器时通过change事件发出的值 (默认 true )
|
|
31
|
-
* */
|
|
32
|
-
activeValue?: boolean | string | number
|
|
33
|
-
/**
|
|
34
|
-
* @description 关闭选择器时通过change事件发出的值 (默认 false )
|
|
35
|
-
* */
|
|
36
|
-
inactiveValue?: boolean | string | number
|
|
37
|
-
/**
|
|
38
|
-
* @description 打开选择器时图标
|
|
39
|
-
* */
|
|
40
|
-
activeIcon?: string
|
|
41
|
-
/**
|
|
42
|
-
* @description 关闭选择器时图标
|
|
43
|
-
* */
|
|
44
|
-
inactiveIcon?: string
|
|
45
|
-
/**
|
|
46
|
-
* @description 图标
|
|
47
|
-
* */
|
|
48
|
-
icon?: IconProps
|
|
49
|
-
/**
|
|
50
|
-
* @description 是否开启异步变更,开启后需要手动控制输入值 (默认 false )
|
|
51
|
-
* */
|
|
52
|
-
asyncChange?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* @description 圆点与外边框的距离 (默认 0 )
|
|
55
|
-
* */
|
|
56
|
-
space?: number
|
|
57
|
-
/**
|
|
58
|
-
* @description 定义需要用到的外部样式
|
|
59
|
-
* */
|
|
60
|
-
customStyle?: CSSProperties
|
|
61
|
-
}
|
|
62
|
-
|
|
63
1
|
export type SwitchValue = boolean | number | string
|
|
64
2
|
|
|
65
3
|
export interface ISwitchEmits {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type HyBadgeProps from '../hy-badge/typing'
|
|
2
|
-
|
|
3
1
|
export interface TabListVo {
|
|
4
2
|
/**
|
|
5
3
|
* @description 标题
|
|
@@ -15,44 +13,6 @@ export interface TabListVo {
|
|
|
15
13
|
badge?: number
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
export 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
|
-
}
|
|
55
|
-
|
|
56
16
|
export interface ITabBarEmits {
|
|
57
17
|
/** 更新选中索引 */
|
|
58
18
|
(e: 'update:modelValue', index: number): void
|
|
@@ -8,15 +8,3 @@ export interface ITabbarConfig extends TabBarGroupProps {
|
|
|
8
8
|
/** 获取默认唯一值,递增 */
|
|
9
9
|
getIndex: () => number
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
// ITabBarItemEmits 接口定义组件的自定义事件
|
|
13
|
-
export interface ITabBarItemEmits {
|
|
14
|
-
// 点击事件
|
|
15
|
-
(e: 'click', value: number): void
|
|
16
|
-
// 激活事件
|
|
17
|
-
(e: 'active', value: number): void
|
|
18
|
-
// 变化事件
|
|
19
|
-
(e: 'change', value: number): void
|
|
20
|
-
// 更新激活状态事件
|
|
21
|
-
(e: 'update:active', active: boolean): void
|
|
22
|
-
}
|
|
@@ -1,100 +1,33 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
1
|
import BadgeProps from '../hy-badge/typing'
|
|
3
2
|
export interface TabsItemVo extends AnyObject {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
export default interface HyTabsProps {
|
|
22
|
-
/**
|
|
23
|
-
* @description 标签数组,元素为对象,如[{name: '推荐'}]
|
|
24
|
-
* */
|
|
25
|
-
list: TabsItemVo[]
|
|
26
|
-
/**
|
|
27
|
-
* @description 当前选中标签的索引
|
|
28
|
-
* */
|
|
29
|
-
current?: number
|
|
30
|
-
/**
|
|
31
|
-
* @description 从list元素对象中读取的键名
|
|
32
|
-
* */
|
|
33
|
-
keyName?: string
|
|
34
|
-
/**
|
|
35
|
-
* @description 滑块移动一次所需的时间,单位秒(默认 200 )
|
|
36
|
-
* */
|
|
37
|
-
duration?: number
|
|
38
|
-
/**
|
|
39
|
-
* @description 滑块颜色
|
|
40
|
-
* */
|
|
41
|
-
lineColor?: string
|
|
42
|
-
/**
|
|
43
|
-
* @description 菜单选择中时的样式
|
|
44
|
-
* */
|
|
45
|
-
activeStyle?: CSSProperties
|
|
46
|
-
/**
|
|
47
|
-
* @description 菜单非选中时的样式
|
|
48
|
-
* */
|
|
49
|
-
inactiveStyle?: CSSProperties
|
|
50
|
-
/**
|
|
51
|
-
* @description 滑块长度(默认20)
|
|
52
|
-
* */
|
|
53
|
-
lineWidth?: number | string
|
|
54
|
-
/**
|
|
55
|
-
* @description 滑块高度(默认3)
|
|
56
|
-
* */
|
|
57
|
-
lineHeight?: number | string
|
|
58
|
-
/**
|
|
59
|
-
* @description 滑块背景显示大小,当滑块背景设置为图片时使用
|
|
60
|
-
* */
|
|
61
|
-
lineBgSize?: number | string
|
|
62
|
-
/**
|
|
63
|
-
* @description 菜单item的样式
|
|
64
|
-
* */
|
|
65
|
-
itemStyle?: CSSProperties
|
|
66
|
-
/**
|
|
67
|
-
* @description 菜单是否可滚动
|
|
68
|
-
* */
|
|
69
|
-
scrollable?: boolean
|
|
70
|
-
/**
|
|
71
|
-
* @description 徽标props全局定义
|
|
72
|
-
* */
|
|
73
|
-
propsBadge?: BadgeProps
|
|
74
|
-
/**
|
|
75
|
-
* @description 轮播图高度
|
|
76
|
-
* */
|
|
77
|
-
swiperHeight?: string | number
|
|
78
|
-
/**
|
|
79
|
-
* @description 标签左侧图标样式自定义
|
|
80
|
-
* */
|
|
81
|
-
iconStyle?: CSSProperties
|
|
82
|
-
/**
|
|
83
|
-
* @description 定义需要用到的外部样式
|
|
84
|
-
* */
|
|
85
|
-
customStyle?: CSSProperties
|
|
3
|
+
/**
|
|
4
|
+
* @description tab名称
|
|
5
|
+
* */
|
|
6
|
+
name: string
|
|
7
|
+
/**
|
|
8
|
+
* @description 徽标接收的props
|
|
9
|
+
* */
|
|
10
|
+
badge?: BadgeProps
|
|
11
|
+
/**
|
|
12
|
+
* @description 是否禁用
|
|
13
|
+
* */
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
/**
|
|
16
|
+
* @description swiper内容值
|
|
17
|
+
* */
|
|
18
|
+
content?: any
|
|
86
19
|
}
|
|
87
20
|
|
|
88
21
|
export interface TabsParamsVo extends TabsParamsVo {
|
|
89
|
-
|
|
22
|
+
index: number
|
|
90
23
|
}
|
|
91
24
|
export interface ITabsEmits {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
25
|
+
/** 点击标签时触发 */
|
|
26
|
+
(e: 'click', params: TabsParamsVo): void
|
|
27
|
+
/** 标签索引改变时触发 */
|
|
28
|
+
(e: 'change', item: TabsItemVo, index: number): void
|
|
29
|
+
/** 长按标签时触发 */
|
|
30
|
+
(e: 'longPress', params: TabsParamsVo): void
|
|
31
|
+
/** 标签索引改变时触发 */
|
|
32
|
+
(e: 'update:current', index: number): void
|
|
100
33
|
}
|