From 730d127c3aaf4bca76cbe7ab792d0b2b97110ca7 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sun, 22 Jun 2025 21:33:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20alovajs=20ts=20=E5=8A=A0=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/alova-foo.ts | 8 ++++++-- src/utils/request/alova.ts | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/alova-foo.ts b/src/api/alova-foo.ts index 13852ef..35be884 100644 --- a/src/api/alova-foo.ts +++ b/src/api/alova-foo.ts @@ -1,8 +1,12 @@ -// alovaJS 还在整理中,有比较熟悉的开发者可以PR一下,省得我去摸索 import { http } from '@/utils/request/alova' +export interface IFooItem { + id: string + name: string +} + export function foo() { - return http.Get('/foo', { + return http.Get('/foo', { params: { name: '菲鸽', page: 1, diff --git a/src/utils/request/alova.ts b/src/utils/request/alova.ts index 4083115..77584d3 100644 --- a/src/utils/request/alova.ts +++ b/src/utils/request/alova.ts @@ -5,8 +5,6 @@ const baseURL = JSON.parse(__VITE_APP_PROXY__) ? import.meta.env.VITE_APP_PROXY_PREFIX : import.meta.env.VITE_SERVER_BASEURL -// alovaJS 还在整理中,有比较熟悉的开发者可以PR一下,省得我去摸索 -// 主要是下面这个文件的TS整理,如何通过泛型传入想要的数据结构,得到对应的数据结构 export const http = createAlova({ baseURL, ...AdapterUniapp(), From 65830ae0f4ceb5c2d9388adcad38fcf69e950c06 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 23 Jun 2025 10:30:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9D=83=E5=B9=B4=E4=BB=BD=E5=92=8C=E9=A1=B9=E7=9B=AE=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将LICENSE文件中的版权年份从2024更新为2025,并更新README.md中的项目链接 --- LICENSE | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 9c3438e..9e91d10 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 菲鸽 +Copyright (c) 2025 菲鸽 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 18934b4..c088199 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@

- +

- unibest - 最好的 uniapp 开发框架 + unibest - 最好的 uniapp 开发框架

From 585dc2e02f20047bce3939dabef8a4cc85b2285d Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 23 Jun 2025 11:23:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?refactor(.vscode):=20=E6=B8=85=E7=90=86?= =?UTF-8?q?=E5=B9=B6=E9=87=8D=E6=96=B0=E7=BB=84=E7=BB=87=20settings.json?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除重复和冗余的配置项,重新组织文件结构以提高可读性 保留必要的文件关联和拼写检查配置 --- .vscode/settings.json | 73 ++++++++++++------------------------------- 1 file changed, 20 insertions(+), 53 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ac73327..fea52c8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,52 +1,10 @@ { - // 默认格式化工具选择prettier - "editor.defaultFormatter": "esbenp.prettier-vscode", - - // 配置stylelint检查的文件类型范围 - "stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应 - "stylelint.enable": true, - "css.validate": false, - "less.validate": false, - "scss.validate": false, - "[shellscript]": { - "editor.defaultFormatter": "foxundermoon.shell-format" - }, - "[dotenv]": { - "editor.defaultFormatter": "foxundermoon.shell-format" - }, - "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, // 配置语言的文件关联 "files.associations": { "pages.json": "jsonc", // pages.json 可以写注释 "manifest.json": "jsonc" // manifest.json 可以写注释 }, - "cSpell.words": [ - "Aplipay", - "climblee", - "commitlint", - "dcloudio", - "iconfont", - "oxlint", - "qrcode", - "refresherrefresh", - "scrolltolower", - "tabbar", - "Toutiao", - "unibest", - "uview", - "uvui", - "Wechat", - "WechatMiniprogram", - "Weixin" - ], + "typescript.tsdk": "node_modules\\typescript\\lib", "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, @@ -57,16 +15,6 @@ "eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*" }, - // // 保存的时候自动格式化 - // "prettier.enable": true, - // "editor.formatOnSave": true, - // // 开启自动修复 - // "editor.codeActionsOnSave": { - // "source.fixAll": "explicit", - // "source.fixAll.eslint": "explicit", - // "source.fixAll.stylelint": "explicit" - // }, - // Disable the default formatter, use eslint instead "prettier.enable": false, "editor.formatOnSave": false, @@ -115,5 +63,24 @@ "scss", "pcss", "postcss" + ], + "cSpell.words": [ + "Aplipay", + "climblee", + "commitlint", + "dcloudio", + "iconfont", + "oxlint", + "qrcode", + "refresherrefresh", + "scrolltolower", + "tabbar", + "Toutiao", + "unibest", + "uview", + "uvui", + "Wechat", + "WechatMiniprogram", + "Weixin" ] } From 9494f8fda6d00c766b181081e91ff326d745ac48 Mon Sep 17 00:00:00 2001 From: LittleTurtle2333 Date: Mon, 23 Jun 2025 11:39:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=E5=BC=95=E5=85=A5eslint-plugin-fo?= =?UTF-8?q?rmat=E4=BE=9D=E8=B5=96=EF=BC=8C=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E4=BD=BF=E7=94=A8=E7=9A=84Prettier=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierignore | 14 ------- .prettierrc.cjs | 19 ---------- eslint.config.mjs | 21 +++++++++++ package.json | 2 +- pnpm-lock.yaml | 94 +++++++++++++++++++++++++++++++++++++++++------ 5 files changed, 105 insertions(+), 45 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc.cjs diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 77134df..0000000 --- a/.prettierignore +++ /dev/null @@ -1,14 +0,0 @@ -node_modules - -# unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 -auto-import.d.ts - -# vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore -uni-pages.d.ts - -# 插件生成的文件 -src/pages.json -src/manifest.json - -# 忽略自动生成文件 -src/service/app/** diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 448279e..0000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,19 +0,0 @@ -// @see https://prettier.io/docs/en/options -module.exports = { - singleQuote: true, - printWidth: 100, - tabWidth: 2, - useTabs: false, - semi: false, - trailingComma: 'all', - endOfLine: 'auto', - htmlWhitespaceSensitivity: 'ignore', - overrides: [ - { - files: '*.{json,jsonc}', - options: { - trailingComma: 'none', - }, - }, - ], -} diff --git a/eslint.config.mjs b/eslint.config.mjs index a624835..54ce246 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,6 +7,15 @@ export default uniHelper({ ignores: [ 'src/uni_modules/', 'dist', + // unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 + 'auto-import.d.ts', + // vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore + 'uni-pages.d.ts', + // 插件生成的文件 + 'src/pages.json', + 'src/manifest.json', + // 忽略自动生成文件 + 'src/service/app/**', ], rules: { 'no-console': 'off', @@ -19,4 +28,16 @@ export default uniHelper({ 'ts/no-empty-object-type': 'off', 'no-extend-native': 'off', }, + formatters: { + /** + * Format CSS, LESS, SCSS files, also the `