依赖库版本:
vue3 + antd for vue v3.x
dayjs version ^1.11.9
使用dayjs格式化表单中的日期控件值后,点击日期选择器直接报错
解决:
引入dayjs插件
import dayjs from 'dayjs'
import advancedFormat from 'dayjs/plugin/advancedFormat'
import customParseFormat from 'dayjs/plugin/customParseFormat'
import localeData from 'dayjs/plugin/localeData'
import weekday from 'dayjs/plugin/weekday'
import weekOfYear from 'dayjs/plugin/weekOfYear'
import weekYear from 'dayjs/plugin/weekYear'
dayjs.extend(customParseFormat)
dayjs.extend(advancedFormat)
dayjs.extend(weekday)
dayjs.extend(localeData)
dayjs.extend(weekOfYear)
dayjs.extend(weekYear)
标签:function,weekOfYear,TypeError,dayjs,extend,plugin,clone,weekday,import
From: https://www.cnblogs.com/windzz/p/17658616.html