update locale
update locale
This commit is contained in:
parent
d5d4d8e3e9
commit
012cbf285f
9 changed files with 126 additions and 22 deletions
|
@ -3,6 +3,7 @@ import Modal from './modal.vue';
|
|||
import Icon from '../icon/icon.vue';
|
||||
import iButton from '../button/button.vue';
|
||||
import { camelcaseToHyphen } from '../../utils/assist';
|
||||
import { t } from '../../locale';
|
||||
|
||||
const prefixCls = 'ivu-modal-confirm';
|
||||
|
||||
|
@ -44,8 +45,8 @@ Modal.newInstance = properties => {
|
|||
body: '',
|
||||
iconType: '',
|
||||
iconName: '',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
okText: t('i.modal.okText'),
|
||||
cancelText: t('i.modal.cancelText'),
|
||||
showCancel: false,
|
||||
loading: false,
|
||||
buttonLoading: false
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
import Icon from '../icon';
|
||||
import iButton from '../button/button.vue';
|
||||
import { getScrollBarSize } from '../../utils/assist';
|
||||
import { t } from '../../locale';
|
||||
|
||||
const prefixCls = 'ivu-modal';
|
||||
|
||||
|
@ -51,11 +52,15 @@
|
|||
},
|
||||
okText: {
|
||||
type: String,
|
||||
default: '确定'
|
||||
default () {
|
||||
return t('i.modal.okText');
|
||||
}
|
||||
},
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: '取消'
|
||||
default () {
|
||||
return t('i.modal.cancelText');
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
<div v-if="showSizer || showElevator" :class="optsClasses">
|
||||
<div v-if="showSizer" :class="sizerClasses">
|
||||
<i-select :model.sync="pageSize" :size="size" @on-change="changeSize">
|
||||
<i-option v-for="item in pageSizeOpts" :value="item" style="text-align:center;">{{ item }} 条/页</i-option>
|
||||
<i-option v-for="item in pageSizeOpts" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option>
|
||||
</i-select>
|
||||
</div>
|
||||
<div v-if="showElevator" :class="ElevatorClasses">
|
||||
跳至
|
||||
{{ t('i.page.goto') }}
|
||||
<input type="text" :value="_current" @keyup.enter="changePage">
|
||||
页
|
||||
{{ t('i.page.p') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iSelect from '../../components/select/select.vue';
|
||||
import iOption from '../../components/select/option.vue';
|
||||
import Locale from '../../mixins/locale';
|
||||
|
||||
const prefixCls = 'ivu-page';
|
||||
|
||||
|
@ -23,6 +24,7 @@
|
|||
}
|
||||
|
||||
export default {
|
||||
mixins: [ Locale ],
|
||||
components: { iSelect, iOption },
|
||||
props: {
|
||||
pageSizeOpts: Array,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<ul :class="simpleWrapClasses" :style="style" v-if="simple">
|
||||
<li
|
||||
title="上一页"
|
||||
:title="t('i.page.prev')"
|
||||
:class="prevClasses"
|
||||
@click="prev">
|
||||
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
||||
|
@ -17,7 +17,7 @@
|
|||
{{ allPages }}
|
||||
</div>
|
||||
<li
|
||||
title="下一页"
|
||||
:title="t('i.page.next')"
|
||||
:class="nextClasses"
|
||||
@click="next">
|
||||
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
||||
|
@ -25,25 +25,25 @@
|
|||
</ul>
|
||||
<ul :class="wrapClasses" :style="style" v-else>
|
||||
<span :class="[prefixCls + '-total']" v-if="showTotal">
|
||||
<slot>共 {{ total }} 条</slot>
|
||||
<slot>{{ t('i.page.total') }} {{ total }} <template v-if="total <= 1">{{ t('i.page.item') }}</template><template v-else>{{ t('i.page.items') }}</template></slot>
|
||||
</span>
|
||||
<li
|
||||
title="上一页"
|
||||
:title="t('i.page.prev')"
|
||||
:class="prevClasses"
|
||||
@click="prev">
|
||||
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
||||
</li>
|
||||
<li title="第一页" :class="firstPageClasses" @click="changePage(1)"><a>1</a></li>
|
||||
<li title="向前 5 页" v-if="current - 3 > 1" :class="[prefixCls + '-item-jump-prev']" @click="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a></li>
|
||||
<li title="1" :class="firstPageClasses" @click="changePage(1)"><a>1</a></li>
|
||||
<li :title="t('i.page.prev5')" v-if="current - 3 > 1" :class="[prefixCls + '-item-jump-prev']" @click="fastPrev"><a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a></li>
|
||||
<li :title="current - 2" v-if="current - 2 > 1" :class="[prefixCls + '-item']" @click="changePage(current - 2)"><a>{{ current - 2 }}</a></li>
|
||||
<li :title="current - 1" v-if="current - 1 > 1" :class="[prefixCls + '-item']" @click="changePage(current - 1)"><a>{{ current - 1 }}</a></li>
|
||||
<li :title="current" v-if="current != 1 && current != allPages" :class="[prefixCls + '-item',prefixCls + '-item-active']"><a>{{ current }}</a></li>
|
||||
<li :title="current + 1" v-if="current + 1 < allPages" :class="[prefixCls + '-item']" @click="changePage(current + 1)"><a>{{ current + 1 }}</a></li>
|
||||
<li :title="current + 2" v-if="current + 2 < allPages" :class="[prefixCls + '-item']" @click="changePage(current + 2)"><a>{{ current + 2 }}</a></li>
|
||||
<li title="向后 5 页" v-if="current + 3 < allPages" :class="[prefixCls + '-item-jump-next']" @click="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a></li>
|
||||
<li :title="'最后一页:' + allPages" v-if="allPages > 1" :class="lastPageClasses" @click="changePage(allPages)"><a>{{ allPages }}</a></li>
|
||||
<li :title="t('i.page.next5')" v-if="current + 3 < allPages" :class="[prefixCls + '-item-jump-next']" @click="fastNext"><a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a></li>
|
||||
<li :title="allPages" v-if="allPages > 1" :class="lastPageClasses" @click="changePage(allPages)"><a>{{ allPages }}</a></li>
|
||||
<li
|
||||
title="下一页"
|
||||
:title="t('i.page.next')"
|
||||
:class="nextClasses"
|
||||
@click="next">
|
||||
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
||||
|
@ -65,10 +65,12 @@
|
|||
<script>
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import Options from './options.vue';
|
||||
import Locale from '../../mixins/locale';
|
||||
|
||||
const prefixCls = 'ivu-page';
|
||||
|
||||
export default {
|
||||
mixins: [ Locale ],
|
||||
components: { Options },
|
||||
props: {
|
||||
current: {
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
import iButton from '../button/button.vue';
|
||||
import clickoutside from '../../directives/clickoutside';
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import { t } from '../../locale';
|
||||
|
||||
const prefixCls = 'ivu-poptip';
|
||||
|
||||
|
@ -76,11 +77,15 @@
|
|||
},
|
||||
okText: {
|
||||
type: String,
|
||||
default: '确定'
|
||||
default () {
|
||||
return t('i.poptip.okText');
|
||||
}
|
||||
},
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: '取消'
|
||||
default () {
|
||||
return t('i.poptip.cancelText');
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<script>
|
||||
import List from './list.vue';
|
||||
import Operation from './operation.vue';
|
||||
import { t } from '../../locale';
|
||||
|
||||
const prefixCls = 'ivu-transfer';
|
||||
|
||||
|
@ -77,7 +78,7 @@
|
|||
titles: {
|
||||
type: Array,
|
||||
default () {
|
||||
return ['源列表', '目的列表'];
|
||||
return [t('i.transfer.titles.source'), t('i.transfer.titles.target')];
|
||||
}
|
||||
},
|
||||
operations: {
|
||||
|
@ -92,7 +93,9 @@
|
|||
},
|
||||
filterPlaceholder: {
|
||||
type: String,
|
||||
default: '请输入搜索内容'
|
||||
default () {
|
||||
return t('i.transfer.filterPlaceholder');
|
||||
}
|
||||
},
|
||||
filterMethod: {
|
||||
type: Function,
|
||||
|
@ -103,7 +106,9 @@
|
|||
},
|
||||
notFoundText: {
|
||||
type: String,
|
||||
default: '列表为空'
|
||||
default () {
|
||||
return t('i.transfer.notFoundText');
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -17,7 +17,7 @@ export default {
|
|||
startTime: 'Start Time',
|
||||
endTime: 'End Time',
|
||||
clear: 'Clear',
|
||||
ok: 'Ok',
|
||||
ok: 'OK',
|
||||
month: '',
|
||||
month1: 'January',
|
||||
month2: 'February',
|
||||
|
@ -55,6 +55,34 @@ export default {
|
|||
m11: 'Nov',
|
||||
m12: 'Dec'
|
||||
}
|
||||
},
|
||||
transfer: {
|
||||
titles: {
|
||||
source: 'Source',
|
||||
target: 'Target'
|
||||
},
|
||||
filterPlaceholder: 'Search here',
|
||||
notFoundText: 'Not Found'
|
||||
},
|
||||
modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Cancel'
|
||||
},
|
||||
poptip: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Cancel'
|
||||
},
|
||||
page: {
|
||||
prev: 'Previous Page',
|
||||
next: 'Next Page',
|
||||
total: 'Total',
|
||||
item: 'item',
|
||||
items: 'items',
|
||||
prev5: 'Previous 5 Pages',
|
||||
next5: 'Next 5 Pages',
|
||||
page: '/page',
|
||||
goto: 'Goto',
|
||||
p: ''
|
||||
}
|
||||
}
|
||||
};
|
|
@ -55,6 +55,34 @@ export default {
|
|||
m11: '11月',
|
||||
m12: '12月'
|
||||
}
|
||||
},
|
||||
transfer: {
|
||||
titles: {
|
||||
source: '源列表',
|
||||
target: '目的列表'
|
||||
},
|
||||
filterPlaceholder: '请输入搜索内容',
|
||||
notFoundText: '列表为空'
|
||||
},
|
||||
modal: {
|
||||
okText: '确定',
|
||||
cancelText: '取消'
|
||||
},
|
||||
poptip: {
|
||||
okText: '确定',
|
||||
cancelText: '取消'
|
||||
},
|
||||
page: {
|
||||
prev: '上一页',
|
||||
next: '下一页',
|
||||
total: '共',
|
||||
item: '条',
|
||||
items: '条',
|
||||
prev5: '向前 5 页',
|
||||
next5: '向后 5 页',
|
||||
page: '条/页',
|
||||
goto: '跳至',
|
||||
p: '页'
|
||||
}
|
||||
}
|
||||
};
|
|
@ -55,6 +55,34 @@ export default {
|
|||
m11: '11月',
|
||||
m12: '12月'
|
||||
}
|
||||
},
|
||||
transfer: {
|
||||
titles: {
|
||||
source: '源列表',
|
||||
target: '目的列表'
|
||||
},
|
||||
filterPlaceholder: '請輸入搜索內容',
|
||||
notFoundText: '列表爲空'
|
||||
},
|
||||
modal: {
|
||||
okText: '確定',
|
||||
cancelText: '取消'
|
||||
},
|
||||
poptip: {
|
||||
okText: '確定',
|
||||
cancelText: '取消'
|
||||
},
|
||||
page: {
|
||||
prev: '上壹頁',
|
||||
next: '下壹頁',
|
||||
total: '共',
|
||||
item: '條',
|
||||
items: '條',
|
||||
prev5: '向前 5 頁',
|
||||
next5: '向後 5 頁',
|
||||
page: '條/頁',
|
||||
goto: '跳至',
|
||||
p: '頁'
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Reference in a new issue