提交 | 用户 | 时间
|
820397
|
1 |
import { DiyComponent } from '@/components/DiyEditor/util' |
H |
2 |
|
|
3 |
// 悬浮按钮属性 |
|
4 |
export interface FloatingActionButtonProperty { |
|
5 |
// 展开方向 |
|
6 |
direction: 'horizontal' | 'vertical' |
|
7 |
// 是否显示文字 |
|
8 |
showText: boolean |
|
9 |
// 按钮列表 |
|
10 |
list: FloatingActionButtonItemProperty[] |
|
11 |
} |
|
12 |
|
|
13 |
// 悬浮按钮项属性 |
|
14 |
export interface FloatingActionButtonItemProperty { |
|
15 |
// 图片地址 |
|
16 |
imgUrl: string |
|
17 |
// 跳转连接 |
|
18 |
url: string |
|
19 |
// 文字 |
|
20 |
text: string |
|
21 |
// 文字颜色 |
|
22 |
textColor: string |
|
23 |
} |
|
24 |
|
|
25 |
// 定义组件 |
|
26 |
export const component = { |
|
27 |
id: 'FloatingActionButton', |
|
28 |
name: '悬浮按钮', |
|
29 |
icon: 'tabler:float-right', |
|
30 |
position: 'fixed', |
|
31 |
property: { |
|
32 |
direction: 'vertical', |
|
33 |
showText: true, |
|
34 |
list: [{ textColor: '#fff' }] |
|
35 |
} |
|
36 |
} as DiyComponent<FloatingActionButtonProperty> |