UNPKG

@fe6/water-pro

Version:

An enterprise-class UI design language and Vue-based implementation

30 lines (29 loc) 658 B
export default { methods: { getFormat() { let { format } = this; const { locale, timePicker } = this; if (!format) { if (timePicker && this.type !== 'multiple') { format = locale.dateTimeFormat; } else { format = locale.dateFormat; } } return format; }, focus() { if (this.focusElement) { this.focusElement.focus(); } else if (this.rootInstance) { this.rootInstance.focus(); } }, saveFocusElement(focusElement) { this.focusElement = focusElement; }, saveRoot(root) { this.rootInstance = root; }, }, };