Browse Source

feat

feat/优化
谢亚昕 4 days ago
parent
commit
23893adc43
  1. 11
      electron.vite.config.ts
  2. 5
      package.json
  3. 318
      pnpm-lock.yaml
  4. 2
      src/renderer/components.d.ts
  5. 7
      src/renderer/src/App.vue
  6. 22
      src/renderer/src/components/NavBar.vue
  7. 3
      src/renderer/src/main.ts
  8. 13
      src/renderer/src/pages/index.vue
  9. 7
      src/renderer/src/pages/index/_ui/_dialog.vue
  10. 37
      src/renderer/src/pages/index/index.vue
  11. 19
      src/renderer/src/router/index.ts
  12. 2
      src/renderer/typed-router.d.ts

11
electron.vite.config.ts

@ -11,6 +11,10 @@ import VueRouter from "unplugin-vue-router/vite"
import Layouts from "vite-plugin-vue-layouts"
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"
import monacoEditorPlugin from "vite-plugin-monaco-editor"
import IconsResolver from 'unplugin-icons/resolver'
import Icons from 'unplugin-icons/vite'
import LawUIResolver from "law-ui/es/resolver"
export default defineConfig({
main: {
@ -98,7 +102,14 @@ export default defineConfig({
Components({
dts: true,
dirs: ["src/components"],
resolvers: [
IconsResolver({
prefix: 'icon',
}),
LawUIResolver({ importStyle: 'sass' })
]
}),
Icons(),
// https://wf0.github.io/example/plugins/Formatter.html
// @ts-ignore ...
monacoEditorPlugin.default({

5
package.json

@ -36,10 +36,12 @@
"@electron-toolkit/eslint-config": "^1.0.2",
"@electron-toolkit/eslint-config-ts": "^2.0.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@iconify/json": "^2.2.324",
"@intlify/unplugin-vue-i18n": "^6.0.3",
"@rushstack/eslint-patch": "^1.10.5",
"@types/debug": "^4.1.12",
"@types/node": "^20.17.19",
"@types/nprogress": "^0.2.3",
"@unocss/preset-rem-to-px": "^0.64.1",
"@unocss/reset": "^0.64.1",
"@vitejs/plugin-vue": "^5.2.1",
@ -54,10 +56,12 @@
"eslint": "^8.57.1",
"eslint-plugin-vue": "^9.32.0",
"extract-zip": "^2.0.1",
"law-ui": "0.0.2-bate.7",
"locales": "workspace:*",
"lodash-es": "^4.17.21",
"logger": "workspace:^",
"monaco-editor": "^0.52.2",
"nprogress": "^0.2.0",
"prettier": "^3.5.1",
"rotating-file-stream": "^3.2.6",
"sass": "^1.85.0",
@ -66,6 +70,7 @@
"typescript": "^5.7.3",
"unocss": "^0.64.1",
"unplugin-auto-import": "^19.1.0",
"unplugin-icons": "^22.1.0",
"unplugin-vue-components": "^28.4.0",
"unplugin-vue-macros": "^2.14.2",
"unplugin-vue-router": "^0.11.2",

318
pnpm-lock.yaml

@ -36,6 +36,9 @@ importers:
'@electron-toolkit/tsconfig':
specifier: ^1.0.1
version: 1.0.1(@types/node@20.17.19)
'@iconify/json':
specifier: ^2.2.324
version: 2.2.324
'@intlify/unplugin-vue-i18n':
specifier: ^6.0.3
version: 6.0.3(@vue/compiler-dom@3.5.13)(eslint@8.57.1)(rollup@4.26.0)(typescript@5.7.3)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))
@ -48,6 +51,9 @@ importers:
'@types/node':
specifier: ^20.17.19
version: 20.17.19
'@types/nprogress':
specifier: ^0.2.3
version: 0.2.3
'@unocss/preset-rem-to-px':
specifier: ^0.64.1
version: 0.64.1
@ -77,7 +83,7 @@ importers:
version: 31.7.7
electron-builder:
specifier: ^24.13.3
version: 24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
version: 24.13.3(electron-builder-squirrel-windows@24.13.3)
electron-vite:
specifier: ^2.3.0
version: 2.3.0(vite@5.4.14(@types/node@20.17.19)(sass@1.85.0))
@ -90,6 +96,9 @@ importers:
extract-zip:
specifier: ^2.0.1
version: 2.0.1
law-ui:
specifier: 0.0.2-bate.7
version: 0.0.2-bate.7(ant-design-vue@3.2.20(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))
locales:
specifier: workspace:*
version: link:packages/locales
@ -102,6 +111,9 @@ importers:
monaco-editor:
specifier: ^0.52.2
version: 0.52.2
nprogress:
specifier: ^0.2.0
version: 0.2.0
prettier:
specifier: ^3.5.1
version: 3.5.1
@ -126,6 +138,9 @@ importers:
unplugin-auto-import:
specifier: ^19.1.0
version: 19.1.0(@vueuse/core@12.7.0(typescript@5.7.3))
unplugin-icons:
specifier: ^22.1.0
version: 22.1.0(@vue/compiler-sfc@3.5.13)
unplugin-vue-components:
specifier: ^28.4.0
version: 28.4.0(@babel/parser@7.26.9)(vue@3.5.13(typescript@5.7.3))
@ -172,9 +187,23 @@ packages:
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'}
'@ant-design/colors@6.0.0':
resolution: {integrity: sha512-qAZRvPzfdWHtfameEGP2Qvuf838NhergR35o+EuVyB5XvSA98xod5r4utvi4TJ3ywmevm290g9nsCG5MryrdWQ==}
'@ant-design/icons-svg@4.4.2':
resolution: {integrity: sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==}
'@ant-design/icons-vue@6.1.0':
resolution: {integrity: sha512-EX6bYm56V+ZrKN7+3MT/ubDkvJ5rK/O2t380WFRflDcVFgsvl3NLH7Wxeau6R8DbrO5jWR6DSTC3B6gYFp77AA==}
peerDependencies:
vue: '>=3.0.3'
'@antfu/install-pkg@0.4.1':
resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==}
'@antfu/install-pkg@1.0.0':
resolution: {integrity: sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==}
'@antfu/utils@0.7.10':
resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==}
@ -301,6 +330,10 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0-0
'@babel/runtime@7.27.0':
resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==}
engines: {node: '>=6.9.0'}
'@babel/template@7.25.9':
resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==}
engines: {node: '>=6.9.0'}
@ -325,6 +358,10 @@ packages:
resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==}
engines: {node: '>=6.9.0'}
'@ctrl/tinycolor@3.6.1':
resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==}
engines: {node: '>=10'}
'@develar/schema-utils@2.6.5':
resolution: {integrity: sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==}
engines: {node: '>= 8.9.0'}
@ -702,12 +739,18 @@ packages:
resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
deprecated: Use @eslint/object-schema instead
'@iconify/json@2.2.324':
resolution: {integrity: sha512-7rx2pY2NH4zn/7q04zFiiD3o7eQ8ZV0F0nf7Rkn2DyI272OWzDMw5goSULOyDdiW9sdfBLeZod/TRxEilaNNsA==}
'@iconify/types@2.0.0':
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
'@iconify/utils@2.1.33':
resolution: {integrity: sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==}
'@iconify/utils@2.3.0':
resolution: {integrity: sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==}
'@intlify/bundle-utils@10.0.0':
resolution: {integrity: sha512-BR5yLOkF2dzrARTbAg7RGAIPcx9Aark7p1K/0O285F7rfzso9j2dsa+S4dA67clZ0rToZ10NSSTfbyUptVu7Bg==}
engines: {node: '>= 18'}
@ -736,8 +779,8 @@ packages:
resolution: {integrity: sha512-2kGiWoXaeV8HZlhU/Nml12oTbhv7j2ufsJ5vQaa0VTjzUmZVdd/nmKFRAOJ/FtjO90Qba5AnZDwsrY7ZND5udA==}
engines: {node: '>= 16'}
'@intlify/shared@11.1.2':
resolution: {integrity: sha512-dF2iMMy8P9uKVHV/20LA1ulFLL+MKSbfMiixSmn6fpwqzvix38OIc7ebgnFbBqElvghZCW9ACtzKTGKsTGTWGA==}
'@intlify/shared@11.1.3':
resolution: {integrity: sha512-pTFBgqa/99JRA2H1qfyqv97MKWJrYngXBA/I0elZcYxvJgcCw3mApAoPW3mJ7vx3j+Ti0FyKUFZ4hWxdjKaxvA==}
engines: {node: '>= 16'}
'@intlify/shared@12.0.0-alpha.2':
@ -1090,6 +1133,9 @@ packages:
'@rushstack/eslint-patch@1.10.5':
resolution: {integrity: sha512-kkKUDVlII2DQiKy7UstOR1ErJP8kUKAQ4oa+SQtM0K+lPdmmjj0YnnxBgtTVYH7mUKtbsxeFC9y0AmK7Yb78/A==}
'@simonwep/pickr@1.8.2':
resolution: {integrity: sha512-/l5w8BIkrpP6n1xsetx9MWPWlU6OblN5YgZZphxan0Tq4BByTCETL6lyIeY8lagalS2Nbt4F2W034KHLIiunKA==}
'@sindresorhus/is@4.6.0':
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
engines: {node: '>=10'}
@ -1129,6 +1175,9 @@ packages:
'@types/node@20.17.19':
resolution: {integrity: sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A==}
'@types/nprogress@0.2.3':
resolution: {integrity: sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==}
'@types/plist@3.0.5':
resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==}
@ -1633,6 +1682,12 @@ packages:
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
engines: {node: '>=12'}
ant-design-vue@3.2.20:
resolution: {integrity: sha512-YWpMfGaGoRastIXEYfCoJiaRiDHk4chqtYhlKQM5GqPt6NfvrM1Vg2e60yHtjxlZjed91wCMm0rAmyUr7Hwzdg==}
engines: {node: '>=12.22.0'}
peerDependencies:
vue: '>=3.2.0'
anymatch@3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
engines: {node: '>= 8'}
@ -1662,6 +1717,9 @@ packages:
argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
array-tree-filter@2.1.0:
resolution: {integrity: sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==}
array-union@2.1.0:
resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
engines: {node: '>=8'}
@ -1686,6 +1744,9 @@ packages:
resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==}
engines: {node: '>=0.12.0'}
async-validator@4.2.5:
resolution: {integrity: sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==}
async@3.2.6:
resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==}
@ -1852,6 +1913,9 @@ packages:
resolution: {integrity: sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==}
engines: {node: '>= 10'}
compute-scroll-into-view@1.0.20:
resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==}
concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
@ -1868,6 +1932,9 @@ packages:
convert-source-map@2.0.0:
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
core-js@3.41.0:
resolution: {integrity: sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==}
core-util-is@1.0.2:
resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
@ -1902,6 +1969,9 @@ packages:
csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
dayjs@1.11.13:
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
de-indent@1.0.2:
resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==}
@ -1971,6 +2041,12 @@ packages:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
dom-align@1.12.4:
resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==}
dom-scroll-into-view@2.0.1:
resolution: {integrity: sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==}
dotenv-expand@5.1.0:
resolution: {integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==}
@ -2313,6 +2389,10 @@ packages:
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
engines: {node: '>=8'}
globals@15.15.0:
resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==}
engines: {node: '>=18'}
globalthis@1.0.4:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
@ -2457,6 +2537,10 @@ packages:
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
engines: {node: '>=8'}
is-plain-object@3.0.1:
resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==}
engines: {node: '>=0.10.0'}
isarray@1.0.0:
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
@ -2539,6 +2623,12 @@ packages:
kolorist@1.8.0:
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
law-ui@0.0.2-bate.7:
resolution: {integrity: sha512-fwglMPWXIlQpnf/KqC2Bt577zipIRhM4UNBSrAJln4dYwHkAUs2P9F5kXui0hqySfuKYFaiZuAMZ8eot+o3c4Q==}
peerDependencies:
ant-design-vue: ^3.0.0
vue: ^3.0.0
lazy-val@1.0.5:
resolution: {integrity: sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==}
@ -2597,6 +2687,10 @@ packages:
lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
loose-envify@1.4.0:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
lowdb@7.0.1:
resolution: {integrity: sha512-neJAj8GwF0e8EpycYIDFqEPcx9Qz4GUho20jWFR7YiFeXzF1YMLdxB36PypcTSPMA+4+LvgyMacYhlr18Zlymw==}
engines: {node: '>=18'}
@ -2723,6 +2817,9 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
nanopop@2.4.2:
resolution: {integrity: sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==}
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
@ -2746,6 +2843,9 @@ packages:
resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==}
engines: {node: '>=10'}
nprogress@0.2.0:
resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==}
nth-check@2.1.1:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
@ -2781,6 +2881,9 @@ packages:
package-json-from-dist@1.0.1:
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
package-manager-detector@0.2.11:
resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==}
package-manager-detector@0.2.2:
resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==}
@ -2883,6 +2986,9 @@ packages:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
quansync@0.2.10:
resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==}
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
@ -2915,10 +3021,16 @@ packages:
reflect-metadata@0.2.2:
resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==}
regenerator-runtime@0.14.1:
resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
resolve-alpn@1.2.1:
resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==}
@ -2981,6 +3093,9 @@ packages:
sax@1.4.1:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
scroll-into-view-if-needed@2.2.31:
resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==}
scule@1.3.0:
resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==}
@ -3000,6 +3115,9 @@ packages:
resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==}
engines: {node: '>=10'}
shallow-equal@1.2.1:
resolution: {integrity: sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==}
shebang-command@2.0.0:
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
@ -3130,6 +3248,9 @@ packages:
tinyexec@0.3.1:
resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==}
tinyexec@0.3.2:
resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==}
tinyglobby@0.2.10:
resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==}
engines: {node: '>=12.0.0'}
@ -3271,6 +3392,29 @@ packages:
webpack:
optional: true
unplugin-icons@22.1.0:
resolution: {integrity: sha512-ect2ZNtk1Zgwb0NVHd0C1IDW/MV+Jk/xaq4t8o6rYdVS3+L660ZdD5kTSQZvsgdwCvquRw+/wYn75hsweRjoIA==}
peerDependencies:
'@svgr/core': '>=7.0.0'
'@svgx/core': ^1.0.1
'@vue/compiler-sfc': ^3.0.2 || ^2.7.0
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0
vue-template-compiler: ^2.6.12
vue-template-es2015-compiler: ^1.9.0
peerDependenciesMeta:
'@svgr/core':
optional: true
'@svgx/core':
optional: true
'@vue/compiler-sfc':
optional: true
svelte:
optional: true
vue-template-compiler:
optional: true
vue-template-es2015-compiler:
optional: true
unplugin-utils@0.2.4:
resolution: {integrity: sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==}
engines: {node: '>=18.12.0'}
@ -3422,6 +3566,12 @@ packages:
peerDependencies:
typescript: '>=5.0.0'
vue-types@3.0.2:
resolution: {integrity: sha512-IwUC0Aq2zwaXqy74h4WCvFCUtoV0iSWr0snWnE9TnU18S66GAQyqQbRf2qfJtUuiFsBf6qp0MEwdonlwznlcrw==}
engines: {node: '>=10.15.0'}
peerDependencies:
vue: ^3.0.0
vue@3.5.13:
resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==}
peerDependencies:
@ -3430,6 +3580,9 @@ packages:
typescript:
optional: true
warning@4.0.3:
resolution: {integrity: sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==}
webpack-virtual-modules@0.6.2:
resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==}
@ -3508,11 +3661,28 @@ snapshots:
'@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
'@ant-design/colors@6.0.0':
dependencies:
'@ctrl/tinycolor': 3.6.1
'@ant-design/icons-svg@4.4.2': {}
'@ant-design/icons-vue@6.1.0(vue@3.5.13(typescript@5.7.3))':
dependencies:
'@ant-design/colors': 6.0.0
'@ant-design/icons-svg': 4.4.2
vue: 3.5.13(typescript@5.7.3)
'@antfu/install-pkg@0.4.1':
dependencies:
package-manager-detector: 0.2.2
tinyexec: 0.3.1
'@antfu/install-pkg@1.0.0':
dependencies:
package-manager-detector: 0.2.11
tinyexec: 0.3.2
'@antfu/utils@0.7.10': {}
'@antfu/utils@8.1.1': {}
@ -3678,6 +3848,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@babel/runtime@7.27.0':
dependencies:
regenerator-runtime: 0.14.1
'@babel/template@7.25.9':
dependencies:
'@babel/code-frame': 7.26.2
@ -3724,6 +3898,8 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
'@ctrl/tinycolor@3.6.1': {}
'@develar/schema-utils@2.6.5':
dependencies:
ajv: 6.12.6
@ -3998,6 +4174,11 @@ snapshots:
'@humanwhocodes/object-schema@2.0.3': {}
'@iconify/json@2.2.324':
dependencies:
'@iconify/types': 2.0.0
pathe: 1.1.2
'@iconify/types@2.0.0': {}
'@iconify/utils@2.1.33':
@ -4012,6 +4193,19 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@iconify/utils@2.3.0':
dependencies:
'@antfu/install-pkg': 1.0.0
'@antfu/utils': 8.1.1
'@iconify/types': 2.0.0
debug: 4.4.0
globals: 15.15.0
kolorist: 1.8.0
local-pkg: 1.0.0
mlly: 1.7.4
transitivePeerDependencies:
- supports-color
'@intlify/bundle-utils@10.0.0(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))':
dependencies:
'@intlify/message-compiler': 12.0.0-alpha.2
@ -4043,7 +4237,7 @@ snapshots:
'@intlify/shared@11.1.1': {}
'@intlify/shared@11.1.2': {}
'@intlify/shared@11.1.3': {}
'@intlify/shared@12.0.0-alpha.2': {}
@ -4051,8 +4245,8 @@ snapshots:
dependencies:
'@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1)
'@intlify/bundle-utils': 10.0.0(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))
'@intlify/shared': 11.1.2
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.2)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))
'@intlify/shared': 11.1.3
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.3)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))
'@rollup/pluginutils': 5.1.4(rollup@4.26.0)
'@typescript-eslint/scope-manager': 8.25.0
'@typescript-eslint/typescript-estree': 8.25.0(typescript@5.7.3)
@ -4074,11 +4268,11 @@ snapshots:
- supports-color
- typescript
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.2)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))':
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.3)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))':
dependencies:
'@babel/parser': 7.26.9
optionalDependencies:
'@intlify/shared': 11.1.2
'@intlify/shared': 11.1.3
'@vue/compiler-dom': 3.5.13
vue: 3.5.13(typescript@5.7.3)
vue-i18n: 11.1.1(vue@3.5.13(typescript@5.7.3))
@ -4329,6 +4523,11 @@ snapshots:
'@rushstack/eslint-patch@1.10.5': {}
'@simonwep/pickr@1.8.2':
dependencies:
core-js: 3.41.0
nanopop: 2.4.2
'@sindresorhus/is@4.6.0': {}
'@szmarczak/http-timer@4.0.6':
@ -4371,6 +4570,8 @@ snapshots:
dependencies:
undici-types: 6.19.8
'@types/nprogress@0.2.3': {}
'@types/plist@3.0.5':
dependencies:
'@types/node': 20.17.19
@ -5110,6 +5311,27 @@ snapshots:
ansi-styles@6.2.1: {}
ant-design-vue@3.2.20(vue@3.5.13(typescript@5.7.3)):
dependencies:
'@ant-design/colors': 6.0.0
'@ant-design/icons-vue': 6.1.0(vue@3.5.13(typescript@5.7.3))
'@babel/runtime': 7.27.0
'@ctrl/tinycolor': 3.6.1
'@simonwep/pickr': 1.8.2
array-tree-filter: 2.1.0
async-validator: 4.2.5
dayjs: 1.11.13
dom-align: 1.12.4
dom-scroll-into-view: 2.0.1
lodash: 4.17.21
lodash-es: 4.17.21
resize-observer-polyfill: 1.5.1
scroll-into-view-if-needed: 2.2.31
shallow-equal: 1.2.1
vue: 3.5.13(typescript@5.7.3)
vue-types: 3.0.2(vue@3.5.13(typescript@5.7.3))
warning: 4.0.3
anymatch@3.1.3:
dependencies:
normalize-path: 3.0.0
@ -5117,7 +5339,7 @@ snapshots:
app-builder-bin@4.0.0: {}
app-builder-lib@24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)):
app-builder-lib@24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3):
dependencies:
'@develar/schema-utils': 2.6.5
'@electron/notarize': 2.2.1
@ -5189,6 +5411,8 @@ snapshots:
argparse@2.0.1: {}
array-tree-filter@2.1.0: {}
array-union@2.1.0: {}
assert-plus@1.0.0:
@ -5209,6 +5433,8 @@ snapshots:
async-exit-hook@2.0.1: {}
async-validator@4.2.5: {}
async@3.2.6: {}
asynckit@0.4.0: {}
@ -5398,6 +5624,8 @@ snapshots:
normalize-path: 3.0.0
readable-stream: 3.6.2
compute-scroll-into-view@1.0.20: {}
concat-map@0.0.1: {}
confbox@0.1.8: {}
@ -5411,6 +5639,8 @@ snapshots:
convert-source-map@2.0.0: {}
core-js@3.41.0: {}
core-util-is@1.0.2:
optional: true
@ -5443,6 +5673,8 @@ snapshots:
csstype@3.1.3: {}
dayjs@1.11.13: {}
de-indent@1.0.2: {}
debug@4.4.0:
@ -5494,7 +5726,7 @@ snapshots:
dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3):
dependencies:
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
builder-util: 24.13.1
builder-util-runtime: 9.2.4
fs-extra: 10.1.0
@ -5522,6 +5754,10 @@ snapshots:
dependencies:
esutils: 2.0.3
dom-align@1.12.4: {}
dom-scroll-into-view@2.0.1: {}
dotenv-expand@5.1.0: {}
dotenv@9.0.2: {}
@ -5536,7 +5772,7 @@ snapshots:
electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3):
dependencies:
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
archiver: 5.3.2
builder-util: 24.13.1
fs-extra: 10.1.0
@ -5544,9 +5780,9 @@ snapshots:
- dmg-builder
- supports-color
electron-builder@24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)):
electron-builder@24.13.3(electron-builder-squirrel-windows@24.13.3):
dependencies:
app-builder-lib: 24.13.3(dmg-builder@24.13.3(electron-builder-squirrel-windows@24.13.3))(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3))
app-builder-lib: 24.13.3(dmg-builder@24.13.3)(electron-builder-squirrel-windows@24.13.3)
builder-util: 24.13.1
builder-util-runtime: 9.2.4
chalk: 4.1.2
@ -5990,6 +6226,8 @@ snapshots:
dependencies:
type-fest: 0.20.2
globals@15.15.0: {}
globalthis@1.0.4:
dependencies:
define-properties: 1.2.1
@ -6159,6 +6397,8 @@ snapshots:
is-path-inside@3.0.3: {}
is-plain-object@3.0.1: {}
isarray@1.0.0: {}
isbinaryfile@4.0.10: {}
@ -6230,6 +6470,11 @@ snapshots:
kolorist@1.8.0: {}
law-ui@0.0.2-bate.7(ant-design-vue@3.2.20(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3)):
dependencies:
ant-design-vue: 3.2.20(vue@3.5.13(typescript@5.7.3))
vue: 3.5.13(typescript@5.7.3)
lazy-val@1.0.5: {}
lazystream@1.0.1:
@ -6277,6 +6522,10 @@ snapshots:
lodash@4.17.21: {}
loose-envify@1.4.0:
dependencies:
js-tokens: 4.0.0
lowdb@7.0.1:
dependencies:
steno: 4.0.2
@ -6386,6 +6635,8 @@ snapshots:
nanoid@3.3.7: {}
nanopop@2.4.2: {}
natural-compare@1.4.0: {}
node-addon-api@1.7.2:
@ -6402,6 +6653,8 @@ snapshots:
normalize-url@6.1.0: {}
nprogress@0.2.0: {}
nth-check@2.1.1:
dependencies:
boolbase: 1.0.0
@ -6454,6 +6707,10 @@ snapshots:
package-json-from-dist@1.0.1: {}
package-manager-detector@0.2.11:
dependencies:
quansync: 0.2.10
package-manager-detector@0.2.2: {}
parent-module@1.0.1:
@ -6542,6 +6799,8 @@ snapshots:
punycode@2.3.1: {}
quansync@0.2.10: {}
queue-microtask@1.2.3: {}
quick-lru@5.1.1: {}
@ -6583,8 +6842,12 @@ snapshots:
reflect-metadata@0.2.2: {}
regenerator-runtime@0.14.1: {}
require-directory@2.1.1: {}
resize-observer-polyfill@1.5.1: {}
resolve-alpn@1.2.1: {}
resolve-from@4.0.0: {}
@ -6663,6 +6926,10 @@ snapshots:
sax@1.4.1: {}
scroll-into-view-if-needed@2.2.31:
dependencies:
compute-scroll-into-view: 1.0.20
scule@1.3.0: {}
semver-compare@1.0.0:
@ -6677,6 +6944,8 @@ snapshots:
type-fest: 0.13.1
optional: true
shallow-equal@1.2.1: {}
shebang-command@2.0.0:
dependencies:
shebang-regex: 3.0.0
@ -6820,6 +7089,8 @@ snapshots:
tinyexec@0.3.1: {}
tinyexec@0.3.2: {}
tinyglobby@0.2.10:
dependencies:
fdir: 6.4.2(picomatch@4.0.2)
@ -6970,6 +7241,18 @@ snapshots:
unplugin: 1.16.1
vite: 5.4.14(@types/node@20.17.19)(sass@1.85.0)
unplugin-icons@22.1.0(@vue/compiler-sfc@3.5.13):
dependencies:
'@antfu/install-pkg': 1.0.0
'@iconify/utils': 2.3.0
debug: 4.4.0
local-pkg: 1.0.0
unplugin: 2.2.0
optionalDependencies:
'@vue/compiler-sfc': 3.5.13
transitivePeerDependencies:
- supports-color
unplugin-utils@0.2.4:
dependencies:
pathe: 2.0.3
@ -7170,6 +7453,11 @@ snapshots:
semver: 7.6.3
typescript: 5.7.3
vue-types@3.0.2(vue@3.5.13(typescript@5.7.3)):
dependencies:
is-plain-object: 3.0.1
vue: 3.5.13(typescript@5.7.3)
vue@3.5.13(typescript@5.7.3):
dependencies:
'@vue/compiler-dom': 3.5.13
@ -7180,6 +7468,10 @@ snapshots:
optionalDependencies:
typescript: 5.7.3
warning@4.0.3:
dependencies:
loose-envify: 1.4.0
webpack-virtual-modules@0.6.2: {}
which@2.0.2:

