修复部分时间日期相关的组件内部使用的 Day.js 的插件没有在内部引入而需要用户引入的问题 #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
日期时间相关的组件使用的 dayjs 的插件改为用时声明而不提升声明,是因为:
假设在 A 组件的 index 文件里声明了一个插件,而 A 组件的子文件 a 用到了这个插件,这种情况下(提升声明),用户使用 A 组件不会有问题,但是可能会有 B 组件用到了 A 组件的子文件 a,这时候 B 组件其实没有引入 A 组件的 index 文件,而是直接引入了 a,用户使用 B 组件就会因缺少对应的插件而报错。