Compare commits
142 Commits
renovate/t
...
fd6584ff81
| Author | SHA1 | Date | |
|---|---|---|---|
| fd6584ff81 | |||
| 17730cfb10 | |||
| c4b93140f0 | |||
| 1a9257249f | |||
|
|
66280dc6a1 | ||
| 16c93a82a2 | |||
| 16d4b3f749 | |||
| 42f63f7134 | |||
| 9d12927793 | |||
| bb82a6ab83 | |||
| 76d2a45015 | |||
|
|
935251ee53 | ||
| 5472f1c9b9 | |||
| 744703811a | |||
| be3d59691b | |||
| f6bccd7536 | |||
| 4673d622b6 | |||
| 0e467a1e9d | |||
| 7a5610c0dc | |||
| 80d989f6d0 | |||
| 6097d39752 | |||
| 4bc62221b6 | |||
| c405bc9481 | |||
| 54cc46b33a | |||
| 65ee7cccb3 | |||
| 6da6e59b6d | |||
| 8e6d7488f4 | |||
|
|
9e050306bb | ||
| 7f1811098f | |||
| 40b3686f2e | |||
| dfc64ecece | |||
| 1df5110034 | |||
| 731a3da55d | |||
| 4e5b3cb96c | |||
| 5e8df2572f | |||
|
|
7d6474c92b | ||
|
|
86920da611 | ||
| 3828f12a2d | |||
| f269a25968 | |||
| 4a97eca056 | |||
| e91476f55c | |||
| afd08f05fc | |||
| b2f9b9d3b3 | |||
|
|
9cb70b7827 | ||
| 52b1e4fb6b | |||
| f101237792 | |||
| c84380836a | |||
| aca2c29946 | |||
| 9d1374d53c | |||
|
|
814130af34 | ||
| 4a5ae8d2de | |||
| 18fd9cb226 | |||
| 188c813447 | |||
| 737da9c585 | |||
| 80090fdb90 | |||
| abcf706acc | |||
| 760b75083d | |||
| 0b4575b181 | |||
| 57fb6d5256 | |||
| e516dd4ba6 | |||
| 6fc619315a | |||
| a5082ef4e4 | |||
| 9be884be20 | |||
|
|
bbec2a3ff9 | ||
|
|
aa851bb920 | ||
|
|
5610d3ea20 | ||
| 7a20a45035 | |||
| db3f77d6d3 | |||
|
|
e6731afff5 | ||
| 3affb21d99 | |||
|
|
2585b70f6b | ||
|
|
a4e162cab0 | ||
|
|
88cc365935 | ||
|
|
33801ca211 | ||
|
|
4f79426206 | ||
|
|
1185843982 | ||
| 0620651b12 | |||
|
|
a82190d4aa | ||
|
|
d0a7afd5df | ||
|
|
10fcb40d1d | ||
|
|
c7dccb0664 | ||
|
|
1bcecabf7b | ||
|
|
b7b508af08 | ||
|
|
917b3c7324 | ||
|
|
6a73a274bd | ||
|
|
82897ea690 | ||
|
|
e04310c2c9 | ||
| d2a21581ff | |||
|
|
a2c49cf600 | ||
|
|
3429c75600 | ||
| 0f57624cdf | |||
|
|
68fc6ad1a3 | ||
|
|
b4727a1946 | ||
|
|
f757b70174 | ||
|
|
3033a8a707 | ||
|
|
fa77b772be | ||
|
|
2440605fce | ||
|
|
386b65cd05 | ||
|
|
b6fd7c698c | ||
|
|
9376f8e68e | ||
|
|
3a3e9aead5 | ||
|
|
97009158e8 | ||
|
|
a9b916221c | ||
|
|
ac7cb6a31c | ||
|
|
fdf928028c | ||
|
|
3f31d188f6 | ||
| c200206487 | |||
|
|
b7aab0a6a5 | ||
|
|
37a0d59f13 | ||
|
|
163af5e80c | ||
| 8e148c6408 | |||
|
|
1f78af72fc | ||
| 169e0984a4 | |||
|
|
be9093fa77 | ||
|
|
5a6fdc0efd | ||
| 7551eed484 | |||
|
|
a4068df0be | ||
|
|
ccf61ee6c3 | ||
|
|
3170fe889b | ||
|
|
aa55508ed7 | ||
|
|
8d052bcac8 | ||
|
|
ce2f5338de | ||
| 966c40a338 | |||
|
|
fd42a4d6d5 | ||
|
|
f883e0bec1 | ||
|
|
17bdbce8c8 | ||
|
|
61e86e731d | ||
|
|
ff790c7a3a | ||
| 076b8f3407 | |||
| 269d93187c | |||
| 33676dcc8b | |||
|
|
290aed74f2 | ||
|
|
fd0543dcc2 | ||
|
|
fcd840d4fe | ||
|
|
2ba453bbed | ||
|
|
4b645bb916 | ||
| 0a8f1f8248 | |||
| eaafbef793 | |||
| 9f57c8fe0b | |||
|
|
e912b2c710 | ||
|
|
c0c5e9763e | ||
|
|
6e915a5977 |
39
.devcontainer/devcontainer.json
Normal file
39
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"image": "ghcr.io/yanhao98/h-devcontainer:main",
|
||||
"runArgs": [
|
||||
"--hostname=devcontainer-host",
|
||||
"--name=${localWorkspaceFolderBasename}-devcontainer"
|
||||
],
|
||||
"forwardPorts": [4730, 4731, 5901],
|
||||
"portsAttributes": {
|
||||
"4730": { "label": "开发服务器端口", "onAutoForward": "notify" },
|
||||
"4731": { "label": "预览服务器端口", "onAutoForward": "notify" }
|
||||
},
|
||||
"containerEnv": {
|
||||
"TZ": "${localEnv:TZ:Asia/Shanghai}"
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["prettier.prettier-vscode", "vue.volar"],
|
||||
"settings": {
|
||||
// "tasks": { "version": "2.0.0", "tasks": [] },
|
||||
"github.copilot.chat.codeGeneration.instructions": [
|
||||
{
|
||||
"text": "This dev container includes a lightweight Fluxbox based desktop that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS Code terminal will open on the desktop automatically."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"mounts": [
|
||||
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
|
||||
"source=${localWorkspaceFolder}/.devcontainer/lifecycle-scripts.d,target=/usr/local/etc/lifecycle-scripts.d,type=bind,consistency=delegated"
|
||||
],
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=delegated",
|
||||
"initializeCommand": "docker pull ghcr.io/yanhao98/h-devcontainer:main;",
|
||||
"onCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh onCreateCommand",
|
||||
"updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand",
|
||||
"postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand",
|
||||
"postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand",
|
||||
"postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand"
|
||||
}
|
||||
0
.devcontainer/lifecycle-scripts.d/.gitkeep
Normal file
0
.devcontainer/lifecycle-scripts.d/.gitkeep
Normal file
14
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
14
.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/-
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/zsh -eu
|
||||
h-setup-zh-locale
|
||||
|
||||
h-setup-bun-bin
|
||||
h-setup-pnpm-bin
|
||||
|
||||
h-setup-chromium
|
||||
h-setup-desktop-lite
|
||||
|
||||
h-install-node-modules
|
||||
|
||||
echo "-----------------------------"
|
||||
echo "开发容器已启动并配置完成!"
|
||||
echo "-----------------------------"
|
||||
6
.github/workflows/ci-cd.yaml
vendored
6
.github/workflows/ci-cd.yaml
vendored
@@ -14,10 +14,10 @@ on:
|
||||
jobs:
|
||||
playwright:
|
||||
runs-on: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright:v1.56.1-noble
|
||||
container: mcr.microsoft.com/playwright:v1.57.0-noble
|
||||
steps:
|
||||
- name: ⚙️ 设置 Node 环境
|
||||
uses: yanhao98/composite-actions/setup-node-environment@25eb4dc0c134cc9df2b7c569aa54140a366b45a8
|
||||
uses: yanhao98/composite-actions/setup-node-environment@faab20ac2f9c85dfce1a4147fca493bf632bd744
|
||||
# - name: 📥 安装 Playwright 浏览器
|
||||
# run: pnpm exec playwright install --with-deps
|
||||
- name: 📦 构建项目
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 🛠️ 设置Node环境
|
||||
uses: yanhao98/composite-actions/setup-node-environment@25eb4dc0c134cc9df2b7c569aa54140a366b45a8
|
||||
uses: yanhao98/composite-actions/setup-node-environment@faab20ac2f9c85dfce1a4147fca493bf632bd744
|
||||
|
||||
- name: 🔍 静态代码分析
|
||||
run: pnpm run lint
|
||||
|
||||
2
.github/workflows/测试最新依赖.yaml
vendored
2
.github/workflows/测试最新依赖.yaml
vendored
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
playwright:
|
||||
runs-on: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright:v1.56.1-noble
|
||||
container: mcr.microsoft.com/playwright:v1.57.0-noble
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@ yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
.pnpm-store
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
|
||||
@@ -8,6 +8,6 @@ cat $1
|
||||
echo "🟢 [Commit-msg] Node 版本:$(node -v)"
|
||||
|
||||
# pnpm exec commitlint --edit $1
|
||||
time node node_modules/@commitlint/cli/cli.js --edit $1
|
||||
node node_modules/@commitlint/cli/cli.js --edit $1
|
||||
|
||||
echo "📝 [Commit-msg] commit-msg 钩子完成!"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# 此钩子在 git merge 或 git pull 成功完成后运行。
|
||||
echo "🔗 [Post-merge] 正在安装依赖..."
|
||||
time pnpm install
|
||||
pnpm install
|
||||
echo "🔗 [Post-merge] 依赖安装完成!"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 此钩子在执行 git commit 命令时,在创建提交之前运行。
|
||||
echo "🧹 [Pre-commit] 正在运行 lint-staged..."
|
||||
time pnpm exec lint-staged
|
||||
time pnpm run lint:vue-i18n-extract
|
||||
# time pnpm run type-check
|
||||
pnpm exec lint-staged
|
||||
pnpm run lint:vue-i18n-extract
|
||||
# pnpm run type-check
|
||||
echo "🧹 [Pre-commit] lint-staged 完成!"
|
||||
|
||||
8
.npmrc
8
.npmrc
@@ -1,9 +1 @@
|
||||
# registry=https://registry.npmmirror.com/
|
||||
|
||||
# https://pnpm.io/zh/npmrc#node-mirrorltreleasedir
|
||||
use-node-version=24.7.0
|
||||
node-mirror:release=https://npmmirror.com/mirrors/node/ # pnpm config set node-mirror:release=https://npmmirror.com/mirrors/node/
|
||||
node-mirror:rc=https://npmmirror.com/mirrors/node-rc/
|
||||
node-mirror:nightly=https://npmmirror.com/mirrors/node-nightly/
|
||||
|
||||
# shamefully-hoist=true
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all"
|
||||
"trailingComma": "all",
|
||||
"plugins": ["@prettier/plugin-oxc"]
|
||||
}
|
||||
|
||||
5
.vscode/extensions.json
vendored
5
.vscode/extensions.json
vendored
@@ -2,10 +2,11 @@
|
||||
"recommendations": [
|
||||
"Vue.volar",
|
||||
"vitest.explorer",
|
||||
"ms-playwright.playwright",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"oxc.oxc-vscode",
|
||||
"esbenp.prettier-vscode"
|
||||
"prettier.prettier-vscode",
|
||||
"stylelint.vscode-stylelint",
|
||||
"lokalise.i18n-ally"
|
||||
]
|
||||
}
|
||||
|
||||
59
.vscode/settings.json
vendored
59
.vscode/settings.json
vendored
@@ -1,28 +1,56 @@
|
||||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.preferences.autoImportFileExcludePatterns": [
|
||||
"vue-router$",
|
||||
"**/src/composables/**",
|
||||
"**/*-auto-imports.ts",
|
||||
"**/*-auto-imports.types.ts"
|
||||
],
|
||||
"search.exclude": {
|
||||
"public/report-ui-dist": true
|
||||
},
|
||||
|
||||
// ============================================================
|
||||
// 代码格式化相关配置
|
||||
// ============================================================
|
||||
"prettier.enable": true,
|
||||
"files.readonlyInclude": {
|
||||
"dist/**": true
|
||||
},
|
||||
"eslint.enable": true,
|
||||
"oxc.enable": true,
|
||||
"stylelint.enable": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit",
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.fixAll.stylelint": "explicit",
|
||||
"source.fixAll.oxc": "explicit",
|
||||
"source.organizeImports": "never"
|
||||
"source.fixAll.stylelint": "explicit",
|
||||
"source.organizeImports": "explicit"
|
||||
},
|
||||
"eslint.enable": true,
|
||||
"stylelint.enable": true,
|
||||
"oxc.enable": true,
|
||||
"editor.formatOnSave": true,
|
||||
|
||||
"stylelint.validate": ["css", "less", "postcss", "scss", "vue"],
|
||||
"scss.lint.unknownAtRules": "ignore",
|
||||
"css.lint.unknownAtRules": "ignore",
|
||||
"less.lint.unknownAtRules": "ignore",
|
||||
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode",
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "prettier.prettier-vscode"
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
|
||||
// ============================================================
|
||||
// i18n-ally 配置
|
||||
// ============================================================
|
||||
// >>>>>
|
||||
"i18n-ally.readonly": true,
|
||||
"i18n-ally.readonly": false,
|
||||
"i18n-ally.namespace": false /* 禁用命名空间(@intlify/unplugin-vue-i18n不支持吧?) */,
|
||||
"i18n-ally.localesPaths": ["src/locales/demo", "src/locales"],
|
||||
// https://github.com/lokalise/i18n-ally/wiki/Path-Matcher
|
||||
@@ -31,12 +59,7 @@
|
||||
"i18n-ally.enabledParsers": ["json"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"i18n-ally.sourceLanguage": "zh-CN", // 翻译源语言 (源文件) 根据此语言文件翻译其他语言文件的变量和内容
|
||||
"i18n-ally.displayLanguage": "zh-CN", // 显示语言 (显示文件/翻译文件)
|
||||
"i18n-ally.displayLanguage": "zh-CN" // 显示语言 (显示文件/翻译文件)
|
||||
// <<<<<
|
||||
|
||||
// https://github.com/copilot/share/8a1a019a-0180-80e7-8141-a40be02c4006
|
||||
// "iconify.customCollectionJsonPaths": ["https://example.com/my-icons.json", "./local/icons.json"],
|
||||
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.preferences.autoImportFileExcludePatterns": ["vue-router/auto$"]
|
||||
}
|
||||
|
||||
24
.vscode/tasks.json
vendored
24
.vscode/tasks.json
vendored
@@ -6,16 +6,12 @@
|
||||
"script": "dev",
|
||||
"label": "🚀 dev",
|
||||
"detail": "启动开发服务器",
|
||||
"problemMatcher": {
|
||||
"pattern": { "regexp": "." },
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "VITE.*ready in",
|
||||
"endsPattern": "(Local|Network):.*http"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
"presentation": { "reveal": "always", "panel": "dedicated" },
|
||||
"presentation": {
|
||||
"reveal": "always", // 控制运行任务的终端是否显示。可按选项 "revealProblems" 进行替代。默认设置为“始终”。
|
||||
"panel": "dedicated" // dedicated:一个任务独占一个终端,方便查看特定任务的日志,不会被其他任务干扰。
|
||||
},
|
||||
"group": { "kind": "build", "isDefault": false }
|
||||
},
|
||||
{
|
||||
@@ -23,7 +19,6 @@
|
||||
"script": "build-only",
|
||||
"label": "🔨 build-only",
|
||||
"detail": "" /* 如果为空或省略,VSCode 将自动使用 package.json 中 scripts[scriptName] 的值作为 detail */,
|
||||
"problemMatcher": ["$tsc"],
|
||||
"presentation": { "reveal": "always", "panel": "shared" },
|
||||
"group": { "kind": "none", "isDefault": false }
|
||||
},
|
||||
@@ -33,14 +28,7 @@
|
||||
"label": "☁️ wrangler:dev",
|
||||
"detail": "启动 Cloudflare Workers 开发服务器,相当于预览",
|
||||
"dependsOn": ["🔨 build-only"],
|
||||
"problemMatcher": {
|
||||
"pattern": { "regexp": "." },
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "wrangler dev",
|
||||
"endsPattern": "Ready on"
|
||||
}
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
"presentation": { "reveal": "always", "panel": "dedicated" },
|
||||
"group": { "kind": "build", "isDefault": false }
|
||||
|
||||
20
AGENTS.md
20
AGENTS.md
@@ -9,6 +9,7 @@ Vue 3 TypeScript application with Vite.
|
||||
## 开发服务器
|
||||
|
||||
- **不要启动开发服务器**: 开发服务器通常已经由用户启动。除非特别要求,否则不要执行 `pnpm dev` 之类的命令。
|
||||
- **不要执行 Playwright 测试**: 除非用户明确要求,否则不要运行 Playwright 端到端测试。
|
||||
|
||||
### Routing & Layouts
|
||||
|
||||
@@ -46,25 +47,6 @@ Multiple auto-import systems are active:
|
||||
Project has multiple UI frameworks configured:
|
||||
|
||||
- **Naive UI**
|
||||
- **Form Layout**: When using `NGrid` for form layouts, prefer `NFormItemGi` over nesting `NFormItem` inside `NGridItem` for more concise code.
|
||||
|
||||
```vue
|
||||
<!-- ❌ Avoid: Verbose nesting -->
|
||||
<NGrid :cols="4">
|
||||
<NGridItem>
|
||||
<NFormItem label="Username">
|
||||
<NInput />
|
||||
</NFormItem>
|
||||
</NGridItem>
|
||||
</NGrid>
|
||||
|
||||
<!-- ✅ Use: Concise and direct -->
|
||||
<NGrid :cols="4">
|
||||
<NFormItemGi label="Username">
|
||||
<NInput />
|
||||
</NFormItemGi>
|
||||
</NGrid>
|
||||
```
|
||||
|
||||
- **PrimeVue**:
|
||||
|
||||
|
||||
664
auto-imports.d.ts
vendored
664
auto-imports.d.ts
vendored
@@ -6,335 +6,335 @@
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
declare global {
|
||||
const ConfirmationService: typeof import('utils4u/primevue')['ConfirmationService']
|
||||
const DialogService: typeof import('utils4u/primevue')['DialogService']
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ToastService: typeof import('utils4u/primevue')['ToastService']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const arrayToTree: typeof import('utils4u/array')['arrayToTree']
|
||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const computedAsync: typeof import('@vueuse/core')['computedAsync']
|
||||
const computedEager: typeof import('@vueuse/core')['computedEager']
|
||||
const computedInject: typeof import('@vueuse/core')['computedInject']
|
||||
const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
|
||||
const consola: typeof import('consola/browser')['consola']
|
||||
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
|
||||
const controlledRef: typeof import('@vueuse/core')['controlledRef']
|
||||
const convertFileToBase64: typeof import('utils4u/browser')['convertFileToBase64']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createEventHook: typeof import('@vueuse/core')['createEventHook']
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||
const createLogGuard: typeof import('utils4u/vue-router')['createLogGuard']
|
||||
const createNProgressGuard: typeof import('utils4u/vue-router')['createNProgressGuard']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createRef: typeof import('@vueuse/core')['createRef']
|
||||
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createStackGuard: typeof import('utils4u/vue-router')['createStackGuard']
|
||||
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
|
||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||
const deepFreeze: typeof import('deep-freeze-es6')['default']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const getCurrentWatcher: typeof import('vue')['getCurrentWatcher']
|
||||
const h: typeof import('vue')['h']
|
||||
const i18nInstance: typeof import('./src/locales-utils/i18n-auto-imports')['i18nInstance']
|
||||
const i18nRouteMessages: typeof import('./src/locales-utils/route-messages/route-messages-auto-imports')['i18nRouteMessages']
|
||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const injectLocal: typeof import('@vueuse/core')['injectLocal']
|
||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||
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 isShallow: typeof import('vue')['isShallow']
|
||||
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||
const mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onElementRemoval: typeof import('@vueuse/core')['onElementRemoval']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
|
||||
const onLongPress: typeof import('@vueuse/core')['onLongPress']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const provideLocal: typeof import('@vueuse/core')['provideLocal']
|
||||
const reactify: typeof import('@vueuse/core')['reactify']
|
||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
|
||||
const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
|
||||
const reactivePick: typeof import('@vueuse/core')['reactivePick']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
|
||||
const refDebounced: typeof import('@vueuse/core')['refDebounced']
|
||||
const refDefault: typeof import('@vueuse/core')['refDefault']
|
||||
const refThrottled: typeof import('@vueuse/core')['refThrottled']
|
||||
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||
const routeI18nInstance: typeof import('./src/locales-utils/i18n-auto-imports')['routeI18nInstance']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const setViewportCSSVars: typeof import('utils4u/browser')['setViewportCSSVars']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const showOpenFilePicker: typeof import('utils4u/browser')['showOpenFilePicker']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||
const throttledRef: typeof import('@vueuse/core')['throttledRef']
|
||||
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toReactive: typeof import('@vueuse/core')['toReactive']
|
||||
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 tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
|
||||
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
|
||||
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||
const until: typeof import('@vueuse/core')['until']
|
||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||
const useAnimate: typeof import('@vueuse/core')['useAnimate']
|
||||
const useAppStore: typeof import('./src/stores/app-store-auto-imports')['useAppStore']
|
||||
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
|
||||
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
||||
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
||||
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
||||
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
||||
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
|
||||
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
|
||||
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
||||
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
||||
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
||||
const useArraySome: typeof import('@vueuse/core')['useArraySome']
|
||||
const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
|
||||
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
|
||||
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useAuthStore: typeof import('./src/stores/auth-store-auto-imports')['useAuthStore']
|
||||
const useBase64: typeof import('@vueuse/core')['useBase64']
|
||||
const useBattery: typeof import('@vueuse/core')['useBattery']
|
||||
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
|
||||
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
|
||||
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useCached: typeof import('@vueuse/core')['useCached']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
const useCountdown: typeof import('@vueuse/core')['useCountdown']
|
||||
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
|
||||
const useCycleList: typeof import('@vueuse/core')['useCycleList']
|
||||
const useDark: typeof import('@vueuse/core')['useDark']
|
||||
const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
|
||||
const useDebounce: typeof import('@vueuse/core')['useDebounce']
|
||||
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
|
||||
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
|
||||
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
|
||||
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
|
||||
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
|
||||
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
|
||||
const useDialog: typeof import('naive-ui')['useDialog']
|
||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||
const useElementSize: typeof import('@vueuse/core')['useElementSize']
|
||||
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
|
||||
const useEventBus: typeof import('@vueuse/core')['useEventBus']
|
||||
const useEventListener: typeof import('@vueuse/core')['useEventListener']
|
||||
const useEventSource: typeof import('@vueuse/core')['useEventSource']
|
||||
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
|
||||
const useFavicon: typeof import('@vueuse/core')['useFavicon']
|
||||
const useFetch: typeof import('@vueuse/core')['useFetch']
|
||||
const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
|
||||
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
|
||||
const useFocus: typeof import('@vueuse/core')['useFocus']
|
||||
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
|
||||
const useFps: typeof import('@vueuse/core')['useFps']
|
||||
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||
const useGamepad: typeof import('@vueuse/core')['useGamepad']
|
||||
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||
const useI18n: typeof import('vue-i18n')['useI18n']
|
||||
const useId: typeof import('vue')['useId']
|
||||
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||
const useImage: typeof import('@vueuse/core')['useImage']
|
||||
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
|
||||
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
|
||||
const useInterval: typeof import('@vueuse/core')['useInterval']
|
||||
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
|
||||
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
|
||||
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
|
||||
const useLink: typeof import('vue-router/auto')['useLink']
|
||||
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
|
||||
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
|
||||
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
|
||||
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
|
||||
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
|
||||
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||
const useMessage: typeof import('naive-ui')['useMessage']
|
||||
const useMetaLayoutsNMenuOptions: typeof import('./src/composables/useMetaLayoutsMenuOptions')['useMetaLayoutsNMenuOptions']
|
||||
const useModal: typeof import('naive-ui')['useModal']
|
||||
const useModel: typeof import('vue')['useModel']
|
||||
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
|
||||
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
|
||||
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
|
||||
const useNetwork: typeof import('@vueuse/core')['useNetwork']
|
||||
const useNotification: typeof import('naive-ui')['useNotification']
|
||||
const useNow: typeof import('@vueuse/core')['useNow']
|
||||
const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
|
||||
const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
|
||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||
const useParentElement: typeof import('@vueuse/core')['useParentElement']
|
||||
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
|
||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
||||
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
|
||||
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
|
||||
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
|
||||
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
|
||||
const usePreferredReducedTransparency: typeof import('@vueuse/core')['usePreferredReducedTransparency']
|
||||
const usePrevious: typeof import('@vueuse/core')['usePrevious']
|
||||
const usePrimevueDialogRef: typeof import('utils4u/primevue')['usePrimevueDialogRef']
|
||||
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||
const useRefs: typeof import('utils4u/vue-use')['useRefs']
|
||||
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSSRWidth: typeof import('@vueuse/core')['useSSRWidth']
|
||||
const useSafeNForm: typeof import('./src/utils/use-safe-n-form-auto-imports')['useSafeNForm']
|
||||
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
|
||||
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||
const useShare: typeof import('@vueuse/core')['useShare']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useSorted: typeof import('@vueuse/core')['useSorted']
|
||||
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
|
||||
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
|
||||
const useStepper: typeof import('@vueuse/core')['useStepper']
|
||||
const useStorage: typeof import('@vueuse/core')['useStorage']
|
||||
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
|
||||
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||
const useSupported: typeof import('@vueuse/core')['useSupported']
|
||||
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
|
||||
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
|
||||
const useThrottle: typeof import('@vueuse/core')['useThrottle']
|
||||
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
|
||||
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
|
||||
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
|
||||
const useTimeAgoIntl: typeof import('@vueuse/core')['useTimeAgoIntl']
|
||||
const useTimeout: typeof import('@vueuse/core')['useTimeout']
|
||||
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
|
||||
const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
|
||||
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
|
||||
const useTitle: typeof import('@vueuse/core')['useTitle']
|
||||
const useToNumber: typeof import('@vueuse/core')['useToNumber']
|
||||
const useToString: typeof import('@vueuse/core')['useToString']
|
||||
const useToggle: typeof import('@vueuse/core')['useToggle']
|
||||
const useTransition: typeof import('@vueuse/core')['useTransition']
|
||||
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
|
||||
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
|
||||
const useVModel: typeof import('@vueuse/core')['useVModel']
|
||||
const useVModels: typeof import('@vueuse/core')['useVModels']
|
||||
const useVibrate: typeof import('@vueuse/core')['useVibrate']
|
||||
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
|
||||
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
|
||||
const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
|
||||
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
|
||||
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
|
||||
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
|
||||
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||
const watchDeep: typeof import('@vueuse/core')['watchDeep']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
|
||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
|
||||
const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
|
||||
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||
const whenever: typeof import('@vueuse/core')['whenever']
|
||||
const ConfirmationService: typeof import('utils4u/primevue').ConfirmationService
|
||||
const DialogService: typeof import('utils4u/primevue').DialogService
|
||||
const EffectScope: typeof import('vue').EffectScope
|
||||
const ToastService: typeof import('utils4u/primevue').ToastService
|
||||
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
||||
const arrayToTree: typeof import('utils4u/array').arrayToTree
|
||||
const asyncComputed: typeof import('@vueuse/core').asyncComputed
|
||||
const autoResetRef: typeof import('@vueuse/core').autoResetRef
|
||||
const computed: typeof import('vue').computed
|
||||
const computedAsync: typeof import('@vueuse/core').computedAsync
|
||||
const computedEager: typeof import('@vueuse/core').computedEager
|
||||
const computedInject: typeof import('@vueuse/core').computedInject
|
||||
const computedWithControl: typeof import('@vueuse/core').computedWithControl
|
||||
const consola: typeof import('consola/browser').consola
|
||||
const controlledComputed: typeof import('@vueuse/core').controlledComputed
|
||||
const controlledRef: typeof import('@vueuse/core').controlledRef
|
||||
const convertFileToBase64: typeof import('utils4u/browser').convertFileToBase64
|
||||
const createApp: typeof import('vue').createApp
|
||||
const createEventHook: typeof import('@vueuse/core').createEventHook
|
||||
const createGlobalState: typeof import('@vueuse/core').createGlobalState
|
||||
const createInjectionState: typeof import('@vueuse/core').createInjectionState
|
||||
const createLogGuard: typeof import('utils4u/vue-router').createLogGuard
|
||||
const createNProgressGuard: typeof import('utils4u/vue-router').createNProgressGuard
|
||||
const createPinia: typeof import('pinia').createPinia
|
||||
const createReactiveFn: typeof import('@vueuse/core').createReactiveFn
|
||||
const createRef: typeof import('@vueuse/core').createRef
|
||||
const createReusableTemplate: typeof import('@vueuse/core').createReusableTemplate
|
||||
const createSharedComposable: typeof import('@vueuse/core').createSharedComposable
|
||||
const createStackGuard: typeof import('utils4u/vue-router').createStackGuard
|
||||
const createTemplatePromise: typeof import('@vueuse/core').createTemplatePromise
|
||||
const createUnrefFn: typeof import('@vueuse/core').createUnrefFn
|
||||
const customRef: typeof import('vue').customRef
|
||||
const debouncedRef: typeof import('@vueuse/core').debouncedRef
|
||||
const debouncedWatch: typeof import('@vueuse/core').debouncedWatch
|
||||
const deepFreeze: typeof import('deep-freeze-es6').default
|
||||
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
||||
const defineBasicLoader: typeof import('unplugin-vue-router/data-loaders/basic').defineBasicLoader
|
||||
const defineComponent: typeof import('vue').defineComponent
|
||||
const defineStore: typeof import('pinia').defineStore
|
||||
const eagerComputed: typeof import('@vueuse/core').eagerComputed
|
||||
const effectScope: typeof import('vue').effectScope
|
||||
const extendRef: typeof import('@vueuse/core').extendRef
|
||||
const getActivePinia: typeof import('pinia').getActivePinia
|
||||
const getCurrentInstance: typeof import('vue').getCurrentInstance
|
||||
const getCurrentScope: typeof import('vue').getCurrentScope
|
||||
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
|
||||
const h: typeof import('vue').h
|
||||
const i18nInstance: typeof import('./src/locales-utils/i18n-auto-imports').i18nInstance
|
||||
const i18nRouteMessages: typeof import('./src/locales-utils/route-messages/route-messages-auto-imports').i18nRouteMessages
|
||||
const ignorableWatch: typeof import('@vueuse/core').ignorableWatch
|
||||
const inject: typeof import('vue').inject
|
||||
const injectLocal: typeof import('@vueuse/core').injectLocal
|
||||
const isDefined: typeof import('@vueuse/core').isDefined
|
||||
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 isShallow: typeof import('vue').isShallow
|
||||
const makeDestructurable: typeof import('@vueuse/core').makeDestructurable
|
||||
const mapActions: typeof import('pinia').mapActions
|
||||
const mapGetters: typeof import('pinia').mapGetters
|
||||
const mapState: typeof import('pinia').mapState
|
||||
const mapStores: typeof import('pinia').mapStores
|
||||
const mapWritableState: typeof import('pinia').mapWritableState
|
||||
const markRaw: typeof import('vue').markRaw
|
||||
const nextTick: typeof import('vue').nextTick
|
||||
const onActivated: typeof import('vue').onActivated
|
||||
const onBeforeMount: typeof import('vue').onBeforeMount
|
||||
const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave
|
||||
const onBeforeRouteUpdate: typeof import('vue-router').onBeforeRouteUpdate
|
||||
const onBeforeUnmount: typeof import('vue').onBeforeUnmount
|
||||
const onBeforeUpdate: typeof import('vue').onBeforeUpdate
|
||||
const onClickOutside: typeof import('@vueuse/core').onClickOutside
|
||||
const onDeactivated: typeof import('vue').onDeactivated
|
||||
const onElementRemoval: typeof import('@vueuse/core').onElementRemoval
|
||||
const onErrorCaptured: typeof import('vue').onErrorCaptured
|
||||
const onKeyStroke: typeof import('@vueuse/core').onKeyStroke
|
||||
const onLongPress: typeof import('@vueuse/core').onLongPress
|
||||
const onMounted: typeof import('vue').onMounted
|
||||
const onRenderTracked: typeof import('vue').onRenderTracked
|
||||
const onRenderTriggered: typeof import('vue').onRenderTriggered
|
||||
const onScopeDispose: typeof import('vue').onScopeDispose
|
||||
const onServerPrefetch: typeof import('vue').onServerPrefetch
|
||||
const onStartTyping: typeof import('@vueuse/core').onStartTyping
|
||||
const onUnmounted: typeof import('vue').onUnmounted
|
||||
const onUpdated: typeof import('vue').onUpdated
|
||||
const onWatcherCleanup: typeof import('vue').onWatcherCleanup
|
||||
const pausableWatch: typeof import('@vueuse/core').pausableWatch
|
||||
const provide: typeof import('vue').provide
|
||||
const provideLocal: typeof import('@vueuse/core').provideLocal
|
||||
const reactify: typeof import('@vueuse/core').reactify
|
||||
const reactifyObject: typeof import('@vueuse/core').reactifyObject
|
||||
const reactive: typeof import('vue').reactive
|
||||
const reactiveComputed: typeof import('@vueuse/core').reactiveComputed
|
||||
const reactiveOmit: typeof import('@vueuse/core').reactiveOmit
|
||||
const reactivePick: typeof import('@vueuse/core').reactivePick
|
||||
const readonly: typeof import('vue').readonly
|
||||
const ref: typeof import('vue').ref
|
||||
const refAutoReset: typeof import('@vueuse/core').refAutoReset
|
||||
const refDebounced: typeof import('@vueuse/core').refDebounced
|
||||
const refDefault: typeof import('@vueuse/core').refDefault
|
||||
const refManualReset: typeof import('@vueuse/core').refManualReset
|
||||
const refThrottled: typeof import('@vueuse/core').refThrottled
|
||||
const refWithControl: typeof import('@vueuse/core').refWithControl
|
||||
const resolveComponent: typeof import('vue').resolveComponent
|
||||
const resolveRef: typeof import('@vueuse/core').resolveRef
|
||||
const routeI18nInstance: typeof import('./src/locales-utils/i18n-auto-imports').routeI18nInstance
|
||||
const routeI18nT: typeof import('./src/locales-utils/i18n-auto-imports').routeI18nT
|
||||
const setActivePinia: typeof import('pinia').setActivePinia
|
||||
const setMapStoreSuffix: typeof import('pinia').setMapStoreSuffix
|
||||
const setViewportCSSVars: typeof import('utils4u/browser').setViewportCSSVars
|
||||
const shallowReactive: typeof import('vue').shallowReactive
|
||||
const shallowReadonly: typeof import('vue').shallowReadonly
|
||||
const shallowRef: typeof import('vue').shallowRef
|
||||
const showOpenFilePicker: typeof import('utils4u/browser').showOpenFilePicker
|
||||
const storeToRefs: typeof import('pinia').storeToRefs
|
||||
const syncRef: typeof import('@vueuse/core').syncRef
|
||||
const syncRefs: typeof import('@vueuse/core').syncRefs
|
||||
const templateRef: typeof import('@vueuse/core').templateRef
|
||||
const throttledRef: typeof import('@vueuse/core').throttledRef
|
||||
const throttledWatch: typeof import('@vueuse/core').throttledWatch
|
||||
const toRaw: typeof import('vue').toRaw
|
||||
const toReactive: typeof import('@vueuse/core').toReactive
|
||||
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 tryOnBeforeMount: typeof import('@vueuse/core').tryOnBeforeMount
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core').tryOnBeforeUnmount
|
||||
const tryOnMounted: typeof import('@vueuse/core').tryOnMounted
|
||||
const tryOnScopeDispose: typeof import('@vueuse/core').tryOnScopeDispose
|
||||
const tryOnUnmounted: typeof import('@vueuse/core').tryOnUnmounted
|
||||
const unref: typeof import('vue').unref
|
||||
const unrefElement: typeof import('@vueuse/core').unrefElement
|
||||
const until: typeof import('@vueuse/core').until
|
||||
const useActiveElement: typeof import('@vueuse/core').useActiveElement
|
||||
const useAnimate: typeof import('@vueuse/core').useAnimate
|
||||
const useAppStore: typeof import('./src/stores/app-store-auto-imports').useAppStore
|
||||
const useArrayDifference: typeof import('@vueuse/core').useArrayDifference
|
||||
const useArrayEvery: typeof import('@vueuse/core').useArrayEvery
|
||||
const useArrayFilter: typeof import('@vueuse/core').useArrayFilter
|
||||
const useArrayFind: typeof import('@vueuse/core').useArrayFind
|
||||
const useArrayFindIndex: typeof import('@vueuse/core').useArrayFindIndex
|
||||
const useArrayFindLast: typeof import('@vueuse/core').useArrayFindLast
|
||||
const useArrayIncludes: typeof import('@vueuse/core').useArrayIncludes
|
||||
const useArrayJoin: typeof import('@vueuse/core').useArrayJoin
|
||||
const useArrayMap: typeof import('@vueuse/core').useArrayMap
|
||||
const useArrayReduce: typeof import('@vueuse/core').useArrayReduce
|
||||
const useArraySome: typeof import('@vueuse/core').useArraySome
|
||||
const useArrayUnique: typeof import('@vueuse/core').useArrayUnique
|
||||
const useAsyncQueue: typeof import('@vueuse/core').useAsyncQueue
|
||||
const useAsyncState: typeof import('@vueuse/core').useAsyncState
|
||||
const useAttrs: typeof import('vue').useAttrs
|
||||
const useAuthStore: typeof import('./src/stores/auth-store-auto-imports').useAuthStore
|
||||
const useBase64: typeof import('@vueuse/core').useBase64
|
||||
const useBattery: typeof import('@vueuse/core').useBattery
|
||||
const useBluetooth: typeof import('@vueuse/core').useBluetooth
|
||||
const useBreakpoints: typeof import('@vueuse/core').useBreakpoints
|
||||
const useBroadcastChannel: typeof import('@vueuse/core').useBroadcastChannel
|
||||
const useBrowserLocation: typeof import('@vueuse/core').useBrowserLocation
|
||||
const useCached: typeof import('@vueuse/core').useCached
|
||||
const useClipboard: typeof import('@vueuse/core').useClipboard
|
||||
const useClipboardItems: typeof import('@vueuse/core').useClipboardItems
|
||||
const useCloned: typeof import('@vueuse/core').useCloned
|
||||
const useColorMode: typeof import('@vueuse/core').useColorMode
|
||||
const useConfirmDialog: typeof import('@vueuse/core').useConfirmDialog
|
||||
const useCountdown: typeof import('@vueuse/core').useCountdown
|
||||
const useCounter: typeof import('@vueuse/core').useCounter
|
||||
const useCssModule: typeof import('vue').useCssModule
|
||||
const useCssVar: typeof import('@vueuse/core').useCssVar
|
||||
const useCssVars: typeof import('vue').useCssVars
|
||||
const useCurrentElement: typeof import('@vueuse/core').useCurrentElement
|
||||
const useCycleList: typeof import('@vueuse/core').useCycleList
|
||||
const useDark: typeof import('@vueuse/core').useDark
|
||||
const useDateFormat: typeof import('@vueuse/core').useDateFormat
|
||||
const useDebounce: typeof import('@vueuse/core').useDebounce
|
||||
const useDebounceFn: typeof import('@vueuse/core').useDebounceFn
|
||||
const useDebouncedRefHistory: typeof import('@vueuse/core').useDebouncedRefHistory
|
||||
const useDeviceMotion: typeof import('@vueuse/core').useDeviceMotion
|
||||
const useDeviceOrientation: typeof import('@vueuse/core').useDeviceOrientation
|
||||
const useDevicePixelRatio: typeof import('@vueuse/core').useDevicePixelRatio
|
||||
const useDevicesList: typeof import('@vueuse/core').useDevicesList
|
||||
const useDialog: typeof import('naive-ui').useDialog
|
||||
const useDisplayMedia: typeof import('@vueuse/core').useDisplayMedia
|
||||
const useDocumentVisibility: typeof import('@vueuse/core').useDocumentVisibility
|
||||
const useDraggable: typeof import('@vueuse/core').useDraggable
|
||||
const useDropZone: typeof import('@vueuse/core').useDropZone
|
||||
const useElementBounding: typeof import('@vueuse/core').useElementBounding
|
||||
const useElementByPoint: typeof import('@vueuse/core').useElementByPoint
|
||||
const useElementHover: typeof import('@vueuse/core').useElementHover
|
||||
const useElementSize: typeof import('@vueuse/core').useElementSize
|
||||
const useElementVisibility: typeof import('@vueuse/core').useElementVisibility
|
||||
const useEventBus: typeof import('@vueuse/core').useEventBus
|
||||
const useEventListener: typeof import('@vueuse/core').useEventListener
|
||||
const useEventSource: typeof import('@vueuse/core').useEventSource
|
||||
const useEyeDropper: typeof import('@vueuse/core').useEyeDropper
|
||||
const useFavicon: typeof import('@vueuse/core').useFavicon
|
||||
const useFetch: typeof import('@vueuse/core').useFetch
|
||||
const useFileDialog: typeof import('@vueuse/core').useFileDialog
|
||||
const useFileSystemAccess: typeof import('@vueuse/core').useFileSystemAccess
|
||||
const useFocus: typeof import('@vueuse/core').useFocus
|
||||
const useFocusWithin: typeof import('@vueuse/core').useFocusWithin
|
||||
const useFps: typeof import('@vueuse/core').useFps
|
||||
const useFullscreen: typeof import('@vueuse/core').useFullscreen
|
||||
const useGamepad: typeof import('@vueuse/core').useGamepad
|
||||
const useGeolocation: typeof import('@vueuse/core').useGeolocation
|
||||
const useI18n: typeof import('vue-i18n').useI18n
|
||||
const useId: typeof import('vue').useId
|
||||
const useIdle: typeof import('@vueuse/core').useIdle
|
||||
const useImage: typeof import('@vueuse/core').useImage
|
||||
const useInfiniteScroll: typeof import('@vueuse/core').useInfiniteScroll
|
||||
const useIntersectionObserver: typeof import('@vueuse/core').useIntersectionObserver
|
||||
const useInterval: typeof import('@vueuse/core').useInterval
|
||||
const useIntervalFn: typeof import('@vueuse/core').useIntervalFn
|
||||
const useKeyModifier: typeof import('@vueuse/core').useKeyModifier
|
||||
const useLastChanged: typeof import('@vueuse/core').useLastChanged
|
||||
const useLoadingBar: typeof import('naive-ui').useLoadingBar
|
||||
const useLocalStorage: typeof import('@vueuse/core').useLocalStorage
|
||||
const useMagicKeys: typeof import('@vueuse/core').useMagicKeys
|
||||
const useManualRefHistory: typeof import('@vueuse/core').useManualRefHistory
|
||||
const useMediaControls: typeof import('@vueuse/core').useMediaControls
|
||||
const useMediaQuery: typeof import('@vueuse/core').useMediaQuery
|
||||
const useMemoize: typeof import('@vueuse/core').useMemoize
|
||||
const useMemory: typeof import('@vueuse/core').useMemory
|
||||
const useMessage: typeof import('naive-ui').useMessage
|
||||
const useMetaLayoutsNMenuOptions: typeof import('./src/composables/useMetaLayoutsMenuOptions').useMetaLayoutsNMenuOptions
|
||||
const useModal: typeof import('naive-ui').useModal
|
||||
const useModel: typeof import('vue').useModel
|
||||
const useMounted: typeof import('@vueuse/core').useMounted
|
||||
const useMouse: typeof import('@vueuse/core').useMouse
|
||||
const useMouseInElement: typeof import('@vueuse/core').useMouseInElement
|
||||
const useMousePressed: typeof import('@vueuse/core').useMousePressed
|
||||
const useMutationObserver: typeof import('@vueuse/core').useMutationObserver
|
||||
const useNavigatorLanguage: typeof import('@vueuse/core').useNavigatorLanguage
|
||||
const useNetwork: typeof import('@vueuse/core').useNetwork
|
||||
const useNotification: typeof import('naive-ui').useNotification
|
||||
const useNow: typeof import('@vueuse/core').useNow
|
||||
const useObjectUrl: typeof import('@vueuse/core').useObjectUrl
|
||||
const useOffsetPagination: typeof import('@vueuse/core').useOffsetPagination
|
||||
const useOnline: typeof import('@vueuse/core').useOnline
|
||||
const usePageLeave: typeof import('@vueuse/core').usePageLeave
|
||||
const useParallax: typeof import('@vueuse/core').useParallax
|
||||
const useParentElement: typeof import('@vueuse/core').useParentElement
|
||||
const usePerformanceObserver: typeof import('@vueuse/core').usePerformanceObserver
|
||||
const usePermission: typeof import('@vueuse/core').usePermission
|
||||
const usePointer: typeof import('@vueuse/core').usePointer
|
||||
const usePointerLock: typeof import('@vueuse/core').usePointerLock
|
||||
const usePointerSwipe: typeof import('@vueuse/core').usePointerSwipe
|
||||
const usePreferredColorScheme: typeof import('@vueuse/core').usePreferredColorScheme
|
||||
const usePreferredContrast: typeof import('@vueuse/core').usePreferredContrast
|
||||
const usePreferredDark: typeof import('@vueuse/core').usePreferredDark
|
||||
const usePreferredLanguages: typeof import('@vueuse/core').usePreferredLanguages
|
||||
const usePreferredReducedMotion: typeof import('@vueuse/core').usePreferredReducedMotion
|
||||
const usePreferredReducedTransparency: typeof import('@vueuse/core').usePreferredReducedTransparency
|
||||
const usePrevious: typeof import('@vueuse/core').usePrevious
|
||||
const usePrimevueDialogRef: typeof import('utils4u/primevue').usePrimevueDialogRef
|
||||
const useRafFn: typeof import('@vueuse/core').useRafFn
|
||||
const useRefHistory: typeof import('@vueuse/core').useRefHistory
|
||||
const useRefs: typeof import('utils4u/vue-use').useRefs
|
||||
const useResizeObserver: typeof import('@vueuse/core').useResizeObserver
|
||||
const useRoute: typeof import('vue-router').useRoute
|
||||
const useRouter: typeof import('vue-router').useRouter
|
||||
const useSSRWidth: typeof import('@vueuse/core').useSSRWidth
|
||||
const useScreenOrientation: typeof import('@vueuse/core').useScreenOrientation
|
||||
const useScreenSafeArea: typeof import('@vueuse/core').useScreenSafeArea
|
||||
const useScriptTag: typeof import('@vueuse/core').useScriptTag
|
||||
const useScroll: typeof import('@vueuse/core').useScroll
|
||||
const useScrollLock: typeof import('@vueuse/core').useScrollLock
|
||||
const useSessionStorage: typeof import('@vueuse/core').useSessionStorage
|
||||
const useShare: typeof import('@vueuse/core').useShare
|
||||
const useSlots: typeof import('vue').useSlots
|
||||
const useSorted: typeof import('@vueuse/core').useSorted
|
||||
const useSpeechRecognition: typeof import('@vueuse/core').useSpeechRecognition
|
||||
const useSpeechSynthesis: typeof import('@vueuse/core').useSpeechSynthesis
|
||||
const useStepper: typeof import('@vueuse/core').useStepper
|
||||
const useStorage: typeof import('@vueuse/core').useStorage
|
||||
const useStorageAsync: typeof import('@vueuse/core').useStorageAsync
|
||||
const useStyleTag: typeof import('@vueuse/core').useStyleTag
|
||||
const useSupported: typeof import('@vueuse/core').useSupported
|
||||
const useSwipe: typeof import('@vueuse/core').useSwipe
|
||||
const useTemplateRef: typeof import('vue').useTemplateRef
|
||||
const useTemplateRefsList: typeof import('@vueuse/core').useTemplateRefsList
|
||||
const useTextDirection: typeof import('@vueuse/core').useTextDirection
|
||||
const useTextSelection: typeof import('@vueuse/core').useTextSelection
|
||||
const useTextareaAutosize: typeof import('@vueuse/core').useTextareaAutosize
|
||||
const useThrottle: typeof import('@vueuse/core').useThrottle
|
||||
const useThrottleFn: typeof import('@vueuse/core').useThrottleFn
|
||||
const useThrottledRefHistory: typeof import('@vueuse/core').useThrottledRefHistory
|
||||
const useTimeAgo: typeof import('@vueuse/core').useTimeAgo
|
||||
const useTimeAgoIntl: typeof import('@vueuse/core').useTimeAgoIntl
|
||||
const useTimeout: typeof import('@vueuse/core').useTimeout
|
||||
const useTimeoutFn: typeof import('@vueuse/core').useTimeoutFn
|
||||
const useTimeoutPoll: typeof import('@vueuse/core').useTimeoutPoll
|
||||
const useTimestamp: typeof import('@vueuse/core').useTimestamp
|
||||
const useTitle: typeof import('@vueuse/core').useTitle
|
||||
const useToNumber: typeof import('@vueuse/core').useToNumber
|
||||
const useToString: typeof import('@vueuse/core').useToString
|
||||
const useToggle: typeof import('@vueuse/core').useToggle
|
||||
const useTransition: typeof import('@vueuse/core').useTransition
|
||||
const useUrlSearchParams: typeof import('@vueuse/core').useUrlSearchParams
|
||||
const useUserMedia: typeof import('@vueuse/core').useUserMedia
|
||||
const useVModel: typeof import('@vueuse/core').useVModel
|
||||
const useVModels: typeof import('@vueuse/core').useVModels
|
||||
const useVibrate: typeof import('@vueuse/core').useVibrate
|
||||
const useVirtualList: typeof import('@vueuse/core').useVirtualList
|
||||
const useWakeLock: typeof import('@vueuse/core').useWakeLock
|
||||
const useWebNotification: typeof import('@vueuse/core').useWebNotification
|
||||
const useWebSocket: typeof import('@vueuse/core').useWebSocket
|
||||
const useWebWorker: typeof import('@vueuse/core').useWebWorker
|
||||
const useWebWorkerFn: typeof import('@vueuse/core').useWebWorkerFn
|
||||
const useWindowFocus: typeof import('@vueuse/core').useWindowFocus
|
||||
const useWindowScroll: typeof import('@vueuse/core').useWindowScroll
|
||||
const useWindowSize: typeof import('@vueuse/core').useWindowSize
|
||||
const watch: typeof import('vue').watch
|
||||
const watchArray: typeof import('@vueuse/core').watchArray
|
||||
const watchAtMost: typeof import('@vueuse/core').watchAtMost
|
||||
const watchDebounced: typeof import('@vueuse/core').watchDebounced
|
||||
const watchDeep: typeof import('@vueuse/core').watchDeep
|
||||
const watchEffect: typeof import('vue').watchEffect
|
||||
const watchIgnorable: typeof import('@vueuse/core').watchIgnorable
|
||||
const watchImmediate: typeof import('@vueuse/core').watchImmediate
|
||||
const watchOnce: typeof import('@vueuse/core').watchOnce
|
||||
const watchPausable: typeof import('@vueuse/core').watchPausable
|
||||
const watchPostEffect: typeof import('vue').watchPostEffect
|
||||
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
||||
const watchThrottled: typeof import('@vueuse/core').watchThrottled
|
||||
const watchTriggerable: typeof import('@vueuse/core').watchTriggerable
|
||||
const watchWithFilter: typeof import('@vueuse/core').watchWithFilter
|
||||
const whenever: typeof import('@vueuse/core').whenever
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
@@ -387,6 +387,7 @@ declare module 'vue' {
|
||||
readonly debouncedWatch: UnwrapRef<typeof import('@vueuse/core')['debouncedWatch']>
|
||||
readonly deepFreeze: UnwrapRef<typeof import('deep-freeze-es6')['default']>
|
||||
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
|
||||
readonly defineBasicLoader: UnwrapRef<typeof import('unplugin-vue-router/data-loaders/basic')['defineBasicLoader']>
|
||||
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
|
||||
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
|
||||
readonly eagerComputed: UnwrapRef<typeof import('@vueuse/core')['eagerComputed']>
|
||||
@@ -451,12 +452,13 @@ declare module 'vue' {
|
||||
readonly refAutoReset: UnwrapRef<typeof import('@vueuse/core')['refAutoReset']>
|
||||
readonly refDebounced: UnwrapRef<typeof import('@vueuse/core')['refDebounced']>
|
||||
readonly refDefault: UnwrapRef<typeof import('@vueuse/core')['refDefault']>
|
||||
readonly refManualReset: UnwrapRef<typeof import('@vueuse/core')['refManualReset']>
|
||||
readonly refThrottled: UnwrapRef<typeof import('@vueuse/core')['refThrottled']>
|
||||
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
||||
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
||||
readonly routeI18nInstance: UnwrapRef<typeof import('./src/locales-utils/i18n-auto-imports')['routeI18nInstance']>
|
||||
readonly routeI18nT: UnwrapRef<typeof import('./src/locales-utils/i18n-auto-imports')['routeI18nT']>
|
||||
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
|
||||
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
|
||||
readonly setViewportCSSVars: UnwrapRef<typeof import('utils4u/browser')['setViewportCSSVars']>
|
||||
@@ -565,7 +567,6 @@ declare module 'vue' {
|
||||
readonly useIntervalFn: UnwrapRef<typeof import('@vueuse/core')['useIntervalFn']>
|
||||
readonly useKeyModifier: UnwrapRef<typeof import('@vueuse/core')['useKeyModifier']>
|
||||
readonly useLastChanged: UnwrapRef<typeof import('@vueuse/core')['useLastChanged']>
|
||||
readonly useLink: UnwrapRef<typeof import('vue-router/auto')['useLink']>
|
||||
readonly useLoadingBar: UnwrapRef<typeof import('naive-ui')['useLoadingBar']>
|
||||
readonly useLocalStorage: UnwrapRef<typeof import('@vueuse/core')['useLocalStorage']>
|
||||
readonly useMagicKeys: UnwrapRef<typeof import('@vueuse/core')['useMagicKeys']>
|
||||
@@ -613,7 +614,6 @@ declare module 'vue' {
|
||||
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
|
||||
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
|
||||
readonly useSSRWidth: UnwrapRef<typeof import('@vueuse/core')['useSSRWidth']>
|
||||
readonly useSafeNForm: UnwrapRef<typeof import('./src/utils/use-safe-n-form-auto-imports')['useSafeNForm']>
|
||||
readonly useScreenOrientation: UnwrapRef<typeof import('@vueuse/core')['useScreenOrientation']>
|
||||
readonly useScreenSafeArea: UnwrapRef<typeof import('@vueuse/core')['useScreenSafeArea']>
|
||||
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { UserConfig } from '@commitlint/types';
|
||||
|
||||
|
||||
const Configuration: UserConfig = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
formatter: '@commitlint/format',
|
||||
rules: {
|
||||
'body-max-line-length': [2, 'always', 500],
|
||||
},
|
||||
};
|
||||
|
||||
export default Configuration;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "@tsconfig/node22/tsconfig.json",
|
||||
"extends": "@tsconfig/node24/tsconfig.json",
|
||||
"include": ["./**/*"]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import vueI18n from '@intlify/eslint-plugin-vue-i18n';
|
||||
// import stylistic from '@stylistic/eslint-plugin';
|
||||
import pluginVitest from '@vitest/eslint-plugin';
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||||
import {
|
||||
@@ -8,6 +10,7 @@ import {
|
||||
import pluginImport from 'eslint-plugin-import';
|
||||
import pluginJsonc from 'eslint-plugin-jsonc';
|
||||
import pluginOxlint from 'eslint-plugin-oxlint';
|
||||
import pluginPerfectionist from 'eslint-plugin-perfectionist';
|
||||
import pluginPlaywright from 'eslint-plugin-playwright';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import { globalIgnores } from 'eslint/config';
|
||||
@@ -22,7 +25,14 @@ export default defineConfigWithVueTs(
|
||||
files: ['**/*.{ts,mts,tsx,vue}'],
|
||||
},
|
||||
|
||||
globalIgnores(['worker-configuration.d.ts', '**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
||||
globalIgnores([
|
||||
'worker-configuration.d.ts',
|
||||
'**/dist/**',
|
||||
'**/dist-ssr/**',
|
||||
'**/coverage/**',
|
||||
'**/public/**',
|
||||
'**/-----TEMP-----/**',
|
||||
]),
|
||||
|
||||
pluginVue.configs['flat/essential'],
|
||||
vueTsConfigs.recommended,
|
||||
@@ -37,10 +47,29 @@ export default defineConfigWithVueTs(
|
||||
files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
||||
},
|
||||
...pluginOxlint.configs['flat/recommended'],
|
||||
|
||||
// https://eslint-plugin-vue-i18n.intlify.dev/started.html#getting-started
|
||||
...vueI18n.configs.recommended,
|
||||
{
|
||||
plugins: {
|
||||
import: pluginImport,
|
||||
rules: {
|
||||
'@intlify/vue-i18n/no-raw-text': 'off',
|
||||
'@intlify/vue-i18n/no-unused-keys': [
|
||||
'error',
|
||||
{
|
||||
src: './src',
|
||||
extensions: ['.js', '.ts', '.tsx', '.vue'],
|
||||
},
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
'vue-i18n': {
|
||||
localeDir: './src/locales/**/*.json',
|
||||
messageSyntaxVersion: '^11.0.0',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: { import: pluginImport },
|
||||
rules: {
|
||||
'import/first': 'error',
|
||||
'import/no-duplicates': 'error',
|
||||
@@ -54,6 +83,8 @@ export default defineConfigWithVueTs(
|
||||
},
|
||||
},
|
||||
|
||||
{ plugins: { perfectionist: pluginPerfectionist } },
|
||||
|
||||
{
|
||||
/**
|
||||
* 启用 sort-keys 规则以强制对象键按字母顺序排序
|
||||
@@ -68,6 +99,9 @@ export default defineConfigWithVueTs(
|
||||
},
|
||||
|
||||
{
|
||||
// plugins: {
|
||||
// '@stylistic': stylistic,
|
||||
// },
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'vue/block-order': [
|
||||
@@ -82,6 +116,18 @@ export default defineConfigWithVueTs(
|
||||
],
|
||||
'vue/attributes-order': 'error',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/padding-line-between-blocks': ['error', 'always'],
|
||||
'vue/component-name-in-template-casing': [
|
||||
'error',
|
||||
'PascalCase',
|
||||
{ registeredComponentsOnly: false, ignores: [] },
|
||||
],
|
||||
// '@stylistic/padding-line-between-statements': [
|
||||
// 'error',
|
||||
// { blankLine: 'always', prev: '*', next: ['const', 'let', 'var'] },
|
||||
// { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
|
||||
// { blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
|
||||
// ],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
145
package.json
145
package.json
@@ -1,28 +1,34 @@
|
||||
{
|
||||
"packageManager": "pnpm@10.18.3",
|
||||
"packageManager": "pnpm@10.25.0",
|
||||
"name": "vue-ts-example-2025",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
"_devenginesruntime_docs": "https://pnpm.io/zh/package_json#devenginesruntime",
|
||||
"devEngines": {
|
||||
"runtime": {
|
||||
"name": "node",
|
||||
"version": "^24.11.1",
|
||||
"onFail": "download"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"_all": "run-s build-only lint format:prettier type-check test:unit:DisableWatch",
|
||||
"dev": "vite --port 4730 --host --strictPort",
|
||||
"all": "run-s lint format:prettier build-only type-check test:unit:DisableWatch",
|
||||
"dev": "nodemon --delay 280ms --watch vite-plugins --ext ts -x vite -- --port 4730 --host --strictPort",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"build-only": "vite build",
|
||||
"preview": "vite preview --port 4731 --host --strictPort",
|
||||
"wrangler:dev": "wrangler dev --port 4732",
|
||||
"format:prettier": "prettier --write src/",
|
||||
"format:prettier": "prettier --config=.prettierrc.json --cache --write --log-level=warn src/",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint": "run-s lint:*",
|
||||
"lint:vue-i18n-extract": "vue-i18n-extract report --vueFiles './src/**/*.?(ts|tsx|vue)' --languageFiles './src/locales/**/*.?(json|yml|yaml|js)' --ci",
|
||||
"lint:stylelint": "stylelint --fix --ignore-path .gitignore \"**/*.{css,less,scss,vue}\"",
|
||||
"lint:stylelint": "stylelint --config=stylelint.config.mjs --cache --output-file=node_modules/.cache/stylelint/stylelint-report.json --cache-location=node_modules/.cache/stylelint/.stylelintcache --fix --ignore-path=.gitignore '**/*.{css,less,scss,vue}'",
|
||||
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
|
||||
"lint:eslint": "eslint . --fix",
|
||||
"lint:eslint": "eslint . --fix --config=eslint.config.ts --concurrency=auto --env-info --cache --cache-location=node_modules/.cache/eslint/.eslintcache",
|
||||
"test:unit:DisableWatch": "vitest --run",
|
||||
"test:playwright:headless": "HEADLESS=true playwright test --quiet",
|
||||
"_stylelint-config": "stylelint --config=stylelint.config.mjs --print-config src/styles/scss/global.scss",
|
||||
"postinstall": "wrangler types",
|
||||
"prepare": "husky"
|
||||
},
|
||||
@@ -38,9 +44,6 @@
|
||||
"{src/locales-utils,src/locales}/**/*": "node scripts/type-check-for-lint-staged.mjs"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"vue-tsc": "$vue-tsc"
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
"esbuild",
|
||||
@@ -51,104 +54,110 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@commitlint/cli": "^20.0.0",
|
||||
"@commitlint/cli": "^20.1.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"@formkit/auto-animate": "^0.9.0",
|
||||
"@pinia/colada": "^0.17.4",
|
||||
"@primeuix/themes": "^1.2.3",
|
||||
"@pinia/colada": "^0.21.0",
|
||||
"@primeuix/themes": "^2.0.0",
|
||||
"@sa/materials": "workspace:*",
|
||||
"@unhead/vue": "^2.0.14",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
"@unhead/vue": "^2.0.19",
|
||||
"@vueuse/core": "^14.0.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"jsonc-eslint-parser": "^2.4.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"naive-ui": "^2.43.1",
|
||||
"pinia": "^3.0.3",
|
||||
"naive-ui": "^2.43.2",
|
||||
"pinia": "^3.0.4",
|
||||
"primeicons": "^7.0.0",
|
||||
"primelocale": "^2.1.7",
|
||||
"primevue": "^4.3.9",
|
||||
"primelocale": "^2.2.2",
|
||||
"primevue": "^4.4.1",
|
||||
"ts-enum-util": "^4.1.0",
|
||||
"utils4u": "^4.2.3",
|
||||
"vue": "^3.5.21",
|
||||
"vue-i18n": "^11.1.12",
|
||||
"utils4u": "^5",
|
||||
"vue": "^3.5.24",
|
||||
"vue-i18n": "^11.2.1",
|
||||
"vue-memoize-dict": "^1.1.3",
|
||||
"vue-router": "^4.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/vite-plugin": "^1.13.2",
|
||||
"@cloudflare/vite-plugin": "^1.15.2",
|
||||
"@commitlint/types": "^20.0.0",
|
||||
"@iconify-json/carbon": "^1.2.13",
|
||||
"@iconify-json/carbon": "^1.2.14",
|
||||
"@iconify-json/clarity": "^1.2.4",
|
||||
"@iconify-json/line-md": "^1.2.11",
|
||||
"@iconify-json/material-symbols": "^1.2.42",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.0",
|
||||
"@playwright/test": "^1.55.0",
|
||||
"@prettier/plugin-oxc": "^0.0.4",
|
||||
"@primevue/auto-import-resolver": "^4.3.9",
|
||||
"@primevue/metadata": "^4.3.9",
|
||||
"@iconify-json/material-symbols": "^1.2.47",
|
||||
"@intlify/eslint-plugin-vue-i18n": "^4.1.0",
|
||||
"@intlify/unplugin-vue-i18n": "^11.0.1",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"@prettier/plugin-oxc": "^0.1.3",
|
||||
"@primevue/auto-import-resolver": "^4.4.1",
|
||||
"@primevue/metadata": "^4.4.1",
|
||||
"@stylelint-types/stylelint-order": "^7.0.0",
|
||||
"@stylelint-types/stylelint-scss": "^6.11.0",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@stylistic/eslint-plugin": "^5.6.1",
|
||||
"@tsconfig/node24": "^24.0.0",
|
||||
"@types/html-minifier-terser": "^7.0.2",
|
||||
"@types/jsdom": "^27.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.18.1",
|
||||
"@types/node": "^24.10.1",
|
||||
"@vant/auto-import-resolver": "^1.3.0",
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
||||
"@vitest/eslint-plugin": "^1.3.9",
|
||||
"@vitejs/plugin-vue": "^6.0.2",
|
||||
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
||||
"@vitest/eslint-plugin": "^1.4.3",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
"boxen": "^8.0.1",
|
||||
"consola": "^3.4.2",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jsonc": "^2.21.0",
|
||||
"eslint-plugin-oxlint": "~1.23.0",
|
||||
"eslint-plugin-playwright": "^2.2.2",
|
||||
"eslint-plugin-vue": "~10.5.0",
|
||||
"happy-dom": "^20.0.1",
|
||||
"eslint-plugin-oxlint": "~1.32.0",
|
||||
"eslint-plugin-perfectionist": "^5.0.0",
|
||||
"eslint-plugin-playwright": "^2.3.0",
|
||||
"eslint-plugin-vue": "~10.6.0",
|
||||
"happy-dom": "^20.0.10",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsdom": "^27.0.0",
|
||||
"lint-staged": "^16.1.6",
|
||||
"jsdom": "^27.2.0",
|
||||
"lint-staged": "^16.2.7",
|
||||
"nodemon": "^3.1.11",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"nprogress": "^0.2.0",
|
||||
"oxlint": "~1.23.0",
|
||||
"oxlint": "~1.29.0",
|
||||
"postcss-html": "^1.8.0",
|
||||
"prettier": "3.6.2",
|
||||
"rollup": "^4.52.5",
|
||||
"sass-embedded": "^1.93.2",
|
||||
"sharp": "^0.34.4",
|
||||
"stylelint": "^16.25.0",
|
||||
"stylelint-config-recess-order": "^7.3.0",
|
||||
"prettier": "3.7.4",
|
||||
"rollup": "^4.53.3",
|
||||
"sass-embedded": "^1.93.3",
|
||||
"sharp": "^0.34.5",
|
||||
"stylelint": "^16.26.0",
|
||||
"stylelint-config-recess-order": "^7.4.0",
|
||||
"stylelint-config-standard": "^39.0.1",
|
||||
"stylelint-config-standard-scss": "^16.0.0",
|
||||
"stylelint-config-standard-vue": "^1.0.0",
|
||||
"stylelint-define-config": "^16.24.0",
|
||||
"svgo": "^4.0.0",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"type-fest": "^5.1.0",
|
||||
"typescript": "~5.9.2",
|
||||
"unocss": "^66.5.1",
|
||||
"unocss-preset-animations": "^1.2.1",
|
||||
"unplugin-auto-import": "^20.1.0",
|
||||
"unplugin-icons": "^22.2.0",
|
||||
"unplugin-vue-components": "^29.2.0",
|
||||
"type-fest": "^5.2.0",
|
||||
"typescript": "~5.9.3",
|
||||
"unocss": "^66.5.9",
|
||||
"unocss-preset-animations": "^1.3.0",
|
||||
"unplugin-auto-import": "^20.2.0",
|
||||
"unplugin-icons": "^22.5.0",
|
||||
"unplugin-vue-components": "^30.0.0",
|
||||
"unplugin-vue-markdown": "^29.2.0",
|
||||
"unplugin-vue-router": "^0.16.0",
|
||||
"vite": "^7.1.5",
|
||||
"vite-plugin-checker": "^0.11.0",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-image-optimizer": "^2.0.2",
|
||||
"vite-plugin-vue-devtools": "^8.0.1",
|
||||
"unplugin-vue-router": "^0.19.0",
|
||||
"vite": "^7.2.4",
|
||||
"vite-plugin-checker": "^0.12.0",
|
||||
"vite-plugin-fake-server": "^2.2.2",
|
||||
"vite-plugin-image-optimizer": "^2.0.3",
|
||||
"vite-plugin-vue-devtools": "^8.0.5",
|
||||
"vite-plugin-vue-meta-layouts": "^0.6.1",
|
||||
"vite-plugin-webfont-dl": "^3.11.1",
|
||||
"vitest": "^3.2.4",
|
||||
"vue-component-type-helpers": "^3.1.2",
|
||||
"vitest": "^4.0.13",
|
||||
"vue-component-type-helpers": "^3.1.4",
|
||||
"vue-i18n-extract": "^2.0.7",
|
||||
"vue-macros": "3.1.1",
|
||||
"vue-tsc": "^3.1.0",
|
||||
"wrangler": "^4.37.1"
|
||||
"vue-macros": "3.1.2",
|
||||
"vue-tsc": "^3.1.8",
|
||||
"wrangler": "^4.50.0"
|
||||
}
|
||||
}
|
||||
|
||||
5873
pnpm-lock.yaml
generated
5873
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,6 @@
|
||||
packages:
|
||||
- "packages/*"
|
||||
- 'packages/*'
|
||||
# shamefullyHoist: false # https://pnpm.io/zh/settings#shamefullyhoist
|
||||
|
||||
overrides:
|
||||
vue-tsc: $vue-tsc
|
||||
|
||||
10
src/App.vue
10
src/App.vue
@@ -6,13 +6,13 @@ import AppNaiveUIProvider from './AppNaiveUIProvider.vue';
|
||||
<template>
|
||||
<DynamicDialog />
|
||||
<ConfirmDialog />
|
||||
<Toast />
|
||||
<Toast style="z-index: 5000" />
|
||||
|
||||
<AppNaiveUIProvider>
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="fade" mode="out-in">
|
||||
<RouterView v-slot="{ Component }">
|
||||
<Transition name="fade" mode="out-in">
|
||||
<component :is="Component" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</Transition>
|
||||
</RouterView>
|
||||
</AppNaiveUIProvider>
|
||||
</template>
|
||||
|
||||
@@ -42,17 +42,17 @@ declare global {
|
||||
:theme="appStore.isDark ? darkTheme : null"
|
||||
abstract
|
||||
>
|
||||
<n-loading-bar-provider>
|
||||
<n-message-provider>
|
||||
<n-notification-provider>
|
||||
<n-modal-provider>
|
||||
<n-dialog-provider>
|
||||
<NLoadingBarProvider>
|
||||
<NMessageProvider>
|
||||
<NNotificationProvider>
|
||||
<NModalProvider>
|
||||
<NDialogProvider>
|
||||
<slot></slot>
|
||||
<ContextHolder />
|
||||
</n-dialog-provider>
|
||||
</n-modal-provider>
|
||||
</n-notification-provider>
|
||||
</n-message-provider>
|
||||
</n-loading-bar-provider>
|
||||
</NDialogProvider>
|
||||
</NModalProvider>
|
||||
</NNotificationProvider>
|
||||
</NMessageProvider>
|
||||
</NLoadingBarProvider>
|
||||
</NConfigProvider>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +25,7 @@ function handleSelect(key: string) {
|
||||
<NDropdown trigger="hover" placement="bottom-end" :options="options" @select="handleSelect">
|
||||
<NButton quaternary class="flex items-center gap-1">
|
||||
<template #icon>
|
||||
<icon-clarity-language-line w-4.5 h-4.5 />
|
||||
<IconClarityLanguageLine w-4.5 h-4.5 />
|
||||
</template>
|
||||
<span>{{ languageLabels[locale] }}</span>
|
||||
</NButton>
|
||||
|
||||
@@ -13,17 +13,17 @@ const themeLabels: Record<AppThemeMode, string> = {
|
||||
{{ themeLabels[appStore.themeMode] }}
|
||||
<template #trigger>
|
||||
<NButton quaternary @click="appStore.cycleTheme()">
|
||||
<icon-line-md-sunny-filled-loop-to-moon-filled-loop-transition
|
||||
<IconLineMdSunnyFilledLoopToMoonFilledLoopTransition
|
||||
v-if="appStore.themeMode === 'light'"
|
||||
w-4.5
|
||||
h-4.5
|
||||
/>
|
||||
<icon-line-md-moon-filled-to-sunny-filled-loop-transition
|
||||
<IconLineMdMoonFilledToSunnyFilledLoopTransition
|
||||
v-else-if="appStore.themeMode === 'dark'"
|
||||
w-4.5
|
||||
h-4.5
|
||||
/>
|
||||
<icon-line-md-computer v-else w-4.5 h-4.5 />
|
||||
<IconLineMdComputer v-else w-4.5 h-4.5 />
|
||||
</NButton>
|
||||
</template>
|
||||
</NTooltip>
|
||||
|
||||
@@ -15,8 +15,8 @@ function toggleCollapsed() {
|
||||
{{ appStore.sidebarCollapsed ? '展开菜单' : '收起菜单' }}
|
||||
<template #trigger>
|
||||
<NButton ref="buttonRef" quaternary @click="toggleCollapsed">
|
||||
<icon-line-md-menu-fold-right v-if="appStore.sidebarCollapsed" w-4.5 h-4.5 />
|
||||
<icon-line-md-menu-fold-left v-else w-4.5 h-4.5 />
|
||||
<IconLineMdMenuFoldRight v-if="appStore.sidebarCollapsed" w-4.5 h-4.5 />
|
||||
<IconLineMdMenuFoldLeft v-else w-4.5 h-4.5 />
|
||||
</NButton>
|
||||
</template>
|
||||
</NTooltip>
|
||||
|
||||
@@ -39,7 +39,7 @@ function handleSelect(key: string) {
|
||||
<template>
|
||||
<NDropdown :options="options" placement="bottom-end" @select="handleSelect">
|
||||
<NButton quaternary circle>
|
||||
<icon-material-symbols-account-circle w-5 h-5 />
|
||||
<IconMaterialSymbolsAccountCircle w-5 h-5 />
|
||||
</NButton>
|
||||
</NDropdown>
|
||||
</template>
|
||||
|
||||
@@ -29,11 +29,11 @@ const appStore = useAppStore();
|
||||
<BaseLayoutSider />
|
||||
</template>
|
||||
<!-- <div>GlobalContent</div> -->
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="fade" mode="out-in">
|
||||
<RouterView v-slot="{ Component }">
|
||||
<Transition name="fade" mode="out-in">
|
||||
<component :is="Component" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</Transition>
|
||||
</RouterView>
|
||||
<!-- <div>ThemeDrawer</div> -->
|
||||
<template #footer>
|
||||
<div
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
* All i18n resources specified in the plugin `include` option can be loaded
|
||||
* at once using the import syntax
|
||||
*/
|
||||
import { router } from '@/plugins/00.router-plugin';
|
||||
import messages from '@intlify/unplugin-vue-i18n/messages';
|
||||
import { createGetRoutes } from 'virtual:meta-layouts';
|
||||
|
||||
import { router } from '@/plugins/00.router-plugin';
|
||||
import { createGetRoutes } from 'virtual:meta-layouts';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import { START_LOCATION } from 'vue-router';
|
||||
|
||||
const locale = useLocalStorage<string>('app-locale', navigator.language);
|
||||
watchEffect(() => {
|
||||
@@ -35,11 +36,20 @@ export const routeI18nInstance = createI18n({
|
||||
useScope: 'local',
|
||||
missing: (locale, key) => {
|
||||
consola.warn(`菜单翻译缺失: locale=${locale}, key=${key}`);
|
||||
if (__DEV__) {
|
||||
ToastService.add({
|
||||
severity: 'warn',
|
||||
summary: '菜单翻译缺失',
|
||||
detail: `菜单翻译缺失: locale=${locale}, key=${key}`,
|
||||
life: 5000,
|
||||
});
|
||||
}
|
||||
return key;
|
||||
},
|
||||
fallbackRoot: true,
|
||||
messages: i18nRouteMessages,
|
||||
});
|
||||
export const routeI18nT = routeI18nInstance.global.t;
|
||||
|
||||
watchEffect(
|
||||
() => {
|
||||
@@ -51,18 +61,17 @@ watchEffect(
|
||||
watch(
|
||||
() => i18nInstance.global.locale.value,
|
||||
() => {
|
||||
const { t, te } = routeI18nInstance.global;
|
||||
|
||||
routeI18nInstance.global.locale.value = i18nInstance.global.locale.value;
|
||||
|
||||
if (router.currentRoute.value.name && router.currentRoute.value !== START_LOCATION) {
|
||||
router.currentRoute.value.meta.title = t(router.currentRoute.value.name as string);
|
||||
}
|
||||
|
||||
const routes = createGetRoutes(router)(); // 获取路由表但是不包含布局路由
|
||||
|
||||
routes.forEach((route) => {
|
||||
const { t, te } = routeI18nInstance.global;
|
||||
|
||||
if (router.currentRoute.value.name) {
|
||||
router.currentRoute.value.meta.title = t(router.currentRoute.value.name as string);
|
||||
}
|
||||
|
||||
route.meta = route.meta || {};
|
||||
const routeName = route.name as string;
|
||||
route.meta.title = te(routeName) ? t(routeName) : routeName;
|
||||
});
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/*eslint sort-keys: "error"*/
|
||||
/*eslint perfectionist/sort-objects: "error"*/
|
||||
/**
|
||||
* 启用 sort-keys 规则以强制对象键按字母顺序排序
|
||||
* 启用 perfectionist/sort-objects 规则以强制对象键按字母顺序排序
|
||||
* 原因:
|
||||
* 1. 减少多人协作时的合并冲突
|
||||
* 2. 保持代码一致性,提高可维护性
|
||||
*
|
||||
* 运行以下命令自动修复排序:
|
||||
* pnpm exec eslint --fix --no-ignore src/locales-utils/route-messages/
|
||||
*/
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/*eslint sort-keys: "error"*/
|
||||
/*eslint perfectionist/sort-objects: "error"*/
|
||||
/**
|
||||
* 启用 sort-keys 规则以强制对象键按字母顺序排序
|
||||
* 启用 perfectionist/sort-objects 规则以强制对象键按字母顺序排序
|
||||
* 原因:
|
||||
* 1. 减少多人协作时的合并冲突
|
||||
* 2. 保持代码一致性,提高可维护性
|
||||
*
|
||||
* 运行以下命令自动修复排序:
|
||||
* pnpm exec eslint --fix --no-ignore src/locales-utils/route-messages/
|
||||
*/
|
||||
|
||||
export default {
|
||||
|
||||
@@ -7,6 +7,7 @@ import { setupPlugins } from './plugins';
|
||||
consola.level = LogLevels.verbose;
|
||||
|
||||
const app = createApp(App);
|
||||
if (__DEV__) Object.defineProperty(window, '__APP__', { value: app });
|
||||
setupPlugins(app);
|
||||
|
||||
await new Promise((resolve) => setTimeout(resolve, 280));
|
||||
|
||||
@@ -128,7 +128,7 @@ const resetCount = () => {
|
||||
</button>
|
||||
|
||||
<!-- Naive UI 按钮 -->
|
||||
<n-button
|
||||
<NButton
|
||||
type="warning"
|
||||
size="large"
|
||||
block
|
||||
@@ -148,7 +148,7 @@ const resetCount = () => {
|
||||
</svg>
|
||||
</template>
|
||||
点击 +1 (Naive UI)
|
||||
</n-button>
|
||||
</NButton>
|
||||
|
||||
<!-- 重置按钮 -->
|
||||
<button
|
||||
|
||||
@@ -9,24 +9,29 @@ function setLocale(newLocale: 'en-US' | 'zh-CN') {
|
||||
|
||||
<template>
|
||||
<div class="p-4">
|
||||
<n-h1>{{ t('page.i18n-demo.title') }}</n-h1>
|
||||
<NH1>{{ t('page.i18n-demo.title') }}</NH1>
|
||||
|
||||
<n-card :title="t('page.i18n-demo.change-language')">
|
||||
<n-p>
|
||||
<NCard :title="t('page.i18n-demo.change-language')">
|
||||
<NP>
|
||||
{{ t('page.i18n-demo.current-language') }}:
|
||||
<span class="font-bold">{{ locale }}</span>
|
||||
</n-p>
|
||||
</NP>
|
||||
|
||||
<n-p>
|
||||
<NP>
|
||||
{{ t('page.i18n-demo.hello', { name: 'Kilo' }) }}
|
||||
</n-p>
|
||||
</NP>
|
||||
|
||||
<n-p> $route.meta: {{ $route.meta }} </n-p>
|
||||
<NSpace>
|
||||
<NButton type="primary" @click="setLocale('en-US')"> English </NButton>
|
||||
<NButton type="success" @click="setLocale('zh-CN')"> 简体中文 </NButton>
|
||||
</NSpace>
|
||||
</NCard>
|
||||
|
||||
<n-space>
|
||||
<n-button type="primary" @click="setLocale('en-US')"> English </n-button>
|
||||
<n-button type="success" @click="setLocale('zh-CN')"> 简体中文 </n-button>
|
||||
</n-space>
|
||||
</n-card>
|
||||
<!-- 这里响应式有问题: -->
|
||||
<NP> $route.meta.title: {{ $route.meta.title }} </NP>
|
||||
<!-- 这样才正常 -->
|
||||
<NP>
|
||||
routeI18nInstance.global.t($route.name): {{ routeI18nInstance.global.t($route.name) }}
|
||||
</NP>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -24,6 +24,7 @@ const FComponent: FunctionalComponent<{ prop: string }> = (props /* context */)
|
||||
</>
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NCard title="函数式组件(TSX)示例">
|
||||
<FComponent prop="some-prop-value" />
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { MessageType } from 'naive-ui';
|
||||
import { useDialog, useMessage } from 'naive-ui';
|
||||
import UseSafeNForm from './use-safe-n-form.vue';
|
||||
|
||||
definePage({ meta: {} });
|
||||
|
||||
@@ -61,9 +60,6 @@ const openModal = () => {
|
||||
<NAlert title="信息" type="info" :bordered="false">
|
||||
演示 Naive UI 各种组件的使用方法和功能特性
|
||||
</NAlert>
|
||||
<n-card title="SafeNForm" mt-4>
|
||||
<UseSafeNForm />
|
||||
</n-card>
|
||||
<NCard title="Message 消息" class="mt-4">
|
||||
<NSpace>
|
||||
<NButton
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
const { formInst, formValue, SafeNForm, SafeNFormItem } = useSafeNForm({
|
||||
initialFormValue: {
|
||||
/* ⚠️:
|
||||
如果没使用`SafeNFormItem`,
|
||||
这里`user`对象没有手动初始化的话,将会报错:
|
||||
`can't access property "name", $setup.formValue.user is undefined`
|
||||
*/
|
||||
user: {
|
||||
name: '',
|
||||
age: 0,
|
||||
},
|
||||
phone: '',
|
||||
},
|
||||
});
|
||||
|
||||
function handleValidateClick() {
|
||||
formInst.value?.validate((errors) => {
|
||||
if (!errors) {
|
||||
window.$nMessage!.success('Valid');
|
||||
} else {
|
||||
console.log(errors);
|
||||
window.$nMessage!.error('Invalid');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div border>
|
||||
<pre>formValue: {{ JSON.stringify(formValue, null, 2) }}</pre>
|
||||
</div>
|
||||
|
||||
<SafeNForm inline label-placement="left" label-width="auto" mt-4>
|
||||
<n-form-item
|
||||
label="姓名"
|
||||
path="user.name"
|
||||
:rule="{ required: true, message: '请输入姓名', trigger: ['input'] }"
|
||||
>
|
||||
<n-input v-model:value="formValue.user.name" placeholder="输入姓名" />
|
||||
</n-form-item>
|
||||
|
||||
<SafeNFormItem
|
||||
#default="{ value, setValue }"
|
||||
:rule="{ required: true, message: '请输入姓名', trigger: ['input'] }"
|
||||
label="姓名"
|
||||
path="user.name"
|
||||
>
|
||||
<NInput :value="value" placeholder="SafeNFormItem" @update:value="setValue" />
|
||||
</SafeNFormItem>
|
||||
|
||||
<n-form-item
|
||||
label="电话号码"
|
||||
path="phone"
|
||||
:rule="{ required: true, message: '请输入电话号码', trigger: ['blur'] }"
|
||||
>
|
||||
<n-input v-model:value="formValue.phone" placeholder="电话号码" />
|
||||
</n-form-item>
|
||||
|
||||
<SafeNFormItem
|
||||
label="电话号码"
|
||||
path="phone"
|
||||
:rule="{ required: true, message: '请输入电话号码', trigger: ['blur'] }"
|
||||
>
|
||||
<!-- 如果没有提供插槽,会默认渲染一个`<NInput>` -->
|
||||
</SafeNFormItem>
|
||||
|
||||
<n-form-item>
|
||||
<n-button attr-type="button" @click="handleValidateClick"> 验证 </n-button>
|
||||
</n-form-item>
|
||||
</SafeNForm>
|
||||
</template>
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-button @click="$router.push({ name: 'DemosCreate' })">DemosCreate</n-button>
|
||||
<NButton @click="$router.push({ name: 'DemosCreate' })">DemosCreate</NButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export function install({ app }: { app: import('vue').App<Element> }) {
|
||||
app.config.globalProperties.__DEV__ = __DEV__;
|
||||
app.config.globalProperties.__DEV__ =
|
||||
__DEV__; /* vite.config.ts: define: { __DEV__: JSON.stringify(!isBuild) } */
|
||||
|
||||
app.config.errorHandler = (error, instance, info) => {
|
||||
console.error('Global error:', error);
|
||||
|
||||
@@ -5,12 +5,21 @@
|
||||
import Aura from '@primeuix/themes/aura';
|
||||
import zhCN from 'primelocale/zh-CN.json';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import type { PrimeVueConfiguration } from 'primevue/config';
|
||||
import StyleClass from 'primevue/styleclass';
|
||||
import ToastService from 'primevue/toastservice';
|
||||
|
||||
export function install({ app }: { app: import('vue').App<Element> }) {
|
||||
app.directive('styleclass', StyleClass);
|
||||
|
||||
// https://github.com/primefaces/primevue/blob/afe6f58ae55e9caf7f9bc094cd453a21a6113001/packages/core/src/config/PrimeVue.js
|
||||
app.use(PrimeVue, {
|
||||
zIndex: {
|
||||
modal: 5100,
|
||||
overlay: 5000,
|
||||
menu: 5000,
|
||||
tooltip: 5100,
|
||||
},
|
||||
locale: {
|
||||
...zhCN['zh-CN'],
|
||||
completed: '已上传',
|
||||
@@ -25,6 +34,6 @@ export function install({ app }: { app: import('vue').App<Element> }) {
|
||||
},
|
||||
preset: Aura,
|
||||
},
|
||||
});
|
||||
} satisfies PrimeVueConfiguration);
|
||||
app.use(ToastService);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import type { BasicColorSchema } from '@vueuse/core';
|
||||
import { useLocalStorage, useMediaQuery } from '@vueuse/core';
|
||||
import { defineStore } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
|
||||
// >>>>>
|
||||
// https://vueuse.org/core/useColorMode/#advanced-usage
|
||||
const { system, store: themeMode } = useColorMode({
|
||||
const { system, store: themeMode } = useColorMode<BasicColorSchema>({
|
||||
selector: 'html',
|
||||
attribute: 'class',
|
||||
modes: { light: '', dark: 'app-dark', auto: '' },
|
||||
disableTransition: false,
|
||||
initialValue: 'auto',
|
||||
});
|
||||
const { state, next: cycleTheme } = useCycleList(['light', 'dark', 'auto'] as const, {
|
||||
initialValue: themeMode,
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/**
|
||||
* https://www.naiveui.com/zh-CN/os-theme/components/form
|
||||
*
|
||||
* FIXME: `NForm` 和 `NFormItem` 的 slots 还没有实现。`NFormItemGi`组件。
|
||||
*/
|
||||
|
||||
import { get, set } from 'lodash-es';
|
||||
import type { FormInst, FormItemProps, FormProps } from 'naive-ui';
|
||||
import { NForm, NFormItem, formItemProps, NInput, formProps } from 'naive-ui';
|
||||
import type { Get, Paths } from 'type-fest';
|
||||
import type { SlotsType } from 'vue';
|
||||
import { Comment } from 'vue';
|
||||
|
||||
type UseSafeNFormOptions<FormValue> = {
|
||||
initialFormValue?: FormValue;
|
||||
};
|
||||
|
||||
export function useSafeNForm<T extends Record<string, any> = Record<string, unknown>>(
|
||||
options: UseSafeNFormOptions<T> = {},
|
||||
) {
|
||||
const formInst = ref<FormInst | null>(null);
|
||||
const formValue = ref<T>(structuredClone(toRaw(options.initialFormValue)) || ({} as T));
|
||||
|
||||
// 创建类型安全的 Form 组件
|
||||
type SafeNFormProps = FormProps;
|
||||
|
||||
type SafeNFormSlots = SlotsType<{
|
||||
default?: { count?: number };
|
||||
}>;
|
||||
|
||||
const SafeNForm = defineComponent<SafeNFormProps, /* Emits */ [], /* EE */ never, SafeNFormSlots>(
|
||||
(props, ctx) => {
|
||||
return () => (
|
||||
<NForm
|
||||
{...props}
|
||||
model={formValue.value}
|
||||
ref={(inst) => {
|
||||
formInst.value = inst as unknown as FormInst;
|
||||
}}
|
||||
>
|
||||
{ctx.slots.default?.({})}
|
||||
</NForm>
|
||||
);
|
||||
},
|
||||
{
|
||||
name: 'SafeNForm',
|
||||
inheritAttrs: true,
|
||||
props: formProps,
|
||||
},
|
||||
);
|
||||
// <<<<<
|
||||
|
||||
// >>>>> 创建类型安全的 FormItem 组件
|
||||
type SafeNFormItemProps<P extends Paths<T> & string> = FormItemProps & {
|
||||
path: P;
|
||||
};
|
||||
|
||||
type SafeNFormItemDefaultSlot<P extends Paths<T> & string> = {
|
||||
value: Get<T, P>;
|
||||
setValue: (val: Get<T, P>) => void;
|
||||
};
|
||||
|
||||
const SafeNFormItemImpl = defineComponent<
|
||||
SafeNFormItemProps<Paths<T> & string>,
|
||||
/* Emits */ [],
|
||||
/* EE */ never,
|
||||
SlotsType<{ default: SafeNFormItemDefaultSlot<Paths<T> & string> }>
|
||||
>(
|
||||
(props, ctx) => {
|
||||
return () => {
|
||||
const value = get(formValue.value, props.path);
|
||||
function setValue(val: typeof value) {
|
||||
set(formValue.value, props.path, val);
|
||||
}
|
||||
|
||||
const defaultSlotContent = ctx.slots.default?.({
|
||||
value,
|
||||
setValue,
|
||||
});
|
||||
|
||||
// 如果没有提供默认 slot 内容,则渲染一个 NInput 作为默认输入组件
|
||||
const renderDefaultNInput = defaultSlotContent?.some((v) => v.type !== Comment) ? null : (
|
||||
<NInput value={value} onUpdate:value={setValue} />
|
||||
);
|
||||
|
||||
return (
|
||||
<NFormItem {...props} path={props.path}>
|
||||
{defaultSlotContent}
|
||||
{renderDefaultNInput}
|
||||
</NFormItem>
|
||||
);
|
||||
};
|
||||
},
|
||||
{
|
||||
name: 'SafeNFormItem',
|
||||
inheritAttrs: false,
|
||||
props: Object.keys(formItemProps) as unknown as [keyof FormItemProps],
|
||||
},
|
||||
);
|
||||
|
||||
// Expose a generic constructor so template literals narrow `path`.
|
||||
type SafeNFormItemComponent = {
|
||||
new <P extends Paths<T> & string>(
|
||||
props: SafeNFormItemProps<P>,
|
||||
): {
|
||||
$props: SafeNFormItemProps<P>;
|
||||
$slots: {
|
||||
default?: (scope: SafeNFormItemDefaultSlot<P>) => VNode[];
|
||||
};
|
||||
};
|
||||
};
|
||||
const SafeNFormItem = SafeNFormItemImpl as SafeNFormItemComponent;
|
||||
// <<<<<
|
||||
|
||||
return {
|
||||
formValue,
|
||||
SafeNForm,
|
||||
SafeNFormItem,
|
||||
formInst,
|
||||
};
|
||||
}
|
||||
@@ -14,7 +14,15 @@
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": ["./src/*"],
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"vueCompilerOptions": {
|
||||
"plugins": [
|
||||
"vue-macros/volar",
|
||||
"unplugin-vue-router/volar/sfc-route-blocks",
|
||||
"unplugin-vue-router/volar/sfc-typed-router"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@tsconfig/node22/tsconfig.json",
|
||||
"extends": "@tsconfig/node24/tsconfig.json",
|
||||
"include": [
|
||||
"vite.config.*",
|
||||
"vitest.config.*",
|
||||
|
||||
2
typed-router.d.ts
vendored
2
typed-router.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection ES6UnusedImports
|
||||
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
||||
// Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !!
|
||||
// It's recommended to commit this file.
|
||||
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
||||
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { getPascalCaseRouteName } from 'unplugin-vue-router';
|
||||
import vueRouter from 'unplugin-vue-router/vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
import VueMacros from 'vue-macros/vite';
|
||||
|
||||
export default [
|
||||
VueMacros({
|
||||
plugins: {
|
||||
vue: vue({ include: [/\.vue$/, /\.md$/] }),
|
||||
vueJsx: vueJsx(),
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
// https://uvr.esm.is/guide/configuration.html
|
||||
// https://github.com/posva/unplugin-vue-router
|
||||
// ⚠️ Vue must be placed after VueRouter()
|
||||
vueRouter: vueRouter({
|
||||
exclude: ['**/__*', '**/__*/**/*'],
|
||||
extensions: ['.page.vue', '.page.md'],
|
||||
getRouteName: (routeNode) => getPascalCaseRouteName(routeNode),
|
||||
logs: false,
|
||||
routesFolder: 'src/pages',
|
||||
}),
|
||||
},
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
export const loadPlugin: LoadPluginFunction = async (_pluginLoadOptions) => {
|
||||
return [
|
||||
VueMacros({
|
||||
plugins: {
|
||||
vue: vue({ include: [/\.vue$/, /\.md$/] }),
|
||||
vueJsx: vueJsx(),
|
||||
|
||||
// https://uvr.esm.is/guide/configuration.html
|
||||
// https://github.com/posva/unplugin-vue-router
|
||||
// ⚠️ Vue must be placed after VueRouter()
|
||||
vueRouter: vueRouter({
|
||||
routesFolder: 'src/pages',
|
||||
extensions: ['.page.vue', '.page.md'],
|
||||
exclude: ['**/__*', '**/__*/**/*'],
|
||||
getRouteName: (await import('unplugin-vue-router')).getPascalCaseRouteName,
|
||||
beforeWriteFiles(rootRoute) {
|
||||
for (/* 深度优先遍历 */ const route of rootRoute.traverseDFS()) {
|
||||
route.addToMeta({ _: route.fullPath });
|
||||
}
|
||||
},
|
||||
logs: !true,
|
||||
}),
|
||||
},
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
import UnoCSS from 'unocss/vite';
|
||||
|
||||
export default [
|
||||
// https://github.com/antfu/unocss
|
||||
// see uno.config.ts for config
|
||||
UnoCSS({
|
||||
checkImport: true,
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/antfu/unocss
|
||||
// see uno.config.ts for config
|
||||
UnoCSS({
|
||||
checkImport: true,
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
|
||||
export default [
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n
|
||||
VueI18nPlugin({
|
||||
/* options */
|
||||
// locale messages resource pre-compile option
|
||||
include: ['src/locales/**'],
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#transformi18nblock
|
||||
// transformI18nBlock(src) {
|
||||
// console.debug(`src :>> `, src);
|
||||
// console.debug(`typeof src :>> `, typeof src);
|
||||
// return src as string;
|
||||
// },
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n
|
||||
VueI18nPlugin({
|
||||
/* options */
|
||||
// locale messages resource pre-compile option
|
||||
include: ['src/locales/**'],
|
||||
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#transformi18nblock
|
||||
// transformI18nBlock(src) {
|
||||
// console.debug(`src :>> `, src);
|
||||
// console.debug(`typeof src :>> `, typeof src);
|
||||
// return src as string;
|
||||
// },
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
import Markdown from 'unplugin-vue-markdown/vite';
|
||||
|
||||
export default [
|
||||
// https://github.com/unplugin/unplugin-vue-markdown
|
||||
Markdown({
|
||||
headEnabled: true,
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/unplugin/unplugin-vue-markdown
|
||||
Markdown({
|
||||
headEnabled: true,
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
import MetaLayouts from 'vite-plugin-vue-meta-layouts';
|
||||
|
||||
export default [
|
||||
// https://github.com/dishait/vite-plugin-vue-meta-layouts
|
||||
MetaLayouts({
|
||||
target: 'src/layouts',
|
||||
excludes: ['**/!(the-)*.vue'], // 排除非 the- 开头的文件。
|
||||
metaName: 'layout',
|
||||
// defaultLayout: 'sakai-vue/AppLayout',
|
||||
// defaultLayout: 'naive-ui/AppLayout',
|
||||
defaultLayout: 'base-layout/the-base-layout',
|
||||
// !⬇️: 当设置为 `sync` 时,注意`import 'virtual:uno.css'`的顺序问题。
|
||||
// importMode: 'sync', // 默认为自动处理,SSG 时为 sync,非 SSG 时为 async
|
||||
skipTopLevelRouteLayout: true, // 打开修复 https://github.com/JohnCampionJr/vite-plugin-vue-layouts/issues/134,默认为 false 关闭
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/dishait/vite-plugin-vue-meta-layouts
|
||||
MetaLayouts({
|
||||
target: 'src/layouts',
|
||||
excludes: ['**/!(the-)*.vue'], // 排除非 the- 开头的文件。
|
||||
metaName: 'layout',
|
||||
// defaultLayout: 'sakai-vue/AppLayout',
|
||||
// defaultLayout: 'naive-ui/AppLayout',
|
||||
defaultLayout: 'base-layout/the-base-layout',
|
||||
// !⬇️: 当设置为 `sync` 时,注意`import 'virtual:uno.css'`的顺序问题。
|
||||
// importMode: 'sync', // 默认为自动处理,SSG 时为 sync,非 SSG 时为 async
|
||||
skipTopLevelRouteLayout: true, // 打开修复 https://github.com/JohnCampionJr/vite-plugin-vue-layouts/issues/134,默认为 false 关闭
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -9,7 +9,6 @@ import Icons from 'unplugin-icons/vite';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { VueRouterAutoImports } from 'unplugin-vue-router';
|
||||
import { createUtils4uAutoImports } from 'utils4u/auto-imports';
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
|
||||
// >>>>>
|
||||
// eslint-disable-next-line import/no-duplicates
|
||||
@@ -26,6 +25,8 @@ import { PrimeVueResolver } from '@primevue/auto-import-resolver';
|
||||
import { VantResolver } from '@vant/auto-import-resolver';
|
||||
// <<<<<
|
||||
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
function _getNaiveUiComponentNames() {
|
||||
// [dtsTsx](https://github.com/unplugin/unplugin-vue-components/pull/673/files/84e80738885cfe11298f41f070cda94a7a779276)
|
||||
|
||||
@@ -55,7 +56,7 @@ function _getNaiveUiComponentNames() {
|
||||
return [];
|
||||
}
|
||||
|
||||
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/antfu/unplugin-auto-import
|
||||
AutoImport({
|
||||
@@ -76,7 +77,7 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
createUtils4uAutoImports(['primevue']),
|
||||
{
|
||||
'consola/browser': ['consola'],
|
||||
'vue-router/auto': ['useLink'],
|
||||
'unplugin-vue-router/data-loaders/basic': ['defineBasicLoader'],
|
||||
'naive-ui': [
|
||||
'useModal',
|
||||
'useDialog',
|
||||
@@ -141,4 +142,4 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
},
|
||||
}),
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { minify as minifyHtml } from 'html-minifier-terser';
|
||||
import { loadEnv } from 'vite';
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
function IndexHtmlPlugin(): PluginOption {
|
||||
return {
|
||||
@@ -91,8 +92,14 @@ function ___(): PluginOption {
|
||||
};
|
||||
}
|
||||
|
||||
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
export const loadPlugin: LoadPluginFunction = (pluginLoadOptions) => {
|
||||
const { mode, env } = pluginLoadOptions;
|
||||
// return [___()];
|
||||
const env = loadEnv(_configEnv.mode, process.cwd());
|
||||
if (env.VITE_BUILD_MINIFY === 'true') return IndexHtmlPlugin();
|
||||
}
|
||||
if (mode !== 'production') {
|
||||
return { plugins: [], message: '仅在生产模式下启用' };
|
||||
}
|
||||
if (env.VITE_BUILD_MINIFY !== 'true') {
|
||||
return { plugins: [], message: `已通过环境变量禁用: VITE_BUILD_MINIFY=${env.VITE_BUILD_MINIFY}` };
|
||||
}
|
||||
return IndexHtmlPlugin();
|
||||
};
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { consola } from 'consola';
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
import { vitePluginFakeServer } from 'vite-plugin-fake-server';
|
||||
// https://github.com/condorheroblog/vite-plugin-fake-server?tab=readme-ov-file#usage
|
||||
|
||||
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
if (_configEnv.mode !== 'development') {
|
||||
consola.info('fake server plugin is disabled in non-development mode.');
|
||||
return [];
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
// https://github.com/condorheroblog/vite-plugin-fake-server?tab=readme-ov-file#usage
|
||||
export const loadPlugin: LoadPluginFunction = (pluginLoadOptions) => {
|
||||
const { mode } = pluginLoadOptions;
|
||||
if (mode !== 'development') {
|
||||
return { plugins: [], message: '仅在开发模式下启用' };
|
||||
}
|
||||
return vitePluginFakeServer({
|
||||
basename: 'fake-api',
|
||||
enableProd: true,
|
||||
include: 'fake',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
|
||||
|
||||
export default [
|
||||
// https://github.com/FatehAK/vite-plugin-image-optimizer?tab=readme-ov-file#default-configuration
|
||||
ViteImageOptimizer({
|
||||
/* pass your config */
|
||||
}),
|
||||
] satisfies PluginOption;
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
return [
|
||||
// https://github.com/FatehAK/vite-plugin-image-optimizer?tab=readme-ov-file#default-configuration
|
||||
ViteImageOptimizer({
|
||||
/* pass your config */
|
||||
}),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
import consola from 'consola';
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
import { loadEnv } from 'vite';
|
||||
import vueDevTools from 'vite-plugin-vue-devtools';
|
||||
|
||||
export function loadPlugin(configEnv: ConfigEnv): PluginOption {
|
||||
const env = loadEnv(configEnv.mode, process.cwd());
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
if (configEnv.command === 'build') {
|
||||
consola.info('vue-devtools plugin is not used in build mode.');
|
||||
return [];
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
const { mode } = _pluginLoadOptions;
|
||||
if (mode !== 'development') {
|
||||
return { plugins: [], message: '仅在开发模式下启用' };
|
||||
}
|
||||
|
||||
if (env.VITE_APP_ENABLE_VUE_DEVTOOLS !== 'true') {
|
||||
consola.info('vue-devtools plugin disabled by env');
|
||||
return [];
|
||||
let launchEditor = 'code';
|
||||
let message: string | undefined;
|
||||
|
||||
if (process.env.TERM_PROGRAM_VERSION?.toLowerCase()?.includes('insider')) {
|
||||
launchEditor = 'code-insiders';
|
||||
message = '检测到 VSCode Insiders 环境';
|
||||
}
|
||||
|
||||
return [vueDevTools()];
|
||||
}
|
||||
return {
|
||||
plugins: [
|
||||
vueDevTools({
|
||||
launchEditor: launchEditor,
|
||||
}),
|
||||
],
|
||||
message,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { cloudflare } from '@cloudflare/vite-plugin';
|
||||
import { loadEnv } from 'vite';
|
||||
import type {ConfigEnv, PluginOption} from 'vite';
|
||||
|
||||
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
const env = loadEnv(_configEnv.mode, process.cwd());
|
||||
if (_configEnv.mode === 'test') {
|
||||
console.log('cloudflare plugin disabled in test mode');
|
||||
return [];
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export const loadPlugin: LoadPluginFunction = (pluginLoadOptions) => {
|
||||
const { mode, env } = pluginLoadOptions;
|
||||
if (mode === 'test') {
|
||||
return { plugins: [], message: '在测试模式下禁用' };
|
||||
}
|
||||
if (env.VITE_CLOUDFLARE_SERVER_ENABLED !== 'true') {
|
||||
console.log('cloudflare plugin disabled by env');
|
||||
return [];
|
||||
return {
|
||||
plugins: [],
|
||||
message: `已通过环境变量禁用: VITE_CLOUDFLARE_SERVER_ENABLED=${env.VITE_CLOUDFLARE_SERVER_ENABLED}`,
|
||||
};
|
||||
}
|
||||
return [cloudflare()];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,28 +1,47 @@
|
||||
import boxen from 'boxen';
|
||||
import consola from 'consola';
|
||||
import path from 'node:path';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
import consola from 'consola';
|
||||
import { glob } from 'tinyglobby';
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
import { loadEnv } from 'vite';
|
||||
|
||||
export type LoadPluginFunction = (
|
||||
configEnv: ConfigEnv & {
|
||||
env: Record<string, string>;
|
||||
},
|
||||
) => PluginOption | LoadPluginResult;
|
||||
export interface LoadPluginResult {
|
||||
plugins: PluginOption;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
type LoadPluginFunction = (configEnv: ConfigEnv) => PluginOption;
|
||||
export async function loadPlugins(configEnv: ConfigEnv): Promise<PluginOption[]> {
|
||||
const plugins: PluginOption[] = [];
|
||||
|
||||
consola.start('开始加载 Vite 插件...');
|
||||
const cwd = path.resolve(import.meta.dirname);
|
||||
|
||||
const pluginEntries = await glob('**/*.ts', {
|
||||
absolute: true,
|
||||
cwd: path.resolve(import.meta.dirname),
|
||||
cwd,
|
||||
ignore: [
|
||||
'**/*.d.ts',
|
||||
'**/*.disabled.ts',
|
||||
'**/x-*.ts', // 禁用以 x- 开头的插件文件
|
||||
'**/*-x.ts', // 禁用以 -x 结尾的插件文件
|
||||
'**/*-X.ts', // 禁用以 -X 结尾的插件文件
|
||||
'**/_*',
|
||||
],
|
||||
});
|
||||
|
||||
consola.info(`找到 ${pluginEntries.length} 个插件文件`);
|
||||
const relativeCwd = path.relative(process.cwd(), cwd);
|
||||
console.time('加载插件');
|
||||
consola.log(
|
||||
boxen(`正在加载 Vite 插件... (./${relativeCwd})`, {
|
||||
borderStyle: 'classic',
|
||||
borderColor: 'cyan',
|
||||
}),
|
||||
);
|
||||
|
||||
// 计算最长的文件名长度,用于对齐输出
|
||||
const maxNameLength = Math.max(...pluginEntries.map((entry) => path.basename(entry).length));
|
||||
@@ -33,36 +52,39 @@ export async function loadPlugins(configEnv: ConfigEnv): Promise<PluginOption[]>
|
||||
const imported = await import(pathToFileURL(entry).href);
|
||||
|
||||
const loadPlugin = imported.loadPlugin as LoadPluginFunction | undefined;
|
||||
let plugin: PluginOption | undefined;
|
||||
let loadMethod = '';
|
||||
|
||||
// 优先使用 loadPlugin 函数(接收 configEnv 参数)
|
||||
if (loadPlugin && typeof loadPlugin === 'function') {
|
||||
plugin = loadPlugin(configEnv);
|
||||
loadMethod = 'loadPlugin';
|
||||
} else if (imported.default) {
|
||||
plugin = imported.default;
|
||||
loadMethod = 'default';
|
||||
} else {
|
||||
consola.warn(`插件未导出有效内容: ${paddedName}`);
|
||||
continue; // 跳过无效插件
|
||||
if (!loadPlugin || typeof loadPlugin !== 'function') {
|
||||
consola.warn(`插件未导出 loadPlugin 函数: ${paddedName}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (plugin) {
|
||||
const pluginArray = Array.isArray(plugin) ? plugin : [plugin];
|
||||
const validPlugins = pluginArray.filter(Boolean); // 过滤掉 null/undefined
|
||||
const pluginCount = validPlugins.length;
|
||||
const env = loadEnv(configEnv.mode, process.cwd());
|
||||
const result = loadPlugin({ ...configEnv, env });
|
||||
|
||||
if (pluginCount > 0) {
|
||||
plugins.push(...validPlugins);
|
||||
consola.success(`${paddedName} → ${pluginCount} 个实例 (${loadMethod})`);
|
||||
} else {
|
||||
consola.info(`${paddedName} 返回了空数组或无效值`);
|
||||
}
|
||||
// 判断是否是 LoadPluginResult 对象
|
||||
const isResultObject = (val: unknown): val is LoadPluginResult =>
|
||||
typeof val === 'object' && val !== null && 'plugins' in val;
|
||||
|
||||
const plugin = isResultObject(result) ? result.plugins : result;
|
||||
const message = isResultObject(result) ? result.message : undefined;
|
||||
|
||||
const pluginArray = Array.isArray(plugin) ? plugin : [plugin];
|
||||
const validPlugins = pluginArray.filter(Boolean);
|
||||
const pluginCount = validPlugins.length;
|
||||
|
||||
if (pluginCount > 0) {
|
||||
plugins.push(...validPlugins);
|
||||
const suffix = message ? ` (${message})` : '';
|
||||
consola.info(`${paddedName} → ${pluginCount} 个实例${suffix}`);
|
||||
} else if (message) {
|
||||
consola.info(`${paddedName} → ${message}`);
|
||||
} else {
|
||||
consola.info(`${paddedName} 返回了空数组或无效值`);
|
||||
}
|
||||
}
|
||||
|
||||
consola.success(`✅ 总共加载了 ${plugins.length} 个插件实例`);
|
||||
consola.success(`共 ${pluginEntries.length} 个插件文件,已加载 ${plugins.length} 个实例`);
|
||||
console.timeEnd('加载插件');
|
||||
|
||||
return plugins;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import type { ConfigEnv, PluginOption } from 'vite';
|
||||
import { loadEnv } from 'vite';
|
||||
import type { LoadPluginFunction } from './_loadPlugins';
|
||||
|
||||
export default [
|
||||
// ...
|
||||
] satisfies PluginOption;
|
||||
export const loadPlugin: LoadPluginFunction = (_pluginLoadOptions) => {
|
||||
const env = _pluginLoadOptions.env;
|
||||
|
||||
export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
||||
const env = loadEnv(_configEnv.mode, process.cwd());
|
||||
console.debug(`env :>> `, env);
|
||||
// ...
|
||||
return undefined;
|
||||
}
|
||||
// 示例:根据环境变量禁用插件并返回消息
|
||||
if (env.VITE_DEMO_ENABLED !== 'true') {
|
||||
return {
|
||||
plugins: [],
|
||||
message: `已通过环境变量禁用: VITE_DEMO_ENABLED=${env.VITE_DEMO_ENABLED}`,
|
||||
};
|
||||
}
|
||||
|
||||
// 正常返回插件
|
||||
return [];
|
||||
};
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import type { PluginOption } from 'vite';
|
||||
|
||||
export default [
|
||||
// // 检查是否在VS Code终端中运行
|
||||
// if (process.env.TERM_PROGRAM === 'vscode' || process.env.VSCODE_PID) {
|
||||
// // plugins.push(
|
||||
// // // 构建后自动将dist目录打包成zip文件
|
||||
// // viteArchiverPlugin({
|
||||
// // addTimestamp: false, // 是否添加时间戳到输出文件名
|
||||
// // format: 'zip', // 输出的压缩文件格式
|
||||
// // outputDir: '', // 输出目录,默认为项目根目录
|
||||
// // outputFileName: 'dist', // 输出的zip文件名(不含扩展名)
|
||||
// // sourceDir: 'dist', // 要打包的源目录
|
||||
// // }),
|
||||
// // )
|
||||
// }
|
||||
] satisfies PluginOption;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ManualChunkMeta, PreRenderedAsset, RollupOptions } from 'rollup';
|
||||
import type { /* ManualChunkMeta, PreRenderedAsset, */ RollupOptions } from 'rollup';
|
||||
|
||||
import path from 'node:path';
|
||||
// import path from 'node:path';
|
||||
|
||||
// https://www.npmjs.com/package/utils4u/v/2.19.2?activeTab=code
|
||||
|
||||
@@ -12,106 +12,95 @@ export const viteConfigRollupOptions: RollupOptions = {
|
||||
if (warning.code === 'EVAL' && warning.id?.includes('node_modules/protobufjs')) return;
|
||||
warn(warning);
|
||||
}, */
|
||||
|
||||
output: {
|
||||
// Keep hashed file names predictable across entry, chunk, and asset outputs.
|
||||
entryFileNames: 'entry/[name].[hash].js', // 默认: "[name].js"
|
||||
chunkFileNames: 'chunk/[name].[hash].js', // 默认: "[name]-[hash].js"
|
||||
// assetFileNames:'', // 默认: "assets/[name]-[hash][extname]"
|
||||
// https://cn.rollupjs.org/configuration-options/#output-assetfilenames
|
||||
assetFileNames(chunkInfo: PreRenderedAsset) {
|
||||
const names = [...new Set(chunkInfo.names)];
|
||||
|
||||
if (names.length !== 1) {
|
||||
console.error('Multiple names for asset:', chunkInfo);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const assetName = names[0];
|
||||
const ext = assetName.split('.').pop()?.toLowerCase();
|
||||
if (ext && /png|jpe?g|gif|svg|webp|avif/.test(ext)) {
|
||||
return 'chunks/images/[name].[hash][extname]';
|
||||
}
|
||||
if (ext && /woff2?|ttf|otf/.test(ext)) {
|
||||
return 'chunks/fonts/[name].[hash][extname]';
|
||||
}
|
||||
if (ext === 'css') {
|
||||
return 'chunks/css/[name].[hash][extname]';
|
||||
}
|
||||
return '_chunks/[name].[hash][extname]';
|
||||
},
|
||||
|
||||
manualChunks: (id: string, _meta: ManualChunkMeta) => {
|
||||
// https://github.com/unocss/unocss/issues/4917
|
||||
// if (['/src/layouts'].some((prefix) => id.includes(prefix))) {
|
||||
// const url = new URL(id, 'file://');
|
||||
// if (!url.search /* ?vue&type=script&setup=true&lang.ts */) {
|
||||
// return 'layouts';
|
||||
// }
|
||||
// }
|
||||
|
||||
if (id.includes('meta-layouts')) {
|
||||
// console.debug(`id :>> `, id); // id :>> virtual:meta-layouts
|
||||
// 这里很奇怪,打印 id 是`virtual:meta-layouts`,但是 `'virtual:meta-layouts' === id` 却是 false
|
||||
return 'lib-meta-layouts';
|
||||
}
|
||||
|
||||
if (id.includes('index.page.vue')) {
|
||||
const url = new URL(id, 'file://');
|
||||
if (!url.search /* ?vue&type=script&setup=true&lang.ts */) {
|
||||
const parentDir = path.basename(path.dirname(id));
|
||||
return `${parentDir}-index.page`;
|
||||
}
|
||||
}
|
||||
|
||||
if (!id.includes('node_modules')) return;
|
||||
// 处理 pnpm 的特殊路径结构
|
||||
let packageName;
|
||||
if (id.includes('.pnpm')) {
|
||||
// pnpm 路径: .pnpm/naive-ui@2.43.1_vue@3.5.22/node_modules/naive-ui/...
|
||||
const pnpmMatch = id.match(/\.pnpm\/(.+?)@/);
|
||||
if (pnpmMatch) {
|
||||
packageName = pnpmMatch[1];
|
||||
}
|
||||
} else {
|
||||
// 普通路径: node_modules/lodash/...
|
||||
const normalMatch = id.match(/node_modules\/(@[^/]+\/[^/]+|[^/]+)\//);
|
||||
if (normalMatch) {
|
||||
packageName = normalMatch[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (packageName) {
|
||||
if (['highlight.js'].includes(packageName)) {
|
||||
return 'lib-hljs';
|
||||
}
|
||||
|
||||
// 根据包名分组
|
||||
if (['consola', 'lodash', '@juggle+resize-observer', 'vueuc'].includes(packageName)) {
|
||||
return 'lib-vendor';
|
||||
}
|
||||
|
||||
// // 拆了有问题
|
||||
// if (['naive-ui'].includes(packageName) && id.includes('_internal')) {
|
||||
// return 'lib-naive-ui-internal';
|
||||
// }
|
||||
|
||||
if (['naive-ui'].includes(packageName)) {
|
||||
return 'lib-naive-ui';
|
||||
}
|
||||
|
||||
if (
|
||||
['primelocale', 'primevue', 'primeuix', 'primeicons'].some((name) =>
|
||||
packageName!.includes(name),
|
||||
)
|
||||
) {
|
||||
return 'lib-primevue';
|
||||
}
|
||||
|
||||
if (['vue', 'vue-router', 'pinia', 'vue-demi', 'vue-i18n'].includes(packageName)) {
|
||||
return 'lib-vue-vendor';
|
||||
}
|
||||
}
|
||||
},
|
||||
// 如果一个 chunk 小于 10KB,Rollup 会尝试将它合并到其他 chunk 中。这样可以避免产生大量碎片文件
|
||||
experimentalMinChunkSize: 10 * 1024,
|
||||
// // Keep hashed file names predictable across entry, chunk, and asset outputs.
|
||||
// entryFileNames: 'entry/[name].[hash].js', // 默认: "[name].js"
|
||||
// chunkFileNames: 'chunk/[name].[hash].js', // 默认: "[name]-[hash].js"
|
||||
// // assetFileNames:'', // 默认: "assets/[name]-[hash][extname]"
|
||||
// // https://cn.rollupjs.org/configuration-options/#output-assetfilenames
|
||||
// assetFileNames(chunkInfo: PreRenderedAsset) {
|
||||
// const names = [...new Set(chunkInfo.names)];
|
||||
// if (names.length !== 1) {
|
||||
// console.error('Multiple names for asset:', chunkInfo);
|
||||
// process.exit(1);
|
||||
// }
|
||||
// const assetName = names[0];
|
||||
// const ext = assetName.split('.').pop()?.toLowerCase();
|
||||
// if (ext && /png|jpe?g|gif|svg|webp|avif/.test(ext)) {
|
||||
// return 'chunks/images/[name].[hash][extname]';
|
||||
// }
|
||||
// if (ext && /woff2?|ttf|otf/.test(ext)) {
|
||||
// return 'chunks/fonts/[name].[hash][extname]';
|
||||
// }
|
||||
// if (ext === 'css') {
|
||||
// return 'chunks/css/[name].[hash][extname]';
|
||||
// }
|
||||
// return '_chunks/[name].[hash][extname]';
|
||||
// },
|
||||
// manualChunks: (id: string, _meta: ManualChunkMeta) => {
|
||||
// // https://github.com/unocss/unocss/issues/4917
|
||||
// // if (['/src/layouts'].some((prefix) => id.includes(prefix))) {
|
||||
// // const url = new URL(id, 'file://');
|
||||
// // if (!url.search /* ?vue&type=script&setup=true&lang.ts */) {
|
||||
// // return 'layouts';
|
||||
// // }
|
||||
// // }
|
||||
// if (id.includes('meta-layouts')) {
|
||||
// // console.debug(`id :>> `, id); // id :>> virtual:meta-layouts
|
||||
// // 这里很奇怪,打印 id 是`virtual:meta-layouts`,但是 `'virtual:meta-layouts' === id` 却是 false
|
||||
// return 'lib-meta-layouts';
|
||||
// }
|
||||
// if (id.includes('index.page.vue')) {
|
||||
// const url = new URL(id, 'file://');
|
||||
// if (!url.search /* ?vue&type=script&setup=true&lang.ts */) {
|
||||
// const parentDir = path.basename(path.dirname(id));
|
||||
// return `${parentDir}-index.page`;
|
||||
// }
|
||||
// }
|
||||
// if (!id.includes('node_modules')) return;
|
||||
// // 处理 pnpm 的特殊路径结构
|
||||
// let packageName;
|
||||
// if (id.includes('.pnpm')) {
|
||||
// // pnpm 路径: .pnpm/naive-ui@2.43.1_vue@3.5.22/node_modules/naive-ui/...
|
||||
// const pnpmMatch = id.match(/\.pnpm\/(.+?)@/);
|
||||
// if (pnpmMatch) {
|
||||
// packageName = pnpmMatch[1];
|
||||
// }
|
||||
// } else {
|
||||
// // 普通路径: node_modules/lodash/...
|
||||
// const normalMatch = id.match(/node_modules\/(@[^/]+\/[^/]+|[^/]+)\//);
|
||||
// if (normalMatch) {
|
||||
// packageName = normalMatch[1];
|
||||
// }
|
||||
// }
|
||||
// if (packageName) {
|
||||
// if (['highlight.js'].includes(packageName)) {
|
||||
// return 'lib-hljs';
|
||||
// }
|
||||
// // 根据包名分组
|
||||
// if (['consola', 'lodash', '@juggle+resize-observer', 'vueuc'].includes(packageName)) {
|
||||
// return 'lib-vendor';
|
||||
// }
|
||||
// // // 拆了有问题
|
||||
// // if (['naive-ui'].includes(packageName) && id.includes('_internal')) {
|
||||
// // return 'lib-naive-ui-internal';
|
||||
// // }
|
||||
// if (['naive-ui'].includes(packageName)) {
|
||||
// return 'lib-naive-ui';
|
||||
// }
|
||||
// if (
|
||||
// ['primelocale', 'primevue', 'primeuix', 'primeicons'].some((name) =>
|
||||
// packageName!.includes(name),
|
||||
// )
|
||||
// ) {
|
||||
// return 'lib-primevue';
|
||||
// }
|
||||
// if (['vue', 'vue-router', 'pinia', 'vue-demi', 'vue-i18n'].includes(packageName)) {
|
||||
// return 'lib-vue-vendor';
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -40,6 +40,7 @@ export default defineConfig(async (configEnv) => {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'~': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
|
||||
1403
worker-configuration.d.ts
vendored
1403
worker-configuration.d.ts
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user