From 08ce9386963e8bc0062a83033083ea01352d9f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Fri, 3 May 2024 22:50:53 +0800 Subject: [PATCH 01/12] chore: delete page.json + manifest.json --- src/manifest.json | 79 ----------------------------------------- src/pages.json | 89 ----------------------------------------------- 2 files changed, 168 deletions(-) delete mode 100644 src/manifest.json delete mode 100644 src/pages.json diff --git a/src/manifest.json b/src/manifest.json deleted file mode 100644 index f6ad007..0000000 --- a/src/manifest.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "unibest-base", - "appid": "H57F2ACE4", - "description": "", - "versionName": "1.0.0", - "versionCode": "100", - "transformPx": false, - "app-plus": { - "usingComponents": true, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - "modules": {}, - "distribute": { - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "minSdkVersion": 30, - "targetSdkVersion": 30, - "abiFilters": [ - "armeabi-v7a", - "arm64-v8a" - ] - }, - "ios": {}, - "sdkConfigs": {}, - "icons": { - "android": {}, - "ios": {} - } - } - }, - "quickapp": {}, - "mp-weixin": { - "appid": "wxa2abb91f64032a2b", - "setting": { - "urlCheck": false - }, - "usingComponents": true - }, - "mp-alipay": { - "usingComponents": true - }, - "mp-baidu": { - "usingComponents": true - }, - "mp-toutiao": { - "usingComponents": true - }, - "uniStatistics": { - "enable": false - }, - "vueVersion": "3", - "h5": { - "router": { - "base": "/" - } - } -} \ No newline at end of file diff --git a/src/pages.json b/src/pages.json deleted file mode 100644 index 468dc66..0000000 --- a/src/pages.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "globalStyle": { - "navigationStyle": "default", - "navigationBarTitleText": "unibest", - "navigationBarBackgroundColor": "#f8f8f8", - "navigationBarTextStyle": "black", - "backgroundColor": "#FFFFFF" - }, - "easycom": { - "autoscan": true, - "custom": { - "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue" - } - }, - "tabBar": { - "color": "#999999", - "selectedColor": "#018d71", - "backgroundColor": "#F8F8F8", - "borderStyle": "black", - "height": "50px", - "fontSize": "10px", - "iconWidth": "24px", - "spacing": "3px", - "list": [ - { - "iconPath": "static/tabbar/home.png", - "selectedIconPath": "static/tabbar/homeHL.png", - "pagePath": "pages/index/index", - "text": "首页" - }, - { - "iconPath": "static/tabbar/example.png", - "selectedIconPath": "static/tabbar/exampleHL.png", - "pagePath": "pages/index/about", - "text": "关于" - } - ] - }, - "pages": [ - { - "path": "pages/index/index", - "type": "home", - "style": { - "navigationStyle": "custom", - "navigationBarTitleText": "首页" - } - }, - { - "path": "pages/index/about", - "type": "page", - "style": { - "navigationBarTitleText": "关于" - } - }, - { - "path": "pages/index/request", - "type": "page", - "layout": "demo", - "style": { - "navigationBarTitleText": "请求" - } - }, - { - "path": "pages/index/request2", - "type": "page", - "layout": "demo", - "style": { - "navigationBarTitleText": "请求-状态一体化" - } - }, - { - "path": "pages/index/upload", - "type": "page", - "layout": "default", - "style": { - "navigationBarTitleText": "上传" - } - }, - { - "path": "pages/index/upload2", - "type": "page", - "layout": "default", - "style": { - "navigationBarTitleText": "上传-状态一体化" - } - } - ], - "subPackages": [] -} \ No newline at end of file From 960aee04aff5c26fbc921952f65be68bdaeee188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Fri, 3 May 2024 22:53:13 +0800 Subject: [PATCH 02/12] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=20.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ee50950..025366d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,12 +22,9 @@ dist .hbuilderx .stylelintcache -# rollup-plugin-visualizer 生成的分析文件 -stats.html + # unplugin-auto-import 生成的类型文件 auto-import.d.ts -# unplugin-vue-components 生成的类型文件 -components.d.ts # vite-plugin-uni-pages 生成的类型文件 uni-pages.d.ts @@ -36,7 +33,6 @@ src/pages.json src/manifest.json # lock 文件还是不要了,我主要的版本写死就好了 -# github actions 需要这些文件,所以main分支需要留着 pnpm-lock.yaml package-lock.json From 5a118585ed46c697eb6ffa3c908ae135a5c9bd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Fri, 3 May 2024 22:57:38 +0800 Subject: [PATCH 03/12] build: npx @dcloudio/uvm@latest --- .gitignore | 3 +++ package.json | 40 ++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 025366d..23fc323 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ package-lock.json # git rm -r --cached file1 file2 ## 针对某些文件 # git rm -r --cached dir1 dir2 ## 针对某些文件夹 # git rm -r --cached . ## 针对所有文件 + +# 更新 uni-app 官方版本 +# npx @dcloudio/uvm@latest diff --git a/package.json b/package.json index 5a549f4..cfc05da 100644 --- a/package.json +++ b/package.json @@ -79,35 +79,35 @@ "bin-wrapper": "npm:bin-wrapper-china" }, "dependencies": { - "@dcloudio/uni-app": "3.0.0-4000820240401001", - "@dcloudio/uni-app-plus": "3.0.0-4000820240401001", - "@dcloudio/uni-components": "3.0.0-4000820240401001", - "@dcloudio/uni-h5": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-alipay": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-baidu": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-jd": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-kuaishou": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-lark": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-qq": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-toutiao": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001", - "@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001", - "@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001", + "@dcloudio/uni-app": "3.0.0-4010420240430001", + "@dcloudio/uni-app-plus": "3.0.0-4010420240430001", + "@dcloudio/uni-components": "3.0.0-4010420240430001", + "@dcloudio/uni-h5": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-alipay": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-baidu": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-jd": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-lark": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-qq": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-toutiao": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-weixin": "3.0.0-4010420240430001", + "@dcloudio/uni-mp-xhs": "3.0.0-4010420240430001", + "@dcloudio/uni-quickapp-webview": "3.0.0-4010420240430001", "dayjs": "1.11.10", "pinia": "2.0.36", "pinia-plugin-persistedstate": "3.2.1", "qs": "6.5.3", - "vue": "3.3.11", + "vue": "3.4.26", "wot-design-uni": "^1.2.13" }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@dcloudio/types": "^3.4.8", - "@dcloudio/uni-automator": "3.0.0-4000820240401001", - "@dcloudio/uni-cli-shared": "3.0.0-4000820240401001", - "@dcloudio/uni-stacktracey": "3.0.0-4000820240401001", - "@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001", + "@dcloudio/uni-automator": "3.0.0-4010420240430001", + "@dcloudio/uni-cli-shared": "3.0.0-4010420240430001", + "@dcloudio/uni-stacktracey": "3.0.0-4010420240430001", + "@dcloudio/vite-plugin-uni": "3.0.0-4010420240430001", "@iconify-json/carbon": "^1.1.27", "@types/node": "^20.11.5", "@types/wechat-miniprogram": "^3.4.7", @@ -148,7 +148,7 @@ "unocss": "^0.58.0", "unocss-applet": "^0.7.8", "unplugin-auto-import": "^0.17.2", - "vite": "4.3.5", + "vite": "5.2.8", "vite-plugin-restart": "^0.4.0", "vue-tsc": "^1.8.25" } From d40fb087aaf529a35a8dab3c48164fe9d849d2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Fri, 3 May 2024 23:01:03 +0800 Subject: [PATCH 04/12] =?UTF-8?q?build:=20stylelint-config-standard=20?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E6=88=90=E4=BA=86=E6=9B=B4=E5=AE=BD=E6=9D=BE?= =?UTF-8?q?=E7=9A=84=20stylelint-config-recommended?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .stylelintrc.cjs | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stylelintrc.cjs b/.stylelintrc.cjs index b2f0a8f..2cb661a 100644 --- a/.stylelintrc.cjs +++ b/.stylelintrc.cjs @@ -3,7 +3,8 @@ module.exports = { root: true, extends: [ - 'stylelint-config-standard', + // stylelint-config-standard 替换成了更宽松的 stylelint-config-recommended + 'stylelint-config-recommended', // stylelint-config-standard-scss 替换成了更宽松的 stylelint-config-recommended-scss 'stylelint-config-recommended-scss', 'stylelint-config-recommended-vue/scss', diff --git a/package.json b/package.json index cfc05da..0e7b3c0 100644 --- a/package.json +++ b/package.json @@ -139,9 +139,9 @@ "stylelint": "^16.0.2", "stylelint-config-html": "^1.1.0", "stylelint-config-recess-order": "^4.4.0", + "stylelint-config-recommended": "^14.0.0", "stylelint-config-recommended-scss": "^14.0.0", "stylelint-config-recommended-vue": "^1.5.0", - "stylelint-config-standard": "^35.0.0", "stylelint-prettier": "^5.0.0", "terser": "^5.26.0", "typescript": "^4.9.5", From 7beb03a89e41dc1c2ef87cba1359414714e5503d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Sat, 4 May 2024 22:39:45 +0800 Subject: [PATCH 05/12] =?UTF-8?q?chore:=20proxy=20=E5=8F=AF=E9=80=89?= =?UTF-8?q?=EF=BC=8C=E9=9D=9E=E5=BF=85=E9=A1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index e678465..24acf1c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -110,13 +110,13 @@ export default ({ command, mode }) => { hmr: true, port: Number.parseInt(VITE_APP_PORT, 10), // 仅 H5 端生效,其他端不生效(其他端走build,不走devServer) - proxy: { - '/api': { - target: VITE_SERVER_BASEURL, - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, ''), - }, - }, + // proxy: { + // '/api': { + // target: VITE_SERVER_BASEURL, + // changeOrigin: true, + // rewrite: (path) => path.replace(/^\/api/, ''), + // }, + // }, }, build: { // 方便非h5端调试 From cc53167750a659a27b0b6aa7ec75fb3d1e277772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Sat, 4 May 2024 23:29:21 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=20http.get=20?= =?UTF-8?q?=E6=9B=BF=E4=BB=A3=20httpGet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/index/foo.ts | 8 ++++++-- src/utils/http.ts | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/service/index/foo.ts b/src/service/index/foo.ts index 7263dfc..dac3519 100644 --- a/src/service/index/foo.ts +++ b/src/service/index/foo.ts @@ -1,4 +1,4 @@ -import { http, httpGet } from '@/utils/http' +import { http } from '@/utils/http' export interface IFooItem { id: string name: string @@ -15,7 +15,7 @@ export const getFooAPI = (name: string) => { /** GET 请求 - 再次简化,看大家是否喜欢这种简化 */ export const getFooAPI2 = (name: string) => { - return httpGet('/foo', { name }) + return http.get('/foo', { name }) } /** POST 请求 */ @@ -27,3 +27,7 @@ export const postFooAPI = (name: string) => { data: { name }, }) } +/** POST 请求 - 再次简化,看大家是否喜欢这种简化 */ +export const postFooAPI2 = (name: string) => { + return http.post('/foo', { name }, { name }) +} diff --git a/src/utils/http.ts b/src/utils/http.ts index db4c6aa..4e3f38c 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -41,6 +41,7 @@ export const http = (options: CustomRequestOptions) => { }) }) } + /** * GET 请求 * @param url 后台地址 @@ -74,3 +75,6 @@ export const httpPost = ( method: 'POST', }) } + +http.get = httpGet +http.post = httpPost From 3967084fda278da3d10fe1868ff75db499c60500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Wed, 8 May 2024 10:23:59 +0800 Subject: [PATCH 07/12] =?UTF-8?q?build:=20add=20uni=5Fmodules=20=E5=B9=B6?= =?UTF-8?q?=20=E5=8A=A0=E5=85=A5ignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 + .stylelintignore | 1 + src/uni_modules/.gitkeep | 0 3 files changed, 2 insertions(+) create mode 100644 .eslintignore create mode 100644 .stylelintignore create mode 100644 src/uni_modules/.gitkeep diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..2ce5c91 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +src/uni_modules/ diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..2ce5c91 --- /dev/null +++ b/.stylelintignore @@ -0,0 +1 @@ +src/uni_modules/ diff --git a/src/uni_modules/.gitkeep b/src/uni_modules/.gitkeep new file mode 100644 index 0000000..e69de29 From 1914f439727f531347db4861d21ab341510bba30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Wed, 8 May 2024 15:33:31 +0800 Subject: [PATCH 08/12] refine: index.ts --- src/utils/index.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 98fe2b6..715c123 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,16 +1,18 @@ -import pagesJson from '@/pages.json' - -console.log(pagesJson) +import { pages, subPackages, tabBar } from '@/pages.json' /** 判断当前页面是否是tabbar页 */ export const getIsTabbar = () => { - if (!Object.keys(pagesJson).includes('tabBar')) { + if (!tabBar) { return false } - const pages = getCurrentPages() - const lastPage = pages.at(-1) + if (!tabBar.list.length) { + // 通常有tabBar的话,list不能有空,且至少有2个元素,这里其实不用处理 + return false + } + // getCurrentPages() 至少有1个元素,所以不再额外判断 + const lastPage = getCurrentPages().at(-1) const currPath = lastPage.route - return !!pagesJson.tabBar.list.find((e) => e.pagePath === currPath) + return !!tabBar.list.find((e) => e.pagePath === currPath) } /** @@ -19,10 +21,8 @@ export const getIsTabbar = () => { * redirectPath 如 ‘/pages/demo/base/route-interceptor’ */ export const currRoute = () => { - const pages = getCurrentPages() - console.log('pages:', pages) - - const lastPage = pages.at(-1) + // getCurrentPages() 至少有1个元素,所以不再额外判断 + const lastPage = getCurrentPages().at(-1) const currRoute = (lastPage as any).$page // console.log('lastPage.$page:', currRoute) // console.log('lastPage.$page.fullpath:', currRoute.fullPath) @@ -66,8 +66,8 @@ export const getUrlObj = (url: string) => { */ export const getAllPages = (key = 'needLogin') => { // 这里处理主包 - const pages = [ - ...pagesJson.pages + const mainPages = [ + ...pages .filter((page) => !key || page[key]) .map((page) => ({ ...page, @@ -76,7 +76,7 @@ export const getAllPages = (key = 'needLogin') => { ] // 这里处理分包 const subPages: any[] = [] - pagesJson.subPackages.forEach((subPageObj) => { + subPackages.forEach((subPageObj) => { // console.log(subPageObj) const { root } = subPageObj @@ -89,7 +89,7 @@ export const getAllPages = (key = 'needLogin') => { }) }) }) - const result = [...pages, ...subPages] + const result = [...mainPages, ...subPages] console.log(`getAllPages by ${key} result: `, result) return result } From 77e257e16d1bf2ac4e088d02c3e5b5ea304494c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Wed, 8 May 2024 20:46:59 +0800 Subject: [PATCH 09/12] =?UTF-8?q?build:=20auto-import.d.ts=20=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 +- src/types/auto-import.d.ts | 298 +++++++++++++++++++++++++++++++++++++ src/utils/index.ts | 1 + 3 files changed, 303 insertions(+), 3 deletions(-) create mode 100644 src/types/auto-import.d.ts diff --git a/.gitignore b/.gitignore index 23fc323..4815e0c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,9 +23,10 @@ dist .stylelintcache -# unplugin-auto-import 生成的类型文件 -auto-import.d.ts -# vite-plugin-uni-pages 生成的类型文件 +# unplugin-auto-import 生成的类型文件,因为变化较小,还是加入版本管理吧 +# auto-import.d.ts + +# vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore uni-pages.d.ts # 插件生成的文件 diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts new file mode 100644 index 0000000..bd90dfb --- /dev/null +++ b/src/types/auto-import.d.ts @@ -0,0 +1,298 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +export {} +declare global { + const EffectScope: (typeof import('vue'))['EffectScope'] + const computed: (typeof import('vue'))['computed'] + const createApp: (typeof import('vue'))['createApp'] + const customRef: (typeof import('vue'))['customRef'] + const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent'] + const defineComponent: (typeof import('vue'))['defineComponent'] + const effectScope: (typeof import('vue'))['effectScope'] + const getCurrentInstance: (typeof import('vue'))['getCurrentInstance'] + const getCurrentScope: (typeof import('vue'))['getCurrentScope'] + const h: (typeof import('vue'))['h'] + const inject: (typeof import('vue'))['inject'] + const isProxy: (typeof import('vue'))['isProxy'] + const isReactive: (typeof import('vue'))['isReactive'] + const isReadonly: (typeof import('vue'))['isReadonly'] + const isRef: (typeof import('vue'))['isRef'] + const markRaw: (typeof import('vue'))['markRaw'] + const nextTick: (typeof import('vue'))['nextTick'] + const onActivated: (typeof import('vue'))['onActivated'] + const onAddToFavorites: (typeof import('@dcloudio/uni-app'))['onAddToFavorites'] + const onBackPress: (typeof import('@dcloudio/uni-app'))['onBackPress'] + const onBeforeMount: (typeof import('vue'))['onBeforeMount'] + const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount'] + const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate'] + const onDeactivated: (typeof import('vue'))['onDeactivated'] + const onError: (typeof import('@dcloudio/uni-app'))['onError'] + const onErrorCaptured: (typeof import('vue'))['onErrorCaptured'] + const onHide: (typeof import('@dcloudio/uni-app'))['onHide'] + const onLaunch: (typeof import('@dcloudio/uni-app'))['onLaunch'] + const onLoad: (typeof import('@dcloudio/uni-app'))['onLoad'] + const onMounted: (typeof import('vue'))['onMounted'] + const onNavigationBarButtonTap: (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] + const onNavigationBarSearchInputChanged: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] + const onNavigationBarSearchInputClicked: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] + const onNavigationBarSearchInputConfirmed: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] + const onNavigationBarSearchInputFocusChanged: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] + const onPageNotFound: (typeof import('@dcloudio/uni-app'))['onPageNotFound'] + const onPageScroll: (typeof import('@dcloudio/uni-app'))['onPageScroll'] + const onPullDownRefresh: (typeof import('@dcloudio/uni-app'))['onPullDownRefresh'] + const onReachBottom: (typeof import('@dcloudio/uni-app'))['onReachBottom'] + const onReady: (typeof import('@dcloudio/uni-app'))['onReady'] + const onRenderTracked: (typeof import('vue'))['onRenderTracked'] + const onRenderTriggered: (typeof import('vue'))['onRenderTriggered'] + const onResize: (typeof import('@dcloudio/uni-app'))['onResize'] + const onScopeDispose: (typeof import('vue'))['onScopeDispose'] + const onServerPrefetch: (typeof import('vue'))['onServerPrefetch'] + const onShareAppMessage: (typeof import('@dcloudio/uni-app'))['onShareAppMessage'] + const onShareTimeline: (typeof import('@dcloudio/uni-app'))['onShareTimeline'] + const onShow: (typeof import('@dcloudio/uni-app'))['onShow'] + const onTabItemTap: (typeof import('@dcloudio/uni-app'))['onTabItemTap'] + const onThemeChange: (typeof import('@dcloudio/uni-app'))['onThemeChange'] + const onUnhandledRejection: (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] + const onUnload: (typeof import('@dcloudio/uni-app'))['onUnload'] + const onUnmounted: (typeof import('vue'))['onUnmounted'] + const onUpdated: (typeof import('vue'))['onUpdated'] + const provide: (typeof import('vue'))['provide'] + const reactive: (typeof import('vue'))['reactive'] + const readonly: (typeof import('vue'))['readonly'] + const ref: (typeof import('vue'))['ref'] + const resolveComponent: (typeof import('vue'))['resolveComponent'] + const shallowReactive: (typeof import('vue'))['shallowReactive'] + const shallowReadonly: (typeof import('vue'))['shallowReadonly'] + const shallowRef: (typeof import('vue'))['shallowRef'] + const toRaw: (typeof import('vue'))['toRaw'] + const toRef: (typeof import('vue'))['toRef'] + const toRefs: (typeof import('vue'))['toRefs'] + const toValue: (typeof import('vue'))['toValue'] + const triggerRef: (typeof import('vue'))['triggerRef'] + const unref: (typeof import('vue'))['unref'] + const useAttrs: (typeof import('vue'))['useAttrs'] + const useCssModule: (typeof import('vue'))['useCssModule'] + const useCssVars: (typeof import('vue'))['useCssVars'] + const useNavbarWeixin: (typeof import('../hooks/useNavbarWeixin'))['default'] + const useRequest: (typeof import('../hooks/useRequest'))['default'] + const useSlots: (typeof import('vue'))['useSlots'] + const useUpload: (typeof import('../hooks/useUpload'))['default'] + const useUpload2: (typeof import('../hooks/useUpload2'))['default'] + const watch: (typeof import('vue'))['watch'] + const watchEffect: (typeof import('vue'))['watchEffect'] + const watchPostEffect: (typeof import('vue'))['watchPostEffect'] + const watchSyncEffect: (typeof import('vue'))['watchSyncEffect'] +} +// for type re-export +declare global { + // @ts-ignore + export type { + Component, + ComponentPublicInstance, + ComputedRef, + ExtractDefaultPropTypes, + ExtractPropTypes, + ExtractPublicPropTypes, + InjectionKey, + PropType, + Ref, + VNode, + WritableComputedRef, + } from 'vue' + import('vue') +} +// for vue template auto import +import { UnwrapRef } from 'vue' +declare module 'vue' { + interface GlobalComponents {} + interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']> + readonly computed: UnwrapRef<(typeof import('vue'))['computed']> + readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']> + readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']> + readonly defineAsyncComponent: UnwrapRef<(typeof import('vue'))['defineAsyncComponent']> + readonly defineComponent: UnwrapRef<(typeof import('vue'))['defineComponent']> + readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']> + readonly getCurrentInstance: UnwrapRef<(typeof import('vue'))['getCurrentInstance']> + readonly getCurrentScope: UnwrapRef<(typeof import('vue'))['getCurrentScope']> + readonly h: UnwrapRef<(typeof import('vue'))['h']> + readonly inject: UnwrapRef<(typeof import('vue'))['inject']> + readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']> + readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']> + readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']> + readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']> + readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']> + readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']> + readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']> + readonly onAddToFavorites: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onAddToFavorites']> + readonly onBackPress: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onBackPress']> + readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']> + readonly onBeforeUnmount: UnwrapRef<(typeof import('vue'))['onBeforeUnmount']> + readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']> + readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']> + readonly onError: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onError']> + readonly onErrorCaptured: UnwrapRef<(typeof import('vue'))['onErrorCaptured']> + readonly onHide: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onHide']> + readonly onLaunch: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLaunch']> + readonly onLoad: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLoad']> + readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']> + readonly onNavigationBarButtonTap: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] + > + readonly onNavigationBarSearchInputChanged: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] + > + readonly onNavigationBarSearchInputClicked: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] + > + readonly onNavigationBarSearchInputConfirmed: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] + > + readonly onNavigationBarSearchInputFocusChanged: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] + > + readonly onPageNotFound: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageNotFound']> + readonly onPageScroll: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageScroll']> + readonly onPullDownRefresh: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPullDownRefresh']> + readonly onReachBottom: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReachBottom']> + readonly onReady: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReady']> + readonly onRenderTracked: UnwrapRef<(typeof import('vue'))['onRenderTracked']> + readonly onRenderTriggered: UnwrapRef<(typeof import('vue'))['onRenderTriggered']> + readonly onResize: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onResize']> + readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']> + readonly onServerPrefetch: UnwrapRef<(typeof import('vue'))['onServerPrefetch']> + readonly onShareAppMessage: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareAppMessage']> + readonly onShareTimeline: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareTimeline']> + readonly onShow: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShow']> + readonly onTabItemTap: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onTabItemTap']> + readonly onThemeChange: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onThemeChange']> + readonly onUnhandledRejection: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] + > + readonly onUnload: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onUnload']> + readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']> + readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']> + readonly provide: UnwrapRef<(typeof import('vue'))['provide']> + readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']> + readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']> + readonly ref: UnwrapRef<(typeof import('vue'))['ref']> + readonly resolveComponent: UnwrapRef<(typeof import('vue'))['resolveComponent']> + readonly shallowReactive: UnwrapRef<(typeof import('vue'))['shallowReactive']> + readonly shallowReadonly: UnwrapRef<(typeof import('vue'))['shallowReadonly']> + readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']> + readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']> + readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']> + readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']> + readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']> + readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']> + readonly unref: UnwrapRef<(typeof import('vue'))['unref']> + readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']> + readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']> + readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']> + readonly useNavbarWeixin: UnwrapRef<(typeof import('../hooks/useNavbarWeixin'))['default']> + readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']> + readonly useUpload: UnwrapRef<(typeof import('../hooks/useUpload'))['default']> + readonly watch: UnwrapRef<(typeof import('vue'))['watch']> + readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']> + readonly watchPostEffect: UnwrapRef<(typeof import('vue'))['watchPostEffect']> + readonly watchSyncEffect: UnwrapRef<(typeof import('vue'))['watchSyncEffect']> + } +} +declare module '@vue/runtime-core' { + interface GlobalComponents {} + interface ComponentCustomProperties { + readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']> + readonly computed: UnwrapRef<(typeof import('vue'))['computed']> + readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']> + readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']> + readonly defineAsyncComponent: UnwrapRef<(typeof import('vue'))['defineAsyncComponent']> + readonly defineComponent: UnwrapRef<(typeof import('vue'))['defineComponent']> + readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']> + readonly getCurrentInstance: UnwrapRef<(typeof import('vue'))['getCurrentInstance']> + readonly getCurrentScope: UnwrapRef<(typeof import('vue'))['getCurrentScope']> + readonly h: UnwrapRef<(typeof import('vue'))['h']> + readonly inject: UnwrapRef<(typeof import('vue'))['inject']> + readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']> + readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']> + readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']> + readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']> + readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']> + readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']> + readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']> + readonly onAddToFavorites: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onAddToFavorites']> + readonly onBackPress: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onBackPress']> + readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']> + readonly onBeforeUnmount: UnwrapRef<(typeof import('vue'))['onBeforeUnmount']> + readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']> + readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']> + readonly onError: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onError']> + readonly onErrorCaptured: UnwrapRef<(typeof import('vue'))['onErrorCaptured']> + readonly onHide: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onHide']> + readonly onLaunch: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLaunch']> + readonly onLoad: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLoad']> + readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']> + readonly onNavigationBarButtonTap: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] + > + readonly onNavigationBarSearchInputChanged: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] + > + readonly onNavigationBarSearchInputClicked: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] + > + readonly onNavigationBarSearchInputConfirmed: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] + > + readonly onNavigationBarSearchInputFocusChanged: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] + > + readonly onPageNotFound: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageNotFound']> + readonly onPageScroll: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageScroll']> + readonly onPullDownRefresh: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPullDownRefresh']> + readonly onReachBottom: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReachBottom']> + readonly onReady: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReady']> + readonly onRenderTracked: UnwrapRef<(typeof import('vue'))['onRenderTracked']> + readonly onRenderTriggered: UnwrapRef<(typeof import('vue'))['onRenderTriggered']> + readonly onResize: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onResize']> + readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']> + readonly onServerPrefetch: UnwrapRef<(typeof import('vue'))['onServerPrefetch']> + readonly onShareAppMessage: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareAppMessage']> + readonly onShareTimeline: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareTimeline']> + readonly onShow: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShow']> + readonly onTabItemTap: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onTabItemTap']> + readonly onThemeChange: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onThemeChange']> + readonly onUnhandledRejection: UnwrapRef< + (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] + > + readonly onUnload: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onUnload']> + readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']> + readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']> + readonly provide: UnwrapRef<(typeof import('vue'))['provide']> + readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']> + readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']> + readonly ref: UnwrapRef<(typeof import('vue'))['ref']> + readonly resolveComponent: UnwrapRef<(typeof import('vue'))['resolveComponent']> + readonly shallowReactive: UnwrapRef<(typeof import('vue'))['shallowReactive']> + readonly shallowReadonly: UnwrapRef<(typeof import('vue'))['shallowReadonly']> + readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']> + readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']> + readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']> + readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']> + readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']> + readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']> + readonly unref: UnwrapRef<(typeof import('vue'))['unref']> + readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']> + readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']> + readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']> + readonly useNavbarWeixin: UnwrapRef<(typeof import('../hooks/useNavbarWeixin'))['default']> + readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']> + readonly useUpload: UnwrapRef<(typeof import('../hooks/useUpload'))['default']> + readonly watch: UnwrapRef<(typeof import('vue'))['watch']> + readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']> + readonly watchPostEffect: UnwrapRef<(typeof import('vue'))['watchPostEffect']> + readonly watchSyncEffect: UnwrapRef<(typeof import('vue'))['watchSyncEffect']> + } +} diff --git a/src/utils/index.ts b/src/utils/index.ts index 715c123..14ef106 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,3 +1,4 @@ +// @ts-expect-error import json file import { pages, subPackages, tabBar } from '@/pages.json' /** 判断当前页面是否是tabbar页 */ From 70986d7cb66c433beb2a2dd8200c2a309d659aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Thu, 9 May 2024 08:48:22 +0800 Subject: [PATCH 10/12] =?UTF-8?q?feat:=20=E8=AF=95=E8=AF=95=E6=8A=8A=20aut?= =?UTF-8?q?o-import.d.ts=20=E5=8A=A0=E5=85=A5=20.prettierignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierignore | 2 + src/types/auto-import.d.ts | 510 +++++++++++++++++-------------------- 2 files changed, 240 insertions(+), 272 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..4917b0e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 +auto-import.d.ts diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts index bd90dfb..a822be5 100644 --- a/src/types/auto-import.d.ts +++ b/src/types/auto-import.d.ts @@ -5,103 +5,91 @@ // Generated by unplugin-auto-import export {} declare global { - const EffectScope: (typeof import('vue'))['EffectScope'] - const computed: (typeof import('vue'))['computed'] - const createApp: (typeof import('vue'))['createApp'] - const customRef: (typeof import('vue'))['customRef'] - const defineAsyncComponent: (typeof import('vue'))['defineAsyncComponent'] - const defineComponent: (typeof import('vue'))['defineComponent'] - const effectScope: (typeof import('vue'))['effectScope'] - const getCurrentInstance: (typeof import('vue'))['getCurrentInstance'] - const getCurrentScope: (typeof import('vue'))['getCurrentScope'] - const h: (typeof import('vue'))['h'] - const inject: (typeof import('vue'))['inject'] - const isProxy: (typeof import('vue'))['isProxy'] - const isReactive: (typeof import('vue'))['isReactive'] - const isReadonly: (typeof import('vue'))['isReadonly'] - const isRef: (typeof import('vue'))['isRef'] - const markRaw: (typeof import('vue'))['markRaw'] - const nextTick: (typeof import('vue'))['nextTick'] - const onActivated: (typeof import('vue'))['onActivated'] - const onAddToFavorites: (typeof import('@dcloudio/uni-app'))['onAddToFavorites'] - const onBackPress: (typeof import('@dcloudio/uni-app'))['onBackPress'] - const onBeforeMount: (typeof import('vue'))['onBeforeMount'] - const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount'] - const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate'] - const onDeactivated: (typeof import('vue'))['onDeactivated'] - const onError: (typeof import('@dcloudio/uni-app'))['onError'] - const onErrorCaptured: (typeof import('vue'))['onErrorCaptured'] - const onHide: (typeof import('@dcloudio/uni-app'))['onHide'] - const onLaunch: (typeof import('@dcloudio/uni-app'))['onLaunch'] - const onLoad: (typeof import('@dcloudio/uni-app'))['onLoad'] - const onMounted: (typeof import('vue'))['onMounted'] - const onNavigationBarButtonTap: (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] - const onNavigationBarSearchInputChanged: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] - const onNavigationBarSearchInputClicked: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] - const onNavigationBarSearchInputConfirmed: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] - const onNavigationBarSearchInputFocusChanged: (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] - const onPageNotFound: (typeof import('@dcloudio/uni-app'))['onPageNotFound'] - const onPageScroll: (typeof import('@dcloudio/uni-app'))['onPageScroll'] - const onPullDownRefresh: (typeof import('@dcloudio/uni-app'))['onPullDownRefresh'] - const onReachBottom: (typeof import('@dcloudio/uni-app'))['onReachBottom'] - const onReady: (typeof import('@dcloudio/uni-app'))['onReady'] - const onRenderTracked: (typeof import('vue'))['onRenderTracked'] - const onRenderTriggered: (typeof import('vue'))['onRenderTriggered'] - const onResize: (typeof import('@dcloudio/uni-app'))['onResize'] - const onScopeDispose: (typeof import('vue'))['onScopeDispose'] - const onServerPrefetch: (typeof import('vue'))['onServerPrefetch'] - const onShareAppMessage: (typeof import('@dcloudio/uni-app'))['onShareAppMessage'] - const onShareTimeline: (typeof import('@dcloudio/uni-app'))['onShareTimeline'] - const onShow: (typeof import('@dcloudio/uni-app'))['onShow'] - const onTabItemTap: (typeof import('@dcloudio/uni-app'))['onTabItemTap'] - const onThemeChange: (typeof import('@dcloudio/uni-app'))['onThemeChange'] - const onUnhandledRejection: (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] - const onUnload: (typeof import('@dcloudio/uni-app'))['onUnload'] - const onUnmounted: (typeof import('vue'))['onUnmounted'] - const onUpdated: (typeof import('vue'))['onUpdated'] - const provide: (typeof import('vue'))['provide'] - const reactive: (typeof import('vue'))['reactive'] - const readonly: (typeof import('vue'))['readonly'] - const ref: (typeof import('vue'))['ref'] - const resolveComponent: (typeof import('vue'))['resolveComponent'] - const shallowReactive: (typeof import('vue'))['shallowReactive'] - const shallowReadonly: (typeof import('vue'))['shallowReadonly'] - const shallowRef: (typeof import('vue'))['shallowRef'] - const toRaw: (typeof import('vue'))['toRaw'] - const toRef: (typeof import('vue'))['toRef'] - const toRefs: (typeof import('vue'))['toRefs'] - const toValue: (typeof import('vue'))['toValue'] - const triggerRef: (typeof import('vue'))['triggerRef'] - const unref: (typeof import('vue'))['unref'] - const useAttrs: (typeof import('vue'))['useAttrs'] - const useCssModule: (typeof import('vue'))['useCssModule'] - const useCssVars: (typeof import('vue'))['useCssVars'] + const EffectScope: typeof import('vue')['EffectScope'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const effectScope: typeof import('vue')['effectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites'] + const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onError: typeof import('@dcloudio/uni-app')['onError'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onHide: typeof import('@dcloudio/uni-app')['onHide'] + const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch'] + const onLoad: typeof import('@dcloudio/uni-app')['onLoad'] + const onMounted: typeof import('vue')['onMounted'] + const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap'] + const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged'] + const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked'] + const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed'] + const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged'] + const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound'] + const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll'] + const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh'] + const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom'] + const onReady: typeof import('@dcloudio/uni-app')['onReady'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onResize: typeof import('@dcloudio/uni-app')['onResize'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage'] + const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline'] + const onShow: typeof import('@dcloudio/uni-app')['onShow'] + const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap'] + const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange'] + const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection'] + const onUnload: typeof import('@dcloudio/uni-app')['onUnload'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] const useNavbarWeixin: (typeof import('../hooks/useNavbarWeixin'))['default'] - const useRequest: (typeof import('../hooks/useRequest'))['default'] - const useSlots: (typeof import('vue'))['useSlots'] - const useUpload: (typeof import('../hooks/useUpload'))['default'] - const useUpload2: (typeof import('../hooks/useUpload2'))['default'] - const watch: (typeof import('vue'))['watch'] - const watchEffect: (typeof import('vue'))['watchEffect'] - const watchPostEffect: (typeof import('vue'))['watchPostEffect'] - const watchSyncEffect: (typeof import('vue'))['watchSyncEffect'] + const useRequest: typeof import('../hooks/useRequest')['default'] + const useSlots: typeof import('vue')['useSlots'] + const useUpload: typeof import('../hooks/useUpload')['default'] + const useUpload2: typeof import('../hooks/useUpload2')['default'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] } // for type re-export declare global { // @ts-ignore - export type { - Component, - ComponentPublicInstance, - ComputedRef, - ExtractDefaultPropTypes, - ExtractPropTypes, - ExtractPublicPropTypes, - InjectionKey, - PropType, - Ref, - VNode, - WritableComputedRef, - } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } // for vue template auto import @@ -109,190 +97,168 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface GlobalComponents {} interface ComponentCustomProperties { - readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']> - readonly computed: UnwrapRef<(typeof import('vue'))['computed']> - readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']> - readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']> - readonly defineAsyncComponent: UnwrapRef<(typeof import('vue'))['defineAsyncComponent']> - readonly defineComponent: UnwrapRef<(typeof import('vue'))['defineComponent']> - readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']> - readonly getCurrentInstance: UnwrapRef<(typeof import('vue'))['getCurrentInstance']> - readonly getCurrentScope: UnwrapRef<(typeof import('vue'))['getCurrentScope']> - readonly h: UnwrapRef<(typeof import('vue'))['h']> - readonly inject: UnwrapRef<(typeof import('vue'))['inject']> - readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']> - readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']> - readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']> - readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']> - readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']> - readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']> - readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']> - readonly onAddToFavorites: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onAddToFavorites']> - readonly onBackPress: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onBackPress']> - readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']> - readonly onBeforeUnmount: UnwrapRef<(typeof import('vue'))['onBeforeUnmount']> - readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']> - readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']> - readonly onError: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onError']> - readonly onErrorCaptured: UnwrapRef<(typeof import('vue'))['onErrorCaptured']> - readonly onHide: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onHide']> - readonly onLaunch: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLaunch']> - readonly onLoad: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLoad']> - readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']> - readonly onNavigationBarButtonTap: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] - > - readonly onNavigationBarSearchInputChanged: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] - > - readonly onNavigationBarSearchInputClicked: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] - > - readonly onNavigationBarSearchInputConfirmed: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] - > - readonly onNavigationBarSearchInputFocusChanged: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] - > - readonly onPageNotFound: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageNotFound']> - readonly onPageScroll: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageScroll']> - readonly onPullDownRefresh: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPullDownRefresh']> - readonly onReachBottom: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReachBottom']> - readonly onReady: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReady']> - readonly onRenderTracked: UnwrapRef<(typeof import('vue'))['onRenderTracked']> - readonly onRenderTriggered: UnwrapRef<(typeof import('vue'))['onRenderTriggered']> - readonly onResize: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onResize']> - readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']> - readonly onServerPrefetch: UnwrapRef<(typeof import('vue'))['onServerPrefetch']> - readonly onShareAppMessage: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareAppMessage']> - readonly onShareTimeline: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareTimeline']> - readonly onShow: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShow']> - readonly onTabItemTap: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onTabItemTap']> - readonly onThemeChange: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onThemeChange']> - readonly onUnhandledRejection: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] - > - readonly onUnload: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onUnload']> - readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']> - readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']> - readonly provide: UnwrapRef<(typeof import('vue'))['provide']> - readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']> - readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']> - readonly ref: UnwrapRef<(typeof import('vue'))['ref']> - readonly resolveComponent: UnwrapRef<(typeof import('vue'))['resolveComponent']> - readonly shallowReactive: UnwrapRef<(typeof import('vue'))['shallowReactive']> - readonly shallowReadonly: UnwrapRef<(typeof import('vue'))['shallowReadonly']> - readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']> - readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']> - readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']> - readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']> - readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']> - readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']> - readonly unref: UnwrapRef<(typeof import('vue'))['unref']> - readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']> - readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']> - readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']> - readonly useNavbarWeixin: UnwrapRef<(typeof import('../hooks/useNavbarWeixin'))['default']> - readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']> - readonly useUpload: UnwrapRef<(typeof import('../hooks/useUpload'))['default']> - readonly watch: UnwrapRef<(typeof import('vue'))['watch']> - readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']> - readonly watchPostEffect: UnwrapRef<(typeof import('vue'))['watchPostEffect']> - readonly watchSyncEffect: UnwrapRef<(typeof import('vue'))['watchSyncEffect']> + readonly EffectScope: UnwrapRef + readonly computed: UnwrapRef + readonly createApp: UnwrapRef + readonly customRef: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef + readonly effectScope: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly h: UnwrapRef + readonly inject: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef + readonly markRaw: UnwrapRef + readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef + readonly onAddToFavorites: UnwrapRef + readonly onBackPress: UnwrapRef + readonly onBeforeMount: UnwrapRef + readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onError: UnwrapRef + readonly onErrorCaptured: UnwrapRef + readonly onHide: UnwrapRef + readonly onLaunch: UnwrapRef + readonly onLoad: UnwrapRef + readonly onMounted: UnwrapRef + readonly onNavigationBarButtonTap: UnwrapRef + readonly onNavigationBarSearchInputChanged: UnwrapRef + readonly onNavigationBarSearchInputClicked: UnwrapRef + readonly onNavigationBarSearchInputConfirmed: UnwrapRef + readonly onNavigationBarSearchInputFocusChanged: UnwrapRef + readonly onPageNotFound: UnwrapRef + readonly onPageScroll: UnwrapRef + readonly onPullDownRefresh: UnwrapRef + readonly onReachBottom: UnwrapRef + readonly onReady: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef + readonly onResize: UnwrapRef + readonly onScopeDispose: UnwrapRef + readonly onServerPrefetch: UnwrapRef + readonly onShareAppMessage: UnwrapRef + readonly onShareTimeline: UnwrapRef + readonly onShow: UnwrapRef + readonly onTabItemTap: UnwrapRef + readonly onThemeChange: UnwrapRef + readonly onUnhandledRejection: UnwrapRef + readonly onUnload: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly provide: UnwrapRef + readonly reactive: UnwrapRef + readonly readonly: UnwrapRef + readonly ref: UnwrapRef + readonly resolveComponent: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef + readonly shallowRef: UnwrapRef + readonly toRaw: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef + readonly triggerRef: UnwrapRef + readonly unref: UnwrapRef + readonly useAttrs: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVars: UnwrapRef + readonly useRequest: UnwrapRef + readonly useSlots: UnwrapRef + readonly useUpload2: UnwrapRef + readonly useUpload: UnwrapRef + readonly watch: UnwrapRef + readonly watchEffect: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef } } declare module '@vue/runtime-core' { interface GlobalComponents {} interface ComponentCustomProperties { - readonly EffectScope: UnwrapRef<(typeof import('vue'))['EffectScope']> - readonly computed: UnwrapRef<(typeof import('vue'))['computed']> - readonly createApp: UnwrapRef<(typeof import('vue'))['createApp']> - readonly customRef: UnwrapRef<(typeof import('vue'))['customRef']> - readonly defineAsyncComponent: UnwrapRef<(typeof import('vue'))['defineAsyncComponent']> - readonly defineComponent: UnwrapRef<(typeof import('vue'))['defineComponent']> - readonly effectScope: UnwrapRef<(typeof import('vue'))['effectScope']> - readonly getCurrentInstance: UnwrapRef<(typeof import('vue'))['getCurrentInstance']> - readonly getCurrentScope: UnwrapRef<(typeof import('vue'))['getCurrentScope']> - readonly h: UnwrapRef<(typeof import('vue'))['h']> - readonly inject: UnwrapRef<(typeof import('vue'))['inject']> - readonly isProxy: UnwrapRef<(typeof import('vue'))['isProxy']> - readonly isReactive: UnwrapRef<(typeof import('vue'))['isReactive']> - readonly isReadonly: UnwrapRef<(typeof import('vue'))['isReadonly']> - readonly isRef: UnwrapRef<(typeof import('vue'))['isRef']> - readonly markRaw: UnwrapRef<(typeof import('vue'))['markRaw']> - readonly nextTick: UnwrapRef<(typeof import('vue'))['nextTick']> - readonly onActivated: UnwrapRef<(typeof import('vue'))['onActivated']> - readonly onAddToFavorites: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onAddToFavorites']> - readonly onBackPress: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onBackPress']> - readonly onBeforeMount: UnwrapRef<(typeof import('vue'))['onBeforeMount']> - readonly onBeforeUnmount: UnwrapRef<(typeof import('vue'))['onBeforeUnmount']> - readonly onBeforeUpdate: UnwrapRef<(typeof import('vue'))['onBeforeUpdate']> - readonly onDeactivated: UnwrapRef<(typeof import('vue'))['onDeactivated']> - readonly onError: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onError']> - readonly onErrorCaptured: UnwrapRef<(typeof import('vue'))['onErrorCaptured']> - readonly onHide: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onHide']> - readonly onLaunch: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLaunch']> - readonly onLoad: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onLoad']> - readonly onMounted: UnwrapRef<(typeof import('vue'))['onMounted']> - readonly onNavigationBarButtonTap: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarButtonTap'] - > - readonly onNavigationBarSearchInputChanged: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputChanged'] - > - readonly onNavigationBarSearchInputClicked: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputClicked'] - > - readonly onNavigationBarSearchInputConfirmed: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputConfirmed'] - > - readonly onNavigationBarSearchInputFocusChanged: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onNavigationBarSearchInputFocusChanged'] - > - readonly onPageNotFound: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageNotFound']> - readonly onPageScroll: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPageScroll']> - readonly onPullDownRefresh: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onPullDownRefresh']> - readonly onReachBottom: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReachBottom']> - readonly onReady: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onReady']> - readonly onRenderTracked: UnwrapRef<(typeof import('vue'))['onRenderTracked']> - readonly onRenderTriggered: UnwrapRef<(typeof import('vue'))['onRenderTriggered']> - readonly onResize: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onResize']> - readonly onScopeDispose: UnwrapRef<(typeof import('vue'))['onScopeDispose']> - readonly onServerPrefetch: UnwrapRef<(typeof import('vue'))['onServerPrefetch']> - readonly onShareAppMessage: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareAppMessage']> - readonly onShareTimeline: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShareTimeline']> - readonly onShow: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onShow']> - readonly onTabItemTap: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onTabItemTap']> - readonly onThemeChange: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onThemeChange']> - readonly onUnhandledRejection: UnwrapRef< - (typeof import('@dcloudio/uni-app'))['onUnhandledRejection'] - > - readonly onUnload: UnwrapRef<(typeof import('@dcloudio/uni-app'))['onUnload']> - readonly onUnmounted: UnwrapRef<(typeof import('vue'))['onUnmounted']> - readonly onUpdated: UnwrapRef<(typeof import('vue'))['onUpdated']> - readonly provide: UnwrapRef<(typeof import('vue'))['provide']> - readonly reactive: UnwrapRef<(typeof import('vue'))['reactive']> - readonly readonly: UnwrapRef<(typeof import('vue'))['readonly']> - readonly ref: UnwrapRef<(typeof import('vue'))['ref']> - readonly resolveComponent: UnwrapRef<(typeof import('vue'))['resolveComponent']> - readonly shallowReactive: UnwrapRef<(typeof import('vue'))['shallowReactive']> - readonly shallowReadonly: UnwrapRef<(typeof import('vue'))['shallowReadonly']> - readonly shallowRef: UnwrapRef<(typeof import('vue'))['shallowRef']> - readonly toRaw: UnwrapRef<(typeof import('vue'))['toRaw']> - readonly toRef: UnwrapRef<(typeof import('vue'))['toRef']> - readonly toRefs: UnwrapRef<(typeof import('vue'))['toRefs']> - readonly toValue: UnwrapRef<(typeof import('vue'))['toValue']> - readonly triggerRef: UnwrapRef<(typeof import('vue'))['triggerRef']> - readonly unref: UnwrapRef<(typeof import('vue'))['unref']> - readonly useAttrs: UnwrapRef<(typeof import('vue'))['useAttrs']> - readonly useCssModule: UnwrapRef<(typeof import('vue'))['useCssModule']> - readonly useCssVars: UnwrapRef<(typeof import('vue'))['useCssVars']> - readonly useNavbarWeixin: UnwrapRef<(typeof import('../hooks/useNavbarWeixin'))['default']> - readonly useSlots: UnwrapRef<(typeof import('vue'))['useSlots']> - readonly useUpload: UnwrapRef<(typeof import('../hooks/useUpload'))['default']> - readonly watch: UnwrapRef<(typeof import('vue'))['watch']> - readonly watchEffect: UnwrapRef<(typeof import('vue'))['watchEffect']> - readonly watchPostEffect: UnwrapRef<(typeof import('vue'))['watchPostEffect']> - readonly watchSyncEffect: UnwrapRef<(typeof import('vue'))['watchSyncEffect']> + readonly EffectScope: UnwrapRef + readonly computed: UnwrapRef + readonly createApp: UnwrapRef + readonly customRef: UnwrapRef + readonly defineAsyncComponent: UnwrapRef + readonly defineComponent: UnwrapRef + readonly effectScope: UnwrapRef + readonly getCurrentInstance: UnwrapRef + readonly getCurrentScope: UnwrapRef + readonly h: UnwrapRef + readonly inject: UnwrapRef + readonly isProxy: UnwrapRef + readonly isReactive: UnwrapRef + readonly isReadonly: UnwrapRef + readonly isRef: UnwrapRef + readonly markRaw: UnwrapRef + readonly nextTick: UnwrapRef + readonly onActivated: UnwrapRef + readonly onAddToFavorites: UnwrapRef + readonly onBackPress: UnwrapRef + readonly onBeforeMount: UnwrapRef + readonly onBeforeUnmount: UnwrapRef + readonly onBeforeUpdate: UnwrapRef + readonly onDeactivated: UnwrapRef + readonly onError: UnwrapRef + readonly onErrorCaptured: UnwrapRef + readonly onHide: UnwrapRef + readonly onLaunch: UnwrapRef + readonly onLoad: UnwrapRef + readonly onMounted: UnwrapRef + readonly onNavigationBarButtonTap: UnwrapRef + readonly onNavigationBarSearchInputChanged: UnwrapRef + readonly onNavigationBarSearchInputClicked: UnwrapRef + readonly onNavigationBarSearchInputConfirmed: UnwrapRef + readonly onNavigationBarSearchInputFocusChanged: UnwrapRef + readonly onPageNotFound: UnwrapRef + readonly onPageScroll: UnwrapRef + readonly onPullDownRefresh: UnwrapRef + readonly onReachBottom: UnwrapRef + readonly onReady: UnwrapRef + readonly onRenderTracked: UnwrapRef + readonly onRenderTriggered: UnwrapRef + readonly onResize: UnwrapRef + readonly onScopeDispose: UnwrapRef + readonly onServerPrefetch: UnwrapRef + readonly onShareAppMessage: UnwrapRef + readonly onShareTimeline: UnwrapRef + readonly onShow: UnwrapRef + readonly onTabItemTap: UnwrapRef + readonly onThemeChange: UnwrapRef + readonly onUnhandledRejection: UnwrapRef + readonly onUnload: UnwrapRef + readonly onUnmounted: UnwrapRef + readonly onUpdated: UnwrapRef + readonly provide: UnwrapRef + readonly reactive: UnwrapRef + readonly readonly: UnwrapRef + readonly ref: UnwrapRef + readonly resolveComponent: UnwrapRef + readonly shallowReactive: UnwrapRef + readonly shallowReadonly: UnwrapRef + readonly shallowRef: UnwrapRef + readonly toRaw: UnwrapRef + readonly toRef: UnwrapRef + readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef + readonly triggerRef: UnwrapRef + readonly unref: UnwrapRef + readonly useAttrs: UnwrapRef + readonly useCssModule: UnwrapRef + readonly useCssVars: UnwrapRef + readonly useRequest: UnwrapRef + readonly useSlots: UnwrapRef + readonly useUpload2: UnwrapRef + readonly useUpload: UnwrapRef + readonly watch: UnwrapRef + readonly watchEffect: UnwrapRef + readonly watchPostEffect: UnwrapRef + readonly watchSyncEffect: UnwrapRef } } From 58e630cf6da00c2fe5162ad6e59a5ee5fe6064db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Sun, 12 May 2024 10:26:05 +0800 Subject: [PATCH 11/12] =?UTF-8?q?feat:=20=E5=81=9A=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E6=94=BE=E5=BC=80=E9=83=A8=E5=88=86ignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +-- .prettierignore | 7 ++++ src/manifest.json | 79 +++++++++++++++++++++++++++++++++++++++++ src/pages.json | 89 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 src/manifest.json create mode 100644 src/pages.json diff --git a/.gitignore b/.gitignore index 4815e0c..4fd1279 100644 --- a/.gitignore +++ b/.gitignore @@ -30,8 +30,8 @@ dist uni-pages.d.ts # 插件生成的文件 -src/pages.json -src/manifest.json +# src/pages.json +# src/manifest.json # lock 文件还是不要了,我主要的版本写死就好了 pnpm-lock.yaml diff --git a/.prettierignore b/.prettierignore index 4917b0e..301d974 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,9 @@ # unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 auto-import.d.ts + +# vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore +uni-pages.d.ts + +# 插件生成的文件 +src/pages.json +src/manifest.json diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..f6ad007 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,79 @@ +{ + "name": "unibest-base", + "appid": "H57F2ACE4", + "description": "", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + "app-plus": { + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "modules": {}, + "distribute": { + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "minSdkVersion": 30, + "targetSdkVersion": 30, + "abiFilters": [ + "armeabi-v7a", + "arm64-v8a" + ] + }, + "ios": {}, + "sdkConfigs": {}, + "icons": { + "android": {}, + "ios": {} + } + } + }, + "quickapp": {}, + "mp-weixin": { + "appid": "wxa2abb91f64032a2b", + "setting": { + "urlCheck": false + }, + "usingComponents": true + }, + "mp-alipay": { + "usingComponents": true + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { + "enable": false + }, + "vueVersion": "3", + "h5": { + "router": { + "base": "/" + } + } +} \ No newline at end of file diff --git a/src/pages.json b/src/pages.json new file mode 100644 index 0000000..468dc66 --- /dev/null +++ b/src/pages.json @@ -0,0 +1,89 @@ +{ + "globalStyle": { + "navigationStyle": "default", + "navigationBarTitleText": "unibest", + "navigationBarBackgroundColor": "#f8f8f8", + "navigationBarTextStyle": "black", + "backgroundColor": "#FFFFFF" + }, + "easycom": { + "autoscan": true, + "custom": { + "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue" + } + }, + "tabBar": { + "color": "#999999", + "selectedColor": "#018d71", + "backgroundColor": "#F8F8F8", + "borderStyle": "black", + "height": "50px", + "fontSize": "10px", + "iconWidth": "24px", + "spacing": "3px", + "list": [ + { + "iconPath": "static/tabbar/home.png", + "selectedIconPath": "static/tabbar/homeHL.png", + "pagePath": "pages/index/index", + "text": "首页" + }, + { + "iconPath": "static/tabbar/example.png", + "selectedIconPath": "static/tabbar/exampleHL.png", + "pagePath": "pages/index/about", + "text": "关于" + } + ] + }, + "pages": [ + { + "path": "pages/index/index", + "type": "home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "首页" + } + }, + { + "path": "pages/index/about", + "type": "page", + "style": { + "navigationBarTitleText": "关于" + } + }, + { + "path": "pages/index/request", + "type": "page", + "layout": "demo", + "style": { + "navigationBarTitleText": "请求" + } + }, + { + "path": "pages/index/request2", + "type": "page", + "layout": "demo", + "style": { + "navigationBarTitleText": "请求-状态一体化" + } + }, + { + "path": "pages/index/upload", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "上传" + } + }, + { + "path": "pages/index/upload2", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "上传-状态一体化" + } + } + ], + "subPackages": [] +} \ No newline at end of file From ac7ab948135ceb8e2e387003701c1a50084de528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Sun, 12 May 2024 10:27:36 +0800 Subject: [PATCH 12/12] =?UTF-8?q?feat:=20=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/about.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/index/about.vue b/src/pages/index/about.vue index 7d6a8bb..8ba7b35 100644 --- a/src/pages/index/about.vue +++ b/src/pages/index/about.vue @@ -22,6 +22,7 @@ 去请求页2 (请求状态一体化) + 上传demo 上传demo2(请求状态一体化)