This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nezha-fronted/nezha-fronted/src/components/common/myDatePicker/index.js
2021-04-28 15:18:21 +08:00

16 lines
456 B
JavaScript

import DatePicker from './src/picker/date-picker'
import localeEn from 'element-ui/lib/locale/lang/en'
import localeCn from 'element-ui/lib/locale/lang/zh-CN'
import { use } from 'element-ui/src/locale/'
/* istanbul ignore next */
DatePicker.install = function install (Vue) {
if (localStorage.getItem('nz-language') === 'cn') {
use(localeCn)
} else {
use(localeEn)
}
Vue.component(DatePicker.name, DatePicker)
}
export default DatePicker