From 4e3283ff019b84b6f8cab76a55fdb3920352b53b Mon Sep 17 00:00:00 2001 From: xcbyy <2578898740@qq.com> Date: Wed, 21 Oct 2026 16:48:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(miniapp):=20=E4=BF=AE=E5=A4=8D=20hall.vue?= =?UTF-8?q?=20=E6=B7=B7=E5=85=A5=20TS=20=E7=B1=BB=E5=9E=8B=E6=A0=87?= =?UTF-8?q?=E6=B3=A8=E5=AF=BC=E8=87=B4=E7=BC=96=E8=AF=91=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - countByType 的 (cls: string)/(o: any) 改为纯 JS 写法 - 新增 miniapp-script-syntax 护栏:未声明 lang=ts 的 vue 脚本禁止 TS 类型标注(112 套件/734 用例全绿) --- pwuniapp/pages/expert/hall.vue | 2 +- server/tests/miniapp-script-syntax.spec.ts | 38 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 server/tests/miniapp-script-syntax.spec.ts diff --git a/pwuniapp/pages/expert/hall.vue b/pwuniapp/pages/expert/hall.vue index 419c2f4..646311a 100644 --- a/pwuniapp/pages/expert/hall.vue +++ b/pwuniapp/pages/expert/hall.vue @@ -385,7 +385,7 @@ onUnmounted(() => { }); -const countByType = (cls: string) => orders.value.filter((o: any) => o.typeClass === cls).length; +const countByType = (cls) => orders.value.filter((o) => o.typeClass === cls).length; const categories = computed(() => [ { key: 'all', name: '全部可接', count: orders.value.length, icon: ICONS.gridAll }, diff --git a/server/tests/miniapp-script-syntax.spec.ts b/server/tests/miniapp-script-syntax.spec.ts new file mode 100644 index 0000000..ecc3f42 --- /dev/null +++ b/server/tests/miniapp-script-syntax.spec.ts @@ -0,0 +1,38 @@ +// 已读取AGENTS.md +import * as fs from 'fs'; +import * as path from 'path'; + +/** + * 第九十七批:小程序 Vue 单文件不得混入 TypeScript 语法。 + * 背景:hall.vue 的 `