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.
36 lines
701 B
36 lines
701 B
Component({
|
|
externalClasses: ['mask-class', 'container-class'],
|
|
properties: {
|
|
actions: {
|
|
type: Array,
|
|
value: []
|
|
},
|
|
show: {
|
|
type: Boolean,
|
|
value: false
|
|
},
|
|
cancelWithMask: {
|
|
type: Boolean,
|
|
value: true
|
|
},
|
|
cancelText: {
|
|
type: String,
|
|
value: ''
|
|
}
|
|
},
|
|
methods: {
|
|
onMaskClick() {
|
|
if (this.data.cancelWithMask) {
|
|
this.cancelClick();
|
|
}
|
|
},
|
|
cancelClick() {
|
|
this.triggerEvent('cancel');
|
|
},
|
|
handleBtnClick({ currentTarget = {} }) {
|
|
const dataset = currentTarget.dataset || {};
|
|
const { index } = dataset;
|
|
this.triggerEvent('actionclick', { index });
|
|
}
|
|
}
|
|
});
|