You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
855 B
61 lines
855 B
6 years ago
|
Component({
|
||
|
data: {
|
||
|
visible: false
|
||
|
},
|
||
|
properties:{
|
||
|
dialogVisible: {
|
||
|
type: Boolean,
|
||
|
value: false,
|
||
|
observer (value) {
|
||
|
this.setData({
|
||
|
visible: !this.data.visible
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
title: {
|
||
|
type: String,
|
||
|
value: ''
|
||
|
},
|
||
|
content: {
|
||
|
type: Array,
|
||
|
value: []
|
||
|
},
|
||
|
cancelText: {
|
||
|
type: String,
|
||
|
value: ''
|
||
|
},
|
||
|
confirmText: {
|
||
|
type: String,
|
||
|
value: ''
|
||
|
}
|
||
|
|
||
|
},
|
||
|
lifetimes: {
|
||
|
created () {
|
||
|
|
||
|
},
|
||
|
attached () {
|
||
|
|
||
|
},
|
||
|
detached() {
|
||
|
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
closeDialog () {
|
||
|
this.setData({
|
||
|
visible: false
|
||
|
})
|
||
|
this.triggerEvent('cancel')
|
||
|
},
|
||
|
confirmDialog () {
|
||
|
this.setData({
|
||
|
visible: false
|
||
|
})
|
||
|
this.triggerEvent('confirm')
|
||
|
},
|
||
|
catchmove () {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
})
|