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 Icon from '../icon/icon.vue';
|
||||||
import iButton from '../button/button.vue';
|
import iButton from '../button/button.vue';
|
||||||
import { camelcaseToHyphen } from '../../utils/assist';
|
import { camelcaseToHyphen } from '../../utils/assist';
|
||||||
|
import { t } from '../../locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-modal-confirm';
|
const prefixCls = 'ivu-modal-confirm';
|
||||||
|
|
||||||
|
@ -44,8 +45,8 @@ Modal.newInstance = properties => {
|
||||||
body: '',
|
body: '',
|
||||||
iconType: '',
|
iconType: '',
|
||||||
iconName: '',
|
iconName: '',
|
||||||
okText: '确定',
|
okText: t('i.modal.okText'),
|
||||||
cancelText: '取消',
|
cancelText: t('i.modal.cancelText'),
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
buttonLoading: false
|
buttonLoading: false
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
import iButton from '../button/button.vue';
|
import iButton from '../button/button.vue';
|
||||||
import { getScrollBarSize } from '../../utils/assist';
|
import { getScrollBarSize } from '../../utils/assist';
|
||||||
|
import { t } from '../../locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-modal';
|
const prefixCls = 'ivu-modal';
|
||||||
|
|
||||||
|
@ -51,11 +52,15 @@
|
||||||
},
|
},
|
||||||
okText: {
|
okText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '确定'
|
default () {
|
||||||
|
return t('i.modal.okText');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancelText: {
|
cancelText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '取消'
|
default () {
|
||||||
|
return t('i.modal.cancelText');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -2,19 +2,20 @@
|
||||||
<div v-if="showSizer || showElevator" :class="optsClasses">
|
<div v-if="showSizer || showElevator" :class="optsClasses">
|
||||||
<div v-if="showSizer" :class="sizerClasses">
|
<div v-if="showSizer" :class="sizerClasses">
|
||||||
<i-select :model.sync="pageSize" :size="size" @on-change="changeSize">
|
<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>
|
</i-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="showElevator" :class="ElevatorClasses">
|
<div v-if="showElevator" :class="ElevatorClasses">
|
||||||
跳至
|
{{ t('i.page.goto') }}
|
||||||
<input type="text" :value="_current" @keyup.enter="changePage">
|
<input type="text" :value="_current" @keyup.enter="changePage">
|
||||||
页
|
{{ t('i.page.p') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import iSelect from '../../components/select/select.vue';
|
import iSelect from '../../components/select/select.vue';
|
||||||
import iOption from '../../components/select/option.vue';
|
import iOption from '../../components/select/option.vue';
|
||||||
|
import Locale from '../../mixins/locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-page';
|
const prefixCls = 'ivu-page';
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [ Locale ],
|
||||||
components: { iSelect, iOption },
|
components: { iSelect, iOption },
|
||||||
props: {
|
props: {
|
||||||
pageSizeOpts: Array,
|
pageSizeOpts: Array,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<ul :class="simpleWrapClasses" :style="style" v-if="simple">
|
<ul :class="simpleWrapClasses" :style="style" v-if="simple">
|
||||||
<li
|
<li
|
||||||
title="上一页"
|
:title="t('i.page.prev')"
|
||||||
:class="prevClasses"
|
:class="prevClasses"
|
||||||
@click="prev">
|
@click="prev">
|
||||||
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
{{ allPages }}
|
{{ allPages }}
|
||||||
</div>
|
</div>
|
||||||
<li
|
<li
|
||||||
title="下一页"
|
:title="t('i.page.next')"
|
||||||
:class="nextClasses"
|
:class="nextClasses"
|
||||||
@click="next">
|
@click="next">
|
||||||
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
||||||
|
@ -25,25 +25,25 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul :class="wrapClasses" :style="style" v-else>
|
<ul :class="wrapClasses" :style="style" v-else>
|
||||||
<span :class="[prefixCls + '-total']" v-if="showTotal">
|
<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>
|
</span>
|
||||||
<li
|
<li
|
||||||
title="上一页"
|
:title="t('i.page.prev')"
|
||||||
:class="prevClasses"
|
:class="prevClasses"
|
||||||
@click="prev">
|
@click="prev">
|
||||||
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
<a><i class="ivu-icon ivu-icon-ios-arrow-left"></i></a>
|
||||||
</li>
|
</li>
|
||||||
<li title="第一页" :class="firstPageClasses" @click="changePage(1)"><a>1</a></li>
|
<li title="1" :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="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 - 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 - 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" 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 + 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="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="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="allPages" v-if="allPages > 1" :class="lastPageClasses" @click="changePage(allPages)"><a>{{ allPages }}</a></li>
|
||||||
<li
|
<li
|
||||||
title="下一页"
|
:title="t('i.page.next')"
|
||||||
:class="nextClasses"
|
:class="nextClasses"
|
||||||
@click="next">
|
@click="next">
|
||||||
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
<a><i class="ivu-icon ivu-icon-ios-arrow-right"></i></a>
|
||||||
|
@ -65,10 +65,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { oneOf } from '../../utils/assist';
|
import { oneOf } from '../../utils/assist';
|
||||||
import Options from './options.vue';
|
import Options from './options.vue';
|
||||||
|
import Locale from '../../mixins/locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-page';
|
const prefixCls = 'ivu-page';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [ Locale ],
|
||||||
components: { Options },
|
components: { Options },
|
||||||
props: {
|
props: {
|
||||||
current: {
|
current: {
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
import iButton from '../button/button.vue';
|
import iButton from '../button/button.vue';
|
||||||
import clickoutside from '../../directives/clickoutside';
|
import clickoutside from '../../directives/clickoutside';
|
||||||
import { oneOf } from '../../utils/assist';
|
import { oneOf } from '../../utils/assist';
|
||||||
|
import { t } from '../../locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-poptip';
|
const prefixCls = 'ivu-poptip';
|
||||||
|
|
||||||
|
@ -76,11 +77,15 @@
|
||||||
},
|
},
|
||||||
okText: {
|
okText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '确定'
|
default () {
|
||||||
|
return t('i.poptip.okText');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancelText: {
|
cancelText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '取消'
|
default () {
|
||||||
|
return t('i.poptip.cancelText');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
<script>
|
<script>
|
||||||
import List from './list.vue';
|
import List from './list.vue';
|
||||||
import Operation from './operation.vue';
|
import Operation from './operation.vue';
|
||||||
|
import { t } from '../../locale';
|
||||||
|
|
||||||
const prefixCls = 'ivu-transfer';
|
const prefixCls = 'ivu-transfer';
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@
|
||||||
titles: {
|
titles: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default () {
|
default () {
|
||||||
return ['源列表', '目的列表'];
|
return [t('i.transfer.titles.source'), t('i.transfer.titles.target')];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
operations: {
|
operations: {
|
||||||
|
@ -92,7 +93,9 @@
|
||||||
},
|
},
|
||||||
filterPlaceholder: {
|
filterPlaceholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '请输入搜索内容'
|
default () {
|
||||||
|
return t('i.transfer.filterPlaceholder');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
filterMethod: {
|
filterMethod: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
@ -103,7 +106,9 @@
|
||||||
},
|
},
|
||||||
notFoundText: {
|
notFoundText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '列表为空'
|
default () {
|
||||||
|
return t('i.transfer.notFoundText');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default {
|
||||||
startTime: 'Start Time',
|
startTime: 'Start Time',
|
||||||
endTime: 'End Time',
|
endTime: 'End Time',
|
||||||
clear: 'Clear',
|
clear: 'Clear',
|
||||||
ok: 'Ok',
|
ok: 'OK',
|
||||||
month: '',
|
month: '',
|
||||||
month1: 'January',
|
month1: 'January',
|
||||||
month2: 'February',
|
month2: 'February',
|
||||||
|
@ -55,6 +55,34 @@ export default {
|
||||||
m11: 'Nov',
|
m11: 'Nov',
|
||||||
m12: 'Dec'
|
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月',
|
m11: '11月',
|
||||||
m12: '12月'
|
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月',
|
m11: '11月',
|
||||||
m12: '12月'
|
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