♻️(component): [dropdown] placement 更改为 *-start *-end
This commit is contained in:
parent
9a80be4c37
commit
8d2acb70e1
@ -59,7 +59,7 @@ const props = withDefaults(defineProps<LayDropdownProps>(), {
|
|||||||
visible: false,
|
visible: false,
|
||||||
trigger: "click",
|
trigger: "click",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
placement: "bottom-left",
|
placement: "bottom-start",
|
||||||
autoFitPosition: true,
|
autoFitPosition: true,
|
||||||
autoFitMinWidth: true,
|
autoFitMinWidth: true,
|
||||||
autoFitWidth: false,
|
autoFitWidth: false,
|
||||||
@ -265,16 +265,16 @@ const getContentStyle = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getPosition = (placement: DropdownPlacement) => {
|
const getPosition = (placement: DropdownPlacement) => {
|
||||||
if (["top", "top-left", "top-right"].includes(placement)) {
|
if (["top", "top-start", "top-end"].includes(placement)) {
|
||||||
return "top";
|
return "top";
|
||||||
}
|
}
|
||||||
if (["bottom", "bottom-left", "bottom-right"].includes(placement)) {
|
if (["bottom", "bottom-start", "bottom-end"].includes(placement)) {
|
||||||
return "bottom";
|
return "bottom";
|
||||||
}
|
}
|
||||||
if (["left", "left-bottom", "left-top"].includes(placement)) {
|
if (["left", "left-start", "left-end"].includes(placement)) {
|
||||||
return "left";
|
return "left";
|
||||||
}
|
}
|
||||||
if (["right", "right-bottom", "right-top"].includes(placement)) {
|
if (["right", "right-start", "right-end"].includes(placement)) {
|
||||||
return "right";
|
return "right";
|
||||||
}
|
}
|
||||||
return "bottom";
|
return "bottom";
|
||||||
@ -345,12 +345,12 @@ const getContentOffset = (
|
|||||||
triggerRect.scrollLeft +
|
triggerRect.scrollLeft +
|
||||||
Math.round((triggerRect.width - contentRect.width) / 2),
|
Math.round((triggerRect.width - contentRect.width) / 2),
|
||||||
};
|
};
|
||||||
case "top-left":
|
case "top-start":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollTop - contentRect.height - props.contentOffset,
|
top: triggerRect.scrollTop - contentRect.height - props.contentOffset,
|
||||||
left: triggerRect.scrollLeft,
|
left: triggerRect.scrollLeft,
|
||||||
};
|
};
|
||||||
case "top-right":
|
case "top-end":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollTop - contentRect.height - props.contentOffset,
|
top: triggerRect.scrollTop - contentRect.height - props.contentOffset,
|
||||||
left: triggerRect.scrollRight - contentRect.width,
|
left: triggerRect.scrollRight - contentRect.width,
|
||||||
@ -362,12 +362,12 @@ const getContentOffset = (
|
|||||||
triggerRect.scrollLeft +
|
triggerRect.scrollLeft +
|
||||||
Math.round((triggerRect.width - contentRect.width) / 2),
|
Math.round((triggerRect.width - contentRect.width) / 2),
|
||||||
};
|
};
|
||||||
case "bottom-left":
|
case "bottom-start":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollBottom + props.contentOffset,
|
top: triggerRect.scrollBottom + props.contentOffset,
|
||||||
left: triggerRect.scrollLeft,
|
left: triggerRect.scrollLeft,
|
||||||
};
|
};
|
||||||
case "bottom-right":
|
case "bottom-end":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollBottom + props.contentOffset,
|
top: triggerRect.scrollBottom + props.contentOffset,
|
||||||
left: triggerRect.scrollRight - contentRect.width,
|
left: triggerRect.scrollRight - contentRect.width,
|
||||||
@ -379,12 +379,12 @@ const getContentOffset = (
|
|||||||
Math.round((triggerRect.height - contentRect.height) / 2),
|
Math.round((triggerRect.height - contentRect.height) / 2),
|
||||||
left: triggerRect.scrollRight + props.contentOffset,
|
left: triggerRect.scrollRight + props.contentOffset,
|
||||||
};
|
};
|
||||||
case "right-top":
|
case "right-start":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollTop,
|
top: triggerRect.scrollTop,
|
||||||
left: triggerRect.scrollRight + props.contentOffset,
|
left: triggerRect.scrollRight + props.contentOffset,
|
||||||
};
|
};
|
||||||
case "right-bottom":
|
case "right-end":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollBottom - contentRect.height,
|
top: triggerRect.scrollBottom - contentRect.height,
|
||||||
left: triggerRect.scrollRight + props.contentOffset,
|
left: triggerRect.scrollRight + props.contentOffset,
|
||||||
@ -396,12 +396,12 @@ const getContentOffset = (
|
|||||||
Math.round((triggerRect.height - contentRect.height) / 2),
|
Math.round((triggerRect.height - contentRect.height) / 2),
|
||||||
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
||||||
};
|
};
|
||||||
case "left-top":
|
case "left-start":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollTop,
|
top: triggerRect.scrollTop,
|
||||||
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
||||||
};
|
};
|
||||||
case "left-bottom":
|
case "left-end":
|
||||||
return {
|
return {
|
||||||
top: triggerRect.scrollBottom - contentRect.height,
|
top: triggerRect.scrollBottom - contentRect.height,
|
||||||
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
left: triggerRect.scrollLeft - contentRect.width - props.contentOffset,
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
export type DropdownTrigger = "click" | "hover" | "focus" | "contextMenu";
|
export type DropdownTrigger = "click" | "hover" | "focus" | "contextMenu";
|
||||||
export type DropdownPlacement =
|
export type DropdownPlacement =
|
||||||
| "top"
|
| "top"
|
||||||
| "top-left"
|
| "top-start"
|
||||||
| "top-right"
|
| "top-end"
|
||||||
| "bottom"
|
| "bottom"
|
||||||
| "bottom-left"
|
| "bottom-start"
|
||||||
| "bottom-right"
|
| "bottom-end"
|
||||||
| "right"
|
| "right"
|
||||||
| "right-top"
|
| "right-start"
|
||||||
| "right-bottom"
|
| "right-end"
|
||||||
| "left"
|
| "left"
|
||||||
| "left-top"
|
| "left-start"
|
||||||
| "left-bottom";
|
| "left-end";
|
||||||
|
|
||||||
export interface ElementScrollRect {
|
export interface ElementScrollRect {
|
||||||
top: number;
|
top: number;
|
||||||
|
@ -24,7 +24,7 @@ export interface LayDropdownSubMenuProps {
|
|||||||
const props = withDefaults(defineProps<LayDropdownSubMenuProps>(), {
|
const props = withDefaults(defineProps<LayDropdownSubMenuProps>(), {
|
||||||
trigger: "hover",
|
trigger: "hover",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
placement: "right-top",
|
placement: "right-start",
|
||||||
contentOffset: 2,
|
contentOffset: 2,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -30,7 +30,7 @@ const isOpen = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<lay-dropdown
|
<lay-dropdown
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
placement="right-top"
|
placement="right-start"
|
||||||
:autoFitMinWidth="false"
|
:autoFitMinWidth="false"
|
||||||
:contentOffset="3"
|
:contentOffset="3"
|
||||||
popupContainer="body"
|
popupContainer="body"
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
h,
|
h,
|
||||||
createTextVNode,
|
createTextVNode,
|
||||||
isVNode,
|
isVNode,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { useResizeObserver } from "@vueuse/core";
|
import { useResizeObserver } from "@vueuse/core";
|
||||||
import { TabData, TabInjectKey } from "./interface";
|
import { TabData, TabInjectKey } from "./interface";
|
||||||
@ -268,16 +268,14 @@ const update = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderTabChild = (child: TabData) => {
|
const renderTabChild = (child: TabData) => {
|
||||||
|
if (child.slots?.title) {
|
||||||
if (child.slots?.title){
|
return () => h("span", child.slots?.title && child.slots.title());
|
||||||
return () => h("span", child.slots?.title && child.slots.title())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof child.title === "function"){
|
if (typeof child.title === "function") {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return () => child.title();
|
return () => child.title();
|
||||||
|
} else if (typeof child.title === "string") {
|
||||||
} else if (typeof child.title === "string"){
|
|
||||||
return () => createTextVNode(child.title as string);
|
return () => createTextVNode(child.title as string);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -57,6 +57,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<lay-space>
|
||||||
<lay-dropdown trigger="hover" updateAtScroll>
|
<lay-dropdown trigger="hover" updateAtScroll>
|
||||||
<lay-button>Hover 触发</lay-button>
|
<lay-button>Hover 触发</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -67,7 +68,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown updateAtScroll>
|
<lay-dropdown updateAtScroll>
|
||||||
<lay-button>Click 触发</lay-button>
|
<lay-button>Click 触发</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -78,7 +78,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown trigger="contextMenu" updateAtScroll>
|
<lay-dropdown trigger="contextMenu" updateAtScroll>
|
||||||
<lay-button>contextMenu 触发</lay-button>
|
<lay-button>contextMenu 触发</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -89,7 +88,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown trigger="focus" updateAtScroll>
|
<lay-dropdown trigger="focus" updateAtScroll>
|
||||||
<lay-input placeholder="Focus 触发"></lay-input>
|
<lay-input placeholder="Focus 触发"></lay-input>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -100,7 +98,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown :trigger="['hover','focus','click']" updateAtScroll>
|
<lay-dropdown :trigger="['hover','focus','click']" updateAtScroll>
|
||||||
<lay-input placeholder="hover focus click"></lay-input>
|
<lay-input placeholder="hover focus click"></lay-input>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -111,6 +108,7 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
</lay-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -267,90 +265,83 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-dropdown placement="top-left" updateAtScroll>
|
<lay-space wrap>
|
||||||
<lay-button type="primary">topLeft</lay-button>
|
<lay-dropdown placement="top-start" updateAtScroll>
|
||||||
|
<lay-button type="primary">top-start</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="top" updateAtScroll>
|
<lay-dropdown placement="top" updateAtScroll>
|
||||||
<lay-button type="primary">top</lay-button>
|
<lay-button type="primary">top</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="top-end" updateAtScroll>
|
||||||
<lay-dropdown placement="top-right" updateAtScroll>
|
<lay-button type="primary">top-end</lay-button>
|
||||||
<lay-button type="primary">topRight</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="bottom-start" updateAtScroll>
|
||||||
<lay-dropdown placement="bottom-left" updateAtScroll>
|
<lay-button type="primary">bottom-start</lay-button>
|
||||||
<lay-button type="primary">bottomLeft</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="bottom" updateAtScroll>
|
<lay-dropdown placement="bottom" updateAtScroll>
|
||||||
<lay-button type="primary">bottom</lay-button>
|
<lay-button type="primary">bottom</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="bottom-end" updateAtScroll>
|
||||||
<lay-dropdown placement="bottom-right" updateAtScroll>
|
<lay-button type="primary">bottom-end</lay-button>
|
||||||
<lay-button type="primary">bottomRight</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
<br><br>
|
</lay-space>
|
||||||
|
<br><br>
|
||||||
<lay-dropdown placement="right-top" updateAtScroll>
|
<lay-space>
|
||||||
<lay-button type="primary">right-top</lay-button>
|
<lay-dropdown placement="right-start" updateAtScroll>
|
||||||
|
<lay-button type="primary">right-start</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="right" updateAtScroll>
|
<lay-dropdown placement="right" updateAtScroll>
|
||||||
<lay-button type="primary">right</lay-button>
|
<lay-button type="primary">right</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="right-end" updateAtScroll>
|
||||||
<lay-dropdown placement="right-bottom" updateAtScroll>
|
<lay-button type="primary">right-end</lay-button>
|
||||||
<lay-button type="primary">right-bottom</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="left-start" updateAtScroll>
|
||||||
<lay-dropdown placement="left-top" updateAtScroll>
|
<lay-button type="primary">left-start</lay-button>
|
||||||
<lay-button type="primary">left-top</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="left" updateAtScroll>
|
<lay-dropdown placement="left" updateAtScroll>
|
||||||
<lay-button type="primary">left</lay-button>
|
<lay-button type="primary">left</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
<lay-dropdown placement="left-end" updateAtScroll>
|
||||||
<lay-dropdown placement="left-bottom" updateAtScroll>
|
<lay-button type="primary">left-end</lay-button>
|
||||||
<lay-button type="primary">left-bottom</lay-button>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="width:300px;height:200px;"></div>
|
<div style="width:300px;height:200px;"></div>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
</lay-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -486,6 +477,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<lay-space>
|
||||||
<lay-dropdown placement="bottom-left" autoFitWidth updateAtScroll>
|
<lay-dropdown placement="bottom-left" autoFitWidth updateAtScroll>
|
||||||
<lay-button type="primary">autoFitWidth</lay-button>
|
<lay-button type="primary">autoFitWidth</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -496,7 +488,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="bottom-left" :autoFitMinWidth="false" updateAtScroll>
|
<lay-dropdown placement="bottom-left" :autoFitMinWidth="false" updateAtScroll>
|
||||||
<lay-button type="primary">关闭 autoFitMinWidth</lay-button>
|
<lay-button type="primary">关闭 autoFitMinWidth</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -507,7 +498,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="bottom-left" updateAtScroll>
|
<lay-dropdown placement="bottom-left" updateAtScroll>
|
||||||
<lay-button type="primary">updateAtScroll</lay-button>
|
<lay-button type="primary">updateAtScroll</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -518,7 +508,6 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
|
||||||
<lay-dropdown placement="bottom-left" updateAtScroll :contentOffset="8">
|
<lay-dropdown placement="bottom-left" updateAtScroll :contentOffset="8">
|
||||||
<lay-button type="primary">contentOffset: 8px</lay-button>
|
<lay-button type="primary">contentOffset: 8px</lay-button>
|
||||||
<template #content>
|
<template #content>
|
||||||
@ -529,6 +518,7 @@ export default {
|
|||||||
</lay-dropdown-menu>
|
</lay-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</lay-dropdown>
|
</lay-dropdown>
|
||||||
|
</lay-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -547,7 +537,7 @@ import { ref, computed } from 'vue'
|
|||||||
| visible | 下拉面板是否可见 |`true` `false`|
|
| visible | 下拉面板是否可见 |`true` `false`|
|
||||||
| trigger | 触发方式,类型 `string` 或 trigger 数组 | `click` `hover` `focus` `contextMenu` |
|
| trigger | 触发方式,类型 `string` 或 trigger 数组 | `click` `hover` `focus` `contextMenu` |
|
||||||
| disabled | 是否禁用触发 | `true` `false` |
|
| disabled | 是否禁用触发 | `true` `false` |
|
||||||
| placement | 下拉面板位置 |`top` `bottom` `right` `left` `*-left` `*-right` `*-top` `*-bottom`|
|
| placement | 下拉面板位置 |`top` `bottom` `right` `left` `*-start` `*-end`|
|
||||||
| autoFitPosition| 是否自动调整下拉面板位置,默认 `true` |`true` `false` |
|
| autoFitPosition| 是否自动调整下拉面板位置,默认 `true` |`true` `false` |
|
||||||
| autoFitWidth | 是否将下拉面板宽度设置为触发器宽度, 默认 `false` |`true` `false` |
|
| autoFitWidth | 是否将下拉面板宽度设置为触发器宽度, 默认 `false` |`true` `false` |
|
||||||
| autoFitMinWidth | 是否将下拉面板最小宽度设置为触发器宽度, 默认 `true` |`true` `false` |
|
| autoFitMinWidth | 是否将下拉面板最小宽度设置为触发器宽度, 默认 `true` |`true` `false` |
|
||||||
@ -610,7 +600,7 @@ import { ref, computed } from 'vue'
|
|||||||
| ------- | -------- | ------ |
|
| ------- | -------- | ------ |
|
||||||
| trigger | 触发方式,类型 `string` 或 trigger 数组,默认 hover | `click` `hover` `focus` `contextMenu` |
|
| trigger | 触发方式,类型 `string` 或 trigger 数组,默认 hover | `click` `hover` `focus` `contextMenu` |
|
||||||
| disabled | 是否禁用触发 | `true` `false` |
|
| disabled | 是否禁用触发 | `true` `false` |
|
||||||
| placement | 下拉面板位置,默认 right-top |`top` `bottom` `right` `left` `*-left` `*-right` `*-top` `*-bottom`|
|
| placement | 下拉面板位置,默认 right-top |`top` `bottom` `right` `left` `*-start` `*-end`|
|
||||||
| contentOffset | 下拉面板距离触发器的偏移距离,默认 2| -|
|
| contentOffset | 下拉面板距离触发器的偏移距离,默认 2| -|
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
Loading…
x
Reference in New Issue
Block a user