Skip to content

Commit

Permalink
fix: api.json数据 没有type 无法判断插件 (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Nov 7, 2023
1 parent a988f25 commit 56e36b2
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 56e36b2

Please sign in to comment.