From 245d74b9ebfd5612cd2fb4026965ce8f03dd8fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Wed, 27 Mar 2024 17:41:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B1=BB=E5=9E=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/user.ts | 1 - src/typings.d.ts | 15 ++++++++++++--- src/utils/index.ts | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/store/user.ts b/src/store/user.ts index b5eca5f..82bd873 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -1,6 +1,5 @@ import { defineStore } from 'pinia' import { ref } from 'vue' -import { IUserInfo } from '../typings' const initState = { nickname: '', avatar: '' } diff --git a/src/typings.d.ts b/src/typings.d.ts index 910b23a..d6140cd 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,13 +1,22 @@ /* eslint-disable no-unused-vars */ // 全局要用的类型放到这里 -export type IResData = { +type IResData = { code: number msg: string result: T } -export type IUserInfo = { +// uni.uploadFile文件上传参数 +type IUniUploadFileOptions = { + file?: File + files?: UniApp.UploadFileOptionFiles[] + filePath?: string + name?: string + formData?: any +} + +type IUserInfo = { nickname?: string avatar?: string /** 微信的 openid,非微信没有这个字段 */ @@ -15,7 +24,7 @@ export type IUserInfo = { token?: string } -export enum TestEnum { +enum TestEnum { A = 'a', B = 'b', } diff --git a/src/utils/index.ts b/src/utils/index.ts index 6cf3d2b..bb36bc9 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,5 @@ -import pagesJson from '@/pages.json' import { translate as t } from '@/locale/index' +import pagesJson from '@/pages.json' console.log(pagesJson)