# ActTipDialog
# import
import PressActTipDialog from '@tencent/press-plus/press-act-tip-dialog/press-act-tip-dialog';
export default {
components: {
PressActTipDialog,
}
}
# Code Demo
# Basic usage
example
<PressActTipDialog
:show="show"
:title="title"
:message="message"
:show-cancel-button="showCancelButton"
:show-confirm-button="showConfirmButton"
:cancel-button-text="cancelButtonText"
:confirm-button-text="confirmButtonText"
@confirm="confirm"
@cancel="cancel"
/>
import PressActTipDialog from '@tencent/press-plus/press-act-tip-dialog/press-act-tip-dialog.vue';
export default {
components: {
PressActTipDialog,
},
data() {
return {
show: false,
title: 'title',
message: 'message',
showCancelButton: true,
showConfirmButton: true,
cancelButtonText: 'cancel',
confirmButtonText: 'confirm',
};
},
methods: {
cancel(show) {
this.show = !show;
},
confirm(show) {
this.show = !show;
},
}
};
# API
# Props
Parameter | Description | Type | Default |
---|---|---|---|
show | Whether to show popup | boolean | false |
title | Title | string | Tips |
message | content | string | - |
show-cancel-button | Whether to show the cancel button | boolean | true |
show-confirm-button | Whether to show the confirm button | boolean | true |
confirm-text | Confirm button text | string | OK |
cancel-text | cancel button text | string | cancel |
cancel | click to cancel event | function | null |
confirm | event for confirm click | function | null |
# Events
Event Name | Description | Parameters |
---|---|---|
confirm | Click to confirm | show |
cancel | click to cancel | show |