Component({ externalClasses: ['tui-modal-class'], properties: { //是否显示 show:{ type:Boolean, value:false }, //标题 title: { type: String, value: "" }, //内容 content: { type: String, value: "" }, //内容字体颜色 color: { type: String, value: "#999" }, //弹窗宽度 width: { type: String, value: "580rpx" }, top: { type: String, value: "40%" }, background:{ type: String, value: "#FFFFFF" }, borderRadius:{ type: String, value: "16rpx" }, //内容字体大小 size: { type: Number, value: 28 }, zIndex: { type: Number, value: 99998 }, //形状 circle, square shape: { type: String, value: 'square' }, button: { type: Array, value: [{ text: "取消", type: "red", plain: true //是否空心 }, { text: "确定", type: "red", plain: false }] }, //点击遮罩 是否可关闭 maskClosable: { type: Boolean, value: true }, //自定义弹窗内容 custom:{ type:Boolean, value:false }, //淡入效果,自定义弹框插入input输入框时传true fadein: { type: Boolean, value: false } }, data: { }, methods: { handleClick(e) { if (!this.data.show) return; const dataset = e.currentTarget.dataset; this.triggerEvent('click', { index: Number(dataset.index) }); }, handleClickCancel() { if(!this.data.maskClosable) return; this.triggerEvent('cancel'); }, forbid(){} } })