wot-design-uni
Version:
一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。
39 lines (35 loc) • 998 B
text/typescript
import type { ExtractPropTypes } from 'vue'
import { baseProps, makeBooleanProp, makeStringProp } from '../common/props'
export type ClosePosition = 'inset' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
export const curtainProps = {
...baseProps,
/**
* 绑定值,展示/关闭幕帘
*/
value: makeBooleanProp(false),
/**
* 关闭按钮位置,可选值:inset / top / bottom / top-left / top-right / bottom-left / bottom-right
*/
closePosition: makeStringProp<ClosePosition>('inset'),
/**
* 幕帘图片地址,必须使用网络地址
*/
src: String,
/**
* 幕帘图片点击链接
*/
to: String,
/**
* 幕帘图片宽度
*/
width: Number,
/**
* 点击遮罩是否关闭
*/
closeOnClickModal: makeBooleanProp(false),
/**
* 是否当关闭时将弹出层隐藏(display: none)
*/
hideWhenClose: makeBooleanProp(true)
}
export type CurtainProps = ExtractPropTypes<typeof curtainProps>