chore: 更新oxlint配置及依赖版本
- 添加oxlint到VSCode设置 - 在useUpload.ts中移除未使用的import和注释掉accept参数 - 在utils/index.ts中简化getAllPages函数 - 更新package.json中的oxlint版本和lint配置 - 更新pnpm-lock.yaml中的oxlint相关依赖
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ref, Ref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import { getEnvBaseUploadUrl } from '@/utils'
|
||||
|
||||
const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
|
||||
@@ -20,7 +20,7 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
|
||||
const {
|
||||
formData = {},
|
||||
maxSize = 5 * 1024 * 1024,
|
||||
accept = ['*'],
|
||||
// accept = ['*'],
|
||||
fileType = 'image',
|
||||
success,
|
||||
error: onError,
|
||||
|
||||
@@ -101,14 +101,13 @@ export const getUrlObj = (url: string) => {
|
||||
*/
|
||||
export const getAllPages = (key = 'needLogin') => {
|
||||
// 这里处理主包
|
||||
const mainPages = [
|
||||
...pages
|
||||
.filter((page) => !key || page[key])
|
||||
.map((page) => ({
|
||||
...page,
|
||||
path: `/${page.path}`,
|
||||
})),
|
||||
]
|
||||
const mainPages = pages
|
||||
.filter((page) => !key || page[key])
|
||||
.map((page) => ({
|
||||
...page,
|
||||
path: `/${page.path}`,
|
||||
}))
|
||||
|
||||
// 这里处理分包
|
||||
const subPages: any[] = []
|
||||
subPackages.forEach((subPageObj) => {
|
||||
|
||||
Reference in New Issue
Block a user