Files
lichebao/components/msg/index.js
T
2021-07-16 17:39:47 +08:00

73 lines
1.4 KiB
JavaScript

import commonconstants from '../../commons/js/config'
Component({
/**
* 组件的属性列表
*/
properties: {
isShow: { //是否显示弹框
type: Boolean,
value: false
},
isHasClose: { //是否显示关闭按钮 取值:'','up','down'
type: String,
value: ''
},
isExtraOpt: { //是否增加底部操作
type: Boolean,
value: false
},
isBottomOpt: { //是否显示底部操作
type: Boolean,
value: false
},
isTransparent: { //是否背景透明
type: Boolean,
value: false
},
iconType: { //图标
type: String,
value: ''
},
title: { //标题
type: String,
value: ''
},
content: { //内容
type: String,
value: ''
},
closeWord: { //关闭按钮文字
type: String,
value: '我知道了'
}
},
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/**
* 组件的初始数据
*/
data: {
successIcon:commonconstants.imgUrl+'/msg/icon-success.png',
failIcon: commonconstants.imgUrl+'/msg/icon-fail.png'
},
/**
* 组件的方法列表
*/
methods: {
close(){
this.setData({
isShow: false
})
this.triggerEvent('closeevent', {
isClose: true
})
},
aaa(){
}
}
})