import { computed, CSSProperties } from 'vue'; import { commonProps } from "../../common" export const popupProps = { modelValue: { type: Boolean, default: false }, // 弹出方向 // left/right/top/bottom/center mode: { type: String, default: 'left' }, // 是否显示遮罩 mask: { type: Boolean, default: true }, // 抽屉的宽度(mode=left/right),高度(mode=top/bottom) length: { type: [Number, String], default: 'auto' }, // 宽度,只对左,右,中部弹出时起作用,单位rpx,或者"auto" // 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数 width: { type: String, default: '' }, // 高度,只对上,下,中部弹出时起作用,单位rpx,或者"auto" // 或者百分比"50%",表示由内容撑开高度或者宽度,优先级高于length参数 height: { type: String, default: '' }, // 是否开启动画,只在mode=center有效 zoom: { type: Boolean, default: true }, // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距 safeAreaInsetBottom: { type: Boolean, default: false }, // 是否可以通过点击遮罩进行关闭 maskCloseable: { type: Boolean, default: true }, // 用户自定义样式 customStyle: { type: Object, default() { return {} } }, // 显示圆角的大小 borderRadius: { type: Number, default: 0 }, // zIndex zIndex: { type: Number, default: 0 }, // 是否显示关闭按钮 closeBtn: { type: Boolean, default: false }, // 关闭按钮的图标 closeBtnIcon: { type: String, default: 'close' }, // 关闭按钮显示的位置 // top-left/top-right/bottom-left/bottom-right closeBtnPosition: { type: String, default: 'top-right' }, // 关闭按钮图标颜色 closeIconColor: { type: String, default: '#AAAAAA' }, // 关闭按钮图标的大小 closeIconSize: { type: Number, default: 30 }, // 给一个负的margin-top,往上偏移,避免和键盘重合的情况,仅在mode=center时有效 negativeTop: { type: Number, default: 0 }, // marginTop,在mode = top,left,right时生效,避免用户使用了自定义导航栏,组件把导航栏遮挡了 marginTop: { type: Number, default: 0 }, // 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件 // 对v-model双向绑定多层调用造成报错不能修改props值的问题 popup: { type: Boolean, default: true }, ...commonProps }