mirror of https://github.com/ElemeFE/element
Merge pull request #20622 from iamkun/fix/error-i18n-prop
fix: fix Popconfirm i18n bugpull/20626/head
commit
5fecffa353
|
@ -20,14 +20,14 @@
|
||||||
:type="cancelButtonType"
|
:type="cancelButtonType"
|
||||||
@click="cancel"
|
@click="cancel"
|
||||||
>
|
>
|
||||||
{{cancelButtonText}}
|
{{ displayCancelButtonText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
:type="confirmButtonType"
|
:type="confirmButtonType"
|
||||||
@click="confirm"
|
@click="confirm"
|
||||||
>
|
>
|
||||||
{{confirmButtonText}}
|
{{ displayConfirmButtonText }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,12 +47,10 @@ export default {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
confirmButtonText: {
|
confirmButtonText: {
|
||||||
type: String,
|
type: String
|
||||||
default: t('el.popconfirm.confirmButtonText')
|
|
||||||
},
|
},
|
||||||
cancelButtonText: {
|
cancelButtonText: {
|
||||||
type: String,
|
type: String
|
||||||
default: t('el.popconfirm.cancelButtonText')
|
|
||||||
},
|
},
|
||||||
confirmButtonType: {
|
confirmButtonType: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -84,6 +82,14 @@ export default {
|
||||||
visible: false
|
visible: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
displayConfirmButtonText() {
|
||||||
|
return this.confirmButtonText || t('el.popconfirm.confirmButtonText')
|
||||||
|
},
|
||||||
|
displayCancelButtonText() {
|
||||||
|
return this.cancelButtonText || t('el.popconfirm.cancelButtonText')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirm() {
|
confirm() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
Loading…
Reference in New Issue