Appearance

popbox

popbox组件 主要是用在页面中的弹窗。

代码示例

<popbox title="弹窗标题" v-mode="popshow" @close="closePopbox" :width="width" :height="height" padding="0">
	...
</popbox>

Props

参数说明类型默认值可选值
v-mode/value显示隐藏弹窗Booleanfalsefalse/true
title弹窗标题String''
width弹窗宽度,mode = left |center |right 时有效String |Number500rpx
height弹窗高度,mode = left |center |right有效,不写默认自动撑开String |Number
mode弹窗方向,普通情况都是居中弹窗Stringcentertop / right / bottom / center
mask-close-able点击遮罩是否可以关闭弹出层Booleanfalsefalse/true
closeable是否显示关闭图标Booleanfalsetrue
paddingcontent 内边距 默认String,Number15
mask是否显示遮罩Booleantruefalse
zoom是否开启缩放动画,只在modecenter时有效Booleantruefalse
safe-area-inset-bottom是否开启底部安全区适配open in new windowBooleanfalsetrue
custom-style用户自定义样式Object--
z-index弹出内容的z-indexNumber | String10075-
close-icon关闭图标的名称,只能uView的内置图标Stringclose-
close-icon-pos自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角Stringtop-righttop-left / bottom-left / bottom-right
close-icon-color关闭图标的颜色String#909399-
close-icon-size关闭图标的大小,单位rpxString | Number30-
negative-top中部弹出时,以避免可能弹出的键盘重合,往上偏移的值,单位任意,数值则默认为rpx单位String | Number0-
mask-custom-style遮罩自定义样式,一般用于修改遮罩透明度对象形式,如:{background: 'rgba(0, 0, 0, 0.5)'}Object--
duration遮罩打开或收起的动画过渡时间,单位msString | Number250

Events

属性名说明参数
open打开弹窗触发事件null
close点击右上方按钮关闭弹窗触发事件null

接口继承 uview的 popup,更多详细接口 请查看这里open in new window