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,326 +0,0 @@
|
|
|
1
|
-
# Hy Tabbar 组件
|
|
2
|
-
|
|
3
|
-
## 介绍
|
|
4
|
-
|
|
5
|
-
Tabbar 是一个底部标签导航组件,用于在应用不同页面之间进行快速切换。支持自定义样式、图标、文字、徽章、激活状态和路由跳转等功能。
|
|
6
|
-
|
|
7
|
-
## 组件关系
|
|
8
|
-
|
|
9
|
-
- `hy-tabbar-group`: 作为容器,管理多个 tabbar-item
|
|
10
|
-
- `hy-tabbar-item`: 作为单个标签项,包含图标、文字和徽章等元素
|
|
11
|
-
|
|
12
|
-
## 引入方式
|
|
13
|
-
|
|
14
|
-
### 全局引入
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
// 在 main.ts 或 index.ts 中引入
|
|
18
|
-
import { createApp } from 'vue'
|
|
19
|
-
import App from './App.vue'
|
|
20
|
-
import HyDesignUni from '@/package'
|
|
21
|
-
|
|
22
|
-
const app = createApp(App)
|
|
23
|
-
app.use(HyDesignUni)
|
|
24
|
-
app.mount('#app')
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### 局部引入
|
|
28
|
-
|
|
29
|
-
```vue
|
|
30
|
-
<template>
|
|
31
|
-
<hy-tabbar-group v-model="current">
|
|
32
|
-
<hy-tabbar-item index="0" icon="home" text="首页"></hy-tabbar-item>
|
|
33
|
-
<hy-tabbar-item index="1" icon="discover" text="发现"></hy-tabbar-item>
|
|
34
|
-
</hy-tabbar-group>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script setup lang="ts">
|
|
38
|
-
import { ref } from 'vue'
|
|
39
|
-
import HyTabbarGroup from '@/package/components/hy-tabbar-group/hy-tabbar-group.vue'
|
|
40
|
-
import HyTabbarItem from '@/package/components/hy-tabbar-item/hy-tabbar-item.vue'
|
|
41
|
-
|
|
42
|
-
const current = ref('0')
|
|
43
|
-
</script>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## HyTabbarGroup API
|
|
47
|
-
|
|
48
|
-
### Props
|
|
49
|
-
|
|
50
|
-
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|
|
51
|
-
| --- | --- | --- | --- | --- |
|
|
52
|
-
| v-model | `string \| number` | - | 是 | 当前选中项的索引 |
|
|
53
|
-
| fixed | `boolean` | `false` | 否 | 是否固定在底部 |
|
|
54
|
-
| safe-area-inset-bottom | `boolean` | `false` | 否 | 是否适配底部安全区域 |
|
|
55
|
-
| background | `string` | `#fff` | 否 | 背景色 |
|
|
56
|
-
| height | `string \| number` | `50px` | 否 | 高度 |
|
|
57
|
-
| border-style | `string` | - | 否 | 边框样式,可选值:`solid`、`dashed`、`dotted` |
|
|
58
|
-
| shadow-level | `0 \| 1 \| 2 \| 3` | `0` | 否 | 阴影等级 |
|
|
59
|
-
| active-color | `string` | `#1677ff` | 否 | 激活状态颜色 |
|
|
60
|
-
| inactive-color | `string` | `#606266` | 否 | 非激活状态颜色 |
|
|
61
|
-
| icon-size | `string \| number` | `24` | 否 | 图标大小 |
|
|
62
|
-
| fontSize | `string \| number` | `12` | 否 | 文字大小 |
|
|
63
|
-
| icon-text-space | `string \| number` | `4` | 否 | 图标与文字间距 |
|
|
64
|
-
| indicator-mode | `'none' \| 'bottom' \| 'top' \| 'full'` | `'none'` | 否 | 指示器模式 |
|
|
65
|
-
| indicator-color | `string` | `#1677ff` | 否 | 指示器颜色 |
|
|
66
|
-
| indicator-height | `string \| number` | `3px` | 否 | 指示器高度 |
|
|
67
|
-
| indicator-length | `string \| number` | `20px` | 否 | 指示器长度 |
|
|
68
|
-
| indicator-radius | `string \| number` | `4px` | 否 | 指示器圆角 |
|
|
69
|
-
| transition-duration | `string \| number` | `300` | 否 | 过渡动画时长 |
|
|
70
|
-
| customClass | `string` | - | 否 | 自定义类名 |
|
|
71
|
-
| customStyle | `object` | - | 否 | 自定义样式 |
|
|
72
|
-
| activeClass | `string` | - | 否 | 激活时的自定义类名 |
|
|
73
|
-
|
|
74
|
-
### Events
|
|
75
|
-
|
|
76
|
-
| 事件名 | 说明 | 回调参数 |
|
|
77
|
-
| --- | --- | --- |
|
|
78
|
-
| click | 点击标签项时触发 | `index: string \| number` | 选中项的索引 |
|
|
79
|
-
| change | 选中项改变时触发 | `index: string \| number` | 选中项的索引 |
|
|
80
|
-
| active | 选中项被激活时触发 | `index: string \| number` | 选中项的索引 |
|
|
81
|
-
| update:active | 更新激活状态时触发 | `index: string \| number` | 选中项的索引 |
|
|
82
|
-
|
|
83
|
-
### Slots
|
|
84
|
-
|
|
85
|
-
| 名称 | 说明 | 子标签 |
|
|
86
|
-
| --- | --- | --- |
|
|
87
|
-
| default | 容纳 hy-tabbar-item 子组件 | `<hy-tabbar-item>` |
|
|
88
|
-
|
|
89
|
-
### Expose
|
|
90
|
-
|
|
91
|
-
| 方法名 | 说明 | 参数 |
|
|
92
|
-
| --- | --- | --- |
|
|
93
|
-
| selectItem | 选中指定标签项 | `index: string \| number` | 要选中的索引 |
|
|
94
|
-
| updateRectInfo | 更新位置信息 | - |
|
|
95
|
-
| registerTabItem | 注册标签项 | `item: object` | 标签项信息 |
|
|
96
|
-
| unregisterTabItem | 注销标签项 | `item: object` | 标签项信息 |
|
|
97
|
-
| handleClick | 处理点击事件 | `index: string \| number` | 点击的索引 |
|
|
98
|
-
|
|
99
|
-
## HyTabbarItem API
|
|
100
|
-
|
|
101
|
-
### Props
|
|
102
|
-
|
|
103
|
-
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|
|
104
|
-
| --- | --- | --- | --- | --- |
|
|
105
|
-
| index | `string \| number` | - | 是 | 标签项的索引 |
|
|
106
|
-
| icon | `string` | - | 否 | 图标名称 |
|
|
107
|
-
| text | `string` | - | 否 | 文字内容 |
|
|
108
|
-
| route | `string` | - | 否 | 路由路径 |
|
|
109
|
-
| show-icon | `boolean` | `true` | 否 | 是否显示图标 |
|
|
110
|
-
| hide-text | `boolean` | `false` | 否 | 是否隐藏文字 |
|
|
111
|
-
| disabled | `boolean` | `false` | 否 | 是否禁用 |
|
|
112
|
-
| click-effect | `'none' \| 'feedback' \| 'ripple'` | `'none'` | 否 | 点击效果 |
|
|
113
|
-
| ripple-duration | `string` | `'300ms'` | 否 | 波纹动画时长 |
|
|
114
|
-
| width | `string \| number` | - | 否 | 宽度 |
|
|
115
|
-
| height | `string \| number` | - | 否 | 高度 |
|
|
116
|
-
| show-active-bg | `boolean` | `false` | 否 | 是否显示激活背景 |
|
|
117
|
-
| active-bg-color | `string` | - | 否 | 激活背景颜色 |
|
|
118
|
-
| icon-color | `string` | - | 否 | 图标颜色 |
|
|
119
|
-
| active-icon-color | `string` | - | 否 | 激活时图标颜色 |
|
|
120
|
-
| inactive-icon-color | `string` | - | 否 | 非激活时图标颜色 |
|
|
121
|
-
| text-color | `string` | - | 否 | 文字颜色 |
|
|
122
|
-
| active-text-color | `string` | - | 否 | 激活时文字颜色 |
|
|
123
|
-
| inactive-text-color | `string` | - | 否 | 非激活时文字颜色 |
|
|
124
|
-
| icon-size | `string \| number` | `24` | 否 | 图标大小 |
|
|
125
|
-
| icon-text-space | `string \| number` | `4` | 否 | 图标与文字间距 |
|
|
126
|
-
| badge | `string \| number \| null` | - | 否 | 徽章内容 |
|
|
127
|
-
| badge-offset | `[number, number]` | `[0, 0]` | 否 | 徽章偏移量 |
|
|
128
|
-
| badge-max | `number` | `99` | 否 | 徽章最大值 |
|
|
129
|
-
| badge-is-dot | `boolean` | `false` | 否 | 是否显示为点 |
|
|
130
|
-
| badge-inverted | `boolean` | `false` | 否 | 是否使用浅色背景 |
|
|
131
|
-
| badge-bg-color | `string` | `#ff4d4f` | 否 | 徽章背景色 |
|
|
132
|
-
| badge-text-color | `string` | `#fff` | 否 | 徽章文字颜色 |
|
|
133
|
-
| badge-show-zero | `boolean` | `false` | 否 | 徽章为0时是否显示 |
|
|
134
|
-
| customClass | `string` | - | 否 | 自定义类名 |
|
|
135
|
-
| customStyle | `object` | - | 否 | 自定义样式 |
|
|
136
|
-
| activeClass | `string` | - | 否 | 激活时的自定义类名 |
|
|
137
|
-
|
|
138
|
-
### Events
|
|
139
|
-
|
|
140
|
-
| 事件名 | 说明 | 回调参数 |
|
|
141
|
-
| --- | --- | --- |
|
|
142
|
-
| click | 点击标签项时触发 | `{ index, icon, text }` | 标签项信息 |
|
|
143
|
-
| active | 标签项被激活时触发 | `index: string \| number` | 标签项索引 |
|
|
144
|
-
| change | 标签项状态改变时触发 | `index: string \| number` | 标签项索引 |
|
|
145
|
-
| update:active | 更新激活状态时触发 | `index: string \| number` | 标签项索引 |
|
|
146
|
-
|
|
147
|
-
### Slots
|
|
148
|
-
|
|
149
|
-
| 名称 | 说明 |
|
|
150
|
-
| --- | --- |
|
|
151
|
-
| default | 自定义文字内容 |
|
|
152
|
-
| icon | 自定义图标内容 |
|
|
153
|
-
|
|
154
|
-
## 使用示例
|
|
155
|
-
|
|
156
|
-
### 基础用法
|
|
157
|
-
|
|
158
|
-
```vue
|
|
159
|
-
<hy-tabbar-group v-model="current">
|
|
160
|
-
<hy-tabbar-item index="0" icon="home" text="首页"></hy-tabbar-item>
|
|
161
|
-
<hy-tabbar-item index="1" icon="discover" text="发现"></hy-tabbar-item>
|
|
162
|
-
<hy-tabbar-item index="2" icon="shopping-cart" text="购物车"></hy-tabbar-item>
|
|
163
|
-
<hy-tabbar-item index="3" icon="user" text="我的"></hy-tabbar-item>
|
|
164
|
-
</hy-tabbar-group>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### 固定在底部
|
|
168
|
-
|
|
169
|
-
```vue
|
|
170
|
-
<hy-tabbar-group
|
|
171
|
-
v-model="current"
|
|
172
|
-
fixed
|
|
173
|
-
safe-area-inset-bottom
|
|
174
|
-
background="#fff"
|
|
175
|
-
border-style="solid"
|
|
176
|
-
>
|
|
177
|
-
<hy-tabbar-item index="0" icon="home" text="首页"></hy-tabbar-item>
|
|
178
|
-
<hy-tabbar-item index="1" icon="discover" text="发现"></hy-tabbar-item>
|
|
179
|
-
</hy-tabbar-group>
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### 添加徽章
|
|
183
|
-
|
|
184
|
-
```vue
|
|
185
|
-
<hy-tabbar-group v-model="current">
|
|
186
|
-
<hy-tabbar-item index="0" icon="home" text="首页"></hy-tabbar-item>
|
|
187
|
-
<hy-tabbar-item index="1" icon="message" text="消息" :badge="5"></hy-tabbar-item>
|
|
188
|
-
<hy-tabbar-item index="2" icon="notification" text="通知" badge-is-dot></hy-tabbar-item>
|
|
189
|
-
</hy-tabbar-group>
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### 自定义激活样式
|
|
193
|
-
|
|
194
|
-
```vue
|
|
195
|
-
<hy-tabbar-group
|
|
196
|
-
v-model="current"
|
|
197
|
-
active-color="#ff6b81"
|
|
198
|
-
>
|
|
199
|
-
<hy-tabbar-item
|
|
200
|
-
index="0"
|
|
201
|
-
icon="home"
|
|
202
|
-
text="首页"
|
|
203
|
-
show-active-bg
|
|
204
|
-
active-bg-color="rgba(255, 107, 129, 0.1)"
|
|
205
|
-
></hy-tabbar-item>
|
|
206
|
-
<hy-tabbar-item
|
|
207
|
-
index="1"
|
|
208
|
-
icon="discover"
|
|
209
|
-
text="发现"
|
|
210
|
-
show-active-bg
|
|
211
|
-
active-bg-color="rgba(255, 107, 129, 0.1)"
|
|
212
|
-
></hy-tabbar-item>
|
|
213
|
-
</hy-tabbar-group>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### 点击效果
|
|
217
|
-
|
|
218
|
-
```vue
|
|
219
|
-
<hy-tabbar-group v-model="current">
|
|
220
|
-
<hy-tabbar-item
|
|
221
|
-
index="0"
|
|
222
|
-
icon="home"
|
|
223
|
-
text="首页"
|
|
224
|
-
click-effect="ripple"
|
|
225
|
-
></hy-tabbar-item>
|
|
226
|
-
<hy-tabbar-item
|
|
227
|
-
index="1"
|
|
228
|
-
icon="discover"
|
|
229
|
-
text="发现"
|
|
230
|
-
click-effect="feedback"
|
|
231
|
-
></hy-tabbar-item>
|
|
232
|
-
</hy-tabbar-group>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### 路由跳转
|
|
236
|
-
|
|
237
|
-
```vue
|
|
238
|
-
<hy-tabbar-group v-model="current">
|
|
239
|
-
<hy-tabbar-item
|
|
240
|
-
index="0"
|
|
241
|
-
icon="home"
|
|
242
|
-
text="首页"
|
|
243
|
-
route="/pages/index/index"
|
|
244
|
-
></hy-tabbar-item>
|
|
245
|
-
<hy-tabbar-item
|
|
246
|
-
index="1"
|
|
247
|
-
icon="mine"
|
|
248
|
-
text="我的"
|
|
249
|
-
route="/pages/mine/index"
|
|
250
|
-
></hy-tabbar-item>
|
|
251
|
-
</hy-tabbar-group>
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### 指示器模式
|
|
255
|
-
|
|
256
|
-
```vue
|
|
257
|
-
<hy-tabbar-group
|
|
258
|
-
v-model="current"
|
|
259
|
-
indicator-mode="bottom"
|
|
260
|
-
indicator-color="#1677ff"
|
|
261
|
-
indicator-height="3px"
|
|
262
|
-
>
|
|
263
|
-
<hy-tabbar-item index="0" icon="home" text="首页"></hy-tabbar-item>
|
|
264
|
-
<hy-tabbar-item index="1" icon="discover" text="发现"></hy-tabbar-item>
|
|
265
|
-
</hy-tabbar-group>
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
## 多端兼容性说明
|
|
269
|
-
|
|
270
|
-
### H5 端
|
|
271
|
-
- 支持 `vue-router` 路由跳转
|
|
272
|
-
- 支持完整的触摸反馈和波纹效果
|
|
273
|
-
- 支持所有 CSS 动画和过渡效果
|
|
274
|
-
|
|
275
|
-
### 小程序端
|
|
276
|
-
- 使用 `uni.navigateTo` 进行路由跳转
|
|
277
|
-
- 优化了触摸事件处理,确保流畅的交互体验
|
|
278
|
-
- 适配小程序的样式和布局特性
|
|
279
|
-
|
|
280
|
-
### APP 端
|
|
281
|
-
- 支持原生的触摸事件
|
|
282
|
-
- 优化了性能,减少不必要的渲染
|
|
283
|
-
- 适配不同设备的屏幕尺寸和安全区域
|
|
284
|
-
|
|
285
|
-
## 常见问题
|
|
286
|
-
|
|
287
|
-
### 1. 如何实现标签项的动态增减?
|
|
288
|
-
|
|
289
|
-
通过 `v-if` 或 `v-for` 动态渲染 `hy-tabbar-item` 组件,组件会自动注册和注销。
|
|
290
|
-
|
|
291
|
-
### 2. 如何自定义图标?
|
|
292
|
-
|
|
293
|
-
可以使用 `icon` slot 来自定义图标内容,例如:
|
|
294
|
-
|
|
295
|
-
```vue
|
|
296
|
-
<hy-tabbar-item index="0" text="首页">
|
|
297
|
-
<template #icon>
|
|
298
|
-
<image src="/static/custom-icon.png" style="width: 24px; height: 24px;"></image>
|
|
299
|
-
</template>
|
|
300
|
-
</hy-tabbar-item>
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### 3. 如何处理路由跳转?
|
|
304
|
-
|
|
305
|
-
设置 `route` 属性,组件会根据不同端自动选择合适的跳转方式。
|
|
306
|
-
|
|
307
|
-
### 4. 如何适配 iPhone 的底部安全区域?
|
|
308
|
-
|
|
309
|
-
设置 `safe-area-inset-bottom` 属性为 `true`。
|
|
310
|
-
|
|
311
|
-
### 5. 如何自定义徽章样式?
|
|
312
|
-
|
|
313
|
-
使用 `badge-*` 系列属性可以自定义徽章的各种样式,如颜色、大小、位置等。
|
|
314
|
-
|
|
315
|
-
## 组件源码
|
|
316
|
-
|
|
317
|
-
- [hy-tabbar-group](https://github.com/example/hy-design-uni/blob/main/src/package/components/hy-tabbar-group)
|
|
318
|
-
- [hy-tabbar-item](https://github.com/example/hy-design-uni/blob/main/src/package/components/hy-tabbar-item)
|
|
319
|
-
|
|
320
|
-
## 更新日志
|
|
321
|
-
|
|
322
|
-
### v1.0.0
|
|
323
|
-
- 初始版本发布
|
|
324
|
-
- 支持基础的 tabbar 功能
|
|
325
|
-
- 支持自定义样式和交互效果
|
|
326
|
-
- 支持多端适配
|
|
@@ -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
|
-
}
|