|
36 | 36 | import { useToast } from '@/uni_modules/wot-design-uni' |
37 | 37 | const { show: showToast } = useToast() |
38 | 38 | const type = ref<'primary' | 'success' | 'info' | 'warning' | 'error' | 'default'>('primary') |
39 | | -const position = ref<'left-top' | 'right-top' | 'left-bottom' | 'right-bottom'>('left-bottom') |
| 39 | +const position = ref<'left-top' |
| 40 | + | 'right-top' |
| 41 | + | 'left-bottom' |
| 42 | + | 'right-bottom' |
| 43 | + | 'left-center' |
| 44 | + | 'right-center' |
| 45 | + | 'top-center' |
| 46 | + | 'bottom-center'>('left-bottom') |
40 | 47 | const direction = ref<'top' | 'right' | 'bottom' | 'left'>('top') |
41 | 48 | const disabled = ref<boolean>(false) |
42 | 49 | ``` |
@@ -100,20 +107,20 @@ const handleClick = () => { |
100 | 107 |
|
101 | 108 | ## Attributes |
102 | 109 |
|
103 | | -| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 | |
104 | | -| -------------- | ----------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------- | ---------------------------------------------- | ---------------- | |
105 | | -| v-model:active | 是否激活 | boolean | - | false | 0.1.57 | |
106 | | -| type | 类型 | FabType | 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' | 'primary' | 0.1.57 | |
107 | | -| position | 悬浮按钮位置 | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'right-bottom' | 0.1.57 | |
108 | | -| draggable | 按钮能否拖动 | boolean | | false | 1.2.19 | |
109 | | -| direction | 悬浮按钮菜单弹出方向 | FabDirection | 'top' | 'right' | 'bottom' | 'left' | 'top' | 0.1.57 | |
110 | | -| disabled | 是否禁用 | boolean | - | false | 0.1.57 | |
111 | | -| inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 | |
112 | | -| activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 | |
113 | | -| zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 | |
114 | | -| gap | 自定义悬浮按钮与可视区域边缘的间距 | FabGap | - | \{ top: 16, left: 16, right: 16, bottom: 16 \} | 1.2.26 | |
115 | | -| customStyle | 自定义样式 | string | - | '' | 0.1.57 | |
116 | | -| expandable | 用于控制点击时是否展开菜单,设置为 false 时触发 click | boolean | - | true | 1.3.11 | |
| 110 | +| 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 | |
| 111 | +| -------------- | ----------------------------------------------------- | ------------ |-------------------------------------------------------------------------------------------------------------------------------------------| ---------------------------------------------- | ---------------- | |
| 112 | +| v-model:active | 是否激活 | boolean | - | false | 0.1.57 | |
| 113 | +| type | 类型 | FabType | 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' | 'primary' | 0.1.57 | |
| 114 | +| position | 悬浮按钮位置 | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | left-center | right-center | top-center | bottom-center | 'right-bottom' | 0.1.57 | |
| 115 | +| draggable | 按钮能否拖动 | boolean | | false | 1.2.19 | |
| 116 | +| direction | 悬浮按钮菜单弹出方向 | FabDirection | 'top' | 'right' | 'bottom' | 'left' | 'top' | 0.1.57 | |
| 117 | +| disabled | 是否禁用 | boolean | - | false | 0.1.57 | |
| 118 | +| inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 | |
| 119 | +| activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 | |
| 120 | +| zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 | |
| 121 | +| gap | 自定义悬浮按钮与可视区域边缘的间距 | FabGap | - | \{ top: 16, left: 16, right: 16, bottom: 16 \} | 1.2.26 | |
| 122 | +| customStyle | 自定义样式 | string | - | '' | 0.1.57 | |
| 123 | +| expandable | 用于控制点击时是否展开菜单,设置为 false 时触发 click | boolean | - | true | 1.3.11 | |
117 | 124 |
|
118 | 125 | ## Events |
119 | 126 |
|
|
0 commit comments