Merge branch 'main' of github.com:feige996/unibest
This commit is contained in:
commit
0a7af8cccd
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -42,6 +42,7 @@
|
|||||||
"commitlint",
|
"commitlint",
|
||||||
"dcloudio",
|
"dcloudio",
|
||||||
"iconfont",
|
"iconfont",
|
||||||
|
"oxlint",
|
||||||
"qrcode",
|
"qrcode",
|
||||||
"refresherrefresh",
|
"refresherrefresh",
|
||||||
"scrolltolower",
|
"scrolltolower",
|
||||||
|
11
package.json
11
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unibest",
|
"name": "unibest",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "2.11.1",
|
"version": "2.12.0",
|
||||||
"description": "unibest - 最好的 uniapp 开发模板",
|
"description": "unibest - 最好的 uniapp 开发模板",
|
||||||
"update-time": "2025-05-28",
|
"update-time": "2025-05-28",
|
||||||
"author": {
|
"author": {
|
||||||
@ -73,13 +73,14 @@
|
|||||||
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
|
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
|
||||||
"type-check": "vue-tsc --noEmit",
|
"type-check": "vue-tsc --noEmit",
|
||||||
"openapi-ts-request": "openapi-ts",
|
"openapi-ts-request": "openapi-ts",
|
||||||
"prepare": "git init && husky"
|
"prepare": "git init && husky",
|
||||||
|
"lint:oxlint": "oxlint src/**/*.{ts,js,vue}"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"**/*.{vue,html,cjs,json,md,scss,css,txt}": [
|
"**/*.{html,cjs,json,md,scss,css,txt}": [
|
||||||
"prettier --write --cache"
|
"prettier --write --cache"
|
||||||
],
|
],
|
||||||
"**/*.{js,ts}": [
|
"**/*.{js,ts,vue}": [
|
||||||
"oxlint --fix",
|
"oxlint --fix",
|
||||||
"prettier --write --cache"
|
"prettier --write --cache"
|
||||||
],
|
],
|
||||||
@ -145,7 +146,7 @@
|
|||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"lint-staged": "^15.2.10",
|
"lint-staged": "^15.2.10",
|
||||||
"openapi-ts-request": "^1.1.2",
|
"openapi-ts-request": "^1.1.2",
|
||||||
"oxlint": "^0.1.0",
|
"oxlint": "1.0.0",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"postcss-html": "^1.7.0",
|
"postcss-html": "^1.7.0",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
|
82
pnpm-lock.yaml
generated
82
pnpm-lock.yaml
generated
@ -175,8 +175,8 @@ importers:
|
|||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2(@types/node@20.17.9)(@vue/compiler-sfc@3.5.15)(chokidar@3.6.0)(typescript@5.7.2)
|
version: 1.1.2(@types/node@20.17.9)(@vue/compiler-sfc@3.5.15)(chokidar@3.6.0)(typescript@5.7.2)
|
||||||
oxlint:
|
oxlint:
|
||||||
specifier: ^0.1.0
|
specifier: 1.0.0
|
||||||
version: 0.1.2
|
version: 1.0.0
|
||||||
postcss:
|
postcss:
|
||||||
specifier: ^8.4.49
|
specifier: ^8.4.49
|
||||||
version: 8.4.49
|
version: 8.4.49
|
||||||
@ -2004,33 +2004,47 @@ packages:
|
|||||||
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
|
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>= 8'}
|
||||||
|
|
||||||
'@oxlint/darwin-arm64@0.1.2':
|
'@oxlint/darwin-arm64@1.0.0':
|
||||||
resolution: {integrity: sha512-bOYzbxJEXogwulAhGVNq3vSvp6KEwHaaW1G/3xqFKGxuifaa6YeWfCqqguVLh8N0Ma57LfA93/jzBcnW7XHHTQ==}
|
resolution: {integrity: sha512-Ei8wLh65Th/si5EY6mfQIXVpdXbJWOoh56FaxxPgVxTeJaj3NHUIlxICHkvTZ5dz8bnOFcbS/+9MaW8Qkzfm9g==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@oxlint/darwin-x64@0.1.2':
|
'@oxlint/darwin-x64@1.0.0':
|
||||||
resolution: {integrity: sha512-Z6Djz/3csdxHnHgmV+OEl9he1MX+qstDGWsLNAwKLsvixTXYlDoIvdlazysemmBFgVbpUzKbx6cW4HqS31DdAg==}
|
resolution: {integrity: sha512-dbdtQ+rJTUb4jFKTzV+j08yYcR8lZssLF10n7MggK/jI7pBtoQN04cupzYdkxOWSy6uDXjDmWYFDIqlTqV7zOg==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@oxlint/linux-arm64@0.1.2':
|
'@oxlint/linux-arm64-gnu@1.0.0':
|
||||||
resolution: {integrity: sha512-ZjmJVasx0ogX3xG0qhsp9LGliDbS4lzzh9WNZxs76QJOXdulRs5Tk+B+8bYVsZyoo3VXjIofUwRpx11An9hEoA==}
|
resolution: {integrity: sha512-71wy9zMxsAeRhCFQjUkDLT8N5tm10L5FxNxsUcEsezgM187X9tPGP1gwlFpYig7F+bg2X1dijFuTA/FSe0YpKg==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
'@oxlint/linux-x64@0.1.2':
|
'@oxlint/linux-arm64-musl@1.0.0':
|
||||||
resolution: {integrity: sha512-HFCJzqKm5PSjB2uVwy5zVzuVILYwvNgjhQyL3NIJEKF8dpCjn9lxbkJXg1xBJUTCVkuhW/jBdbUipIAFbu7VCg==}
|
resolution: {integrity: sha512-UbD4+2k7aGZOFtKK/yeESX7Fv0w9gQbcjrjr1HGY7QOYg7XlFlqzycZdPS6XbAuKA5oOXFpafaYOD4AyX3p2AA==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
|
|
||||||
|
'@oxlint/linux-x64-gnu@1.0.0':
|
||||||
|
resolution: {integrity: sha512-0NXWqsm65I3VaLgADW4y9r7Pwurqgs2fr1lqoTyTIlidD18LQ3UMAWp8NzBPMCYzw8c/rTgOzsFf0gLtxzMtwg==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
'@oxlint/win32-arm64@0.1.2':
|
'@oxlint/linux-x64-musl@1.0.0':
|
||||||
resolution: {integrity: sha512-NDjeYzu2RqI2Nn/MhKy9MayPw3I2tuIGWZsn27emv/C6s1KW7P3khRgYJE9hX2Zo6pCVXzDRQdcmtJflH9wDlg==}
|
resolution: {integrity: sha512-AY1NLnVQI+tBeuaB8KCriWfiD6O1zZFAQHphRDcZiqSz4mauNq9FFuffW0N9RSR9hYttGr0UVdQ6eK72RhzOYg==}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
|
|
||||||
|
'@oxlint/win32-arm64@1.0.0':
|
||||||
|
resolution: {integrity: sha512-X9y2KAdoqT/jy/sITGDZNMJHJAmhDhofItBnCf2DWS1HPakdtCAKGX9KMx6SivTbtPn1+JpZgfHn4Y7rNMvujQ==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@oxlint/win32-x64@0.1.2':
|
'@oxlint/win32-x64@1.0.0':
|
||||||
resolution: {integrity: sha512-zQpQIBAEclJ8tNQKPmGAOKt2ZYNGRWhucfU3mcUr8YPMy1Tf6GPDZUhXNX9icAMRk83n24EtnQb4lR1ipiStmA==}
|
resolution: {integrity: sha512-x2eQwZCfRUi6GG0lhRuC54O6TK2uW7UbIvERh83vPi0ftd+rtGUuJauNdyC+pPx+iwFToFVet43/5MBMu4bMWg==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
@ -4946,9 +4960,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==}
|
resolution: {integrity: sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==}
|
||||||
engines: {node: '>=10', yarn: ^1.22.4}
|
engines: {node: '>=10', yarn: ^1.22.4}
|
||||||
|
|
||||||
oxlint@0.1.2:
|
oxlint@1.0.0:
|
||||||
resolution: {integrity: sha512-hy/pmCx0zgZr1sLZjQeKYoBc0JbFbvd6r9I8CdNjd3bOH100A3JVSjOkClMq6sMG5+mN7TztZzHnpmVKY+jdjw==}
|
resolution: {integrity: sha512-yyeryHnd21wPBLBEF4Uf8hvzJlftrIGHxyUaqFaP2JYiZ9cbiColygZhrezvv/Z/aThCmYu3j6iJMxlVPxNt6g==}
|
||||||
engines: {node: '>=14.*'}
|
engines: {node: '>=8.*'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
p-cancelable@2.1.1:
|
p-cancelable@2.1.1:
|
||||||
@ -8917,22 +8931,28 @@ snapshots:
|
|||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.17.1
|
fastq: 1.17.1
|
||||||
|
|
||||||
'@oxlint/darwin-arm64@0.1.2':
|
'@oxlint/darwin-arm64@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxlint/darwin-x64@0.1.2':
|
'@oxlint/darwin-x64@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxlint/linux-arm64@0.1.2':
|
'@oxlint/linux-arm64-gnu@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxlint/linux-x64@0.1.2':
|
'@oxlint/linux-arm64-musl@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxlint/win32-arm64@0.1.2':
|
'@oxlint/linux-x64-gnu@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxlint/win32-x64@0.1.2':
|
'@oxlint/linux-x64-musl@1.0.0':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@oxlint/win32-arm64@1.0.0':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@oxlint/win32-x64@1.0.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@polka/url@1.0.0-next.29': {}
|
'@polka/url@1.0.0-next.29': {}
|
||||||
@ -12473,14 +12493,16 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lcid: 3.1.1
|
lcid: 3.1.1
|
||||||
|
|
||||||
oxlint@0.1.2:
|
oxlint@1.0.0:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@oxlint/darwin-arm64': 0.1.2
|
'@oxlint/darwin-arm64': 1.0.0
|
||||||
'@oxlint/darwin-x64': 0.1.2
|
'@oxlint/darwin-x64': 1.0.0
|
||||||
'@oxlint/linux-arm64': 0.1.2
|
'@oxlint/linux-arm64-gnu': 1.0.0
|
||||||
'@oxlint/linux-x64': 0.1.2
|
'@oxlint/linux-arm64-musl': 1.0.0
|
||||||
'@oxlint/win32-arm64': 0.1.2
|
'@oxlint/linux-x64-gnu': 1.0.0
|
||||||
'@oxlint/win32-x64': 0.1.2
|
'@oxlint/linux-x64-musl': 1.0.0
|
||||||
|
'@oxlint/win32-arm64': 1.0.0
|
||||||
|
'@oxlint/win32-x64': 1.0.0
|
||||||
|
|
||||||
p-cancelable@2.1.1: {}
|
p-cancelable@2.1.1: {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ref, Ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { getEnvBaseUploadUrl } from '@/utils'
|
import { getEnvBaseUploadUrl } from '@/utils'
|
||||||
|
|
||||||
const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
|
const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
|
||||||
@ -20,7 +20,7 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
|
|||||||
const {
|
const {
|
||||||
formData = {},
|
formData = {},
|
||||||
maxSize = 5 * 1024 * 1024,
|
maxSize = 5 * 1024 * 1024,
|
||||||
accept = ['*'],
|
// accept = ['*'],
|
||||||
fileType = 'image',
|
fileType = 'image',
|
||||||
success,
|
success,
|
||||||
error: onError,
|
error: onError,
|
||||||
|
@ -101,14 +101,13 @@ export const getUrlObj = (url: string) => {
|
|||||||
*/
|
*/
|
||||||
export const getAllPages = (key = 'needLogin') => {
|
export const getAllPages = (key = 'needLogin') => {
|
||||||
// 这里处理主包
|
// 这里处理主包
|
||||||
const mainPages = [
|
const mainPages = pages
|
||||||
...pages
|
|
||||||
.filter((page) => !key || page[key])
|
.filter((page) => !key || page[key])
|
||||||
.map((page) => ({
|
.map((page) => ({
|
||||||
...page,
|
...page,
|
||||||
path: `/${page.path}`,
|
path: `/${page.path}`,
|
||||||
})),
|
}))
|
||||||
]
|
|
||||||
// 这里处理分包
|
// 这里处理分包
|
||||||
const subPages: any[] = []
|
const subPages: any[] = []
|
||||||
subPackages.forEach((subPageObj) => {
|
subPackages.forEach((subPageObj) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user