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

fix: api.json数据 没有type 无法判断插件 #203

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/scripts/vitest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ function groupByComponent(allApi, framework) {
});
// API 默认顺序为字母顺序,但是插件 API 的顺序应当为创建顺序。插件 API 形如:$Message.info(theme, duration)
Object.keys(result).forEach((componentName) => {
const plugin = result[componentName].type === 'plugin';
if (plugin) {
if (componentName[0]==='$') {
result[componentName] = result[componentName].sort((a, b) => {
// props 放在前面,其余类型放在后面 (props 的 field_category 值最小)
if (a.field_category < b.field_category) return -1;
Expand Down