feat(Cascader): add swipeable prop (#8383)
This commit is contained in:
@@ -48,6 +48,10 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: 'cross',
|
||||
},
|
||||
swipeable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
|
||||
emits: ['close', 'change', 'finish', 'update:modelValue'],
|
||||
@@ -243,10 +247,10 @@ export default defineComponent({
|
||||
<Tabs
|
||||
v-model={[state.activeTab, 'active']}
|
||||
animated
|
||||
swipeable
|
||||
swipeThreshold={0}
|
||||
class={bem('tabs')}
|
||||
color={props.activeColor}
|
||||
swipeThreshold={0}
|
||||
swipeable={props.swipeable}
|
||||
>
|
||||
{state.tabs.map(renderTab)}
|
||||
</Tabs>
|
||||
|
||||
@@ -204,6 +204,7 @@ export default {
|
||||
| options | Options | _Option[]_ | `[]` |
|
||||
| placeholder | Placeholder of unselected tab | _string_ | `Select` |
|
||||
| active-color | Active color | _string_ | `#ee0a24` |
|
||||
| swipeable `v3.0.11` | Whether to enable gestures to slide left and right | _boolean_ | `false` |
|
||||
| closeable | Whether to show close icon | _boolean_ | `true` |
|
||||
| close-icon `v3.0.10` | Close icon name | _string_ | `cross` |
|
||||
| field-names `v3.0.4` | Custom the fields of options | _object_ | `{ text: 'text', value: 'value', children: 'children' }` |
|
||||
|
||||
@@ -218,6 +218,7 @@ export default {
|
||||
| options | 可选项数据源 | _Option[]_ | `[]` |
|
||||
| placeholder | 未选中时的提示文案 | _string_ | `请选择` |
|
||||
| active-color | 选中状态的高亮颜色 | _string_ | `#ee0a24` |
|
||||
| swipeable `v3.0.11` | 是否开启手势左右滑动切换 | _boolean_ | `false` |
|
||||
| closeable | 是否显示关闭图标 | _boolean_ | `true` |
|
||||
| close-icon `v3.0.10` | 关闭[图标名称](#/zh-CN/icon)或图片链接 | _string_ | `cross` |
|
||||
| field-names `v3.0.4` | 自定义 `options` 结构中的字段 | _object_ | `{ text: 'text', value: 'value', children: 'children' }` |
|
||||
|
||||
Reference in New Issue
Block a user