From 56e36b2e9c4bb47bd938be8c68fe87ab18e51211 Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Tue, 7 Nov 2023 20:19:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20api.json=E6=95=B0=E6=8D=AE=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89type=20=E6=97=A0=E6=B3=95=E5=88=A4=E6=96=AD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/scripts/vitest/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/scripts/vitest/utils.js b/packages/scripts/vitest/utils.js index 80deb5806..88cc1764c 100644 --- a/packages/scripts/vitest/utils.js +++ b/packages/scripts/vitest/utils.js @@ -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;