mirror of https://github.com/ElemeFE/element
commit
f2646fba4d
|
@ -8,14 +8,14 @@
|
||||||
:class="{ 'is-week-mode': selectionMode === 'week' }">
|
:class="{ 'is-week-mode': selectionMode === 'week' }">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th v-if="showWeekNumber">{{ $t('el.datepicker.week') }}</th>
|
<th v-if="showWeekNumber">{{ t('el.datepicker.week') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.sun') }}</th>
|
<th>{{ t('el.datepicker.weeks.sun') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.mon') }}</th>
|
<th>{{ t('el.datepicker.weeks.mon') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.tue') }}</th>
|
<th>{{ t('el.datepicker.weeks.tue') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.wed') }}</th>
|
<th>{{ t('el.datepicker.weeks.wed') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.thu') }}</th>
|
<th>{{ t('el.datepicker.weeks.thu') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.fri') }}</th>
|
<th>{{ t('el.datepicker.weeks.fri') }}</th>
|
||||||
<th>{{ $t('el.datepicker.weeks.sat') }}</th>
|
<th>{{ t('el.datepicker.weeks.sat') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr
|
<tr
|
||||||
class="el-date-table__row"
|
class="el-date-table__row"
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<td
|
<td
|
||||||
v-for="cell in row"
|
v-for="cell in row"
|
||||||
:class="getCellClasses(cell)"
|
:class="getCellClasses(cell)"
|
||||||
v-text="cell.type === 'today' ? $t('el.datepicker.today') : cell.text"></td>
|
v-text="cell.type === 'today' ? t('el.datepicker.today') : cell.text"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -3,44 +3,44 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td :class="getCellStyle(0)">
|
<td :class="getCellStyle(0)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.jan') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.jan') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(1)">
|
<td :class="getCellStyle(1)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.feb') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.feb') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(2)">
|
<td :class="getCellStyle(2)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.mar') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.mar') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(3)">
|
<td :class="getCellStyle(3)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.apr') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.apr') }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td :class="getCellStyle(4)">
|
<td :class="getCellStyle(4)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.may') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.may') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(5)">
|
<td :class="getCellStyle(5)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.jun') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.jun') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(6)">
|
<td :class="getCellStyle(6)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.jul') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.jul') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(7)">
|
<td :class="getCellStyle(7)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.aug') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.aug') }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td :class="getCellStyle(8)">
|
<td :class="getCellStyle(8)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.sep') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.sep') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(9)">
|
<td :class="getCellStyle(9)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.oct') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.oct') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(10)">
|
<td :class="getCellStyle(10)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.nov') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.nov') }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td :class="getCellStyle(11)">
|
<td :class="getCellStyle(11)">
|
||||||
<a class="cell">{{ $t('el.datepicker.months.dec') }}</a>
|
<a class="cell">{{ t('el.datepicker.months.dec') }}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<span class="el-date-range-picker__editors-wrap">
|
<span class="el-date-range-picker__editors-wrap">
|
||||||
<span class="el-date-range-picker__time-picker-wrap">
|
<span class="el-date-range-picker__time-picker-wrap">
|
||||||
<input
|
<input
|
||||||
:placeholder="$t('el.datepicker.startDate')"
|
:placeholder="t('el.datepicker.startDate')"
|
||||||
class="el-date-range-picker__editor"
|
class="el-date-range-picker__editor"
|
||||||
:value="minVisibleDate"
|
:value="minVisibleDate"
|
||||||
@input="handleDateInput($event, 'min')"
|
@input="handleDateInput($event, 'min')"
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="el-date-range-picker__time-picker-wrap">
|
<span class="el-date-range-picker__time-picker-wrap">
|
||||||
<input
|
<input
|
||||||
:placeholder="$t('el.datepicker.startTime')"
|
:placeholder="t('el.datepicker.startTime')"
|
||||||
class="el-date-range-picker__editor"
|
class="el-date-range-picker__editor"
|
||||||
:value="minVisibleTime"
|
:value="minVisibleTime"
|
||||||
@focus="minTimePickerVisible = !minTimePickerVisible"
|
@focus="minTimePickerVisible = !minTimePickerVisible"
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<span class="el-date-range-picker__time-picker-wrap">
|
<span class="el-date-range-picker__time-picker-wrap">
|
||||||
<input
|
<input
|
||||||
ref="minInput"
|
ref="minInput"
|
||||||
:placeholder="$t('el.datepicker.endDate')"
|
:placeholder="t('el.datepicker.endDate')"
|
||||||
class="el-date-range-picker__editor"
|
class="el-date-range-picker__editor"
|
||||||
:value="maxVisibleDate"
|
:value="maxVisibleDate"
|
||||||
:readonly="!minDate"
|
:readonly="!minDate"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<span class="el-date-range-picker__time-picker-wrap">
|
<span class="el-date-range-picker__time-picker-wrap">
|
||||||
<input
|
<input
|
||||||
ref="maxInput"
|
ref="maxInput"
|
||||||
:placeholder="$t('el.datepicker.endTime')"
|
:placeholder="t('el.datepicker.endTime')"
|
||||||
class="el-date-range-picker__editor"
|
class="el-date-range-picker__editor"
|
||||||
:value="maxVisibleTime"
|
:value="maxVisibleTime"
|
||||||
@focus="minDate && (maxTimePickerVisible = !maxTimePickerVisible)"
|
@focus="minDate && (maxTimePickerVisible = !maxTimePickerVisible)"
|
||||||
|
@ -128,12 +128,12 @@
|
||||||
<div class="el-picker-panel__footer" v-if="showTime">
|
<div class="el-picker-panel__footer" v-if="showTime">
|
||||||
<a
|
<a
|
||||||
class="el-picker-panel__link-btn"
|
class="el-picker-panel__link-btn"
|
||||||
@click="handleClear">{{ $t('el.datepicker.clear') }}</a>
|
@click="handleClear">{{ t('el.datepicker.clear') }}</a>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-picker-panel__btn"
|
class="el-picker-panel__btn"
|
||||||
@click="handleConfirm"
|
@click="handleConfirm"
|
||||||
:disabled="btnDisabled">{{ $t('el.datepicker.confirm') }}</button>
|
:disabled="btnDisabled">{{ t('el.datepicker.confirm') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -152,11 +152,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
leftLabel() {
|
leftLabel() {
|
||||||
return this.date.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + this.$t(`el.datepicker.month${ this.date.getMonth() + 1 }`);
|
return this.date.getFullYear() + ' ' + this.t('el.datepicker.year') + ' ' + this.t(`el.datepicker.month${ this.date.getMonth() + 1 }`);
|
||||||
},
|
},
|
||||||
|
|
||||||
rightLabel() {
|
rightLabel() {
|
||||||
return this.rightDate.getFullYear() + ' ' + this.$t('el.datepicker.year') + ' ' + this.$t(`el.datepicker.month${ this.rightDate.getMonth() + 1 }`);
|
return this.rightDate.getFullYear() + ' ' + this.t('el.datepicker.year') + ' ' + this.t(`el.datepicker.month${ this.rightDate.getMonth() + 1 }`);
|
||||||
},
|
},
|
||||||
|
|
||||||
leftYear() {
|
leftYear() {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="el-date-picker__time-header" v-if="showTime">
|
<div class="el-date-picker__time-header" v-if="showTime">
|
||||||
<span class="el-date-picker__editor-wrap">
|
<span class="el-date-picker__editor-wrap">
|
||||||
<input
|
<input
|
||||||
:placehoder="$t('el.datepicker.selectDate')"
|
:placehoder="t('el.datepicker.selectDate')"
|
||||||
type="text"
|
type="text"
|
||||||
v-model.lazy="visibleDate"
|
v-model.lazy="visibleDate"
|
||||||
class="el-date-picker__editor">
|
class="el-date-picker__editor">
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
ref="input"
|
ref="input"
|
||||||
@focus="timePickerVisible = !timePickerVisible"
|
@focus="timePickerVisible = !timePickerVisible"
|
||||||
v-model.lazy="visibleTime"
|
v-model.lazy="visibleTime"
|
||||||
:placehoder="$t('el.datepicker.selectTime')"
|
:placehoder="t('el.datepicker.selectTime')"
|
||||||
type="text"
|
type="text"
|
||||||
class="el-date-picker__editor">
|
class="el-date-picker__editor">
|
||||||
<time-picker
|
<time-picker
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
@click="showMonthPicker"
|
@click="showMonthPicker"
|
||||||
v-show="currentView === 'date'"
|
v-show="currentView === 'date'"
|
||||||
class="el-date-picker__header-label"
|
class="el-date-picker__header-label"
|
||||||
:class="{ active: currentView === 'month' }">{{$t(`el.datepicker.month${ month + 1 }`)}}</span>
|
:class="{ active: currentView === 'month' }">{{t(`el.datepicker.month${ month + 1 }`)}}</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="nextYear"
|
@click="nextYear"
|
||||||
|
@ -115,11 +115,11 @@
|
||||||
<a
|
<a
|
||||||
href="JavaScript:"
|
href="JavaScript:"
|
||||||
class="el-picker-panel__link-btn"
|
class="el-picker-panel__link-btn"
|
||||||
@click="changeToNow">{{ $t('el.datepicker.now') }}</a>
|
@click="changeToNow">{{ t('el.datepicker.now') }}</a>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-picker-panel__btn"
|
class="el-picker-panel__btn"
|
||||||
@click="confirm">{{ $t('el.datepicker.confirm') }}</button>
|
@click="confirm">{{ t('el.datepicker.confirm') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -421,7 +421,7 @@
|
||||||
yearLabel() {
|
yearLabel() {
|
||||||
const year = this.year;
|
const year = this.year;
|
||||||
if (!year) return '';
|
if (!year) return '';
|
||||||
const yearTranslation = this.$t('el.datepicker.year');
|
const yearTranslation = this.t('el.datepicker.year');
|
||||||
if (this.currentView === 'year') {
|
if (this.currentView === 'year') {
|
||||||
const startYear = Math.floor(year / 10) * 10;
|
const startYear = Math.floor(year / 10) * 10;
|
||||||
return startYear + ' ' + yearTranslation + '-' + (startYear + 9) + ' ' + yearTranslation;
|
return startYear + ' ' + yearTranslation + '-' + (startYear + 9) + ' ' + yearTranslation;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
class="el-time-range-picker el-picker-panel">
|
class="el-time-range-picker el-picker-panel">
|
||||||
<div class="el-time-range-picker__content">
|
<div class="el-time-range-picker__content">
|
||||||
<div class="el-time-range-picker__cell">
|
<div class="el-time-range-picker__cell">
|
||||||
<div class="el-time-range-picker__header">{{ $t('el.datepicker.startTime') }}</div>
|
<div class="el-time-range-picker__header">{{ t('el.datepicker.startTime') }}</div>
|
||||||
<div class="el-time-range-picker__body el-time-panel__content">
|
<div class="el-time-range-picker__body el-time-panel__content">
|
||||||
<time-spinner
|
<time-spinner
|
||||||
ref="minSpinner"
|
ref="minSpinner"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-time-range-picker__cell">
|
<div class="el-time-range-picker__cell">
|
||||||
<div class="el-time-range-picker__header">{{ $t('el.datepicker.endTime') }}</div>
|
<div class="el-time-range-picker__header">{{ t('el.datepicker.endTime') }}</div>
|
||||||
<div class="el-time-range-picker__body el-time-panel__content">
|
<div class="el-time-range-picker__body el-time-panel__content">
|
||||||
<time-spinner
|
<time-spinner
|
||||||
ref="maxSpinner"
|
ref="maxSpinner"
|
||||||
|
@ -38,12 +38,12 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-time-panel__btn cancel"
|
class="el-time-panel__btn cancel"
|
||||||
@click="handleCancel()">{{ $t('el.datepicker.cancel') }}</button>
|
@click="handleCancel()">{{ t('el.datepicker.cancel') }}</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-time-panel__btn confirm"
|
class="el-time-panel__btn confirm"
|
||||||
@click="handleConfirm()"
|
@click="handleConfirm()"
|
||||||
:disabled="btnDisabled">{{ $t('el.datepicker.confirm') }}</button>
|
:disabled="btnDisabled">{{ t('el.datepicker.confirm') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-time-panel__btn cancel"
|
class="el-time-panel__btn cancel"
|
||||||
@click="handleCancel">{{ $t('el.datepicker.cancel') }}</button>
|
@click="handleCancel">{{ t('el.datepicker.cancel') }}</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="el-time-panel__btn confirm"
|
class="el-time-panel__btn confirm"
|
||||||
@click="handleConfirm()">{{ $t('el.datepicker.confirm') }}</button>
|
@click="handleConfirm()">{{ t('el.datepicker.confirm') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
|
|
||||||
const CONFIRM_TEXT = $t('el.messagebox.confirm');
|
const CONFIRM_TEXT = t('el.messagebox.confirm');
|
||||||
const CANCEL_TEXT = $t('el.messagebox.cancel');
|
const CANCEL_TEXT = t('el.messagebox.cancel');
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
import ElInput from 'element-ui/packages/input';
|
import ElInput from 'element-ui/packages/input';
|
||||||
import ElButton from 'element-ui/packages/button';
|
import ElButton from 'element-ui/packages/button';
|
||||||
import { addClass, removeClass } from 'wind-dom/src/class';
|
import { addClass, removeClass } from 'wind-dom/src/class';
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
|
|
||||||
let typeMap = {
|
let typeMap = {
|
||||||
success: 'circle-check',
|
success: 'circle-check',
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
if (this.$type === 'prompt') {
|
if (this.$type === 'prompt') {
|
||||||
var inputPattern = this.inputPattern;
|
var inputPattern = this.inputPattern;
|
||||||
if (inputPattern && !inputPattern.test(this.inputValue || '')) {
|
if (inputPattern && !inputPattern.test(this.inputValue || '')) {
|
||||||
this.editorErrorMessage = this.inputErrorMessage || $t('el.messagebox.error');
|
this.editorErrorMessage = this.inputErrorMessage || t('el.messagebox.error');
|
||||||
addClass(this.$refs.input.$el.querySelector('input'), 'invalid');
|
addClass(this.$refs.input.$el.querySelector('input'), 'invalid');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
if (typeof inputValidator === 'function') {
|
if (typeof inputValidator === 'function') {
|
||||||
var validateResult = inputValidator(this.inputValue);
|
var validateResult = inputValidator(this.inputValue);
|
||||||
if (validateResult === false) {
|
if (validateResult === false) {
|
||||||
this.editorErrorMessage = this.inputErrorMessage || $t('el.messagebox.error');
|
this.editorErrorMessage = this.inputErrorMessage || t('el.messagebox.error');
|
||||||
addClass(this.$refs.input.$el.querySelector('input'), 'invalid');
|
addClass(this.$refs.input.$el.querySelector('input'), 'invalid');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -184,8 +184,8 @@
|
||||||
inputErrorMessage: '',
|
inputErrorMessage: '',
|
||||||
showConfirmButton: true,
|
showConfirmButton: true,
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
confirmButtonText: $t('el.messagebox.confirm'),
|
confirmButtonText: t('el.messagebox.confirm'),
|
||||||
cancelButtonText: $t('el.messagebox.cancel'),
|
cancelButtonText: t('el.messagebox.cancel'),
|
||||||
confirmButtonClass: '',
|
confirmButtonClass: '',
|
||||||
confirmButtonDisabled: false,
|
confirmButtonDisabled: false,
|
||||||
cancelButtonClass: '',
|
cancelButtonClass: '',
|
||||||
|
|
|
@ -2,7 +2,7 @@ import Pager from './pager.vue';
|
||||||
import ElSelect from 'element-ui/packages/select';
|
import ElSelect from 'element-ui/packages/select';
|
||||||
import ElOption from 'element-ui/packages/option';
|
import ElOption from 'element-ui/packages/option';
|
||||||
import Migrating from 'element-ui/src/mixins/migrating';
|
import Migrating from 'element-ui/src/mixins/migrating';
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ElPagination',
|
name: 'ElPagination',
|
||||||
|
@ -137,7 +137,7 @@ export default {
|
||||||
this.$parent.pageSizes.map(item =>
|
this.$parent.pageSizes.map(item =>
|
||||||
<el-option
|
<el-option
|
||||||
value={ item }
|
value={ item }
|
||||||
label={ item + ' ' + $t('el.pagination.pagesize') }>
|
label={ item + ' ' + t('el.pagination.pagesize') }>
|
||||||
</el-option>
|
</el-option>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
||||||
render(h) {
|
render(h) {
|
||||||
return (
|
return (
|
||||||
<span class="el-pagination__jump">
|
<span class="el-pagination__jump">
|
||||||
{ $t('el.pagination.goto') }
|
{ t('el.pagination.goto') }
|
||||||
<input
|
<input
|
||||||
class="el-pagination__editor"
|
class="el-pagination__editor"
|
||||||
type="number"
|
type="number"
|
||||||
|
@ -194,7 +194,7 @@ export default {
|
||||||
on-focus={ this.handleFocus }
|
on-focus={ this.handleFocus }
|
||||||
style={{ width: '30px' }}
|
style={{ width: '30px' }}
|
||||||
number/>
|
number/>
|
||||||
{ $t('el.pagination.pageClassifier') }
|
{ t('el.pagination.pageClassifier') }
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ export default {
|
||||||
render(h) {
|
render(h) {
|
||||||
return (
|
return (
|
||||||
typeof this.$parent.total === 'number'
|
typeof this.$parent.total === 'number'
|
||||||
? <span class="el-pagination__total">{ $t('el.pagination.total', { total: this.$parent.total }) }</span>
|
? <span class="el-pagination__total">{ t('el.pagination.total', { total: this.$parent.total }) }</span>
|
||||||
: ''
|
: ''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
||||||
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
|
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
|
||||||
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [Emitter, Locale],
|
mixins: [Emitter, Locale],
|
||||||
|
@ -110,17 +110,17 @@
|
||||||
|
|
||||||
emptyText() {
|
emptyText() {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return this.$t('el.select.loading');
|
return this.t('el.select.loading');
|
||||||
} else {
|
} else {
|
||||||
if (this.voidRemoteQuery) {
|
if (this.voidRemoteQuery) {
|
||||||
this.voidRemoteQuery = false;
|
this.voidRemoteQuery = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.filterable && this.filteredOptionsCount === 0) {
|
if (this.filterable && this.filteredOptionsCount === 0) {
|
||||||
return this.$t('el.select.noMatch');
|
return this.t('el.select.noMatch');
|
||||||
}
|
}
|
||||||
if (this.options.length === 0) {
|
if (this.options.length === 0) {
|
||||||
return this.$t('el.select.noData');
|
return this.t('el.select.noData');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
multiple: Boolean,
|
multiple: Boolean,
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: $t('el.select.placeholder')
|
default: t('el.select.placeholder')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
<div class="el-table-filter__bottom">
|
<div class="el-table-filter__bottom">
|
||||||
<button @click="handleConfirm"
|
<button @click="handleConfirm"
|
||||||
:class="{ 'is-disabled': filteredValue.length === 0 }"
|
:class="{ 'is-disabled': filteredValue.length === 0 }"
|
||||||
:disabled="filteredValue.length === 0">{{ $t('el.table.confirmFilter') }}</button>
|
:disabled="filteredValue.length === 0">{{ t('el.table.confirmFilter') }}</button>
|
||||||
<button @click="handleReset">{{ $t('el.table.resetFilter') }}</button>
|
<button @click="handleReset">{{ t('el.table.resetFilter') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-table-filter" v-else v-show="showPopper">
|
<div class="el-table-filter" v-else v-show="showPopper">
|
||||||
<ul class="el-table-filter__list">
|
<ul class="el-table-filter__list">
|
||||||
<li class="el-table-filter__list-item"
|
<li class="el-table-filter__list-item"
|
||||||
:class="{ 'is-active': !filterValue }"
|
:class="{ 'is-active': !filterValue }"
|
||||||
@click="handleSelect(null)">{{ $t('el.table.clearFilter') }}</li>
|
@click="handleSelect(null)">{{ t('el.table.clearFilter') }}</li>
|
||||||
<li class="el-table-filter__list-item"
|
<li class="el-table-filter__list-item"
|
||||||
v-for="filter in filters"
|
v-for="filter in filters"
|
||||||
:label="filter.value"
|
:label="filter.value"
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
<div class="el-table-filter__content">
|
<div class="el-table-filter__content">
|
||||||
</div>
|
</div>
|
||||||
<div class="el-table-filter__bottom">
|
<div class="el-table-filter__bottom">
|
||||||
<button on-click={ this.handleConfirm }>{ this.$t('el.table.confirmFilter') }</button>
|
<button on-click={ this.handleConfirm }>{ this.t('el.table.confirmFilter') }</button>
|
||||||
<button on-click={ this.handleReset }>{ this.$t('el.table.resetFilter') }</button>
|
<button on-click={ this.handleReset }>{ this.t('el.table.resetFilter') }</button>
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
},
|
},
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
import throttle from 'throttle-debounce/throttle';
|
import throttle from 'throttle-debounce/throttle';
|
||||||
import debounce from 'throttle-debounce/debounce';
|
import debounce from 'throttle-debounce/debounce';
|
||||||
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
import TableStore from './table-store';
|
import TableStore from './table-store';
|
||||||
import TableLayout from './table-layout';
|
import TableLayout from './table-layout';
|
||||||
import TableBody from './table-body';
|
import TableBody from './table-body';
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
|
|
||||||
emptyText: {
|
emptyText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: $t('el.table.emptyText')
|
default: t('el.table.emptyText')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
<transition name="fade-in">
|
<transition name="fade-in">
|
||||||
<div v-show="mouseover" class="el-dragger__cover__interact">
|
<div v-show="mouseover" class="el-dragger__cover__interact">
|
||||||
<div class="el-draggeer__cover__btns">
|
<div class="el-draggeer__cover__btns">
|
||||||
<span class="btn" @click="$parent.handleClick()"><i class="el-icon-upload2"></i><span>{{ $t('el.upload.continue') }}</span></span>
|
<span class="btn" @click="$parent.handleClick()"><i class="el-icon-upload2"></i><span>{{ t('el.upload.continue') }}</span></span>
|
||||||
<span class="btn" @click="onPreview(image)"><i class="el-icon-view"></i><span>{{ $t('el.upload.preview') }}</span></span>
|
<span class="btn" @click="onPreview(image)"><i class="el-icon-view"></i><span>{{ t('el.upload.preview') }}</span></span>
|
||||||
<span class="btn" @click="onRemove(image)"><i class="el-icon-delete2"></i><span>{{ $t('el.upload.delete') }}</span></span>
|
<span class="btn" @click="onRemove(image)"><i class="el-icon-delete2"></i><span>{{ t('el.upload.delete') }}</span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<a class="el-upload__file__name" @click="$emit('preview', file)">
|
<a class="el-upload__file__name" @click="$emit('preview', file)">
|
||||||
<i class="el-icon-document"></i>{{file.name}}
|
<i class="el-icon-document"></i>{{file.name}}
|
||||||
</a>
|
</a>
|
||||||
<span class="el-upload__btn-delete" @click="$emit('remove', file)" v-show="file.status === 'finished'">{{ $t('el.upload.delete') }}</span>
|
<span class="el-upload__btn-delete" @click="$emit('remove', file)" v-show="file.status === 'finished'">{{ t('el.upload.delete') }}</span>
|
||||||
<el-progress
|
<el-progress
|
||||||
v-if="file.showProgress"
|
v-if="file.showProgress"
|
||||||
:stroke-width="2"
|
:stroke-width="2"
|
||||||
|
|
|
@ -7,7 +7,7 @@ const format = Format(Vue);
|
||||||
let lang = defaultLang;
|
let lang = defaultLang;
|
||||||
let merged = false;
|
let merged = false;
|
||||||
|
|
||||||
export const $t = function(path, options) {
|
export const t = function(path, options) {
|
||||||
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
||||||
if (typeof vuei18n === 'function') {
|
if (typeof vuei18n === 'function') {
|
||||||
if (!merged) {
|
if (!merged) {
|
||||||
|
@ -32,4 +32,4 @@ export const $t = function(path, options) {
|
||||||
export const use = function(l) {
|
export const use = function(l) {
|
||||||
lang = l || lang;
|
lang = l || lang;
|
||||||
};
|
};
|
||||||
export default { use, $t };
|
export default { use, t };
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { $t } from 'element-ui/src/locale';
|
import { t } from 'element-ui/src/locale';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
$t(...args) {
|
t(...args) {
|
||||||
return $t.apply(this, args);
|
return t.apply(this, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue