-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(DatePicker2): support defaultValue for quarter, close #3006 #4985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是您为 Fusion/Next 提的第一个 pr,感谢您为 Fusion 做出的贡献,我们会尽快进行处理。
71a3e4b
to
ef1f4a0
Compare
components/util/func.ts
Outdated
@@ -1,6 +1,7 @@ | |||
import type { ConfigType, OptionType, Dayjs } from 'dayjs'; | |||
import { isPromise } from './object'; | |||
import datejs from './date'; | |||
import { isArray } from 'lodash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是直接用Array.isArray 就可以处理了,不用引入lodash
components/util/func.ts
Outdated
/** | ||
* 字符型日期转为dayjs类型 | ||
*/ | ||
export function getValueWithDayjs(val: ConfigType | ConfigType[], format: OptionType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的返回类型最好标注一下,下面的方法一样
components/util/func.ts
Outdated
let date = val; | ||
|
||
if (isArray(val)) { | ||
date = [0, 1].map(index => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方直接对date做处理就好了,取[0,1]就限制了长度,工具方法不通用
ef1f4a0
to
44f082c
Compare
No description provided.