UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

162 lines (161 loc) 2.78 kB
const PopupPositionTypes = ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"]; const PopupTriggerTypes = ["none", "click", "click-outclick", "hover", "hover-outclick", "focus", "contextmenu"]; const popupProps = { /** * 是否可见 * v-model */ visible: { type: Boolean }, /** * 弹出位置 PopupPositionT */ position: { type: String, default: "top" }, /** * 触发事件 PopupTriggerT | PopupTriggerT[] * Pad&Phone: 只支持 'none', 'click', 'click-outclick' */ trigger: { type: [String, Array], default: "click" }, /** * 触发元素或组件 */ target: { type: [String, Object], default: null }, /** * 是否禁用 */ disabled: { type: Boolean }, /** * 挂载容器,默认为body */ wrapper: { type: [String, Object], default: "body" }, /** * 距离target偏移量 */ offset: { type: Number, default: 0 }, /** * 距离viewport(屏幕)边缘偏移量 */ edgeOffset: { type: Number, default: 0 }, /** * hover事件延时触发的时间(毫秒) */ hoverDelay: { type: Number, default: 100 }, /** * 是否当触发元素不可见时隐藏弹层 */ hideWhenTargetInvisible: { type: Boolean, default: true }, /** * 是否计算箭头位置 */ anchor: { type: Boolean, default: false }, /** * 锚点自定义class */ anchorClass: { type: [String, Array], default: void 0 }, /** * 是否在popup隐藏时unmout */ unmountOnHide: { type: Boolean, default: true }, /** * popup wrap自定义class */ wrapClass: { type: [String, Array], default: void 0 }, /** * popup body自定义class */ bodyClass: { type: [String, Array], default: void 0 }, /** * popup最小宽度设置为触发元素宽度 */ adjustMinWidth: { type: Boolean, default: true }, /** * popup宽度设置为触发元素宽度 */ adjustWidth: { type: Boolean, default: true }, /** * 过渡名称 */ transition: { type: String, default: "o-zoom-fade" }, /** * 是否自动隐藏 */ autoHide: { type: Boolean, default: true }, /** * 显示前回调,根据返回值判断是否显示, false: 不显示; true|undefined: 显示 */ beforeShow: { type: Function }, /** * 隐藏前回调,根据返回值判断是否隐藏,false: 不隐藏; true|undefined: 隐藏 */ beforeHide: { type: Function }, /** * popup是否自适应边缘 */ adaptive: { type: Boolean, default: true } }; export { PopupPositionTypes, PopupTriggerTypes, popupProps };