mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
[new feature] add i18n support (#310)
* fix: Tabbar icon line-height * [new feature] progress add showPivot prop * [new feature] TabItem support vue-router * [new feature] update document header style * [Doc] add toast english ducoment * [new feature] add i18n support * feat: Extract demos from markdown * feat: Base components demos * [new feature] complete demo extract & translate * [fix] text cases * fix: add deepAssign test cases * fix: changelog detail * [new feature] AddressEdit support i18n
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
v-show="showCancelButton"
|
||||
@click="handleAction('cancel')"
|
||||
>
|
||||
{{ cancelButtonText }}
|
||||
{{ cancelButtonText || $t('cancel') }}
|
||||
</van-button>
|
||||
<van-button
|
||||
size="large"
|
||||
@@ -22,7 +22,7 @@
|
||||
v-show="showConfirmButton"
|
||||
@click="handleAction('confirm')"
|
||||
>
|
||||
{{ confirmButtonText }}
|
||||
{{ confirmButtonText || $t('confirm') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,6 +32,7 @@
|
||||
<script>
|
||||
import Button from '../button';
|
||||
import Popup from '../mixins/popup';
|
||||
import { i18n } from '../locale';
|
||||
|
||||
export default {
|
||||
name: 'van-dialog',
|
||||
@@ -40,9 +41,11 @@ export default {
|
||||
[Button.name]: Button
|
||||
},
|
||||
|
||||
mixins: [Popup],
|
||||
mixins: [Popup, i18n],
|
||||
|
||||
props: {
|
||||
confirmButtonText: String,
|
||||
cancelButtonText: String,
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
@@ -59,14 +62,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
confirmButtonText: {
|
||||
type: String,
|
||||
default: '确认'
|
||||
},
|
||||
cancelButtonText: {
|
||||
type: String,
|
||||
default: '取消'
|
||||
},
|
||||
callback: {
|
||||
type: Function
|
||||
},
|
||||
|
Reference in New Issue
Block a user