2
src/renderer/components.d.ts

@ -10,6 +10,8 @@ declare module 'vue' {
export interface GlobalComponents {
AdjustLine: typeof import('./src/components/AdjustLine.vue')['default']
CodeEditor: typeof import('./src/components/CodeEditor/code-editor.vue')['default']
'IconStash:arrowReplyDuotone': typeof import('~icons/stash/arrow-reply-duotone')['default']
LawDialog: typeof import('law-ui/es')['LawDialog']
NavBar: typeof import('./src/components/NavBar.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']

7
src/renderer/src/App.vue

@ -1,12 +1,17 @@
<script setup lang="ts">
import { ModalContainer } from "law-ui"
</script>
<template>
<div h-full flex flex-col overflow-hidden>
<NavBar></NavBar>
<div flex-1 h-0 overflow-hidden flex flex-col>
<div flex-1 h-0 overflow-hidden flex flex-col relative id="page-container" style="transform: scale(1);">
<router-view v-slot="{ Component, route }">
<Transition name="slide-fade" mode="out-in">
<component :is="Component" :key="route.fullPath" />
</Transition>
</router-view>
<ModalContainer to="#page-container"/>
</div>
</div>
</template>

22
src/renderer/src/components/NavBar.vue

@ -23,13 +23,28 @@
v-if="!isHome"
text-sm
px-2
flex
items-center
hover:rounded-md
hover:bg-gray-2
hover:cursor-pointer
text="hover:hover"
title="返回上一页"
title="返回"
@click="back"
>
<icon-stash:arrow-reply-duotone></icon-stash:arrow-reply-duotone>
</div>
<div
v-if="!isHome"
text-sm
px-2
hover:rounded-md
hover:bg-gray-2
hover:cursor-pointer
text="hover:hover"
title="返回首页"
@click="backHome"
>
🏠
</div>
<div text-sm px-2 hover:rounded-md hover:bg-gray-2 hover:cursor-pointer text="hover:hover" @click="onClickAbout">关于</div>
@ -64,9 +79,12 @@ import { LogLevel } from "logger/common"
return false
})
function back() {
function backHome() {
router.push("/")
}
function back() {
router.back()
}
const { t } = useI18n()
const onClickMenu = async e => {
const menu = new PopupMenu([

3
src/renderer/src/main.ts

@ -3,6 +3,9 @@ import "simplebar-vue/dist/simplebar.min.css"
import "@unocss/reset/normalize.css"
import "@/assets/style/_common.scss"
import "virtual:uno.css"
import 'law-ui/theme-chalk/law-mask.css';
import 'law-ui/theme-chalk/law-dialog.css';
import 'nprogress/nprogress.css';
import { createApp } from "vue"
import App from "./App.vue"

13
src/renderer/src/pages/index.vue

@ -1,13 +0,0 @@
<script setup lang="ts">
definePage({
meta: {
home: true,
},
})
</script>
<template>
<div>
sad
</div>
</template>

7
src/renderer/src/pages/index/_ui/_dialog.vue

@ -0,0 +1,7 @@
<template>
<div bg-white>sada</div>
</template>
<style lang="scss" scoped>
</style>

37
src/renderer/src/pages/index/index.vue

@ -0,0 +1,37 @@
<script setup lang="ts">
import { useDialog } from "law-ui"
definePage({
meta: {
home: true,
},
})
const showDialog = ref(false)
const { show, hide } = useDialog({
renderUI: () => import("./_ui/_dialog.vue"),
dialogProps: {
style: {
width: "50%",
}
}
})
</script>
<template>
<div @click="show()">sad--{{ showDialog }}</div>asd
<div @click="$router.push('/demo')">aaa</div>
<!-- <Dialog inBox disabled v-model:show="showDialog">
<template v-slot:placeholder><div class="dialog-placeholder"></div></template>
<div bg-white>saasda</div>
</Dialog> -->
</template>
<style lang="scss" scoped>
// .dialog-placeholder :deep() {
// & + .dialog__content {
// width: 50%;
// }
// }
</style>

19
src/renderer/src/router/index.ts

@ -1,6 +1,9 @@
import { createWebHashHistory, createRouter } from "vue-router"
import { createWebHashHistory, createRouter, isNavigationFailure } from "vue-router"
import { routes as generatedRoutes, handleHotUpdate } from "vue-router/auto-routes"
import { setupLayouts } from "virtual:generated-layouts"
import NProgress from 'nprogress'
NProgress.configure({ showSpinner: false, parent: "#page-container" })
const routes = setupLayouts(generatedRoutes)
@ -9,6 +12,20 @@ const router = createRouter({
routes,
})
router.beforeEach((to, from, next)=>{
console.log("开始导航");
NProgress.start();
return next()
})
router.afterEach((to, from, failure) => {
console.log("结束导航");
NProgress.done();
if (isNavigationFailure(failure)) {
console.log('failed navigation', failure)
}
})
export { router }
export default router

2
src/renderer/typed-router.d.ts

@ -18,7 +18,7 @@ declare module 'vue-router/auto-routes' {
* Route name map generated by unplugin-vue-router
*/
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
'//': RouteRecordInfo<'//', '/', Record<never, never>, Record<never, never>>,
'/[...all]': RouteRecordInfo<'/[...all]', '/:all(.*)', { all: ParamValue<true> }, { all: ParamValue<false> }>,
'about': RouteRecordInfo<'about', '/about', Record<never, never>, Record<never, never>>,
'/browser': RouteRecordInfo<'/browser', '/browser', Record<never, never>, Record<never, never>>,

Loading…
Cancel
Save