UNPKG

x-antd-vue

Version:

base on antd 1.7.2

28 lines (27 loc) 675 B
export default { methods: { getFormat: function getFormat() { var format = this.format; var locale = this.locale, timePicker = this.timePicker; if (!format) { if (timePicker) { format = locale.dateTimeFormat; } else { format = locale.dateFormat; } } return format; }, focus: function focus() { if (this.focusElement) { this.focusElement.focus(); } else if (this.$refs.rootInstance) { this.$refs.rootInstance.focus(); } }, saveFocusElement: function saveFocusElement(focusElement) { this.focusElement = focusElement; } } };