|
@@ -20,14 +20,14 @@
|
|
|
:type="cancelButtonType"
|
|
|
@click="cancel"
|
|
|
>
|
|
|
- {{cancelButtonText}}
|
|
|
+ {{ displayCancelButtonText }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
:type="confirmButtonType"
|
|
|
@click="confirm"
|
|
|
>
|
|
|
- {{confirmButtonText}}
|
|
|
+ {{ displayConfirmButtonText }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -47,12 +47,10 @@ export default {
|
|
|
type: String
|
|
|
},
|
|
|
confirmButtonText: {
|
|
|
- type: String,
|
|
|
- default: t('el.popconfirm.confirmButtonText')
|
|
|
+ type: String
|
|
|
},
|
|
|
cancelButtonText: {
|
|
|
- type: String,
|
|
|
- default: t('el.popconfirm.cancelButtonText')
|
|
|
+ type: String
|
|
|
},
|
|
|
confirmButtonType: {
|
|
|
type: String,
|
|
@@ -84,6 +82,14 @@ export default {
|
|
|
visible: false
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ displayConfirmButtonText() {
|
|
|
+ return this.confirmButtonText || t('el.popconfirm.confirmButtonText')
|
|
|
+ },
|
|
|
+ displayCancelButtonText() {
|
|
|
+ return this.cancelButtonText || t('el.popconfirm.cancelButtonText')
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
confirm() {
|
|
|
this.visible = false;
|