Skip to content
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

修复部分时间日期相关的组件内部使用的 Day.js 的插件没有在内部引入而需要用户引入的问题 #53

Merged
merged 5 commits into from
Mar 31, 2021

Conversation

Lohoyo
Copy link
Collaborator

@Lohoyo Lohoyo commented Mar 31, 2021

日期时间相关的组件使用的 dayjs 的插件改为用时声明而不提升声明,是因为:
假设在 A 组件的 index 文件里声明了一个插件,而 A 组件的子文件 a 用到了这个插件,这种情况下(提升声明),用户使用 A 组件不会有问题,但是可能会有 B 组件用到了 A 组件的子文件 a,这时候 B 组件其实没有引入 A 组件的 index 文件,而是直接引入了 a,用户使用 B 组件就会因缺少对应的插件而报错。

@jinzhan jinzhan merged commit e3bcd6b into ecomfe:master Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants