mirror of https://github.com/ElemeFE/element
DatePicker: fix i18n
parent
fd989dbd0f
commit
983fa7413a
|
@ -302,7 +302,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
$t,
|
$t(...args) {
|
||||||
|
return $t.apply(this, args);
|
||||||
|
},
|
||||||
|
|
||||||
closeLeftTimePicker() {
|
closeLeftTimePicker() {
|
||||||
this.leftTimePickerVisible = false;
|
this.leftTimePickerVisible = false;
|
||||||
|
|
|
@ -48,8 +48,9 @@
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/ecmascript-6">
|
<script type="text/babel">
|
||||||
import { parseDate, limitRange } from '../util';
|
import { parseDate, limitRange } from '../util';
|
||||||
|
import { $t } from '../util';
|
||||||
|
|
||||||
const MIN_TIME = parseDate('00:00:00', 'HH:mm:ss');
|
const MIN_TIME = parseDate('00:00:00', 'HH:mm:ss');
|
||||||
const MAX_TIME = parseDate('23:59:59', 'HH:mm:ss');
|
const MAX_TIME = parseDate('23:59:59', 'HH:mm:ss');
|
||||||
|
@ -95,6 +96,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
$t(...args) {
|
||||||
|
return $t.apply(this, args);
|
||||||
|
},
|
||||||
|
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('pick');
|
this.$emit('pick');
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/ecmascript-6">
|
<script type="text/babel">
|
||||||
const parseTime = function(time) {
|
const parseTime = function(time) {
|
||||||
const values = ('' || time).split(':');
|
const values = ('' || time).split(':');
|
||||||
if (values.length >= 2) {
|
if (values.length >= 2) {
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<script type="text/babel">
|
<script type="text/babel">
|
||||||
import { limitRange } from '../util';
|
import { limitRange } from '../util';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import { $t } from '../util';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -91,6 +92,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
$t(...args) {
|
||||||
|
return $t.apply(this, args);
|
||||||
|
},
|
||||||
|
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.$emit('pick', null);
|
this.$emit('pick', null);
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,7 +12,7 @@ function broadcast(componentName, eventName, params) {
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
dispatch(componentName, eventName, params) {
|
dispatch(componentName, eventName, params) {
|
||||||
var parent = this.$parent;
|
var parent = this.$parent || this.$root;
|
||||||
var name = parent.$options.componentName;
|
var name = parent.$options.componentName;
|
||||||
|
|
||||||
while (parent && (!name || name !== componentName)) {
|
while (parent && (!name || name !== componentName)) {
|
||||||
|
|
Loading…
Reference in New Issue