fix(components): [el-popconfirm] fix vue warning (#3618)

close #3613
This commit is contained in:
三咲智子 2021-09-24 21:18:16 +08:00 committed by GitHub
parent 4dd3806f47
commit 0b015ab7d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,10 +19,10 @@
</p>
<div class="el-popconfirm__action">
<el-button size="mini" :type="cancelButtonType" @click="cancel">
{{ _cancelButtonText }}
{{ finalCancelButtonText }}
</el-button>
<el-button size="mini" :type="confirmButtonType" @click="confirm">
{{ _confirmButtonText }}
{{ finalConfirmButtonText }}
</el-button>
</div>
</div>
@ -61,18 +61,19 @@ export default defineComponent({
visible.value = false
emit('cancel')
}
const _confirmButtonText = computed(
const finalConfirmButtonText = computed(
() => props.confirmButtonText || t('el.popconfirm.confirmButtonText')
)
const _cancelButtonText = computed(
const finalCancelButtonText = computed(
() => props.cancelButtonText || t('el.popconfirm.cancelButtonText')
)
return {
Effect,
visible,
_confirmButtonText,
_cancelButtonText,
finalConfirmButtonText,
finalCancelButtonText,
confirm,
cancel,