├── configs.yaml ├── data ├── data.db ├── fixed.db └── logs │ └── 2024-03-11 │ └── ERROR.csv ├── .gitignore ├── scripts ├── configs.yaml ├── typescript ├── cnts.go └── func.go ├── frontend ├── .prettierrc.json ├── package.json.md5 ├── env.d.ts ├── src │ ├── style.scss │ ├── assets │ │ ├── logo.png │ │ ├── images │ │ │ └── comeon.gif │ │ ├── css │ │ │ └── font.css │ │ └── fonts │ │ │ ├── JetBrainsMono-Bold.woff2 │ │ │ ├── JetBrainsMono-Thin.woff2 │ │ │ ├── JetBrainsMono-Italic.woff2 │ │ │ ├── JetBrainsMono-Light.woff2 │ │ │ ├── JetBrainsMono-Medium.woff2 │ │ │ ├── JetBrainsMono-ExtraBold.woff2 │ │ │ ├── JetBrainsMono-Regular.woff2 │ │ │ ├── JetBrainsMono-SemiBold.woff2 │ │ │ ├── JetBrainsMono-BoldItalic.woff2 │ │ │ ├── JetBrainsMono-ExtraLight.woff2 │ │ │ ├── JetBrainsMono-LightItalic.woff2 │ │ │ ├── JetBrainsMono-ThinItalic.woff2 │ │ │ ├── JetBrainsMono-MediumItalic.woff2 │ │ │ ├── JetBrainsMono-SemiBoldItalic.woff2 │ │ │ ├── JetBrainsMono-ExtraBoldItalic.woff2 │ │ │ └── JetBrainsMono-ExtraLightItalic.woff2 │ ├── types │ │ ├── menu.ts │ │ ├── home.d.ts │ │ ├── project.d.ts │ │ ├── vpsimpleConfig.ts │ │ ├── hero.ts │ │ └── features.ts │ ├── utils │ │ ├── array.ts │ │ ├── language.ts │ │ ├── system.ts │ │ ├── deepClone.ts │ │ ├── Toast.ts │ │ ├── parse.ts │ │ └── historyProject.ts │ ├── views │ │ ├── previews │ │ │ └── preview.vue │ │ ├── index │ │ │ ├── indexArticle.vue │ │ │ ├── indexArticleTreeSearch.vue │ │ │ ├── indexPopTerminal.vue │ │ │ ├── index.vue │ │ │ ├── indexPopAddFeatures.vue │ │ │ ├── indexEditorFooter.vue │ │ │ ├── indexEditor.vue │ │ │ └── indexEditorWriter.vue │ │ ├── setting │ │ │ └── setting.vue │ │ └── about │ │ │ └── about.vue │ ├── constant │ │ ├── enums │ │ │ ├── system.ts │ │ │ └── cdn.ts │ │ ├── keys │ │ │ ├── cmds.ts │ │ │ └── config.ts │ │ └── cnts │ │ │ └── sys.ts │ ├── quasar-variables.sass │ ├── configs │ │ ├── cnts.ts │ │ ├── defaultVpSimple.ts │ │ ├── defaultFrontMatter.ts │ │ └── defaultLangConfig.ts │ ├── i18n │ │ ├── index.ts │ │ └── locales │ │ │ ├── zh │ │ │ └── shell.ts │ │ │ └── en │ │ │ └── shell.ts │ ├── test │ │ └── replace.test.ts │ ├── components │ │ ├── changeLanguage_1715655984313.vue │ │ ├── menuItem.vue │ │ ├── iconBtn.vue │ │ ├── simSwitch.vue │ │ ├── configColor.vue │ │ ├── simRadio.vue │ │ ├── simInput.vue │ │ ├── configSwitch.vue │ │ ├── configRadio.vue │ │ └── emptyProject.vue │ ├── store │ │ ├── demo.ts │ │ └── nav.ts │ ├── router │ │ └── index.ts │ ├── layout │ │ └── nav │ │ │ └── navTemplate1.vue │ └── main.ts ├── public │ └── favicon.ico ├── postcss.config.js ├── tailwind.config.js ├── tsconfig.config.json ├── wailsjs │ ├── go │ │ ├── services │ │ │ ├── UpdateService.d.ts │ │ │ ├── UpdateService.js │ │ │ ├── StaticServer.d.ts │ │ │ ├── ArticleTreeData.d.ts │ │ │ ├── StaticServer.js │ │ │ └── ArticleTreeData.js │ │ ├── vpsimpler │ │ │ ├── VpManager.d.ts │ │ │ ├── VpConfig.d.ts │ │ │ ├── VpManager.js │ │ │ └── VpConfig.js │ │ ├── shell │ │ │ ├── ShellManager.d.ts │ │ │ └── ShellManager.js │ │ └── system │ │ │ └── SystemService.d.ts │ └── runtime │ │ └── package.json ├── tailwind.config.cjs ├── .eslintrc.cjs ├── .gitignore ├── tsconfig.json ├── vite.config.ts └── index.html ├── application ├── mytest │ ├── configs.yaml │ ├── file_test.go │ ├── server_test.go │ └── update_test.go ├── pkg │ ├── cfg │ │ ├── cfg1.yaml │ │ └── helper_test.go │ ├── myexcel │ │ ├── output.xlsx │ │ ├── e_test.go │ │ ├── map_excel.go │ │ └── list_kv_excel.go │ ├── startup │ │ ├── startup_linux.go │ │ └── service.go │ ├── utils │ │ ├── json.go │ │ ├── system.go │ │ ├── user.go │ │ ├── map.go │ │ ├── md5.go │ │ ├── var.go │ │ ├── root.go │ │ ├── arr.go │ │ └── dto.go │ ├── mytask │ │ ├── task_info.go │ │ └── run_test.go │ ├── filehelper │ │ ├── image_test.go │ │ └── dir.go │ ├── emails │ │ └── send_test.go │ ├── where │ │ ├── func.go │ │ └── opts.go │ ├── random │ │ └── random.go │ ├── mynet │ │ ├── check_connect_test.go │ │ └── check_connect.go │ ├── myreflect │ │ ├── get_struct_json.go │ │ └── to_map.go │ ├── mynum │ │ └── tostring.go │ └── myimg │ │ └── base64save.go ├── constant │ ├── enums │ │ ├── system.go │ │ └── cdn.go │ ├── keys │ │ ├── cmds.go │ │ └── config.go │ └── cnts │ │ └── sys.go ├── db │ ├── repository │ │ ├── struct.go │ │ ├── format_db.go │ │ └── common.go │ ├── entity │ │ └── article.go │ ├── dbdto │ │ └── article.go │ └── dbinit │ │ └── fixed.go ├── dto │ ├── vitepress.go │ └── tree.go ├── first │ ├── task.go │ ├── opencheck.go │ ├── default_config.go │ └── init.go ├── vitepress │ ├── parse_test.go │ ├── vpsimpler │ │ ├── template.go │ │ └── check.go │ └── vptype │ │ ├── sidebar.go │ │ ├── socialLink.go │ │ └── nav.go ├── wailshelper │ └── context.go └── services │ ├── shell │ └── shell_unix.go │ └── update.go ├── docs ├── .vitepress │ ├── config │ │ ├── custom.ts │ │ └── index.ts │ └── dist │ │ ├── images │ │ ├── logo.png │ │ └── home │ │ │ └── index_home.png │ │ ├── static │ │ ├── chunks │ │ │ ├── 7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.CVFl_2j9.js │ │ │ ├── 8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js │ │ │ ├── c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js │ │ │ ├── ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js │ │ │ ├── f95179b2-010e-4f1e-9d34-7a2428d551a6.BTDx6kCw.js │ │ │ ├── @localSearchIndexroot.cVud1dAQ.js │ │ │ ├── 3ccd078e-66ee-42cd-8136-f351d18ce95c.BwvngEhN.js │ │ │ └── 29bf6e91-1dfb-4734-be43-10fd29b9dc2a.CMb43z0y.js │ │ ├── inter-roman-greek.BBVDIX6e.woff2 │ │ ├── inter-roman-latin.Di8DUHzh.woff2 │ │ ├── inter-italic-greek.DJ8dCoTZ.woff2 │ │ ├── inter-italic-latin.C2AdPX0b.woff2 │ │ ├── inter-italic-cyrillic.By2_1cv3.woff2 │ │ ├── inter-italic-greek-ext.1u6EdAuj.woff2 │ │ ├── inter-italic-latin-ext.CN1xVJS-.woff2 │ │ ├── inter-roman-cyrillic.C5lxZ8CY.woff2 │ │ ├── inter-roman-greek-ext.CqjqNYQ-.woff2 │ │ ├── inter-roman-latin-ext.4ZJIpNVo.woff2 │ │ ├── inter-roman-vietnamese.BjW4sHH5.woff2 │ │ ├── inter-italic-vietnamese.BSbpV94h.woff2 │ │ ├── inter-roman-cyrillic-ext.BBPuwvHQ.woff2 │ │ ├── inter-italic-cyrillic-ext.r48I6akx.woff2 │ │ ├── 1976fa44-f433-4638-a876-22d0a097c0fa.YB434_2A.png │ │ ├── 22756e46-f240-47d6-a8aa-d4a464bda7a6.DrRkyTsy.png │ │ ├── 2979d5e6-249d-4bed-8e48-8b771fc25320.BQKqBlls.png │ │ ├── 29bf6e91-1dfb-4734-be43-10fd29b9dc2a.BqaMPQW4.png │ │ ├── 39137c1d-ddb5-47a1-a988-7cfd3ba8be96.BgH1TIPD.png │ │ ├── 3c63f22b-856b-4db1-9b34-d3c2e1e40492.CmAvE7eV.png │ │ ├── 3ccd078e-66ee-42cd-8136-f351d18ce95c.xBY0_1Qf.png │ │ ├── 5f965c09-30e7-400a-92fe-676e7599c0b2.Bxoj2_VA.png │ │ ├── 7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.DaS-L3dt.png │ │ ├── 7d8c870c-bf8b-45a1-bfb9-51c380c844cb.B5vRYeDy.png │ │ ├── 8286944e-c79b-4bbe-83d5-4902316dc593.Dln44ixo.png │ │ ├── 8296bf0d-c76e-4517-a526-b42da4378c6a.D-R2qc24.png │ │ ├── 8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png │ │ ├── 95c8f4e2-0e60-4dc7-9fab-cc86352a858e.wV973ch9.png │ │ ├── b485c946-be26-4eec-a0a8-ad3f3aea2cf5.D3yvS8XQ.png │ │ ├── b560bc15-858a-467b-a6e1-ac537f714d28.DN3MbcWD.png │ │ ├── c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.DUILUzwR.png │ │ ├── c1fa199a-8271-473e-899f-635df0f7d494.C5xgF0UN.png │ │ ├── c585de89-3f7f-4c0d-9b50-404ea79259d0.DUyMEDix.png │ │ ├── f291c8df-b59a-4c23-89d0-7a6fa514661c.ZKO9TfMg.png │ │ ├── f95179b2-010e-4f1e-9d34-7a2428d551a6.CuC0beHI.png │ │ ├── fcc07337-7585-481b-a6d0-5a6b5ee3d01a.AYtrL-Ui.png │ │ ├── en_更新记录_v1.0.0.md.CeiZrSiq.lean.js │ │ ├── zh_更新记录_v1.0.0.md.Him7IZ1f.lean.js │ │ ├── en_zh_更新记录_v1.0.0.md.szl-dyJH.lean.js │ │ ├── en_使用手册_3.项目配置.md.CjJrTWXx.lean.js │ │ ├── zh_使用手册_3.项目配置.md.B_McqDcn.lean.js │ │ ├── en_zh_使用手册_3.项目配置.md.-pPZ6_p_.lean.js │ │ ├── en_使用手册_1.关于软件.md.BggO4lC8.lean.js │ │ ├── zh_使用手册_1.关于软件.md.DGWojpP4.lean.js │ │ ├── en_zh_使用手册_1.关于软件.md.CHQ-h0-c.lean.js │ │ ├── zh_使用手册_2.入门使用.md.CNNhJ-ge.lean.js │ │ ├── en_使用手册_2.入门使用.md.B99jdk7n.lean.js │ │ ├── en_zh_使用手册_2.入门使用.md.BQzakXh6.lean.js │ │ ├── zh_使用手册_6.软件设置.md.Cx36hS5e.js │ │ ├── zh_使用手册_6.软件设置.md.Cx36hS5e.lean.js │ │ ├── en_zh_使用手册_6.软件设置.md.BlZ_r3dw.js │ │ ├── zh_使用手册_4.导航管理.md.Du8XYE-z.js │ │ ├── en_zh_使用手册_6.软件设置.md.BlZ_r3dw.lean.js │ │ ├── zh_使用手册_4.导航管理.md.Du8XYE-z.lean.js │ │ ├── en_zh_使用手册_4.导航管理.md.CRaXgXI2.js │ │ ├── en_zh_使用手册_4.导航管理.md.CRaXgXI2.lean.js │ │ ├── en_使用手册_4.导航管理.md.i3gEwSzu.js │ │ ├── en_使用手册_4.导航管理.md.i3gEwSzu.lean.js │ │ ├── zh_使用手册_5.侧栏管理.md.CAVU1Y2j.js │ │ ├── zh_使用手册_5.侧栏管理.md.CAVU1Y2j.lean.js │ │ ├── en_zh_使用手册_5.侧栏管理.md.C_pnq5SA.js │ │ ├── en_zh_使用手册_5.侧栏管理.md.C_pnq5SA.lean.js │ │ ├── en_使用手册_6.软件设置.md.3GYB_gLH.js │ │ ├── en_使用手册_6.软件设置.md.3GYB_gLH.lean.js │ │ └── app.mhwNdxkg.js │ │ └── hashmap.json ├── public │ └── images │ │ ├── logo.png │ │ └── home │ │ └── index_home.png ├── vpstatic │ └── images │ │ ├── 20240412 │ │ └── 01389cbc-6b8e-4e7b-b160-78f1020c9f72.png │ │ ├── 20240413 │ │ ├── 22756e46-f240-47d6-a8aa-d4a464bda7a6.png │ │ ├── 2979d5e6-249d-4bed-8e48-8b771fc25320.png │ │ ├── 29bf6e91-1dfb-4734-be43-10fd29b9dc2a.png │ │ ├── 38fe097a-edd6-4e2f-a37e-83224219fa03.png │ │ ├── 5f965c09-30e7-400a-92fe-676e7599c0b2.png │ │ ├── 78b3ee48-0b72-4689-b5f4-6af4c101babb.png │ │ ├── 7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.png │ │ ├── 8296bf0d-c76e-4517-a526-b42da4378c6a.png │ │ ├── 830f4b5e-96ce-47f0-9105-a1a110b7ada8.png │ │ ├── 94660893-59d6-4e2f-a492-9a39c655c29b.png │ │ ├── 95c8f4e2-0e60-4dc7-9fab-cc86352a858e.png │ │ ├── 99fa51c3-f763-49ef-852b-eccfaedae80e.png │ │ ├── b6a83854-cc72-46e3-8f5f-9dd07a8eabb9.png │ │ ├── c24ff40e-f708-4cfe-84f4-51adc9e43aef.png │ │ └── f95179b2-010e-4f1e-9d34-7a2428d551a6.png │ │ ├── 20240414 │ │ ├── 171ebbaa-bab8-40d0-a1da-14e46c01631c.png │ │ ├── 1976fa44-f433-4638-a876-22d0a097c0fa.png │ │ ├── 7d8c870c-bf8b-45a1-bfb9-51c380c844cb.png │ │ ├── b560bc15-858a-467b-a6e1-ac537f714d28.png │ │ ├── c1fa199a-8271-473e-899f-635df0f7d494.png │ │ └── f291c8df-b59a-4c23-89d0-7a6fa514661c.png │ │ ├── 20240415 │ │ ├── 3ccd078e-66ee-42cd-8136-f351d18ce95c.png │ │ ├── 8286944e-c79b-4bbe-83d5-4902316dc593.png │ │ ├── 8acabd8c-8c84-416c-920f-6de221a3e9b3.png │ │ ├── b554300e-a946-4c78-9c08-5da14217d91a.png │ │ ├── c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.png │ │ ├── c585de89-3f7f-4c0d-9b50-404ea79259d0.png │ │ ├── ca703e24-4544-4c7d-98e6-6021bd42a3d8.png │ │ └── ce73b454-ff59-4c3d-91b2-de4a2eaffbe8.png │ │ ├── 20240416 │ │ ├── 39137c1d-ddb5-47a1-a988-7cfd3ba8be96.png │ │ ├── 3c63f22b-856b-4db1-9b34-d3c2e1e40492.png │ │ ├── 4631dcde-70f7-427b-b5d0-7a2bd6d80b76.png │ │ ├── 9323bce8-7c90-439d-9b1b-49aec08211ea.png │ │ ├── 9c6ee35b-6ae6-44c6-9670-e1d81c35e88f.png │ │ ├── b485c946-be26-4eec-a0a8-ad3f3aea2cf5.png │ │ ├── fc441d15-a003-481f-a338-39c4f94a40fb.png │ │ └── fcc07337-7585-481b-a6d0-5a6b5ee3d01a.png │ │ ├── 20240506 │ │ ├── 15e6117f-ca53-4464-a3e8-62554eefb082.png │ │ └── 7c4c31db-7e89-43b6-95d1-c33950f3297e.png │ │ ├── demo.png │ │ ├── openInDir.png │ │ └── vpsimple.png ├── package.json ├── .gitignore ├── zh │ ├── 使用手册 │ │ ├── 6.软件设置.md │ │ ├── 4.导航管理.md │ │ └── 5.侧栏管理.md │ └── 更新记录 │ │ ├── v1.1.md │ │ └── v1.0.md └── en │ ├── zh │ ├── 使用手册 │ │ ├── 6.软件设置.md │ │ ├── 4.导航管理.md │ │ └── 5.侧栏管理.md │ └── 更新记录 │ │ └── v1.0.md │ └── 使用手册 │ ├── 4.导航管理.md │ └── 6.软件设置.md ├── resources └── images │ └── icon.png ├── .idea ├── watcherTasks.xml ├── .gitignore ├── codeStyles │ └── codeStyleConfig.xml ├── vcs.xml ├── jsLinters │ └── eslint.xml ├── MarsCodeWorkspaceAppSettings.xml ├── i18nSettings.xml ├── wails2-template-vue.iml ├── modules.xml └── inspectionProfiles │ └── Project_Default.xml ├── vitepress-template ├── .vitepress │ └── config │ │ ├── index.ts │ │ ├── README.md │ │ ├── custom.ts │ │ └── vpsimple.ts ├── package.json ├── .gitignore └── docs │ ├── index.md │ ├── api-examples.md │ └── markdown-examples.md ├── wails.json ├── settings └── setting.go ├── api-examples.md ├── qodana.yaml └── app.go /configs.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/data.db: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/bin -------------------------------------------------------------------------------- /scripts/configs.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /application/mytest/configs.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/pkg/cfg/cfg1.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/package.json.md5: -------------------------------------------------------------------------------- 1 | 80663fa155d89f5d5e32ae5669064b64 -------------------------------------------------------------------------------- /frontend/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /data/fixed.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/data/fixed.db -------------------------------------------------------------------------------- /frontend/src/style.scss: -------------------------------------------------------------------------------- 1 | 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | -------------------------------------------------------------------------------- /docs/.vitepress/config/custom.ts: -------------------------------------------------------------------------------- 1 | export const CustomerConfig = { 2 | head: [] 3 | // markdown: {} 4 | }; -------------------------------------------------------------------------------- /resources/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/resources/images/icon.png -------------------------------------------------------------------------------- /docs/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/public/images/logo.png -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/public/favicon.ico -------------------------------------------------------------------------------- /docs/vpstatic/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/demo.png -------------------------------------------------------------------------------- /frontend/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/logo.png -------------------------------------------------------------------------------- /application/pkg/myexcel/output.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/application/pkg/myexcel/output.xlsx -------------------------------------------------------------------------------- /docs/vpstatic/images/openInDir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/openInDir.png -------------------------------------------------------------------------------- /docs/vpstatic/images/vpsimple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/vpsimple.png -------------------------------------------------------------------------------- /frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /frontend/src/types/menu.ts: -------------------------------------------------------------------------------- 1 | export interface MenuItem { 2 | text: string; 3 | link?: string; 4 | items?: MenuItem[]; 5 | } 6 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/images/logo.png -------------------------------------------------------------------------------- /frontend/src/assets/images/comeon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/images/comeon.gif -------------------------------------------------------------------------------- /docs/public/images/home/index_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/public/images/home/index_home.png -------------------------------------------------------------------------------- /frontend/src/assets/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "JetBrainsMono"; 3 | src: url("../fonts/JetBrainsMono-Medium.woff2"); 4 | } 5 | -------------------------------------------------------------------------------- /application/constant/enums/system.go: -------------------------------------------------------------------------------- 1 | package enums 2 | 3 | const SystemWindows = "windows" 4 | const SystemLinux = "linux" 5 | const SystemMac = "darwin" 6 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/images/home/index_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/images/home/index_home.png -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Bold.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Thin.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Italic.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Light.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Medium.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.CVFl_2j9.js: -------------------------------------------------------------------------------- 1 | const t="/static/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.DaS-L3dt.png";export{t as _}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js: -------------------------------------------------------------------------------- 1 | const t="/static/8286944e-c79b-4bbe-83d5-4902316dc593.Dln44ixo.png";export{t as _}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js: -------------------------------------------------------------------------------- 1 | const c="/static/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.DUILUzwR.png";export{c as _}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js: -------------------------------------------------------------------------------- 1 | const a="/static/8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png";export{a as _}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/f95179b2-010e-4f1e-9d34-7a2428d551a6.BTDx6kCw.js: -------------------------------------------------------------------------------- 1 | const t="/static/f95179b2-010e-4f1e-9d34-7a2428d551a6.CuC0beHI.png";export{t as _}; 2 | -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-ExtraBold.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-Regular.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-SemiBold.woff2 -------------------------------------------------------------------------------- /.idea/watcherTasks.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /application/db/repository/struct.go: -------------------------------------------------------------------------------- 1 | package repository 2 | 3 | type DistinctItem struct { 4 | Value string `json:"value,omitempty"` 5 | Count int `json:"count"` 6 | } 7 | -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-BoldItalic.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-ExtraLight.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-LightItalic.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-ThinItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-ThinItalic.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-greek.BBVDIX6e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-greek.BBVDIX6e.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-latin.Di8DUHzh.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-latin.Di8DUHzh.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-MediumItalic.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-greek.DJ8dCoTZ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-greek.DJ8dCoTZ.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-latin.C2AdPX0b.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-latin.C2AdPX0b.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /frontend/src/assets/fonts/JetBrainsMono-ExtraLightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/frontend/src/assets/fonts/JetBrainsMono-ExtraLightItalic.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-cyrillic.By2_1cv3.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-cyrillic.By2_1cv3.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-greek-ext.1u6EdAuj.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-greek-ext.1u6EdAuj.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-latin-ext.CN1xVJS-.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-latin-ext.CN1xVJS-.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-cyrillic.C5lxZ8CY.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-cyrillic.C5lxZ8CY.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-greek-ext.CqjqNYQ-.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-greek-ext.CqjqNYQ-.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-latin-ext.4ZJIpNVo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-latin-ext.4ZJIpNVo.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-vietnamese.BjW4sHH5.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-vietnamese.BjW4sHH5.woff2 -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /application/constant/enums/cdn.go: -------------------------------------------------------------------------------- 1 | package enums 2 | 3 | const VditorCdnUnpkg = "unpkg.com" 4 | const VditorCdnJsdelivr = "cdn.jsdelivr.net/npm" 5 | const VditorCdnZstatic = "s4.zstatic.net/npm" 6 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-vietnamese.BSbpV94h.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-vietnamese.BSbpV94h.woff2 -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-roman-cyrillic-ext.BBPuwvHQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/inter-italic-cyrillic-ext.r48I6akx.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/inter-italic-cyrillic-ext.r48I6akx.woff2 -------------------------------------------------------------------------------- /docs/vpstatic/images/20240412/01389cbc-6b8e-4e7b-b160-78f1020c9f72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240412/01389cbc-6b8e-4e7b-b160-78f1020c9f72.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/22756e46-f240-47d6-a8aa-d4a464bda7a6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/22756e46-f240-47d6-a8aa-d4a464bda7a6.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/2979d5e6-249d-4bed-8e48-8b771fc25320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/2979d5e6-249d-4bed-8e48-8b771fc25320.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/38fe097a-edd6-4e2f-a37e-83224219fa03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/38fe097a-edd6-4e2f-a37e-83224219fa03.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/5f965c09-30e7-400a-92fe-676e7599c0b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/5f965c09-30e7-400a-92fe-676e7599c0b2.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/78b3ee48-0b72-4689-b5f4-6af4c101babb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/78b3ee48-0b72-4689-b5f4-6af4c101babb.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/8296bf0d-c76e-4517-a526-b42da4378c6a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/8296bf0d-c76e-4517-a526-b42da4378c6a.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/830f4b5e-96ce-47f0-9105-a1a110b7ada8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/830f4b5e-96ce-47f0-9105-a1a110b7ada8.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/94660893-59d6-4e2f-a492-9a39c655c29b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/94660893-59d6-4e2f-a492-9a39c655c29b.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/95c8f4e2-0e60-4dc7-9fab-cc86352a858e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/95c8f4e2-0e60-4dc7-9fab-cc86352a858e.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/99fa51c3-f763-49ef-852b-eccfaedae80e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/99fa51c3-f763-49ef-852b-eccfaedae80e.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/b6a83854-cc72-46e3-8f5f-9dd07a8eabb9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/b6a83854-cc72-46e3-8f5f-9dd07a8eabb9.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/c24ff40e-f708-4cfe-84f4-51adc9e43aef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/c24ff40e-f708-4cfe-84f4-51adc9e43aef.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240413/f95179b2-010e-4f1e-9d34-7a2428d551a6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240413/f95179b2-010e-4f1e-9d34-7a2428d551a6.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/171ebbaa-bab8-40d0-a1da-14e46c01631c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/171ebbaa-bab8-40d0-a1da-14e46c01631c.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/1976fa44-f433-4638-a876-22d0a097c0fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/1976fa44-f433-4638-a876-22d0a097c0fa.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/7d8c870c-bf8b-45a1-bfb9-51c380c844cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/7d8c870c-bf8b-45a1-bfb9-51c380c844cb.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/b560bc15-858a-467b-a6e1-ac537f714d28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/b560bc15-858a-467b-a6e1-ac537f714d28.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/c1fa199a-8271-473e-899f-635df0f7d494.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/c1fa199a-8271-473e-899f-635df0f7d494.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240414/f291c8df-b59a-4c23-89d0-7a6fa514661c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240414/f291c8df-b59a-4c23-89d0-7a6fa514661c.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/3ccd078e-66ee-42cd-8136-f351d18ce95c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/3ccd078e-66ee-42cd-8136-f351d18ce95c.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/8286944e-c79b-4bbe-83d5-4902316dc593.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/8286944e-c79b-4bbe-83d5-4902316dc593.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/8acabd8c-8c84-416c-920f-6de221a3e9b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/8acabd8c-8c84-416c-920f-6de221a3e9b3.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/b554300e-a946-4c78-9c08-5da14217d91a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/b554300e-a946-4c78-9c08-5da14217d91a.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/c585de89-3f7f-4c0d-9b50-404ea79259d0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/c585de89-3f7f-4c0d-9b50-404ea79259d0.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/ca703e24-4544-4c7d-98e6-6021bd42a3d8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/ca703e24-4544-4c7d-98e6-6021bd42a3d8.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240415/ce73b454-ff59-4c3d-91b2-de4a2eaffbe8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240415/ce73b454-ff59-4c3d-91b2-de4a2eaffbe8.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/39137c1d-ddb5-47a1-a988-7cfd3ba8be96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/39137c1d-ddb5-47a1-a988-7cfd3ba8be96.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/3c63f22b-856b-4db1-9b34-d3c2e1e40492.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/3c63f22b-856b-4db1-9b34-d3c2e1e40492.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/4631dcde-70f7-427b-b5d0-7a2bd6d80b76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/4631dcde-70f7-427b-b5d0-7a2bd6d80b76.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/9323bce8-7c90-439d-9b1b-49aec08211ea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/9323bce8-7c90-439d-9b1b-49aec08211ea.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/9c6ee35b-6ae6-44c6-9670-e1d81c35e88f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/9c6ee35b-6ae6-44c6-9670-e1d81c35e88f.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/b485c946-be26-4eec-a0a8-ad3f3aea2cf5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/b485c946-be26-4eec-a0a8-ad3f3aea2cf5.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/fc441d15-a003-481f-a338-39c4f94a40fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/fc441d15-a003-481f-a338-39c4f94a40fb.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240416/fcc07337-7585-481b-a6d0-5a6b5ee3d01a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240416/fcc07337-7585-481b-a6d0-5a6b5ee3d01a.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240506/15e6117f-ca53-4464-a3e8-62554eefb082.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240506/15e6117f-ca53-4464-a3e8-62554eefb082.png -------------------------------------------------------------------------------- /docs/vpstatic/images/20240506/7c4c31db-7e89-43b6-95d1-c33950f3297e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/vpstatic/images/20240506/7c4c31db-7e89-43b6-95d1-c33950f3297e.png -------------------------------------------------------------------------------- /docs/.vitepress/config/index.ts: -------------------------------------------------------------------------------- 1 | import { CustomerConfig } from "./custom"; 2 | import { VpSimpleConfig } from "./vpsimple"; 3 | 4 | export default { 5 | ...VpSimpleConfig, 6 | ...CustomerConfig 7 | }; -------------------------------------------------------------------------------- /frontend/src/types/home.d.ts: -------------------------------------------------------------------------------- 1 | import { Hero } from "@/types/hero"; 2 | import { Feature } from "@/types/features"; 3 | 4 | export interface VitePressHome { 5 | hero: Hero; 6 | features: Feature; 7 | } 8 | -------------------------------------------------------------------------------- /frontend/src/utils/array.ts: -------------------------------------------------------------------------------- 1 | //盘地暖一个数组是否为空或者长度为0 2 | export function isEmptyArray(arr: any[] | null) { 3 | if (arr == null) return true; 4 | return arr.length === 0 || arr.length === undefined; 5 | } 6 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/1976fa44-f433-4638-a876-22d0a097c0fa.YB434_2A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/1976fa44-f433-4638-a876-22d0a097c0fa.YB434_2A.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/22756e46-f240-47d6-a8aa-d4a464bda7a6.DrRkyTsy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/22756e46-f240-47d6-a8aa-d4a464bda7a6.DrRkyTsy.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/2979d5e6-249d-4bed-8e48-8b771fc25320.BQKqBlls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/2979d5e6-249d-4bed-8e48-8b771fc25320.BQKqBlls.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.BqaMPQW4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.BqaMPQW4.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/39137c1d-ddb5-47a1-a988-7cfd3ba8be96.BgH1TIPD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/39137c1d-ddb5-47a1-a988-7cfd3ba8be96.BgH1TIPD.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/3c63f22b-856b-4db1-9b34-d3c2e1e40492.CmAvE7eV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/3c63f22b-856b-4db1-9b34-d3c2e1e40492.CmAvE7eV.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/3ccd078e-66ee-42cd-8136-f351d18ce95c.xBY0_1Qf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/3ccd078e-66ee-42cd-8136-f351d18ce95c.xBY0_1Qf.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/5f965c09-30e7-400a-92fe-676e7599c0b2.Bxoj2_VA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/5f965c09-30e7-400a-92fe-676e7599c0b2.Bxoj2_VA.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.DaS-L3dt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.DaS-L3dt.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/7d8c870c-bf8b-45a1-bfb9-51c380c844cb.B5vRYeDy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/7d8c870c-bf8b-45a1-bfb9-51c380c844cb.B5vRYeDy.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/8286944e-c79b-4bbe-83d5-4902316dc593.Dln44ixo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/8286944e-c79b-4bbe-83d5-4902316dc593.Dln44ixo.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/8296bf0d-c76e-4517-a526-b42da4378c6a.D-R2qc24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/8296bf0d-c76e-4517-a526-b42da4378c6a.D-R2qc24.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/95c8f4e2-0e60-4dc7-9fab-cc86352a858e.wV973ch9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/95c8f4e2-0e60-4dc7-9fab-cc86352a858e.wV973ch9.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/b485c946-be26-4eec-a0a8-ad3f3aea2cf5.D3yvS8XQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/b485c946-be26-4eec-a0a8-ad3f3aea2cf5.D3yvS8XQ.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/b560bc15-858a-467b-a6e1-ac537f714d28.DN3MbcWD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/b560bc15-858a-467b-a6e1-ac537f714d28.DN3MbcWD.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.DUILUzwR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.DUILUzwR.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/c1fa199a-8271-473e-899f-635df0f7d494.C5xgF0UN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/c1fa199a-8271-473e-899f-635df0f7d494.C5xgF0UN.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/c585de89-3f7f-4c0d-9b50-404ea79259d0.DUyMEDix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/c585de89-3f7f-4c0d-9b50-404ea79259d0.DUyMEDix.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/f291c8df-b59a-4c23-89d0-7a6fa514661c.ZKO9TfMg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/f291c8df-b59a-4c23-89d0-7a6fa514661c.ZKO9TfMg.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/f95179b2-010e-4f1e-9d34-7a2428d551a6.CuC0beHI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/f95179b2-010e-4f1e-9d34-7a2428d551a6.CuC0beHI.png -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/fcc07337-7585-481b-a6d0-5a6b5ee3d01a.AYtrL-Ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicoder-cn/vitepress-simple/HEAD/docs/.vitepress/dist/static/fcc07337-7585-481b-a6d0-5a6b5ee3d01a.AYtrL-Ui.png -------------------------------------------------------------------------------- /.idea/jsLinters/eslint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /application/constant/keys/cmds.go: -------------------------------------------------------------------------------- 1 | package keys 2 | 3 | const NpmInstall = "npm run install" 4 | const DocsDev = "npm run docs:dev" 5 | const DocsBuild = "npm run docs:build" 6 | const DocsPreview = "npm run docs:preview" 7 | -------------------------------------------------------------------------------- /frontend/src/views/previews/preview.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /application/pkg/startup/startup_linux.go: -------------------------------------------------------------------------------- 1 | package startup 2 | 3 | func EnableAutoStart(appName, appPath string) error { 4 | return nil 5 | } 6 | 7 | func DisableAutoStart(appName string) error { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /frontend/src/constant/enums/system.ts: -------------------------------------------------------------------------------- 1 | export const SystemWindows = "windows" 2 | 3 | export const SystemLinux = "linux" 4 | 5 | export const SystemMac = "darwin" 6 | 7 | export const SystemArray = ["windows","linux","darwin"]; 8 | -------------------------------------------------------------------------------- /application/pkg/utils/json.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "encoding/json" 4 | 5 | func DataToJsonStr(data any) string { 6 | str, err := json.Marshal(data) 7 | if err != nil { 8 | return "" 9 | } 10 | return string(str) 11 | } 12 | -------------------------------------------------------------------------------- /frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | 8 | plugins: [], 9 | }; 10 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "docs:dev": "vitepress dev", 4 | "docs:build": "vitepress build", 5 | "docs:preview": "vitepress preview" 6 | }, 7 | "devDependencies": { 8 | "vitepress": "^1.1.0" 9 | } 10 | } -------------------------------------------------------------------------------- /frontend/src/quasar-variables.sass: -------------------------------------------------------------------------------- 1 | $primary : #1976D2 2 | $secondary : #26A69A 3 | $accent : #9C27B0 4 | 5 | $dark : #1D1D1D 6 | 7 | $positive : #21BA45 8 | $negative : #C10015 9 | $info : #31CCEC 10 | $warning : #F2C037 -------------------------------------------------------------------------------- /frontend/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | // "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vitepress-template/.vitepress/config/index.ts: -------------------------------------------------------------------------------- 1 | import { CustomConfig } from "./custom"; 2 | import { VpSimpleConfig } from "./vpsimple"; 3 | 4 | 5 | export default { 6 | ...VpSimpleConfig,//来自软件vpsimple自动写入的配置 7 | ...CustomConfig// customer config优先级更大 8 | }; 9 | -------------------------------------------------------------------------------- /vitepress-template/.vitepress/config/README.md: -------------------------------------------------------------------------------- 1 | - index.ts 入口文件,也客自行修改成index.mts 然后使用export default defineConfig({ // ... }) 2 | - vpsimple.ts 存放来自vpsimple的配置,请勿动!!!! 3 | - custom.ts 存放一些自定义的配置,或者需要覆盖vpsimple.ts的配置,比如第三方插件的配置等 4 | > custom config优先级更大,如果两个对象有相同的属性,customer的属性值会覆盖前面的。 -------------------------------------------------------------------------------- /application/dto/vitepress.go: -------------------------------------------------------------------------------- 1 | package dto 2 | 3 | type VitePressCreate struct { 4 | Title string `json:"title,omitempty"` 5 | Identifier string `json:"identifier,omitempty"` 6 | Dir string `json:"dir,omitempty"` 7 | DocsDir string `json:"docsDir,omitempty"` 8 | } 9 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/UpdateService.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function HasNewVersion():Promise; 5 | 6 | export function UpdateNewVersion():Promise; 7 | -------------------------------------------------------------------------------- /scripts/typescript: -------------------------------------------------------------------------------- 1 | Script started on Thu Apr 4 23:49:30 2024 2 | ^D% xiaod@192 scripts % [?2004h[?2004l 3 | 4 | Script done on Thu Apr 4 23:49:30 2024 5 | -------------------------------------------------------------------------------- /frontend/src/configs/cnts.ts: -------------------------------------------------------------------------------- 1 | export const StringGlobalLang = "global"; 2 | export const StringRootLang = "root"; 3 | export const VitePressVersion = "1.2.3"; 4 | 5 | // export const StyleDrag = { CssDragName: CssDragValue }; 6 | export const StyleNoDrag = { "--wails-draggable": "no-drag" }; 7 | -------------------------------------------------------------------------------- /application/pkg/mytask/task_info.go: -------------------------------------------------------------------------------- 1 | // Package mytask 2 | // @Author: zhangdi 3 | // @File: task_info 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/16 14:25 6 | package mytask 7 | 8 | type TaskInfo struct { 9 | EntryID int 10 | TaskName string //任务名称 11 | RunCount int //执行次数 12 | } 13 | -------------------------------------------------------------------------------- /frontend/src/constant/enums/cdn.ts: -------------------------------------------------------------------------------- 1 | export const VditorCdnUnpkg = "unpkg.com" 2 | 3 | export const VditorCdnJsdelivr = "cdn.jsdelivr.net/npm" 4 | 5 | export const VditorCdnZstatic = "s4.zstatic.net/npm" 6 | 7 | export const CdnArray = ["unpkg.com","cdn.jsdelivr.net/npm","s4.zstatic.net/npm"]; 8 | -------------------------------------------------------------------------------- /frontend/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], 4 | darkMode: ["class", '[data-theme="dark"]'], 5 | theme: { 6 | extend: {}, 7 | }, 8 | 9 | plugins: [], 10 | }; 11 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/@localSearchIndexroot.cVud1dAQ.js: -------------------------------------------------------------------------------- 1 | const e='{"documentCount":0,"nextId":0,"documentIds":{},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{},"averageFieldLength":[],"storedFields":{},"dirtCount":0,"index":[],"serializationVersion":2}';export{e as default}; 2 | -------------------------------------------------------------------------------- /application/mytest/file_test.go: -------------------------------------------------------------------------------- 1 | package mytest 2 | 3 | import ( 4 | "testing" 5 | "wailstemplate/application/services/system" 6 | ) 7 | 8 | func TestCopy(t *testing.T) { 9 | sys1 := system.NewSystemService() 10 | sys1.CopyPath(`E:\cach\my1\package.json`, `E:\cach\myBak\package.json`, true) 11 | } 12 | -------------------------------------------------------------------------------- /scripts/cnts.go: -------------------------------------------------------------------------------- 1 | // Package scripts 2 | // @Author: zhangdi 3 | // @File: cnts 4 | // @Version: 1.0.0 5 | // @Date: 2023/9/13 10:30 6 | package scripts 7 | 8 | var skinGenConstants = []string{ 9 | "gen_test.go", "gen1_test.go", "mouse.go", "constant", 10 | "lang.go", "lang_test.go", "lang_data", 11 | } 12 | -------------------------------------------------------------------------------- /application/pkg/utils/system.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "runtime" 4 | 5 | // IsMacOS 是否为苹果系统 6 | func IsMacOS() bool { 7 | return runtime.GOOS == "darwin" 8 | } 9 | func IsWindows() bool { 10 | return runtime.GOOS == "windows" 11 | } 12 | func IsLinux() bool { 13 | return runtime.GOOS == "linux" 14 | } 15 | -------------------------------------------------------------------------------- /frontend/src/utils/language.ts: -------------------------------------------------------------------------------- 1 | import { VitePressVersion } from "@/configs/cnts"; 2 | import i18n from "@/i18n"; 3 | //封装语言包读取函数,方便快速调用 4 | export const lang = (k: string) => { 5 | if (k == "vitePressVersion") { 6 | return VitePressVersion; 7 | } 8 | const { t } = i18n.global; 9 | return t(k); 10 | }; 11 | -------------------------------------------------------------------------------- /application/constant/cnts/sys.go: -------------------------------------------------------------------------------- 1 | package cnts 2 | 3 | // StaticBaseDir 保存图片的静态目录 vpstatic/images 4 | const StaticBaseDir = "vpstatic" 5 | const TemplateRootDir = "vitepress-template" 6 | const TemplateConfigDir = "vitepress-template/.vitepress" 7 | 8 | const CssDragName = "allow-drag" 9 | const CssDragValue = "1" 10 | -------------------------------------------------------------------------------- /vitepress-template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "docs:dev": "vitepress dev", 4 | "docs:build": "vitepress build", 5 | "docs:preview": "vitepress preview" 6 | }, 7 | "devDependencies": { 8 | "vitepress": "^1.2.3" 9 | }, 10 | "dependencies": { 11 | "markdown-it-custom-attrs": "^1.0.2" 12 | } 13 | } -------------------------------------------------------------------------------- /application/pkg/filehelper/image_test.go: -------------------------------------------------------------------------------- 1 | package filehelper 2 | 3 | import ( 4 | "testing" 5 | "wails3templatevuets/app/mypkg/mydev" 6 | ) 7 | 8 | func TestFind(t *testing.T) { 9 | mydev.StartTrack() 10 | imgPath := FindFirstImage(`D:\data\camera\GrpcCamera\GrpcCamera\GrpcCamera`) 11 | println(imgPath) 12 | mydev.EndTrack() 13 | } 14 | -------------------------------------------------------------------------------- /application/pkg/emails/send_test.go: -------------------------------------------------------------------------------- 1 | // Package emails 2 | // @Author: zhangdi 3 | // @File: send_test 4 | // @Version: 1.0.0 5 | // @Date: 2023/6/25 15:17 6 | package emails 7 | 8 | import "testing" 9 | 10 | func TestSend(t *testing.T) { 11 | err := SendEmail1("ideatools@qq.com", "验证码", "您的验证码为0092") 12 | if err != nil { 13 | panic(err) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/3ccd078e-66ee-42cd-8136-f351d18ce95c.BwvngEhN.js: -------------------------------------------------------------------------------- 1 | const c="/static/1976fa44-f433-4638-a876-22d0a097c0fa.YB434_2A.png",a="/static/b560bc15-858a-467b-a6e1-ac537f714d28.DN3MbcWD.png",t="/static/c585de89-3f7f-4c0d-9b50-404ea79259d0.DUyMEDix.png",s="/static/3ccd078e-66ee-42cd-8136-f351d18ce95c.xBY0_1Qf.png";export{c as _,a,t as b,s as c}; 2 | -------------------------------------------------------------------------------- /frontend/src/constant/keys/cmds.ts: -------------------------------------------------------------------------------- 1 | export const NpmInstall = "npm run install" 2 | 3 | export const DocsDev = "npm run docs:dev" 4 | 5 | export const DocsBuild = "npm run docs:build" 6 | 7 | export const DocsPreview = "npm run docs:preview" 8 | 9 | export const CmdsArray = ["npm run install","npm run docs:dev","npm run docs:build","npm run docs:preview"]; 10 | -------------------------------------------------------------------------------- /frontend/src/types/project.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProjectInfo { 2 | title: string; // 项目名称 3 | description: string; // 项目描述 4 | // identifier: string; // 项目标识 5 | dir: string; // 项目目录 6 | fullDir: string; // 项目完整目录 7 | docDir: string; // 存放文档文档目录 8 | createdAt: string; // 创建时间 9 | } 10 | 11 | export interface ProjectCreate extends ProjectInfo {} 12 | -------------------------------------------------------------------------------- /frontend/src/types/vpsimpleConfig.ts: -------------------------------------------------------------------------------- 1 | export interface VPSimpleConfig { 2 | shellBaseDir: string; 3 | gitBaseDir: string; // git 仓库根目录 4 | cmdDocsDev: string; 5 | cmdDocsBuild: string; 6 | cmdNpmInstall: string; 7 | cmdGitInit: string; 8 | cmdGitPull: string; 9 | cmdGitAdd: string; 10 | cmdGitCommit: string; 11 | cmdGitPush: string; 12 | } 13 | -------------------------------------------------------------------------------- /.idea/MarsCodeWorkspaceAppSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /frontend/src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from "vue-i18n"; 2 | import { zhHans } from "@/i18n/locales/zh-Hans"; 3 | import { en } from "@/i18n/locales/en"; 4 | 5 | const i18n = createI18n({ 6 | locale: "zh-Hans", 7 | fallbackLocale: "en", 8 | legacy: false, 9 | messages: { 10 | "zh-Hans": zhHans, 11 | en: en, 12 | }, 13 | }); 14 | 15 | export default i18n; 16 | -------------------------------------------------------------------------------- /scripts/func.go: -------------------------------------------------------------------------------- 1 | // Package script 2 | // @Author: zhangdi 3 | // @File: func 4 | // @Version: 1.0.0 5 | // @Date: 2023/9/13 10:16 6 | package scripts 7 | 8 | import ( 9 | "path/filepath" 10 | ) 11 | 12 | func FrontDir() string { 13 | return filepath.Join(ProjectDir(), "frontend") 14 | } 15 | 16 | func ProjectDir() string { 17 | return "../" 18 | //return setting.ServeDir 19 | } 20 | -------------------------------------------------------------------------------- /frontend/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require("@rushstack/eslint-patch/modern-module-resolution"); 3 | 4 | module.exports = { 5 | root: true, 6 | extends: [ 7 | "plugin:vue/vue3-essential", 8 | "eslint:recommended", 9 | "@vue/eslint-config-typescript", 10 | "@vue/eslint-config-prettier", 11 | ], 12 | parserOptions: { 13 | ecmaVersion: "latest", 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /frontend/src/utils/system.ts: -------------------------------------------------------------------------------- 1 | import { getDirectoryPath } from "@/utils/file"; 2 | import { Move } from "../../wailsjs/go/services/ArticleTreeData"; 3 | import { ToastCheck } from "@/utils/Toast"; 4 | 5 | //移动文件 6 | export const moveTo = async (path: string, target: string) => { 7 | const targetDir = getDirectoryPath(target); 8 | const result = await Move(path, targetDir); 9 | ToastCheck(result); 10 | }; 11 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexArticle.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /frontend/src/constant/cnts/sys.ts: -------------------------------------------------------------------------------- 1 | export const StaticBaseDir = "vpstatic" 2 | 3 | export const TemplateRootDir = "vitepress-template" 4 | 5 | export const TemplateConfigDir = "vitepress-template/.vitepress" 6 | 7 | export const CssDragName = "allow-drag" 8 | 9 | export const CssDragValue = "1" 10 | 11 | export const SysArray = ["vpstatic","vitepress-template","vitepress-template/.vitepress","allow-drag","1"]; 12 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/UpdateService.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function HasNewVersion() { 6 | return window['go']['services']['UpdateService']['HasNewVersion'](); 7 | } 8 | 9 | export function UpdateNewVersion() { 10 | return window['go']['services']['UpdateService']['UpdateNewVersion'](); 11 | } 12 | -------------------------------------------------------------------------------- /.idea/i18nSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | -------------------------------------------------------------------------------- /application/dto/tree.go: -------------------------------------------------------------------------------- 1 | package dto 2 | 3 | // TreeNode 文章列表属性结构 4 | type TreeNode struct { 5 | Title string `json:"title"` 6 | Key string `json:"key"` 7 | Style string `json:"style,omitempty"` 8 | Class string `json:"class,omitempty"` 9 | Children []*TreeNode `json:"children,omitempty"` 10 | } 11 | type TreeNode1 struct { 12 | Title string `json:"title"` 13 | Key string `json:"key"` 14 | } 15 | -------------------------------------------------------------------------------- /frontend/src/test/replace.test.ts: -------------------------------------------------------------------------------- 1 | import { test } from "vitest"; 2 | import { replaceLocalStaticToImageUrl } from "@/utils/repalceStatic"; 3 | 4 | test("repalce1", () => { 5 | const content = 6 | "![d8e8a54a8b8b491dbd5eae2495898a51.png](/vpstatic/images/20240411/d8e8a54a-8b8b-491d-bd5e-ae2495898a51.png)\n"; 7 | const newVal = replaceLocalStaticToImageUrl(content); 8 | console.log(newVal, "newVal -- console.log"); 9 | }); 10 | -------------------------------------------------------------------------------- /application/pkg/utils/user.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: user 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/16 17:33 6 | package utils 7 | 8 | import ( 9 | "os/user" 10 | ) 11 | 12 | // GetUserHomeDir 获取用户家目录 13 | func GetUserHomeDir() string { 14 | currentUser, err := user.Current() 15 | if err != nil { 16 | return "" 17 | } 18 | // 返回格式形如: C:\Users\Administrator 19 | return currentUser.HomeDir 20 | } 21 | -------------------------------------------------------------------------------- /application/db/entity/article.go: -------------------------------------------------------------------------------- 1 | package entity 2 | 3 | import "time" 4 | 5 | type Article struct { 6 | ID uint `gorm:"primarykey;comment:ID" json:"id,omitempty"` 7 | Title string `gorm:"size:255;comment:标题" json:"title"` 8 | Content string `gorm:"size:65535;comment:内容" json:"content"` 9 | CreatedAt time.Time `json:"created_at,omitempty"` //创建时间 10 | UpdatedAt time.Time `json:"updated_at"` //最后修改时间 11 | } 12 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | -------------------------------------------------------------------------------- /frontend/src/components/changeLanguage_1715655984313.vue: -------------------------------------------------------------------------------- 1 | template 2 | 10 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/vpsimpler/VpManager.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function CopyTemplateFile(arg1:string,arg2:string):Promise; 5 | 6 | export function CreateProject(arg1:string,arg2:string,arg3:string):Promise; 7 | 8 | export function GetNodeVersion():Promise; 9 | 10 | export function GetNpmVersion():Promise; 11 | -------------------------------------------------------------------------------- /application/pkg/utils/map.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | func GetStringFromMap(m map[string]interface{}, key string) (string, bool) { 4 | if m == nil { 5 | return "", false 6 | } 7 | value, ok := m[key] 8 | if !ok { 9 | return "", false // 返回空字符串和 false 表示 key 不存在于 map 中 10 | } 11 | strValue, isString := value.(string) 12 | if !isString { 13 | return "", false // 返回空字符串和 false 表示值不是字符串类型 14 | } 15 | 16 | return strValue, true // 返回字符串值和 true 表示获取成功 17 | } 18 | -------------------------------------------------------------------------------- /wails.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VitePressSimple", 3 | "outputfilename": "VitePressSimple", 4 | "assetdir": "frontend/dist", 5 | "frontend:install": "npm install", 6 | "frontend:build": "npm run build", 7 | "frontend:dev:build": "npm run build-only", 8 | "frontend:dev:watcher": "npm run dev", 9 | "frontend:dev:serverUrl": "auto", 10 | "debounceMS": 500, 11 | "author": { 12 | "name": "xiaod-xiaommi", 13 | "email": "1778871523@qq.com" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | .vitepress/cache 10 | .vitepressBak 11 | 12 | node_modules 13 | .DS_Store 14 | dist-ssr 15 | coverage 16 | *.local 17 | 18 | /cypress/videos/ 19 | /cypress/screenshots/ 20 | 21 | # Editor directories and files 22 | .vscode/* 23 | !.vscode/extensions.json 24 | .idea 25 | *.suo 26 | *.ntvs* 27 | *.njsproj 28 | *.sln 29 | *.sw? 30 | -------------------------------------------------------------------------------- /settings/setting.go: -------------------------------------------------------------------------------- 1 | package setting 2 | 3 | import "wailstemplate/application/db/entity" 4 | 5 | const Version = "v1.1.0" 6 | 7 | const AppName = "VitePressSimple" 8 | const GitRepo = "VitePressSimple" 9 | const GitAuthor = "zhangdi168" 10 | const WindowZipContainStr = "windows_" 11 | const MacosZipContainStr = "mac_" 12 | 13 | // EntityAutoMigrateList 自动迁移的实体列表 14 | // var EntityAutoMigrateList = []any{new(entity.User)} 15 | var EntityAutoMigrateList = []any{new(entity.Article)} 16 | -------------------------------------------------------------------------------- /vitepress-template/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | .vitepress/cache 10 | .vitepressBak 11 | 12 | node_modules 13 | .DS_Store 14 | dist-ssr 15 | coverage 16 | *.local 17 | 18 | /cypress/videos/ 19 | /cypress/screenshots/ 20 | 21 | # Editor directories and files 22 | .vscode/* 23 | !.vscode/extensions.json 24 | .idea 25 | *.suo 26 | *.ntvs* 27 | *.njsproj 28 | *.sln 29 | *.sw? 30 | -------------------------------------------------------------------------------- /application/pkg/myexcel/e_test.go: -------------------------------------------------------------------------------- 1 | // Package myexcel 2 | // @Author: zhangdi 3 | // @File: e_test 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/24 10:45 6 | package myexcel 7 | 8 | import ( 9 | "fmt" 10 | "testing" 11 | ) 12 | 13 | func TestMapToexcel(t *testing.T) { 14 | data := map[string]any{ 15 | "Name": "John22", 16 | "Age": 1, 17 | "Email": 88, 18 | } 19 | 20 | err := WriteMapToExcel(data, "output.xlsx") 21 | if err != nil { 22 | fmt.Println(err) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexArticleTreeSearch.vue: -------------------------------------------------------------------------------- 1 | 10 | 17 | 18 | -------------------------------------------------------------------------------- /frontend/src/store/demo.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | //这是一个简单的推荐store案例,可以在这里定义你的状态 3 | //新建pinia时把demo全局替换成你的store名字 4 | export interface demoStore { 5 | demoName: string; 6 | } 7 | export const useDemoStore = defineStore("demo", { 8 | state: (): demoStore => ({ 9 | demoName: "", 10 | }), 11 | actions: { 12 | setDemoName(name: string) { 13 | this.demoName = name; 14 | }, 15 | }, 16 | getters: { 17 | DemoName: (state) => state.demoName, 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexPopTerminal.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /application/first/task.go: -------------------------------------------------------------------------------- 1 | package first 2 | 3 | import ( 4 | "wailstemplate/application/pkg/mytask" 5 | ) 6 | 7 | // Manager 定时任务管理器 8 | var Manager *mytask.TaskManager 9 | 10 | // 定时任务在这里添加 11 | func taskAdd() { 12 | 13 | //使用示例如下: 14 | //spec := mytask.FormatEverySpace(0, 5, 0) 15 | //_, err := Manager.AddTask("同步统计数据到db", spec, SyncToDb) 16 | //if err != nil { 17 | // mylog.Error("初始化定时任务[同步统计数据到db]error:" + err.Error()) 18 | // return 19 | //} 20 | } 21 | 22 | // SyncToDb 定时同步 23 | func SyncToDb() { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /application/vitepress/parse_test.go: -------------------------------------------------------------------------------- 1 | package vitepress 2 | 3 | import ( 4 | "testing" 5 | "wailstemplate/application/vitepress/tsparser" 6 | ) 7 | 8 | func TestParseTsArray(t *testing.T) { 9 | s := `import { defineConfig } from "vitepress"; export const vpSimpleNav = [ 10 | { 11 | text: 'Home', 12 | link: '/', 13 | }, 14 | { 15 | text: 'About', 16 | link: '/about', 17 | }, 18 | { 19 | text: 'Contact', 20 | link: '/contact', 21 | }, 22 | ]` 23 | 24 | println(tsparser.GetTsDataContent(s, "[", "]", "export")) 25 | 26 | } 27 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/vpsimpler/VpConfig.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function ExistsVitepressDir(arg1:string):Promise; 5 | 6 | export function GetConfigPath():Promise; 7 | 8 | export function GetVpConfigData():Promise; 9 | 10 | export function RenameConfigName(arg1:string):Promise; 11 | 12 | export function ReplaceDefaultConfigContent(arg1:string,arg2:string):Promise; 13 | 14 | export function SaveConfig(arg1:string):Promise; 15 | -------------------------------------------------------------------------------- /application/pkg/utils/md5.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: md5 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/6 10:54 6 | package utils 7 | 8 | import ( 9 | "crypto/md5" 10 | "fmt" 11 | ) 12 | 13 | func MD5(str string) string { 14 | // 创建一个新的 MD5 哈希器对象。 15 | hasher := md5.New() 16 | 17 | // 将字符串转换成字节数组,并写入哈希器中。 18 | hasher.Write([]byte(str)) 19 | 20 | // 计算哈希值,并使用字符串格式化输出生成16进制字符串。 21 | return fmt.Sprintf("%x", hasher.Sum(nil)) 22 | //需要注意的是,由于我们只对传入字符串进行了哈希处理,而没有进行加盐或其他处理 23 | //(例如,使用多次迭代或慢哈希函数),因此可能会存在密码被破解等安全问题。 24 | //建议在实际开发中结合具体业务场景选择合适的加密方案来保障系统的安全性。 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/components/menuItem.vue: -------------------------------------------------------------------------------- 1 | 13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /application/pkg/where/func.go: -------------------------------------------------------------------------------- 1 | package where 2 | 3 | import "reflect" 4 | 5 | // ArrContains 它可以接收任何类型的切片和元素,并返回元素是否属于给定切片 6 | func arrContains(slice interface{}, item interface{}) bool { 7 | // 获取切片变量的类型 8 | switch reflect.TypeOf(slice).Kind() { 9 | // 判断切片类型是否是 Slice 或 Array 类型 10 | case reflect.Slice, reflect.Array: 11 | // 将 slice 转成反射对象 12 | s := reflect.ValueOf(slice) 13 | 14 | // 遍历反射对象中的元素 15 | for i := 0; i < s.Len(); i++ { 16 | // 比较当前元素和目标元素是否相等 17 | if reflect.DeepEqual(item, s.Index(i).Interface()) { 18 | return true 19 | } 20 | } 21 | } 22 | 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/StaticServer.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function ConvertFullPathToUrl(arg1:string):Promise; 5 | 6 | export function GetProjectStaticName():Promise; 7 | 8 | export function GetStaticBaseUrl():Promise; 9 | 10 | export function GetStaticFullDir():Promise; 11 | 12 | export function GetStaticImagesFullDir():Promise; 13 | 14 | export function StartStaticServer(arg1:string):Promise; 15 | 16 | export function UploadFile():Promise; 17 | -------------------------------------------------------------------------------- /frontend/src/configs/defaultVpSimple.ts: -------------------------------------------------------------------------------- 1 | //存储项目级的vpsimple软件配置 2 | import { VPSimpleConfig } from "@/types/vpsimpleConfig"; 3 | 4 | export const defaultVpSimple: VPSimpleConfig = { 5 | shellBaseDir: "", //shell运行目录 6 | gitBaseDir: "", //git运行目录 7 | cmdDocsDev: "npm run docs:dev", //启动文档开发服务 8 | cmdDocsBuild: "npm run docs:build", //打包文档 9 | cmdNpmInstall: "npm install", //启动文档服务 10 | cmdGitInit: "git init", //git init 11 | cmdGitPull: "git pull", //git pull 12 | cmdGitAdd: "git add .", 13 | cmdGitCommit: "git commit -m 'autoupdate'", 14 | cmdGitPush: "git push", //git add . + git commit + git push 15 | }; 16 | -------------------------------------------------------------------------------- /application/pkg/random/random.go: -------------------------------------------------------------------------------- 1 | // Package pkg 2 | // @Author: zhangdi 3 | // @File: random 4 | // @Version: 1.0.0 5 | // @Date: 2023/9/11 17:12 6 | package random 7 | 8 | import ( 9 | "math/rand" 10 | "time" 11 | ) 12 | 13 | const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 14 | 15 | func GenerateRandomString(minLength, maxLength int) string { 16 | rand.Seed(time.Now().UnixNano()) 17 | length := rand.Intn(maxLength-minLength+1) + minLength 18 | 19 | b := make([]byte, length) 20 | for i := range b { 21 | b[i] = letterBytes[rand.Intn(len(letterBytes))] 22 | } 23 | 24 | return string(b) 25 | } 26 | -------------------------------------------------------------------------------- /application/pkg/where/opts.go: -------------------------------------------------------------------------------- 1 | // Package where 2 | // @Author: zhangdi 3 | // @File: opts 4 | // @Version: 1.0.0 5 | // @Date: 2023/8/3 14:43 6 | package where 7 | 8 | // OptLike like查询,value传值示例 %12% 9 | const OptLike = "LIKE" 10 | 11 | // OptIn In查询,value 传值示例[]string{"Alice", "Bob", "Charlie" 12 | const OptIn = "IN" 13 | 14 | // OptBetween 传值示例[]int{1, 3},表示查找范围从1到3 15 | const OptBetween = "BETWEEN" 16 | 17 | // OptRepeat 调用示例 Opt("num",OptRepeat,1) 表示num字段重复数量大于1的所有数据 18 | 19 | const Greater = ">" 20 | const greaterEqual = ">=" 21 | const Less = "<" 22 | const LessEqual = "<=" 23 | const Equal = "=" 24 | 25 | //大于 小于 大于或等于 小于或等于 26 | -------------------------------------------------------------------------------- /application/pkg/mynet/check_connect_test.go: -------------------------------------------------------------------------------- 1 | // Package mynet 2 | // @Author: zhangdi 3 | // @File: ping_test 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/23 18:32 6 | package mynet 7 | 8 | import ( 9 | "fmt" 10 | "testing" 11 | ) 12 | 13 | func TestPing(t *testing.T) { 14 | err := CheckConnection() 15 | if err != nil { 16 | fmt.Println("网络连接不正常:", err) 17 | } else { 18 | fmt.Println("网络连接正常") 19 | } 20 | } 21 | 22 | func TestPingUrl(t *testing.T) { 23 | err := CheckConnectionWithUrl("http://baidu.com/api2121121", "80") 24 | if err != nil { 25 | fmt.Println("网络连接不正常:", err) 26 | } else { 27 | fmt.Println("网络连接正常") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /application/wailshelper/context.go: -------------------------------------------------------------------------------- 1 | // Package wailshelper 2 | // @Author: zhangdi 3 | // @File: context 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/19 18:54 6 | package wailshelper 7 | 8 | import ( 9 | "context" 10 | "time" 11 | ) 12 | 13 | var ctx *context.Context = nil 14 | var IsSetCtx = false 15 | 16 | // GetCtx 返回[副本]ctx 17 | func GetCtx() context.Context { 18 | if !IsSetCtx || ctx == nil { 19 | //等待2s后继续读取 20 | time.Sleep(time.Millisecond * time.Duration(2000)) 21 | } 22 | if ctx != nil { 23 | return *ctx 24 | } 25 | return nil 26 | } 27 | 28 | func SetCtx(ctx_ *context.Context) { 29 | IsSetCtx = true 30 | ctx = ctx_ 31 | } 32 | -------------------------------------------------------------------------------- /vitepress-template/.vitepress/config/custom.ts: -------------------------------------------------------------------------------- 1 | import mdItCustomAttrs from "markdown-it-custom-attrs"; 2 | 3 | export const CustomConfig = { 4 | head: [ 5 | [ 6 | "link", 7 | { 8 | rel: "stylesheet", 9 | href: "/plugins/bigimg/fancybox.css"//大图css 10 | } 11 | ], 12 | [ 13 | "script", 14 | { 15 | src: "/plugins/bigimg/fancybox.umd.js"//大图js 16 | } 17 | ] 18 | ], 19 | markdown: { 20 | config: (md) => { 21 | // use more markdown-it plugins! 22 | md.use(mdItCustomAttrs, "image", { 23 | "data-fancybox": "gallery" 24 | }); 25 | } 26 | } 27 | }; -------------------------------------------------------------------------------- /application/pkg/utils/var.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: var 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/29 18:32 6 | package utils 7 | 8 | import "strings" 9 | 10 | // VarLineToCamelCase 将下划线命名转成大驼峰命名 11 | func VarLineToCamelCase(s string) string { 12 | var result string 13 | 14 | // 分隔字符串并遍历每个部分 15 | parts := strings.Split(s, "_") 16 | for _, part := range parts { 17 | if len(part) == 0 { 18 | continue 19 | } 20 | 21 | // 将部分的第一个字符大写,其余字符保持不变 22 | firstChar := strings.ToUpper(part[0:1]) 23 | restChars := part[1:] 24 | 25 | // 拼接所有部分 26 | result += firstChar + restChars 27 | } 28 | 29 | return result 30 | } 31 | -------------------------------------------------------------------------------- /frontend/src/utils/deepClone.ts: -------------------------------------------------------------------------------- 1 | //递归深拷贝 支持含义function的对象 2 | export function DeepClone(obj: Record): Record { 3 | if (typeof obj !== "object" || obj === null) { 4 | return obj; 5 | } 6 | 7 | let cloneObj; 8 | 9 | // 判断对象是数组还是普通对象,创建相应的新对象 10 | if (Array.isArray(obj)) { 11 | cloneObj = []; 12 | } else { 13 | cloneObj = {}; 14 | } 15 | 16 | for (const key in obj) { 17 | // 使用 hasOwnProperty 方法判断 key 是否是自身属性 18 | if (Object.prototype.hasOwnProperty.call(obj, key)) { 19 | // @ts-ignore 20 | cloneObj[key] = DeepClone(obj[key]); // 递归调用深拷贝函数 21 | } 22 | } 23 | 24 | return cloneObj; 25 | } 26 | -------------------------------------------------------------------------------- /application/vitepress/vpsimpler/template.go: -------------------------------------------------------------------------------- 1 | package vpsimpler 2 | 3 | const ConfigContent = "import { CustomConfig } from \"./custom\";\nimport { VpSimpleConfig } from \"./vpsimple\";\n\nexport default {\n ...VpSimpleConfig,\n ...CustomConfig// custom config优先级更大\n};" 4 | const CustomContent = "export const CustomConfig = {\n // head: [],\n // markdown: {}\n};" 5 | 6 | // ConfigFile1 旧版本的配置文件路径 7 | const ConfigFile1 = ".vitepress/config.mts" 8 | const ConfigFile1Rename = ".vitepress/config_bak.mts" 9 | 10 | const ConfigFile = ".vitepress/config/index.ts" 11 | const VpsimpleFile = ".vitepress/config/vpsimple.ts" 12 | const CustomerFile = ".vitepress/config/custom.ts" 13 | -------------------------------------------------------------------------------- /frontend/wailsjs/runtime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wailsapp/runtime", 3 | "version": "2.0.0", 4 | "description": "Wails Javascript runtime library", 5 | "main": "runtime.js", 6 | "types": "runtime.d.ts", 7 | "scripts": { 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/wailsapp/wails.git" 12 | }, 13 | "keywords": [ 14 | "Wails", 15 | "Javascript", 16 | "Go" 17 | ], 18 | "author": "Lea Anthony ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/wailsapp/wails/issues" 22 | }, 23 | "homepage": "https://github.com/wailsapp/wails#readme" 24 | } 25 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/shell/ShellManager.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | import {shell} from '../models'; 4 | 5 | export function CreateShell():Promise; 6 | 7 | export function CreateShellAndRunCmd(arg1:string,arg2:string,arg3:boolean):Promise; 8 | 9 | export function Export(arg1:shell.NotifyShellData):Promise; 10 | 11 | export function RunCmd(arg1:string,arg2:string,arg3:number,arg4:boolean):Promise; 12 | 13 | export function RunCmdBySystem(arg1:string,arg2:string,arg3:number):Promise; 14 | 15 | export function StopShell(arg1:number):Promise; 16 | -------------------------------------------------------------------------------- /application/vitepress/vptype/sidebar.go: -------------------------------------------------------------------------------- 1 | package vptype 2 | 3 | // SidebarItem 表示侧边栏的一个单项 4 | type SidebarItem struct { 5 | // 文本标签 6 | Text string `json:"text,omitempty"` 7 | 8 | // 链接地址 9 | Link string `json:"link,omitempty"` 10 | 11 | // 子项列表 12 | Items []SidebarItem `json:"items,omitempty"` 13 | 14 | // 是否默认折叠。如果未指定,则该组不可折叠。 15 | // 如果为true,则该组可折叠且默认折叠 16 | // 如果为false,则该组可折叠但默认展开 17 | Collapsed bool `json:"collapsed,omitempty"` 18 | 19 | // 子项的基础路径 20 | Base string `json:"base,omitempty"` 21 | 22 | // 自定义显示在上一页/下一页页脚的文字 23 | DocFooterText string `json:"docFooterText,omitempty"` 24 | 25 | Rel string `json:"rel,omitempty"` 26 | Target string `json:"target,omitempty"` 27 | } 28 | -------------------------------------------------------------------------------- /application/pkg/utils/root.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: root 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/6 16:51 6 | package utils 7 | 8 | import ( 9 | "os" 10 | "path/filepath" 11 | ) 12 | 13 | // GetRootDir 获取当前程序运行的根目录 14 | func GetRootDir() string { 15 | //注意!!!go run 命令运行 Go 程序时,os.Executable() 函数返回的是 16 | //【一个临时文件的路径】,而不是程序最终生成的可执行文件的路径 17 | ex, err := os.Executable() 18 | if err != nil { 19 | panic(err) 20 | } 21 | root := filepath.Dir(ex) 22 | return root 23 | } 24 | 25 | // GetProgramName 获取当前运行程序的文件名如:a.exe 26 | func GetProgramName() string { 27 | ex, err := os.Executable() 28 | if err != nil { 29 | panic(err) 30 | } 31 | return filepath.Base(ex) 32 | } 33 | -------------------------------------------------------------------------------- /application/first/opencheck.go: -------------------------------------------------------------------------------- 1 | package first 2 | 3 | import ( 4 | "github.com/ncruces/zenity" 5 | "wailstemplate/application/constant/keys" 6 | "wailstemplate/application/pkg/cfg" 7 | ) 8 | 9 | // CheckCanOpen 返回true时可以打开 10 | func CheckCanOpen() bool { 11 | isOpen := cfg.GetBool(keys.ConfigKeySysProgramIsOpen) 12 | if !isOpen { 13 | cfg.Set(keys.ConfigKeySysProgramIsOpen, "yes") 14 | return true 15 | } 16 | //canOpenMany := cfg.GetBool(keys.ConfigKeySysProgramCanOpenMany) 17 | err := zenity.Question("检测到程序已经打开,是否重复打开", 18 | zenity.Icon(zenity.QuestionIcon), 19 | zenity.OKLabel("重复打开"), 20 | zenity.CancelLabel("取消打开")) 21 | if err != nil { 22 | return false //不重复打开 23 | } 24 | return true 25 | } 26 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/vpsimpler/VpManager.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function CopyTemplateFile(arg1, arg2) { 6 | return window['go']['vpsimpler']['VpManager']['CopyTemplateFile'](arg1, arg2); 7 | } 8 | 9 | export function CreateProject(arg1, arg2, arg3) { 10 | return window['go']['vpsimpler']['VpManager']['CreateProject'](arg1, arg2, arg3); 11 | } 12 | 13 | export function GetNodeVersion() { 14 | return window['go']['vpsimpler']['VpManager']['GetNodeVersion'](); 15 | } 16 | 17 | export function GetNpmVersion() { 18 | return window['go']['vpsimpler']['VpManager']['GetNpmVersion'](); 19 | } 20 | -------------------------------------------------------------------------------- /application/pkg/utils/arr.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: arr 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/18 14:01 6 | package utils 7 | 8 | import "reflect" 9 | 10 | // ArrContains 它可以接收任何类型的切片和元素,并返回元素是否属于给定切片 11 | func ArrContains(slice interface{}, item interface{}) bool { 12 | // 获取切片变量的类型 13 | switch reflect.TypeOf(slice).Kind() { 14 | // 判断切片类型是否是 Slice 或 Array 类型 15 | case reflect.Slice, reflect.Array: 16 | // 将 slice 转成反射对象 17 | s := reflect.ValueOf(slice) 18 | 19 | // 遍历反射对象中的元素 20 | for i := 0; i < s.Len(); i++ { 21 | // 比较当前元素和目标元素是否相等 22 | if reflect.DeepEqual(item, s.Index(i).Interface()) { 23 | return true 24 | } 25 | } 26 | } 27 | 28 | return false 29 | } 30 | -------------------------------------------------------------------------------- /.idea/wails2-template-vue.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /vitepress-template/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # https://vitepress.dev/reference/default-theme-home-page 3 | layout: home 4 | 5 | hero: 6 | name: "vitepress simple template" 7 | text: "A VitePress Site" 8 | tagline: My great project tagline 9 | actions: 10 | - theme: brand 11 | text: Markdown Examples 12 | link: /markdown-examples 13 | - theme: alt 14 | text: API Examples 15 | link: /api-examples 16 | 17 | features: 18 | - title: Feature A 19 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 20 | - title: Feature B 21 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 22 | - title: Feature C 23 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 24 | --- 25 | 26 | -------------------------------------------------------------------------------- /application/pkg/startup/service.go: -------------------------------------------------------------------------------- 1 | // Package startup 2 | // @Author: zhangdi 3 | // @File: service 4 | // @Version: 1.0.0 5 | // @Date: 2023/4/26 16:51 6 | package startup 7 | 8 | import ( 9 | "fmt" 10 | "path/filepath" 11 | "runtime" 12 | "wailstemplate/application/pkg/utils" 13 | ) 14 | 15 | // SetAutoStart 开机自启设置 16 | // enable 是否启用 17 | func SetAutoStart(appName string, enable bool) error { 18 | 19 | switch runtime.GOOS { 20 | case "windows": 21 | case "darwin": 22 | appPath := filepath.Join(utils.GetRootDir(), appName+".exe") 23 | if enable { 24 | return EnableAutoStart(appName, appPath) 25 | } else { 26 | return DisableAutoStart(appName) 27 | } 28 | break 29 | default: 30 | return fmt.Errorf("平台不支持") 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/ArticleTreeData.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | import {dto} from '../models'; 4 | 5 | export function CreateDir(arg1:string):Promise; 6 | 7 | export function CreateFile(arg1:string):Promise; 8 | 9 | export function DeletePath(arg1:string):Promise; 10 | 11 | export function Move(arg1:string,arg2:string):Promise; 12 | 13 | export function ParseTreeData(arg1:string):Promise>; 14 | 15 | export function ReadFileContent(arg1:string):Promise; 16 | 17 | export function Rename(arg1:string,arg2:string):Promise; 18 | 19 | export function WriteFileContent(arg1:string,arg2:string):Promise; 20 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/hashmap.json: -------------------------------------------------------------------------------- 1 | {"index.md":"BuUu-pA9","zh_使用手册_1.关于软件.md":"DGWojpP4","zh_使用手册_4.导航管理.md":"Du8XYE-z","en_使用手册_2.入门使用.md":"B99jdk7n","en_使用手册_4.导航管理.md":"i3gEwSzu","zh_使用手册_5.侧栏管理.md":"CAVU1Y2j","en_index.md":"SB2aZoYi","en_使用手册_6.软件设置.md":"3GYB_gLH","en_zh_使用手册_5.侧栏管理.md":"C_pnq5SA","zh_使用手册_3.项目配置.md":"B_McqDcn","en_zh_使用手册_3.项目配置.md":"-pPZ6_p_","en_zh_使用手册_1.关于软件.md":"CHQ-h0-c","zh_使用手册_6.软件设置.md":"Cx36hS5e","en_使用手册_1.关于软件.md":"BggO4lC8","en_zh_更新记录_v1.0.0.md":"szl-dyJH","en_使用手册_5.侧栏管理.md":"Bzj4H5Zr","en_zh_使用手册_6.软件设置.md":"BlZ_r3dw","en_zh_index.md":"BGr6qhB4","zh_更新记录_v1.0.0.md":"Him7IZ1f","zh_使用手册_2.入门使用.md":"CNNhJ-ge","en_更新记录_v1.0.0.md":"CeiZrSiq","en_zh_使用手册_4.导航管理.md":"CRaXgXI2","en_zh_使用手册_2.入门使用.md":"BQzakXh6","zh_index.md":"DzpeDMYl","en_使用手册_3.项目配置.md":"CjJrTWXx"} 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_更新记录_v1.0.0.md.CeiZrSiq.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,c as t,o as i,a4 as a}from"./chunks/framework.71dsLfGE.js";const f=JSON.parse('{"title":"更新记录","description":"","frontmatter":{"title":"更新记录","description":"","navbar":true,"sideBar":true,"footer":false,"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"outline":[1,3]},"headers":[],"relativePath":"en/更新记录/v1.0.0.md","filePath":"en/更新记录/v1.0.0.md"}'),o={name:"en/更新记录/v1.0.0.md"},n=a("",10),r=[n];function l(s,u,c,d,h,p){return i(),t("div",null,r)}const g=e(o,[["render",l]]);export{f as __pageData,g as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_更新记录_v1.0.0.md.Him7IZ1f.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.71dsLfGE.js";const m=JSON.parse('{"title":"更新记录","description":"","frontmatter":{"title":"更新记录","description":"","navbar":true,"sideBar":true,"footer":false,"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"outline":[1,3]},"headers":[],"relativePath":"zh/更新记录/v1.0.0.md","filePath":"zh/更新记录/v1.0.0.md"}'),l={name:"zh/更新记录/v1.0.0.md"},o=i("",10),r=[o];function s(d,n,c,h,u,_){return t(),a("div",null,r)}const v=e(l,[["render",s]]);export{m as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /frontend/src/components/iconBtn.vue: -------------------------------------------------------------------------------- 1 | 17 | 29 | 30 | -------------------------------------------------------------------------------- /frontend/src/utils/Toast.ts: -------------------------------------------------------------------------------- 1 | import { message } from "ant-design-vue"; 2 | import { IsEmptyValue } from "@/utils/utils"; 3 | 4 | export function ToastInfo(msg: string) { 5 | message.info(msg); 6 | } 7 | 8 | export function ToastError(msg: string) { 9 | if (IsEmptyValue(msg.trim())) return; 10 | message.error(msg); 11 | } 12 | 13 | export function ToastSuccess(msg: string) { 14 | if (IsEmptyValue(msg.trim())) return; 15 | message.success(msg); 16 | } 17 | 18 | //根据message是否为空字符串判断是否成功 19 | export const ToastCheck = ( 20 | message: string, 21 | successText: string = "操作成功", 22 | ) => { 23 | if (message == "" && successText != "") { 24 | ToastSuccess(successText); 25 | return true; 26 | } else { 27 | ToastError(message); 28 | return false; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_更新记录_v1.0.0.md.szl-dyJH.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.71dsLfGE.js";const m=JSON.parse('{"title":"更新记录","description":"","frontmatter":{"title":"更新记录","description":"","navbar":true,"sideBar":true,"footer":false,"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"outline":[1,3]},"headers":[],"relativePath":"en/zh/更新记录/v1.0.0.md","filePath":"en/zh/更新记录/v1.0.0.md"}'),l={name:"en/zh/更新记录/v1.0.0.md"},o=i("",10),r=[o];function n(s,d,c,h,u,_){return t(),a("div",null,r)}const v=e(l,[["render",n]]);export{m as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /application/pkg/mytask/run_test.go: -------------------------------------------------------------------------------- 1 | // Package mytask 2 | // @Author: zhangdi 3 | // @File: helper 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/16 13:08 6 | package mytask 7 | 8 | import ( 9 | "fmt" 10 | "testing" 11 | "time" 12 | ) 13 | 14 | func TestRun(t *testing.T) { 15 | task := NewTaskManager() 16 | 17 | //每隔10秒执行一次 18 | spec1 := FormatEverySpace(0, 0, 10) 19 | task.AddTask("every_10s", spec1, func() { 20 | //mylog.Task("定时任务被执行") 21 | fmt.Println("every_10s", time.Now().UTC().Format("2006-01-02 15:04:05")) 22 | }) 23 | 24 | //每天的某点执行 25 | task.AddTask("every_day_15_15", FormatEveryDay(15, 31, 10), func() { 26 | //mylog.Task("【every_day_15_15】定时任务被执行") 27 | fmt.Println("每天的某点执行", time.Now().Format("2006-01-02 15:04:05")) 28 | }) 29 | 30 | // 保持主程序运行 31 | select {} 32 | } 33 | -------------------------------------------------------------------------------- /application/mytest/server_test.go: -------------------------------------------------------------------------------- 1 | package mytest 2 | 3 | import ( 4 | "path/filepath" 5 | "testing" 6 | "wailstemplate/application/pkg/cfg" 7 | "wailstemplate/application/pkg/utils" 8 | "wailstemplate/application/services" 9 | setting "wailstemplate/settings" 10 | ) 11 | 12 | func TestServer(t *testing.T) { 13 | initData() 14 | StaticServerInstance := services.NewStaticServer() 15 | //StaticServerInstance.StartStaticServer("") 16 | StaticServerInstance.StartStaticServer("") 17 | select {} 18 | } 19 | 20 | func initData() { 21 | err := cfg.InitCfg(filepath.Join(utils.GetUserHomeDir(), setting.AppName, "configs.yaml")) 22 | if err != nil { 23 | println(err.Error()) 24 | return 25 | } 26 | 27 | //cfg.SetDefault(constant.ConfigKeyXKUserCylinderTypeId, "qUUA+OwjWVrHDG7NmUy9EA==") 28 | } 29 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /application/pkg/filehelper/dir.go: -------------------------------------------------------------------------------- 1 | package filehelper 2 | 3 | import ( 4 | "io" 5 | "os" 6 | "path/filepath" 7 | ) 8 | 9 | // 10 | 11 | // CopyFolder 复制文件夹 12 | func CopyFolder(src, dst string) error { 13 | return filepath.Walk(src, func(path string, info os.FileInfo, err error) error { 14 | if err != nil { 15 | return err 16 | } 17 | 18 | relPath := path[len(src):] 19 | 20 | if info.IsDir() { 21 | return os.MkdirAll(dst+relPath, info.Mode()) 22 | } 23 | 24 | in, err := os.Open(path) 25 | if err != nil { 26 | return err 27 | } 28 | defer in.Close() 29 | 30 | out, err := os.Create(dst + relPath) 31 | if err != nil { 32 | return err 33 | } 34 | defer out.Close() 35 | 36 | _, err = io.Copy(out, in) 37 | return err 38 | }) 39 | } 40 | -------------------------------------------------------------------------------- /frontend/src/types/hero.ts: -------------------------------------------------------------------------------- 1 | export interface Hero { 2 | // `text` 上方的字符,带有品牌颜色 3 | // 预计简短,例如产品名称 4 | name?: string; 5 | 6 | // hero 部分的主要文字, 7 | // 被定义为 `h1` 标签 8 | text: string; 9 | 10 | // `text` 下方的标语 11 | tagline?: string; 12 | 13 | // text 和 tagline 区域旁的图片 14 | image?: ThemeableImage; 15 | 16 | // 主页 hero 部分的操作按钮 17 | actions?: HeroAction[]; 18 | } 19 | 20 | export type ThemeableImage = 21 | | string 22 | | { src: string; alt?: string } 23 | | { light: string; dark: string; alt?: string }; 24 | 25 | export interface HeroAction { 26 | // 按钮的颜色主题,默认为 `brand` 27 | theme?: "brand" | "alt"; 28 | 29 | // 按钮的标签 30 | text: string; 31 | 32 | // 按钮的目标链接 33 | link: string; 34 | 35 | // 链接的 target 属性 36 | target?: string; 37 | 38 | // 链接的 rel 属性 39 | rel?: string; 40 | } 41 | -------------------------------------------------------------------------------- /frontend/src/views/setting/setting.vue: -------------------------------------------------------------------------------- 1 | 20 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | -------------------------------------------------------------------------------- /application/pkg/myreflect/get_struct_json.go: -------------------------------------------------------------------------------- 1 | // Package myreflect 2 | // @Author: zhangdi 3 | // @File: get_struct_json 4 | // @Version: 1.0.0 5 | // @Date: 2023/10/20 14:44 6 | package myreflect 7 | 8 | import ( 9 | "reflect" 10 | "strings" 11 | ) 12 | 13 | // GetJSONTags 获取该结构体所有字段的json标签值放到字符串数组 14 | // 传入指针地址 如 &Persion{} 15 | func GetJSONTags(s interface{}) []string { 16 | var tags []string 17 | //v := reflect.ValueOf(s) 18 | t := reflect.TypeOf(s).Elem() 19 | for i := 0; i < t.NumField(); i++ { 20 | field := t.Field(i) 21 | jsonTag := field.Tag.Get("json") 22 | val := "" 23 | if jsonTag == "" { 24 | //不存在则取字段名 25 | val = field.Name 26 | } else { 27 | jsonTagArr := strings.Split(jsonTag, ",") 28 | val = jsonTagArr[0] 29 | } 30 | 31 | tags = append(tags, val) 32 | } 33 | return tags 34 | } 35 | -------------------------------------------------------------------------------- /frontend/src/configs/defaultFrontMatter.ts: -------------------------------------------------------------------------------- 1 | export const defaultFrontMatter: any = { 2 | title: "", //页面标题 3 | description: "", //页面描述 4 | navbar: true, //是否显示导航 5 | sideBar: true, //是否显示侧栏 6 | footer: false, //是否显示页脚 7 | outline: [1, 3], //是否显示页脚 8 | editLink: false, //是否显示编辑链接 9 | lastUpdated: true, //是否显示页脚更新时间 10 | aside: "right", //大纲显示位置--默认右边 11 | layout: "doc", //页面类型 12 | custom: {}, //用户自定义变量 13 | //主页 14 | hero: { 15 | image: { 16 | src: "", 17 | alt: "", 18 | width: "", 19 | height: "", 20 | }, 21 | name: "VitePressSimple", 22 | text: "quick to config vitePress", 23 | description: "", 24 | tagline: "", //下方标语 25 | actions: [], 26 | features: [], //功能列表 27 | head: [], //页面类型 28 | // prev: "上一页", 29 | // next: "", 30 | }, //用户自定义变量 31 | }; 32 | -------------------------------------------------------------------------------- /vitepress-template/.vitepress/config/vpsimple.ts: -------------------------------------------------------------------------------- 1 | export const VpSimpleConfig = { 2 | title: "vitepress-demo", 3 | description: "A VitePress Site", 4 | srcDir: "./docs", 5 | themeConfig: { 6 | nav: [ 7 | { 8 | text: "Home", 9 | link: "/" 10 | }, 11 | { 12 | text: "About", 13 | link: "/about" 14 | }, 15 | { 16 | text: "Contact", 17 | link: "/contact" 18 | } 19 | ], 20 | sidebar: [ 21 | { 22 | text: "Examples", 23 | items: [ 24 | { text: "Markdown Examples", link: "/markdown-examples" }, 25 | { text: "Runtime API Examples", link: "/api-examples" } 26 | ] 27 | } 28 | ], 29 | socialLinks: [ 30 | { icon: "github", link: "https://github.com/vuejs/vitepress" } 31 | ] 32 | } 33 | }; -------------------------------------------------------------------------------- /application/db/dbdto/article.go: -------------------------------------------------------------------------------- 1 | package dbdto 2 | 3 | import "time" 4 | 5 | type ArticleCreate struct { 6 | Title string `json:"title" binding:"required"` 7 | Content string `json:"content" binding:"required"` 8 | } 9 | type ArticleUpdate struct { 10 | ID uint `json:"id" binding:"required"` 11 | Title string `json:"title" binding:"required"` 12 | Content string `json:"content" binding:"required"` 13 | } 14 | type ArticleInfo struct { 15 | ID uint `json:"id" binding:"required"` 16 | Title string `json:"title" binding:"required"` 17 | Content string `json:"content" binding:"required"` 18 | CreatedAt time.Time `json:"created_at" binding:"required"` 19 | UpdatedAt time.Time `json:"updated_at" binding:"required"` 20 | } 21 | 22 | type ArticleDelete struct { 23 | ID uint `json:"id" binding:"required"` 24 | } 25 | -------------------------------------------------------------------------------- /frontend/src/store/nav.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from "pinia"; 2 | import { useIndexStore } from "@/store/index"; 3 | 4 | export interface navStore { 5 | activeName: string; //当前选中的导航 6 | activePath: string; //当前选中的导航路径 7 | } 8 | 9 | export const useNavStore = defineStore("nav", { 10 | state: (): navStore => ({ 11 | activeName: "index", 12 | activePath: "/", 13 | }), 14 | actions: { 15 | setActiveNav(path: string, name: string) { 16 | this.activeName = name; 17 | this.activePath = path; 18 | const indexStore = useIndexStore(); 19 | indexStore.clearCurrData(); 20 | }, 21 | isActiveNav(name: string) { 22 | return this.activeName === name; 23 | }, 24 | }, 25 | getters: { 26 | ActiveName: (state) => state.activeName, 27 | ActivePath: (state) => state.activePath, 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /application/db/dbinit/fixed.go: -------------------------------------------------------------------------------- 1 | // Package dbinit 2 | // @Author: zhangdi 3 | // @File: fixed 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/22 15:15 6 | package dbinit 7 | 8 | import ( 9 | "gorm.io/gorm" 10 | "log" 11 | "path/filepath" 12 | ) 13 | 14 | var fixedDb *gorm.DB 15 | 16 | // GetFixedDb 获取固定数据的示例 17 | func GetFixedDb() *gorm.DB { 18 | db := *fixedDb 19 | return &db 20 | } 21 | 22 | // 固定的数据 不跟随年份的改变而改变,也就是不管哪一年都在同一库同一个文件中保存 23 | func initFixedDb(baseDir string, migrateEntityList []any) { 24 | // 固定数据,不管哪年都能查到 25 | dbFile := filepath.Join(baseDir, "fixed.db") 26 | //获取一个实例化对象 27 | var err error 28 | fixedDb, err = NewDbInstance(dbFile) 29 | if err != nil { 30 | log.Println(err.Error()) 31 | } 32 | 33 | //迁移固定表: 34 | err = fixedDb.AutoMigrate(migrateEntityList...) 35 | if err != nil { 36 | log.Println(err.Error()) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /api-examples.md: -------------------------------------------------------------------------------- 1 | --- 2 | outline: deep 3 | --- 4 | 5 | # Runtime API Examples 6 | 7 | This page demonstrates usage of some of the runtime APIs provided by VitePress. 8 | 9 | The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: 10 | 11 | ```md 12 | 13 | 14 | ## Results 15 | 16 | ### Theme Data 17 |
{{ theme }}
18 | 19 | ### Page Data 20 |
{{ page }}
21 | 22 | ### Page Frontmatter 23 |
{{ frontmatter }}
24 | ``` 25 | 26 | ## Results 27 | 28 | ### Theme Data 29 |
{{ theme }}
30 | 31 | ### Page Data 32 |
{{ page }}
33 | 34 | ### Page Frontmatter 35 |
{{ frontmatter }}
36 | 37 | ## More 38 | 39 | Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). 40 | -------------------------------------------------------------------------------- /frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // "extends": "@vue/tsconfig/tsconfig.web.json", 3 | // "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 5 | 6 | "compilerOptions": { 7 | "baseUrl": ".", 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | }, 11 | "allowSyntheticDefaultImports": true, 12 | "target": "ESNext", 13 | "useDefineForClassFields": true, 14 | "module": "ESNext", 15 | "moduleResolution": "Node", 16 | "strict": true, 17 | "jsx": "preserve", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "esModuleInterop": true, 21 | "lib": ["ESNext", "DOM"], 22 | "skipLibCheck": true, 23 | "noEmit": true 24 | }, 25 | 26 | "references": [ 27 | { 28 | "path": "./tsconfig.config.json" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_3.项目配置.md.CjJrTWXx.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,a,b as t,c as i}from"./chunks/3ccd078e-66ee-42cd-8136-f351d18ce95c.BwvngEhN.js";import{_ as o,c as n,o as s,a4 as r}from"./chunks/framework.71dsLfGE.js";const S=JSON.parse('{"title":"3.项目配置","description":"","frontmatter":{"title":"3.项目配置","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/3.项目配置.md","filePath":"en/使用手册/3.项目配置.md"}'),c={name:"en/使用手册/3.项目配置.md"},l=r("",15),d=[l];function u(g,h,p,f,m,_){return s(),n("div",null,d)}const q=o(c,[["render",u]]);export{S as __pageData,q as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_3.项目配置.md.B_McqDcn.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a,a as e,b as t,c as r}from"./chunks/3ccd078e-66ee-42cd-8136-f351d18ce95c.BwvngEhN.js";import{_ as i,c as o,o as s,a4 as c}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"3.项目配置","description":"","frontmatter":{"title":"3.项目配置","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/3.项目配置.md","filePath":"zh/使用手册/3.项目配置.md"}'),n={name:"zh/使用手册/3.项目配置.md"},d=c("",15),p=[d];function l(_,h,m,f,u,b){return s(),o("div",null,p)}const k=i(n,[["render",l]]);export{P as __pageData,k as default}; 2 | -------------------------------------------------------------------------------- /frontend/src/utils/parse.ts: -------------------------------------------------------------------------------- 1 | //匹配script标签正则表达式 2 | export const regexScript: RegExp = /]*>([\s\S]*?)<\/script>/g; 3 | //匹配style标签正则表达式 4 | export const regexStyle: RegExp = /]*>([\s\S]*?)<\/style>/g; 5 | export const parseTagContent = (markdownText: string, regex: RegExp) => { 6 | // 首先替换被 ``` 包围的多行代码块 7 | markdownText = markdownText.replace(/```[^\n]*\n([\s\S]*?)\n```/gs, ""); 8 | // 然后替换被 ` 包围的单行代码块 9 | markdownText = markdownText.replace(/`[^`]*`/g, ""); 10 | // 使用正则表达式匹配非代码块内的script标签 11 | // const regex = /]*>([\s\S]*?)<\/script>/g; 12 | const results = []; 13 | let match; 14 | while ((match = regex.exec(markdownText)) !== null) { 15 | // console.log(match, "-----match value"); 16 | //match[0]是包含标签的字符串 match[1]是标签内容(不包含标签) 17 | results.push(match[0]); // 输出:alert("Hello, world!"); 18 | } 19 | return results; 20 | }; 21 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_3.项目配置.md.-pPZ6_p_.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a,a as e,b as t,c as r}from"./chunks/3ccd078e-66ee-42cd-8136-f351d18ce95c.BwvngEhN.js";import{_ as i,c as o,o as s,a4 as c}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"3.项目配置","description":"","frontmatter":{"title":"3.项目配置","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/3.项目配置.md","filePath":"en/zh/使用手册/3.项目配置.md"}'),n={name:"en/zh/使用手册/3.项目配置.md"},d=c("",15),p=[d];function l(_,h,m,f,u,b){return s(),o("div",null,p)}const k=i(n,[["render",l]]);export{P as __pageData,k as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_1.关于软件.md.BggO4lC8.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e}from"./chunks/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.CVFl_2j9.js";import{_ as t,c as o,o as a,a4 as i}from"./chunks/framework.71dsLfGE.js";const _=JSON.parse('{"title":"1.关于软件","description":"关于VitepressSimple","frontmatter":{"title":"1.关于软件","description":"关于VitepressSimple","navbar":true,"sideBar":true,"footer":false,"outline":[1,"3"],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/1.关于软件.md","filePath":"en/使用手册/1.关于软件.md"}'),r={name:"en/使用手册/1.关于软件.md"},n=i("",15),s=[n];function l(c,d,p,h,f,u){return a(),o("div",null,s)}const b=t(r,[["render",l]]);export{_ as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_1.关于软件.md.DGWojpP4.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e}from"./chunks/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.CVFl_2j9.js";import{_ as t,c as a,o as r,a4 as s}from"./chunks/framework.71dsLfGE.js";const f=JSON.parse('{"title":"1.关于软件","description":"关于VitepressSimple","frontmatter":{"title":"1.关于软件","description":"关于VitepressSimple","navbar":true,"sideBar":true,"footer":false,"outline":[1,"3"],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/1.关于软件.md","filePath":"zh/使用手册/1.关于软件.md"}'),i={name:"zh/使用手册/1.关于软件.md"},o=s("",16),p=[o];function n(c,l,d,h,_,m){return r(),a("div",null,p)}const b=t(i,[["render",n]]);export{f as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_1.关于软件.md.CHQ-h0-c.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e}from"./chunks/7a9fa3d2-4f65-457b-bd7b-cc14d50129b6.CVFl_2j9.js";import{_ as t,c as a,o as r,a4 as s}from"./chunks/framework.71dsLfGE.js";const f=JSON.parse('{"title":"1.关于软件","description":"关于VitepressSimple","frontmatter":{"title":"1.关于软件","description":"关于VitepressSimple","navbar":true,"sideBar":true,"footer":false,"outline":[1,"3"],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/1.关于软件.md","filePath":"en/zh/使用手册/1.关于软件.md"}'),i={name:"en/zh/使用手册/1.关于软件.md"},o=s("",16),n=[o];function p(c,l,d,h,_,m){return r(),a("div",null,n)}const b=t(i,[["render",p]]);export{f as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /application/pkg/myexcel/map_excel.go: -------------------------------------------------------------------------------- 1 | // Package myexcel 2 | // @Author: zhangdi 3 | // @File: map_excel 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/24 10:44 6 | package myexcel 7 | 8 | import ( 9 | "fmt" 10 | ) 11 | 12 | func WriteMapToExcel(data map[string]any, savePath string) error { 13 | // 创建一个新的Excel文件 14 | f := excelize.NewFile() 15 | 16 | // 设置工作表名称为"Sheet1" 17 | index, _ := f.NewSheet("Sheet1") 18 | 19 | row := 1 20 | // 将map的键和值写入Excel的第一列和第二列 21 | for key, value := range data { 22 | // 写入第一列(A列) 23 | cell := fmt.Sprintf("A%d", row) 24 | f.SetCellValue("Sheet1", cell, key) 25 | 26 | // 写入第二列(B列) 27 | cell = fmt.Sprintf("B%d", row) 28 | f.SetCellValue("Sheet1", cell, value) 29 | 30 | row++ 31 | } 32 | 33 | // 设置活动工作表为"Sheet1" 34 | f.SetActiveSheet(index) 35 | 36 | // 保存Excel文件 37 | err := f.SaveAs(savePath) 38 | if err != nil { 39 | return err 40 | } 41 | 42 | return nil 43 | } 44 | -------------------------------------------------------------------------------- /frontend/src/configs/defaultLangConfig.ts: -------------------------------------------------------------------------------- 1 | export const defaultThemeConfig: any = { 2 | langMenuLabel: "多语言", 3 | returnToTopLabel: "回到顶部", 4 | sidebarMenuLabel: "菜单", 5 | darkModeSwitchLabel: "主题", 6 | lightModeSwitchTitle: "切换到浅色模式", 7 | darkModeSwitchTitle: "切换到深色模式", 8 | externalLinkIcon: true, //外部连接显示图标 9 | 10 | //编辑链接 11 | editLink: { 12 | text: "Edit this page on GitHub", 13 | pattern: 14 | "https://github.com/zhangdi168/VitePressSimple/edit/main/docs/:path", 15 | }, 16 | //页脚 17 | docFooter: { 18 | prev: "Previous page", 19 | next: "Next Page", 20 | }, 21 | nav: [], //导航 22 | //侧边栏 23 | sidebar: {}, 24 | i18nRouting: true, 25 | //站点标题 26 | siteTitle: "VitePressSimple", 27 | //页脚配置 28 | footer: { 29 | message: "", 30 | copyright: "", 31 | }, 32 | }; 33 | 34 | export const defaultLangConfig: any = { 35 | themeConfig: defaultThemeConfig, 36 | }; 37 | -------------------------------------------------------------------------------- /frontend/src/views/index/index.vue: -------------------------------------------------------------------------------- 1 | 22 | 30 | -------------------------------------------------------------------------------- /frontend/src/components/simSwitch.vue: -------------------------------------------------------------------------------- 1 | 21 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /application/vitepress/vpsimpler/check.go: -------------------------------------------------------------------------------- 1 | package vpsimpler 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | ) 7 | 8 | func NodejsIsInstall() bool { 9 | output, err := exec.Command("node", "-v").Output() 10 | if err != nil { 11 | return false 12 | } 13 | fmt.Println(string(output)) 14 | return true 15 | } 16 | 17 | // GetNodeVersion 获取nodejs版本 v18.17.1 18 | func GetNodeVersion() string { 19 | output, err := exec.Command("node", "-v").Output() 20 | if err != nil { 21 | return "" 22 | } 23 | return string(output) 24 | } 25 | 26 | // GetNpmVersion 获取npm版本 27 | func GetNpmVersion() string { 28 | output, err := exec.Command("npm", "-v").Output() 29 | if err != nil { 30 | return "" 31 | } 32 | return string(output) 33 | } 34 | 35 | func NpmIsInstall() bool { 36 | output, err := exec.Command("npm", "version").Output() 37 | if err != nil { 38 | return false 39 | } 40 | fmt.Println(string(output)) 41 | return true 42 | } 43 | -------------------------------------------------------------------------------- /frontend/src/types/features.ts: -------------------------------------------------------------------------------- 1 | export interface Feature { 2 | // 在每个 feature 框中显示图标 3 | icon?: FeatureIcon; 4 | 5 | // feature 的标题 6 | title: string; 7 | 8 | // feature 的详情 9 | details: string; 10 | 11 | // 点击 feature 组件时的链接,可以是内部链接,也可以是外部链接。 12 | // 13 | // 14 | // 例如 `guide/reference/default-theme-home-page` 或 `https://example.com` 15 | link?: string; 16 | 17 | // feature 组件内显示的链接文本,最好与 `link` 选项一起使用 18 | // 19 | // 20 | // 例如 `Learn more`, `Visit page` 等 21 | linkText?: string; 22 | 23 | // `link` 选项的链接 rel 属性 24 | // 25 | // 例如 `external` 26 | rel?: string; 27 | 28 | // `link` 选项的链接 target 属性 29 | target?: string; 30 | } 31 | 32 | export type FeatureIcon = 33 | | string 34 | | { src: string; alt?: string; width?: string; height: string } 35 | | { 36 | light: string; 37 | dark: string; 38 | alt?: string; 39 | width?: string; 40 | height: string; 41 | }; 42 | -------------------------------------------------------------------------------- /application/services/shell/shell_unix.go: -------------------------------------------------------------------------------- 1 | //go:build linux || darwin 2 | 3 | package shell 4 | 5 | import ( 6 | "context" 7 | "os/exec" 8 | ) 9 | 10 | // RunCmd 运行一个cmd对象,返回cmd对象下标 11 | func (s *ShellService) RunCmd(cmdString string, baseDir string, isAlone bool) string { 12 | s.isRunning = true 13 | s.isAlone = isAlone 14 | 15 | s.ctx, s.cancel = context.WithCancel(context.Background()) 16 | name, newCmdArr := parseCmd(cmdString) //解析命令 17 | cmd := exec.CommandContext(s.ctx, name, newCmdArr...) 18 | cmd.Dir = baseDir 19 | s.cmd = cmd 20 | s.printCmdOutput() 21 | return "" 22 | } 23 | 24 | // RunCmdBySystem 调用系统自带的shell运行命令 25 | func (s *ShellService) RunCmdBySystem(cmdString string, baseDir string) string { 26 | 27 | // 定义要执行的命令 28 | //var cmd *exec.Cmd 29 | s.cmd = exec.Command("sh", "-c", cmdString) 30 | s.cmd.Dir = baseDir 31 | 32 | // 启动命令 33 | err := s.cmd.Start() 34 | if err != nil { 35 | return err.Error() 36 | } 37 | return "" 38 | } 39 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/chunks/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.CMb43z0y.js: -------------------------------------------------------------------------------- 1 | const a="/static/8296bf0d-c76e-4517-a526-b42da4378c6a.D-R2qc24.png",c="/static/2979d5e6-249d-4bed-8e48-8b771fc25320.BQKqBlls.png",s="/static/5f965c09-30e7-400a-92fe-676e7599c0b2.Bxoj2_VA.png",t="/static/22756e46-f240-47d6-a8aa-d4a464bda7a6.DrRkyTsy.png",b="/static/39137c1d-ddb5-47a1-a988-7cfd3ba8be96.BgH1TIPD.png",i="/static/fcc07337-7585-481b-a6d0-5a6b5ee3d01a.AYtrL-Ui.png",o="/static/b485c946-be26-4eec-a0a8-ad3f3aea2cf5.D3yvS8XQ.png",_="/static/3c63f22b-856b-4db1-9b34-d3c2e1e40492.CmAvE7eV.png",d="/static/7d8c870c-bf8b-45a1-bfb9-51c380c844cb.B5vRYeDy.png",e="/static/f291c8df-b59a-4c23-89d0-7a6fa514661c.ZKO9TfMg.png",p="/static/c1fa199a-8271-473e-899f-635df0f7d494.C5xgF0UN.png",f="/static/95c8f4e2-0e60-4dc7-9fab-cc86352a858e.wV973ch9.png",n="/static/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.BqaMPQW4.png";export{a as _,c as a,s as b,t as c,b as d,i as e,o as f,_ as g,d as h,e as i,p as j,f as k,n as l}; 2 | -------------------------------------------------------------------------------- /data/logs/2024-03-11/ERROR.csv: -------------------------------------------------------------------------------- 1 | 类型,日志等级,写入时间,日志内容 2 | SYSTEM,ERROR,2024-03-11 21:00:12,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 3 | SYSTEM,ERROR,2024-03-11 21:00:14,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 4 | SYSTEM,ERROR,2024-03-11 21:12:53,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 5 | SYSTEM,ERROR,2024-03-11 21:13:50,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 6 | SYSTEM,ERROR,2024-03-11 21:15:04,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 7 | SYSTEM,ERROR,2024-03-11 21:17:42,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 8 | SYSTEM,ERROR,2024-03-11 21:20:37,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 9 | SYSTEM,ERROR,2024-03-11 21:20:52,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 10 | SYSTEM,ERROR,2024-03-11 21:27:25,解析文件夹树open E:\mydev\vitepress-demo\guide: no such file or directory 11 | -------------------------------------------------------------------------------- /docs/zh/使用手册/6.软件设置.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 介绍 36 | 37 | ![8286944ec79b4bbe83d54902316dc593.png](/vpstatic/images/20240415/8286944e-c79b-4bbe-83d5-4902316dc593.png) 38 | 39 | 软件设置的如上 40 | 41 | 编辑器cdn:如果软件的编辑器显示不出来可以尝试**切换cdn并重启软件** 42 | -------------------------------------------------------------------------------- /docs/en/zh/使用手册/6.软件设置.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 介绍 36 | 37 | ![8286944ec79b4bbe83d54902316dc593.png](/vpstatic/images/20240415/8286944e-c79b-4bbe-83d5-4902316dc593.png) 38 | 39 | 软件设置的如上 40 | 41 | 编辑器cdn:如果软件的编辑器显示不出来可以尝试**切换cdn并重启软件** 42 | -------------------------------------------------------------------------------- /docs/zh/使用手册/4.导航管理.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "VitepressSimple使用教程--4.导航管理", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 界面 36 | 37 | ![ca703e2445444c7d98e66021bd42a3d8.png](/vpstatic/images/20240415/ca703e24-4544-4c7d-98e6-6021bd42a3d8.png) 38 | 39 | 导航设置界面如上图所示 40 | 41 | 目前最多支持到三级导航 42 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/vpsimpler/VpConfig.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function ExistsVitepressDir(arg1) { 6 | return window['go']['vpsimpler']['VpConfig']['ExistsVitepressDir'](arg1); 7 | } 8 | 9 | export function GetConfigPath() { 10 | return window['go']['vpsimpler']['VpConfig']['GetConfigPath'](); 11 | } 12 | 13 | export function GetVpConfigData() { 14 | return window['go']['vpsimpler']['VpConfig']['GetVpConfigData'](); 15 | } 16 | 17 | export function RenameConfigName(arg1) { 18 | return window['go']['vpsimpler']['VpConfig']['RenameConfigName'](arg1); 19 | } 20 | 21 | export function ReplaceDefaultConfigContent(arg1, arg2) { 22 | return window['go']['vpsimpler']['VpConfig']['ReplaceDefaultConfigContent'](arg1, arg2); 23 | } 24 | 25 | export function SaveConfig(arg1) { 26 | return window['go']['vpsimpler']['VpConfig']['SaveConfig'](arg1); 27 | } 28 | -------------------------------------------------------------------------------- /docs/en/zh/使用手册/4.导航管理.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "VitepressSimple使用教程--4.导航管理", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 界面 36 | 37 | ![ca703e2445444c7d98e66021bd42a3d8.png](/vpstatic/images/20240415/ca703e24-4544-4c7d-98e6-6021bd42a3d8.png) 38 | 39 | 导航设置界面如上图所示 40 | 41 | 目前最多支持到三级导航 42 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexPopAddFeatures.vue: -------------------------------------------------------------------------------- 1 | 22 | 41 | 42 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/shell/ShellManager.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function CreateShell() { 6 | return window['go']['shell']['ShellManager']['CreateShell'](); 7 | } 8 | 9 | export function CreateShellAndRunCmd(arg1, arg2, arg3) { 10 | return window['go']['shell']['ShellManager']['CreateShellAndRunCmd'](arg1, arg2, arg3); 11 | } 12 | 13 | export function Export(arg1) { 14 | return window['go']['shell']['ShellManager']['Export'](arg1); 15 | } 16 | 17 | export function RunCmd(arg1, arg2, arg3, arg4) { 18 | return window['go']['shell']['ShellManager']['RunCmd'](arg1, arg2, arg3, arg4); 19 | } 20 | 21 | export function RunCmdBySystem(arg1, arg2, arg3) { 22 | return window['go']['shell']['ShellManager']['RunCmdBySystem'](arg1, arg2, arg3); 23 | } 24 | 25 | export function StopShell(arg1) { 26 | return window['go']['shell']['ShellManager']['StopShell'](arg1); 27 | } 28 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexEditorFooter.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /application/pkg/myreflect/to_map.go: -------------------------------------------------------------------------------- 1 | // Package myreflect 2 | // @Author: zhangdi 3 | // @File: to_map 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/14 18:45 6 | package myreflect 7 | 8 | import ( 9 | "fmt" 10 | "reflect" 11 | "strings" 12 | ) 13 | 14 | // StructToMap 将结构体(传入[非指针]类型)转成map key取传入的tag名,如json 15 | func StructToMap(s any, tagName string) map[string]string { 16 | result := make(map[string]string) 17 | 18 | // 通过反射获取结构体的类型和值 19 | t := reflect.TypeOf(s) 20 | v := reflect.ValueOf(s) 21 | 22 | // 遍历结构体字段 23 | for i := 0; i < t.NumField(); i++ { 24 | field := t.Field(i) 25 | value := v.Field(i) 26 | 27 | // 获取字段的json标签和值 28 | jsonTag := field.Tag.Get(tagName) 29 | tagValArr := strings.Split(jsonTag, ",") 30 | tagVal := jsonTag 31 | if len(tagValArr) > 0 { 32 | tagVal = tagValArr[0] 33 | } 34 | if tagVal == "" { 35 | tagVal = field.Name 36 | } 37 | fieldValue := fmt.Sprintf("%v", value.Interface()) 38 | 39 | result[tagVal] = fieldValue 40 | } 41 | 42 | return result 43 | } 44 | -------------------------------------------------------------------------------- /application/pkg/utils/dto.go: -------------------------------------------------------------------------------- 1 | // Package utils 2 | // @Author: zhangdi 3 | // @File: dto 4 | // @Version: 1.0.0 5 | // @Date: 2023/5/18 10:15 6 | package utils 7 | 8 | import "reflect" 9 | 10 | // DtoToEntity 将 DTO 转换成实体对象 11 | func DtoToEntity(dto interface{}, entity interface{}) { 12 | // 获取Dto对象和Entity对象的反射值 13 | dtoValue := reflect.ValueOf(dto).Elem() // dto必须传入一个指针类型 14 | entityValue := reflect.ValueOf(entity).Elem() // entity必须传入一个指针类型 15 | 16 | // 遍历Dto对象的每个字段并转换 17 | for i := 0; i < dtoValue.NumField(); i++ { // NumField返回结构体中字段的数量 18 | // 获取Dto对象的字段值 19 | dtoField := dtoValue.Field(i) 20 | 21 | // 如果Dto对象的字段值不为空,则进行转换 22 | if !dtoField.IsZero() { 23 | // 获取Dto对象的字段名 24 | fieldName := dtoValue.Type().Field(i).Name 25 | 26 | // 根据字段名获取Entity对象的同名字段 27 | entityField := entityValue.FieldByName(fieldName) 28 | 29 | // 若找到同名字段且类型相同,将Dto对象的值复制给Entity对象 30 | if entityField.IsValid() && entityField.Type() == dtoField.Type() { 31 | entityField.Set(dtoField) 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /application/vitepress/vptype/socialLink.go: -------------------------------------------------------------------------------- 1 | package vptype 2 | 3 | // SocialLink 表示社交媒体链接,包含图标、链接以及可选的ARIA标签 4 | type SocialLink struct { 5 | // Icon 社交媒体链接图标 6 | Icon string `json:"icon"` 7 | 8 | // Link 链接地址 9 | Link string `json:"link"` 10 | 11 | // AriaLabel 可选的ARIA标签,用于辅助功能描述 12 | AriaLabel string `json:"ariaLabel,omitempty"` 13 | } 14 | 15 | // SocialLinkIcon 定义了社交媒体链接图标的类型,可以是预定义的字符串常量, 16 | // 也可以是一个自定义SVG字符串 17 | type SocialLinkIcon string // 实际使用时需要根据应用场景转换为具体类型 18 | 19 | // 预定义的SocialLinkIcon枚举值 20 | const ( 21 | DiscordIcon SocialLinkIcon = "discord" 22 | FacebookIcon SocialLinkIcon = "facebook" 23 | GitHubIcon SocialLinkIcon = "github" 24 | InstagramIcon SocialLinkIcon = "instagram" 25 | LinkedInIcon SocialLinkIcon = "linkedin" 26 | MastodonIcon SocialLinkIcon = "mastodon" 27 | NPMIcon SocialLinkIcon = "npm" 28 | SlackIcon SocialLinkIcon = "slack" 29 | TwitterIcon SocialLinkIcon = "twitter" 30 | XIcon SocialLinkIcon = "x" 31 | YoutubeIcon SocialLinkIcon = "youtube" 32 | ) 33 | -------------------------------------------------------------------------------- /docs/en/使用手册/4.导航管理.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # Interface 36 | 37 | ![8acabd8c8c84416c920f6de221a3e9b3.png](/vpstatic/images/20240415/8acabd8c-8c84-416c-920f-6de221a3e9b3.png) 38 | 39 | The navigation settings interface is shown in the above images. 40 | 41 | Currently, it supports up to three levels of navigation. 42 | -------------------------------------------------------------------------------- /docs/en/zh/使用手册/5.侧栏管理.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "5.侧栏管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 侧栏管理 36 | 37 | ![c0c71ebe9ddb43f188010ffe6707dfc1.png](/vpstatic/images/20240415/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.png) 38 | 39 | 支持:多侧栏和单侧栏切换 40 | 41 | 当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下: 42 | 43 | 1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏 44 | 45 | 2.单语言条件下:根目录下的所有文件夹为侧栏列表 46 | 47 | 如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏 48 | -------------------------------------------------------------------------------- /docs/en/使用手册/6.软件设置.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "4.导航管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # Introduction 36 | 37 | ![8286944ec79b4bbe83d54902316dc593.png](/vpstatic/images/20240415/8286944e-c79b-4bbe-83d5-4902316dc593.png) 38 | 39 | The software settings are shown above. 40 | 41 | Editor CDN: If the editor of the software is not displayed correctly, you can try **changing the CDN and restarting the software**. 42 | -------------------------------------------------------------------------------- /docs/zh/使用手册/5.侧栏管理.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "5.侧栏管理", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # 侧栏管理 36 | 37 | ![c0c71ebe9ddb43f188010ffe6707dfc1.png](/vpstatic/images/20240415/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.png) 38 | 39 | 支持:多侧栏和单侧栏切换 40 | 41 | 当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下: 42 | 43 | 1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏 44 | 45 | 2.单语言条件下:根目录下的所有文件夹为侧栏列表 46 | 47 | 如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏 48 | -------------------------------------------------------------------------------- /frontend/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import vue from "@vitejs/plugin-vue"; 3 | import vueJsx from "@vitejs/plugin-vue-jsx"; 4 | import { quasar, transformAssetUrls } from "@quasar/vite-plugin"; 5 | import { resolve } from "path"; 6 | import { nodePolyfills } from "vite-plugin-node-polyfills"; 7 | 8 | // https://vitejs.dev/config/ 9 | export default defineConfig({ 10 | plugins: [ 11 | vue({ template: { transformAssetUrls } }), 12 | vueJsx(), 13 | nodePolyfills(), 14 | quasar({ 15 | sassVariables: "src/quasar-variables.sass", 16 | }), 17 | ], 18 | resolve: { 19 | alias: { 20 | "@": resolve(__dirname, "src"), 21 | "~": resolve(__dirname, "wails"), 22 | }, 23 | }, 24 | build: { 25 | rollupOptions: { 26 | output: { 27 | entryFileNames: `assets/[name].js`, 28 | chunkFileNames: `assets/[name].js`, 29 | assetFileNames: `assets/[name].[ext]`, 30 | }, 31 | }, 32 | }, 33 | define: { 34 | // 启用生产环境构建下激活不匹配的详细警告 35 | __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "true", 36 | }, 37 | }); 38 | -------------------------------------------------------------------------------- /qodana.yaml: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------------------------------------# 2 | # Qodana analysis is configured by qodana.yaml file # 3 | # https://www.jetbrains.com/help/qodana/qodana-yaml.html # 4 | #-------------------------------------------------------------------------------# 5 | version: "1.0" 6 | 7 | #Specify inspection profile for code analysis 8 | profile: 9 | name: qodana.starter 10 | 11 | #Enable inspections 12 | #include: 13 | # - name: 14 | 15 | #Disable inspections 16 | #exclude: 17 | # - name: 18 | # paths: 19 | # - 20 | 21 | #Execute shell command before Qodana execution (Applied in CI/CD pipeline) 22 | #bootstrap: sh ./prepare-qodana.sh 23 | 24 | #Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) 25 | #plugins: 26 | # - id: #(plugin id can be found at https://plugins.jetbrains.com) 27 | 28 | #Specify Qodana linter for analysis (Applied in CI/CD pipeline) 29 | linter: jetbrains/qodana-go:latest 30 | -------------------------------------------------------------------------------- /application/first/default_config.go: -------------------------------------------------------------------------------- 1 | package first 2 | 3 | import ( 4 | "wailstemplate/application/constant/cnts" 5 | "wailstemplate/application/constant/enums" 6 | "wailstemplate/application/constant/keys" 7 | "wailstemplate/application/pkg/cfg" 8 | ) 9 | 10 | func InitDefaultConfig() { 11 | cfg.SetDefault(keys.ConfigKeyProjectDir, "") 12 | cfg.SetDefault(keys.ConfigKeyIsStartup, "no") 13 | cfg.SetDefault(keys.ConfigKeySysUpdateSource, "github") 14 | cfg.SetDefault(keys.ConfigKeyHistoryProject, "[]") 15 | cfg.SetDefault(keys.ConfigKeyLayoutNavBgColor, "#ebebeb") 16 | cfg.SetDefault(keys.ConfigKeyChangeAutoSave, "no") 17 | cfg.SetDefault(keys.ConfigKeyFrontMatterSaveType, "json") 18 | 19 | //项目静态资源服务器的端口 20 | cfg.SetDefault(keys.ConfigKeySysStaticServerPort, "9874") 21 | cfg.SetDefault(keys.ConfigKeySysProjectStaticDirName, cnts.StaticBaseDir) 22 | 23 | cfg.SetDefault(keys.ConfigKeyVditorCdn, enums.VditorCdnZstatic) 24 | cfg.SetDefault(keys.ConfigKeyLang, "en") 25 | 26 | //cfg.SetDefault(keys.ConfigKeySysProgramCanOpenMany, "no") 27 | cfg.SetDefault(keys.ConfigKeySysProgramIsOpen, "no") 28 | 29 | } 30 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/StaticServer.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function ConvertFullPathToUrl(arg1) { 6 | return window['go']['services']['StaticServer']['ConvertFullPathToUrl'](arg1); 7 | } 8 | 9 | export function GetProjectStaticName() { 10 | return window['go']['services']['StaticServer']['GetProjectStaticName'](); 11 | } 12 | 13 | export function GetStaticBaseUrl() { 14 | return window['go']['services']['StaticServer']['GetStaticBaseUrl'](); 15 | } 16 | 17 | export function GetStaticFullDir() { 18 | return window['go']['services']['StaticServer']['GetStaticFullDir'](); 19 | } 20 | 21 | export function GetStaticImagesFullDir() { 22 | return window['go']['services']['StaticServer']['GetStaticImagesFullDir'](); 23 | } 24 | 25 | export function StartStaticServer(arg1) { 26 | return window['go']['services']['StaticServer']['StartStaticServer'](arg1); 27 | } 28 | 29 | export function UploadFile() { 30 | return window['go']['services']['StaticServer']['UploadFile'](); 31 | } 32 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_2.入门使用.md.CNNhJ-ge.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a,a as e,b as s,c as t,d as p,e as i,f as o,g as n,h as c,i as r,j as l,k as d,l as h}from"./chunks/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.CMb43z0y.js";import{_,j as b,c as u,o as m,a4 as g}from"./chunks/framework.71dsLfGE.js";const f="_button_1yw4d_2",k={button:f},q=g("",43),v=[q],B=JSON.parse('{"title":"2.入门使用","description":"这是文档的seo描述å","frontmatter":{"title":"2.入门使用","description":"这是文档的seo描述å","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{"A1":"Hhh","":""},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"head":[["meta",{"name":"Author","content":"Xiaod"}],["meta",{"name":"","content":""}]]},"headers":[],"relativePath":"zh/使用手册/2.入门使用.md","filePath":"zh/使用手册/2.入门使用.md"}'),P={name:"zh/使用手册/2.入门使用.md"},y=Object.assign(P,{setup(C){return b(0),(F,V)=>(m(),u("div",null,v))}}),x={$style:k},S=_(y,[["__cssModules",x]]);export{B as __pageData,S as default}; 2 | -------------------------------------------------------------------------------- /frontend/src/components/configColor.vue: -------------------------------------------------------------------------------- 1 | 14 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_2.入门使用.md.B99jdk7n.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as e,a as t,b as a,c as o,d as i,e as n,f as s,g as c,h as r,i as l,j as d,k as p,l as h}from"./chunks/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.CMb43z0y.js";import{_ as u,j as m,c as g,o as f,a4 as b}from"./chunks/framework.71dsLfGE.js";const _="_button_1yw4d_2",w={button:_},y=b("",43),k=[y],N=JSON.parse('{"title":"这是文档的标题","description":"这是文档的seo描述å","frontmatter":{"title":"这是文档的标题","description":"这是文档的seo描述å","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{"A1":"Hhh","":""},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"head":[["meta",{"name":"Author","content":"Xiaod"}],["meta",{"name":"","content":""}]]},"headers":[],"relativePath":"en/使用手册/2.入门使用.md","filePath":"en/使用手册/2.入门使用.md"}'),v={name:"en/使用手册/2.入门使用.md"},q=Object.assign(v,{setup(P){return m(0),(j,D)=>(f(),g("div",null,k))}}),C={$style:w},I=u(q,[["__cssModules",C]]);export{N as __pageData,I as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_2.入门使用.md.BQzakXh6.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a,a as e,b as s,c as t,d as p,e as i,f as o,g as n,h as c,i as r,j as l,k as d,l as h}from"./chunks/29bf6e91-1dfb-4734-be43-10fd29b9dc2a.CMb43z0y.js";import{_,j as b,c as u,o as m,a4 as g}from"./chunks/framework.71dsLfGE.js";const f="_button_1yw4d_2",k={button:f},q=g("",43),v=[q],B=JSON.parse('{"title":"这是文档的标题","description":"这是文档的seo描述å","frontmatter":{"title":"这是文档的标题","description":"这是文档的seo描述å","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":true,"lastUpdated":true,"aside":"right","layout":"doc","custom":{"A1":"Hhh","":""},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]},"head":[["meta",{"name":"Author","content":"Xiaod"}],["meta",{"name":"","content":""}]]},"headers":[],"relativePath":"en/zh/使用手册/2.入门使用.md","filePath":"en/zh/使用手册/2.入门使用.md"}'),P={name:"en/zh/使用手册/2.入门使用.md"},y=Object.assign(P,{setup(C){return b(0),(F,V)=>(m(),u("div",null,v))}}),x={$style:k},S=_(y,[["__cssModules",x]]);export{B as __pageData,S as default}; 2 | -------------------------------------------------------------------------------- /vitepress-template/docs/api-examples.md: -------------------------------------------------------------------------------- 1 | --- 2 | outline: deep 3 | --- 4 | 5 | # Runtime API Examples 6 | 7 | This page demonstrates usage of some of the runtime APIs provided by VitePress. 8 | 9 | The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: 10 | 11 | ```md 12 | 17 | 18 | ## Results 19 | 20 | ### Theme Data 21 |
{{ theme }}
22 | 23 | ### Page Data 24 |
{{ page }}
25 | 26 | ### Page Frontmatter 27 |
{{ frontmatter }}
28 | ``` 29 | 30 | 35 | 36 | ## Results 37 | 38 | ### Theme Data 39 |
{{ theme }}
40 | 41 | ### Page Data 42 |
{{ page }}
43 | 44 | ### Page Frontmatter 45 |
{{ frontmatter }}
46 | 47 | ## More 48 | 49 | Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). 50 | -------------------------------------------------------------------------------- /application/mytest/update_test.go: -------------------------------------------------------------------------------- 1 | package mytest 2 | 3 | import ( 4 | "path/filepath" 5 | "testing" 6 | "wailstemplate/application/pkg/autoupdate" 7 | setting "wailstemplate/settings" 8 | ) 9 | 10 | // 设置自动更新的配置,并检查是否有新版本可用。 11 | // 如果有新版本,询问用户是否自动更新。 12 | // 如果用户同意更新,则开始下载更新。 13 | // 设置自动更新的配置信息 14 | func TestAutoUpdate(t *testing.T) { 15 | autoupdate.SetUpdateConfig(autoupdate.UpdateConfig{ 16 | AppName: setting.AppName, 17 | CurrVersion: setting.Version, 18 | GitType: autoupdate.GitTypeGithub, 19 | GitOwner: setting.GitAuthor, 20 | GitRepo: setting.GitRepo, 21 | WindowReleaseNameContainStr: setting.WindowZipContainStr, 22 | MacReleaseNameContainStr: setting.MacosZipContainStr, 23 | }) 24 | 25 | // 获取最新版本的信息 26 | autoupdate.CheckUpdateEntry() 27 | } 28 | 29 | // 测试解压压缩包 30 | func TestUnzip(t *testing.T) { 31 | archivePath := "C:\\Users\\17788\\Downloads\\windows_1.0.1.zip" 32 | dir := "C:\\Users\\17788\\Downloads" 33 | autoupdate.UnzipFile(archivePath, dir) 34 | autoupdate.UpWindowSelfApp(filepath.Join(dir, setting.AppName+".exe")) 35 | } 36 | -------------------------------------------------------------------------------- /application/pkg/myexcel/list_kv_excel.go: -------------------------------------------------------------------------------- 1 | // Package myexcel 2 | // @Author: zhangdi 3 | // @File: list_data_excel 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/24 11:13 6 | package myexcel 7 | 8 | import ( 9 | "fmt" 10 | ) 11 | 12 | type KVItem struct { 13 | K string 14 | V any 15 | } 16 | 17 | // WriteKvToExcel 仿制Map 写入一个KV 目的是为了保证顺序可空 kWidth 18 | func WriteKvToExcel(data []KVItem, savePath string, kWidth float64, vWidth float64) error { 19 | // 创建一个新的Excel文件 20 | f := excelize.NewFile() 21 | 22 | // 设置工作表名称为"Sheet1" 23 | index, _ := f.NewSheet("Sheet1") 24 | 25 | // 将map的键和值写入Excel的第一列和第二列 26 | for i, item := range data { 27 | row := i + 1 28 | // 写入第一列(A列) 29 | cell := fmt.Sprintf("A%d", row) 30 | f.SetCellValue("Sheet1", cell, item.K) 31 | 32 | // 写入第二列(B列) 33 | cell = fmt.Sprintf("B%d", row) 34 | f.SetCellValue("Sheet1", cell, item.V) 35 | } 36 | 37 | // 设置活动工作表为"Sheet1" 38 | f.SetActiveSheet(index) 39 | f.SetColWidth("Sheet1", "A", "A", kWidth) 40 | f.SetColWidth("Sheet1", "B", "B", vWidth) 41 | 42 | // 保存Excel文件 43 | err := f.SaveAs(savePath) 44 | if err != nil { 45 | return err 46 | } 47 | 48 | return nil 49 | } 50 | -------------------------------------------------------------------------------- /frontend/src/i18n/locales/zh/shell.ts: -------------------------------------------------------------------------------- 1 | import { defaultVpSimple } from "@/configs/defaultVpSimple"; 2 | 3 | export const ZhShell = { 4 | //终端配置 5 | config: "终端配置", 6 | //运行日志 7 | runLog: "运行日志", 8 | //默认值 9 | default: "默认值", 10 | //暂无运行中的终端 11 | noRunTerminal: "暂无运行中的终端", 12 | //起始目录不能为空 13 | runPathEmpty: "起始目录不能为空", 14 | //"cmd不能为空" 15 | cmdEmpty: "cmd不能为空", 16 | 17 | docsBuild: "文档build命令", 18 | //运行目录 19 | labels: { 20 | //默认目录 21 | runPath: "默认命令运行目录", 22 | //git运行的目录 23 | gitPath: "git运行的目录", 24 | //文档dev命令 25 | docsDev: "文档dev命令", 26 | //文档build命令 27 | docsBuild: "文档build命令", 28 | //文档serve命令 29 | }, 30 | tips: { 31 | //运行目录的路径,默认值是项目根目录 32 | runPath: "运行目录的路径,默认值是项目根目录", 33 | //git运行的目录,一般为vitepress项目根目录,但有时vitepres是做其它项目的子项目,所以需要指定git运行的目录 34 | gitPath: 35 | "git运行的目录,一般为vitepress项目根目录,但有时vitepres是做其它项目的子项目,所以需要指定git运行的目录", 36 | //文档dev命令,默认值是vitepress项目根目录下的dev命令 37 | docsDev: "文档dev命令,默认值:" + defaultVpSimple.cmdDocsDev, 38 | //文档build命令,默认值是vitepress项目根目录下的build命令 39 | docsBuild: "文档build命令,默认值:" + defaultVpSimple.cmdDocsBuild, 40 | }, 41 | }; 42 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_6.软件设置.md.Cx36hS5e.js: -------------------------------------------------------------------------------- 1 | import{_ as a}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as s,c as o,o as r,l as e,a as t}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/6.软件设置.md","filePath":"zh/使用手册/6.软件设置.md"}'),i={name:"zh/使用手册/6.软件设置.md"},n=e("h1",{id:"介绍",tabindex:"-1"},[t("介绍 "),e("a",{class:"header-anchor",href:"#介绍","aria-label":'Permalink to "介绍"'},"​")],-1),c=e("p",null,[e("img",{src:a,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=e("p",null,"软件设置的如上",-1),l=e("p",null,[t("编辑器cdn:如果软件的编辑器显示不出来可以尝试"),e("strong",null,"切换cdn并重启软件")],-1),_=[n,c,d,l];function h(p,m,u,f,g,b){return r(),o("div",null,_)}const v=s(i,[["render",h]]);export{P as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_6.软件设置.md.Cx36hS5e.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as s,c as o,o as r,l as e,a as t}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/6.软件设置.md","filePath":"zh/使用手册/6.软件设置.md"}'),i={name:"zh/使用手册/6.软件设置.md"},n=e("h1",{id:"介绍",tabindex:"-1"},[t("介绍 "),e("a",{class:"header-anchor",href:"#介绍","aria-label":'Permalink to "介绍"'},"​")],-1),c=e("p",null,[e("img",{src:a,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=e("p",null,"软件设置的如上",-1),l=e("p",null,[t("编辑器cdn:如果软件的编辑器显示不出来可以尝试"),e("strong",null,"切换cdn并重启软件")],-1),_=[n,c,d,l];function h(p,m,u,f,g,b){return r(),o("div",null,_)}const v=s(i,[["render",h]]);export{P as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_6.软件设置.md.BlZ_r3dw.js: -------------------------------------------------------------------------------- 1 | import{_ as a}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as s,c as o,o as n,l as e,a as t}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/6.软件设置.md","filePath":"en/zh/使用手册/6.软件设置.md"}'),r={name:"en/zh/使用手册/6.软件设置.md"},i=e("h1",{id:"介绍",tabindex:"-1"},[t("介绍 "),e("a",{class:"header-anchor",href:"#介绍","aria-label":'Permalink to "介绍"'},"​")],-1),c=e("p",null,[e("img",{src:a,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=e("p",null,"软件设置的如上",-1),l=e("p",null,[t("编辑器cdn:如果软件的编辑器显示不出来可以尝试"),e("strong",null,"切换cdn并重启软件")],-1),_=[i,c,d,l];function h(p,m,u,f,g,b){return n(),o("div",null,_)}const v=s(r,[["render",h]]);export{P as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_4.导航管理.md.Du8XYE-z.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js";import{_ as a,c as s,o as i,l as e,a as o}from"./chunks/framework.71dsLfGE.js";const V=JSON.parse('{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","frontmatter":{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/4.导航管理.md","filePath":"zh/使用手册/4.导航管理.md"}'),r={name:"zh/使用手册/4.导航管理.md"},n=e("h1",{id:"界面",tabindex:"-1"},[o("界面 "),e("a",{class:"header-anchor",href:"#界面","aria-label":'Permalink to "界面"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"ca703e2445444c7d98e66021bd42a3d8.png"})],-1),d=e("p",null,"导航设置界面如上图所示",-1),l=e("p",null,"目前最多支持到三级导航",-1),_=[n,c,d,l];function p(h,m,u,f,g,x){return i(),s("div",null,_)}const b=a(r,[["render",p]]);export{V as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_6.软件设置.md.BlZ_r3dw.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as a}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as s,c as o,o as n,l as e,a as t}from"./chunks/framework.71dsLfGE.js";const P=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/6.软件设置.md","filePath":"en/zh/使用手册/6.软件设置.md"}'),r={name:"en/zh/使用手册/6.软件设置.md"},i=e("h1",{id:"介绍",tabindex:"-1"},[t("介绍 "),e("a",{class:"header-anchor",href:"#介绍","aria-label":'Permalink to "介绍"'},"​")],-1),c=e("p",null,[e("img",{src:a,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=e("p",null,"软件设置的如上",-1),l=e("p",null,[t("编辑器cdn:如果软件的编辑器显示不出来可以尝试"),e("strong",null,"切换cdn并重启软件")],-1),_=[i,c,d,l];function h(p,m,u,f,g,b){return n(),o("div",null,_)}const v=s(r,[["render",h]]);export{P as __pageData,v as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_4.导航管理.md.Du8XYE-z.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js";import{_ as a,c as s,o as i,l as e,a as o}from"./chunks/framework.71dsLfGE.js";const V=JSON.parse('{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","frontmatter":{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/4.导航管理.md","filePath":"zh/使用手册/4.导航管理.md"}'),r={name:"zh/使用手册/4.导航管理.md"},n=e("h1",{id:"界面",tabindex:"-1"},[o("界面 "),e("a",{class:"header-anchor",href:"#界面","aria-label":'Permalink to "界面"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"ca703e2445444c7d98e66021bd42a3d8.png"})],-1),d=e("p",null,"导航设置界面如上图所示",-1),l=e("p",null,"目前最多支持到三级导航",-1),_=[n,c,d,l];function p(h,m,u,f,g,x){return i(),s("div",null,_)}const b=a(r,[["render",p]]);export{V as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /application/db/repository/format_db.go: -------------------------------------------------------------------------------- 1 | package repository 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "wailstemplate/application/pkg/where" 6 | ) 7 | 8 | func formatDbWhere(tx *gorm.DB, wheres []*where.Field) (*gorm.DB, error) { 9 | if wheres == nil || len(wheres) == 0 { 10 | return tx, nil 11 | } 12 | //where 构造 13 | whereStr, whereValues, err := where.ConvertToGormWhere(wheres) 14 | if err != nil { 15 | return tx, err 16 | } 17 | tx = tx.Where(whereStr, whereValues...) 18 | return tx, err 19 | } 20 | 21 | func formatDbExtra(tx *gorm.DB, extra *where.Extra) (*gorm.DB, error) { 22 | if extra == nil { //传入空值nil则使用零值 23 | extra = &where.Extra{} 24 | } 25 | //排序方式 26 | if extra.OrderByColumn != "" { 27 | if extra.OrderByDesc { 28 | tx = tx.Order(extra.OrderByColumn + " desc") 29 | } else { 30 | tx = tx.Order(extra.OrderByColumn + " desc") 31 | } 32 | } 33 | //limit 34 | if extra.PageSize > 0 { 35 | tx = tx.Limit(extra.PageSize) 36 | } 37 | 38 | //offset条件 39 | if extra.PageNum > 0 { 40 | tx = tx.Offset(calculateOffset(extra.PageNum, extra.PageSize)) 41 | } else { 42 | //取消offset条件 43 | tx = tx.Offset(-1) 44 | } 45 | 46 | return tx, nil 47 | } 48 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_4.导航管理.md.CRaXgXI2.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js";import{_ as a,c as s,o as i,l as e,a as o}from"./chunks/framework.71dsLfGE.js";const V=JSON.parse('{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","frontmatter":{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/4.导航管理.md","filePath":"en/zh/使用手册/4.导航管理.md"}'),r={name:"en/zh/使用手册/4.导航管理.md"},n=e("h1",{id:"界面",tabindex:"-1"},[o("界面 "),e("a",{class:"header-anchor",href:"#界面","aria-label":'Permalink to "界面"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"ca703e2445444c7d98e66021bd42a3d8.png"})],-1),d=e("p",null,"导航设置界面如上图所示",-1),l=e("p",null,"目前最多支持到三级导航",-1),_=[n,c,d,l];function p(h,m,u,f,g,x){return i(),s("div",null,_)}const b=a(r,[["render",p]]);export{V as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | wails2-template-vue 8 | 9 | 10 |
11 | 12 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /application/pkg/mynum/tostring.go: -------------------------------------------------------------------------------- 1 | // Package mynum 2 | // @Author: zhangdi 3 | // @File: conv 4 | // @Version: 1.0.0 5 | // @Date: 2023/8/28 16:29 6 | package mynum 7 | 8 | import "strconv" 9 | 10 | type Numbers interface { 11 | uint | int | uint16 | uint8 | uint64 | uint32 | int8 | int16 | int32 | int64 12 | } 13 | 14 | // ToString 通用的泛型方法 15 | //mynum.ToString[uint](16) 16 | func ToString[T Numbers](val T) string { 17 | return strconv.Itoa(int(val)) 18 | } 19 | 20 | func UintToString(str uint) string { 21 | return strconv.Itoa(int(str)) 22 | } 23 | 24 | func Uint16ToString(str uint16) string { 25 | return strconv.Itoa(int(str)) 26 | } 27 | 28 | func Uint64ToString(str uint64) string { 29 | return strconv.Itoa(int(str)) 30 | } 31 | 32 | func Uint32ToString(str uint32) string { 33 | return strconv.Itoa(int(str)) 34 | } 35 | 36 | func IntToString(str int) string { 37 | return strconv.Itoa(int(str)) 38 | } 39 | 40 | func Int16ToString(str int16) string { 41 | return strconv.Itoa(int(str)) 42 | } 43 | 44 | func Int32ToString(str int32) string { 45 | return strconv.Itoa(int(str)) 46 | } 47 | 48 | func Int64ToString(str int64) string { 49 | return strconv.Itoa(int(str)) 50 | } 51 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_4.导航管理.md.CRaXgXI2.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/ca703e24-4544-4c7d-98e6-6021bd42a3d8.Bg-KUEnk.js";import{_ as a,c as s,o as i,l as e,a as o}from"./chunks/framework.71dsLfGE.js";const V=JSON.parse('{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","frontmatter":{"title":"4.导航管理","description":"VitepressSimple使用教程--4.导航管理","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/4.导航管理.md","filePath":"en/zh/使用手册/4.导航管理.md"}'),r={name:"en/zh/使用手册/4.导航管理.md"},n=e("h1",{id:"界面",tabindex:"-1"},[o("界面 "),e("a",{class:"header-anchor",href:"#界面","aria-label":'Permalink to "界面"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"ca703e2445444c7d98e66021bd42a3d8.png"})],-1),d=e("p",null,"导航设置界面如上图所示",-1),l=e("p",null,"目前最多支持到三级导航",-1),_=[n,c,d,l];function p(h,m,u,f,g,x){return i(),s("div",null,_)}const b=a(r,[["render",p]]);export{V as __pageData,b as default}; 2 | -------------------------------------------------------------------------------- /frontend/src/components/simRadio.vue: -------------------------------------------------------------------------------- 1 | 20 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /application/db/repository/common.go: -------------------------------------------------------------------------------- 1 | package repository 2 | 3 | import ( 4 | "fmt" 5 | "gorm.io/gorm" 6 | "wailstemplate/application/pkg/where" 7 | ) 8 | 9 | // FindDistinct 查找1个字段的所有重复项,minRepeat重复数 10 | // entity 传入示例&user{}或new(user),sql demo如下: 11 | // SELECT bottle_number as value, COUNT(*) as count 12 | // FROM bottle_data 13 | // GROUP BY bottle_number 14 | // HAVING COUNT(bottle_number) > 1 15 | func FindDistinct(entity any, columnName string, 16 | wheres []*where.Field, extra *where.Extra, db *gorm.DB) ( 17 | []*DistinctItem, error) { 18 | 19 | minRepeat := 1 20 | var err error 21 | var resultList []*DistinctItem 22 | 23 | db, _ = formatDbExtra(db.Model(entity), extra) 24 | 25 | db = db. 26 | Select(fmt.Sprintf(" %s as Value, COUNT(*) as Count", columnName)). 27 | Group(fmt.Sprintf("%s", columnName)). 28 | Having(fmt.Sprintf("COUNT(%s) > %d", columnName, minRepeat)) 29 | db, err = formatDbWhere(db, wheres) 30 | db.Find(&resultList) 31 | 32 | if db.Error != nil { 33 | return nil, err 34 | } 35 | return resultList, err 36 | } 37 | 38 | // 根据页码和页面大小计算偏移量 39 | func calculateOffset(page, pageSize int) int { 40 | offset := (page - 1) * pageSize 41 | return offset 42 | } 43 | -------------------------------------------------------------------------------- /frontend/src/components/simInput.vue: -------------------------------------------------------------------------------- 1 | 25 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /application/constant/keys/config.go: -------------------------------------------------------------------------------- 1 | package keys 2 | 3 | const ConfigKeyProjectDir = "project_dir" 4 | const ConfigKeyIsStartup = "is_startup" 5 | const ConfigKeyHistoryProject = "history_project" 6 | 7 | // ConfigKeyChangeAutoSave 切换文件时自动保存 8 | const ConfigKeyChangeAutoSave = "change_auto_save" 9 | 10 | // ConfigKeyFrontMatterSaveType frontMatter保存格式 11 | const ConfigKeyFrontMatterSaveType = "front_matter_save_type" 12 | 13 | // ConfigKeyLayoutNavBgColor 左侧导航栏背景颜色 14 | const ConfigKeyLayoutNavBgColor = "layout.nav_bg_color" 15 | 16 | // ConfigKeySysUpdateSource 自动更新源 17 | const ConfigKeySysUpdateSource = "sys.auto_update_source" 18 | 19 | // ConfigKeySysStaticServerPort 项目的静态资源(图片)服务器端口 20 | const ConfigKeySysStaticServerPort = "sys.static_server_port" 21 | 22 | const ConfigKeySysProgramIsOpen = "sys.program_is_open" 23 | 24 | const ConfigKeySysTerminalDir = "sys.terminal_dir" 25 | 26 | //const ConfigKeySysProgramCanOpenMany = "sys.program_can_open_many" 27 | 28 | const ConfigKeySysProjectStaticDirName = "sys.project_static_dir_name" 29 | const ConfigKeyVditorCdn = "vditor.cdn" 30 | 31 | // ConfigKeyLang 语言配置 32 | const ConfigKeyLang = "sys.lang" 33 | 34 | const ConfigKeyShellBaseDir = "shell.base_dir" 35 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_4.导航管理.md.i3gEwSzu.js: -------------------------------------------------------------------------------- 1 | import{_ as t,c as a,o as s,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const n="/static/8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png",x=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/4.导航管理.md","filePath":"en/使用手册/4.导航管理.md"}'),o={name:"en/使用手册/4.导航管理.md"},r=e("h1",{id:"interface",tabindex:"-1"},[i("Interface "),e("a",{class:"header-anchor",href:"#interface","aria-label":'Permalink to "Interface"'},"​")],-1),c=e("p",null,[e("img",{src:n,alt:"8acabd8c8c84416c920f6de221a3e9b3.png"})],-1),d=e("p",null,"The navigation settings interface is shown in the above images.",-1),l=e("p",null,"Currently, it supports up to three levels of navigation.",-1),_=[r,c,d,l];function p(h,f,u,m,g,b){return s(),a("div",null,_)}const k=t(o,[["render",p]]);export{x as __pageData,k as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_4.导航管理.md.i3gEwSzu.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as t,c as a,o as s,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const n="/static/8acabd8c-8c84-416c-920f-6de221a3e9b3.CVzFa7QN.png",x=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/4.导航管理.md","filePath":"en/使用手册/4.导航管理.md"}'),o={name:"en/使用手册/4.导航管理.md"},r=e("h1",{id:"interface",tabindex:"-1"},[i("Interface "),e("a",{class:"header-anchor",href:"#interface","aria-label":'Permalink to "Interface"'},"​")],-1),c=e("p",null,[e("img",{src:n,alt:"8acabd8c8c84416c920f6de221a3e9b3.png"})],-1),d=e("p",null,"The navigation settings interface is shown in the above images.",-1),l=e("p",null,"Currently, it supports up to three levels of navigation.",-1),_=[r,c,d,l];function p(h,f,u,m,g,b){return s(),a("div",null,_)}const k=t(o,[["render",p]]);export{x as __pageData,k as default}; 2 | -------------------------------------------------------------------------------- /frontend/src/utils/historyProject.ts: -------------------------------------------------------------------------------- 1 | // 定义一个简单的类 `Person` 2 | import { ConfigGet, ConfigSet } from "../../wailsjs/go/system/SystemService"; 3 | import { ConfigKeyHistoryProject } from "@/constant/keys/config"; 4 | 5 | export class HistoryProject { 6 | public static currentList: string[] = []; 7 | 8 | // 初始化配置文件中的配置(启动时执行一次即可) 9 | public static async initList() { 10 | const currListString = await ConfigGet(ConfigKeyHistoryProject); 11 | try { 12 | this.currentList = JSON.parse(currListString); 13 | } catch (e) { 14 | this.currentList = []; 15 | } 16 | } 17 | 18 | /** 19 | * 将指定目录添加到当前列表的开头,并确保列表长度不超过10。之后将更新后的列表保存到配置文件中。 20 | * @param dir 要添加到列表开头的目录路径。 21 | */ 22 | public static add(dir: string) { 23 | // 从当前列表中移除指定目录,确保后续添加不会重复 24 | this.currentList = this.currentList.filter((item) => item !== dir); 25 | 26 | // 将指定目录添加到列表的开头 27 | this.currentList.unshift(dir); 28 | 29 | // 限制列表长度不超过10,超出部分会被移除 30 | this.currentList = this.currentList.slice(0, 10); 31 | 32 | // 保存更新后的列表到配置文件 33 | this.SaveToConfig(); 34 | } 35 | 36 | //保存历史数据到到配置文件 37 | public static SaveToConfig() { 38 | ConfigSet(ConfigKeyHistoryProject, JSON.stringify(this.currentList)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/services/ArticleTreeData.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 3 | // This file is automatically generated. DO NOT EDIT 4 | 5 | export function CreateDir(arg1) { 6 | return window['go']['services']['ArticleTreeData']['CreateDir'](arg1); 7 | } 8 | 9 | export function CreateFile(arg1) { 10 | return window['go']['services']['ArticleTreeData']['CreateFile'](arg1); 11 | } 12 | 13 | export function DeletePath(arg1) { 14 | return window['go']['services']['ArticleTreeData']['DeletePath'](arg1); 15 | } 16 | 17 | export function Move(arg1, arg2) { 18 | return window['go']['services']['ArticleTreeData']['Move'](arg1, arg2); 19 | } 20 | 21 | export function ParseTreeData(arg1) { 22 | return window['go']['services']['ArticleTreeData']['ParseTreeData'](arg1); 23 | } 24 | 25 | export function ReadFileContent(arg1) { 26 | return window['go']['services']['ArticleTreeData']['ReadFileContent'](arg1); 27 | } 28 | 29 | export function Rename(arg1, arg2) { 30 | return window['go']['services']['ArticleTreeData']['Rename'](arg1, arg2); 31 | } 32 | 33 | export function WriteFileContent(arg1, arg2) { 34 | return window['go']['services']['ArticleTreeData']['WriteFileContent'](arg1, arg2); 35 | } 36 | -------------------------------------------------------------------------------- /application/pkg/myimg/base64save.go: -------------------------------------------------------------------------------- 1 | // Package myimg 2 | // @Author: zhangdi 3 | // @File: base64save 4 | // @Version: 1.0.0 5 | // @Date: 2023/9/14 15:15 6 | package myimg 7 | 8 | import ( 9 | "encoding/base64" 10 | "io/ioutil" 11 | "os" 12 | "path/filepath" 13 | ) 14 | 15 | func SaveBase64Image(base64String, fileName string) error { 16 | // 解码base64字符串 17 | imageBytes, err := base64.StdEncoding.DecodeString(base64String) 18 | if err != nil { 19 | return err 20 | } 21 | 22 | //文件夹不存在则先创建 23 | dirPath := filepath.Dir(fileName) 24 | _, err = os.Stat(dirPath) 25 | if err != nil { 26 | err := os.MkdirAll(dirPath, os.ModePerm) 27 | if err != nil { 28 | return err 29 | } 30 | } 31 | 32 | // 创建新文件 33 | file, err := os.Create(fileName) 34 | if err != nil { 35 | return err 36 | } 37 | defer file.Close() 38 | 39 | // 写入文件 40 | _, err = file.Write(imageBytes) 41 | if err != nil { 42 | return err 43 | } 44 | 45 | return nil 46 | } 47 | 48 | func GetImageBase64(path string) (string, error) { 49 | // 读取图片文件 50 | imageData, err := ioutil.ReadFile(path) 51 | if err != nil { 52 | 53 | return "", err 54 | } 55 | // 将图片文件编码为base64 56 | base64Data := base64.StdEncoding.EncodeToString(imageData) 57 | return base64Data, nil 58 | } 59 | -------------------------------------------------------------------------------- /frontend/src/views/about/about.vue: -------------------------------------------------------------------------------- 1 | 25 | 35 | -------------------------------------------------------------------------------- /application/vitepress/vptype/nav.go: -------------------------------------------------------------------------------- 1 | package vptype 2 | 3 | import "regexp" 4 | 5 | // NavItemWithLink 结构体代表一个具有链接的导航项。 6 | // Text: 导航项的文本。 7 | // Link: 导航项链接的URL。 8 | // Items: 子导航项的数组,可以是多个 NavItem 实例。 9 | // ActiveMatch: 一个正则表达式,用于检查当前导航项是否处于激活状态。 10 | // Rel: 链接的rel属性。 11 | // Target: 链接的目标窗口属性。 12 | type NavItemWithLink struct { 13 | Text string `json:"text"` 14 | Link string `json:"link,omitempty"` 15 | Items []NavItemWithLink `json:"items,omitempty"` 16 | ActiveMatch *regexp.Regexp `json:"active_match,omitempty"` 17 | Rel string `json:"rel,omitempty"` 18 | Target string `json:"target,omitempty"` 19 | } 20 | 21 | // NavItemChildren 结构体代表含有子项的导航项。 22 | // Text: 导航项的文本。 23 | // Items: 子导航项的数组,每个子项是一个 NavItemWithLink 实例。 24 | type NavItemChildren struct { 25 | Text string 26 | Items []NavItemWithLink 27 | } 28 | 29 | // NavItemWithChildren 结构体代表一个含有子项的导航项,它的子项可以是 NavItemWithLink 或 NavItemChildren。 30 | // Text: 导航项的文本。 31 | // Items: 子导航项的数组,可以包含多种类型的导航项。 32 | // ActiveMatch: 一个正则表达式,用于检查当前导航项是否处于激活状态。 33 | type NavItemWithChildren struct { 34 | Text string 35 | Items []NavItemWithLink // Items 包含的元素类型可以是 NavItemWithLink 或 NavItemChildren。 36 | ActiveMatch string 37 | } 38 | -------------------------------------------------------------------------------- /frontend/src/constant/keys/config.ts: -------------------------------------------------------------------------------- 1 | export const ConfigKeyProjectDir = "project_dir" 2 | 3 | export const ConfigKeyIsStartup = "is_startup" 4 | 5 | export const ConfigKeyHistoryProject = "history_project" 6 | 7 | export const ConfigKeyChangeAutoSave = "change_auto_save" 8 | 9 | export const ConfigKeyFrontMatterSaveType = "front_matter_save_type" 10 | 11 | export const ConfigKeyLayoutNavBgColor = "layout.nav_bg_color" 12 | 13 | export const ConfigKeySysUpdateSource = "sys.auto_update_source" 14 | 15 | export const ConfigKeySysStaticServerPort = "sys.static_server_port" 16 | 17 | export const ConfigKeySysProgramIsOpen = "sys.program_is_open" 18 | 19 | export const ConfigKeySysTerminalDir = "sys.terminal_dir" 20 | 21 | export const ConfigKeySysProjectStaticDirName = "sys.project_static_dir_name" 22 | 23 | export const ConfigKeyVditorCdn = "vditor.cdn" 24 | 25 | export const ConfigKeyLang = "sys.lang" 26 | 27 | export const ConfigKeyShellBaseDir = "shell.base_dir" 28 | 29 | export const ConfigArray = ["project_dir","is_startup","history_project","change_auto_save","front_matter_save_type","layout.nav_bg_color","sys.auto_update_source","sys.static_server_port","sys.program_is_open","sys.terminal_dir","sys.project_static_dir_name","vditor.cdn","sys.lang","shell.base_dir"]; 30 | -------------------------------------------------------------------------------- /frontend/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHashHistory } from "vue-router"; 2 | import HomeView from "../views/index/index.vue"; 3 | 4 | const router = createRouter({ 5 | history: createWebHashHistory(), 6 | routes: [ 7 | { 8 | path: "/", 9 | name: "home", 10 | component: HomeView, 11 | }, 12 | { 13 | path: "/about", 14 | name: "about", 15 | component: () => import("@/views/about/about.vue"), 16 | }, 17 | { 18 | path: "/navSetting", 19 | name: "navSetting", 20 | component: () => import("@/views/nav/navSetting.vue"), 21 | }, 22 | { 23 | path: "/sidebarSetting", 24 | name: "sidebarSetting", 25 | component: () => import("@/views/sidebar/sidebarSetting.vue"), 26 | }, 27 | { 28 | path: "/projectSetting", 29 | name: "projectSetting", 30 | component: () => import("@/views/project/project.vue"), 31 | }, 32 | { 33 | path: "/preview", 34 | name: "preview", 35 | component: () => import("@/views/previews/preview.vue"), 36 | }, 37 | { 38 | path: "/setting", 39 | name: "setting", 40 | component: () => import("@/views/setting/setting.vue"), 41 | }, 42 | ], 43 | }); 44 | 45 | export default router; 46 | -------------------------------------------------------------------------------- /docs/zh/更新记录/v1.1.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "outline": [ 9 | 1, 10 | 3 11 | ], 12 | "editLink": false, 13 | "lastUpdated": true, 14 | "aside": "right", 15 | "layout": "doc", 16 | "custom": {}, 17 | "hero": { 18 | "image": { 19 | "src": "", 20 | "alt": "", 21 | "width": "", 22 | "height": "" 23 | }, 24 | "name": "VitePressSimple", 25 | "text": "quick to config vitePress", 26 | "description": "", 27 | "tagline": "", 28 | "actions": [], 29 | "features": [], 30 | "head": [] 31 | } 32 | } 33 | --- 34 | 35 | # v1.1.0 36 | 37 | > 2024-06-19 38 | 39 | * 【新增】多语言支持,软件支持中英文两种语言切换 40 | * 【新增】新增终端命令功能,可在程序端一键运行常用命令,目前支持如下命令 41 | * git相关命令,如`add commit push pull` 42 | * npm系列命令 如`install docs:dev build`等 43 | * 【新增】新建vitepress项目时内置大图预览插件,点击图片后显示大图。 44 | * 【修复】macos系统下窗体无法正常拖动的问题 45 | * 【修改】修改默认的vitepress版本为v1.2.3 46 | * 【完善】完善vitepress配置文件的存放逻辑,在.vitepress文件夹下新增config目录: 47 | * `index.ts` 入口文件 48 | * `vpsimple.ts` vitepressSimple软件自动生成和写入的文件,用户不可自行改动 49 | * `custom.ts` 用户自定义的一些配置,如果配置了与vpsimple.ts相同的字段,则会优先使用使用custom.ts里面的配置 50 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_5.侧栏管理.md.CAVU1Y2j.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js";import{_ as s,c as a,o,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const B=JSON.parse('{"title":"5.侧栏管理","description":"","frontmatter":{"title":"5.侧栏管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/5.侧栏管理.md","filePath":"zh/使用手册/5.侧栏管理.md"}'),n={name:"zh/使用手册/5.侧栏管理.md"},r=e("h1",{id:"侧栏管理",tabindex:"-1"},[i("侧栏管理 "),e("a",{class:"header-anchor",href:"#侧栏管理","aria-label":'Permalink to "侧栏管理"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"c0c71ebe9ddb43f188010ffe6707dfc1.png"})],-1),d=e("p",null,"支持:多侧栏和单侧栏切换",-1),l=e("p",null,"当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下:",-1),_=e("p",null,"1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏",-1),h=e("p",null,"2.单语言条件下:根目录下的所有文件夹为侧栏列表",-1),p=e("p",null,"如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏",-1),f=[r,c,d,l,_,h,p];function u(m,g,x,b,k,z){return o(),a("div",null,f)}const $=s(n,[["render",u]]);export{B as __pageData,$ as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/zh_使用手册_5.侧栏管理.md.CAVU1Y2j.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js";import{_ as s,c as a,o,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const B=JSON.parse('{"title":"5.侧栏管理","description":"","frontmatter":{"title":"5.侧栏管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"zh/使用手册/5.侧栏管理.md","filePath":"zh/使用手册/5.侧栏管理.md"}'),n={name:"zh/使用手册/5.侧栏管理.md"},r=e("h1",{id:"侧栏管理",tabindex:"-1"},[i("侧栏管理 "),e("a",{class:"header-anchor",href:"#侧栏管理","aria-label":'Permalink to "侧栏管理"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"c0c71ebe9ddb43f188010ffe6707dfc1.png"})],-1),d=e("p",null,"支持:多侧栏和单侧栏切换",-1),l=e("p",null,"当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下:",-1),_=e("p",null,"1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏",-1),h=e("p",null,"2.单语言条件下:根目录下的所有文件夹为侧栏列表",-1),p=e("p",null,"如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏",-1),f=[r,c,d,l,_,h,p];function u(m,g,x,b,k,z){return o(),a("div",null,f)}const $=s(n,[["render",u]]);export{B as __pageData,$ as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_5.侧栏管理.md.C_pnq5SA.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js";import{_ as s,c as a,o,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const B=JSON.parse('{"title":"5.侧栏管理","description":"","frontmatter":{"title":"5.侧栏管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/5.侧栏管理.md","filePath":"en/zh/使用手册/5.侧栏管理.md"}'),n={name:"en/zh/使用手册/5.侧栏管理.md"},r=e("h1",{id:"侧栏管理",tabindex:"-1"},[i("侧栏管理 "),e("a",{class:"header-anchor",href:"#侧栏管理","aria-label":'Permalink to "侧栏管理"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"c0c71ebe9ddb43f188010ffe6707dfc1.png"})],-1),d=e("p",null,"支持:多侧栏和单侧栏切换",-1),l=e("p",null,"当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下:",-1),_=e("p",null,"1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏",-1),h=e("p",null,"2.单语言条件下:根目录下的所有文件夹为侧栏列表",-1),p=e("p",null,"如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏",-1),f=[r,c,d,l,_,h,p];function u(m,g,x,b,k,z){return o(),a("div",null,f)}const $=s(n,[["render",u]]);export{B as __pageData,$ as default}; 2 | -------------------------------------------------------------------------------- /frontend/wailsjs/go/system/SystemService.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function CheckNetConnect():Promise; 5 | 6 | export function ConfigGet(arg1:string):Promise; 7 | 8 | export function ConfigGetBool(arg1:string):Promise; 9 | 10 | export function ConfigSet(arg1:string,arg2:string):Promise; 11 | 12 | export function CopyPath(arg1:string,arg2:string,arg3:boolean):Promise; 13 | 14 | export function GetCurrVersion():Promise; 15 | 16 | export function GetPathDir(arg1:string):Promise; 17 | 18 | export function GetPathExt(arg1:string):Promise; 19 | 20 | export function GetPathFileName(arg1:string):Promise; 21 | 22 | export function GetSystemType():Promise; 23 | 24 | export function GetSystemUserHomeDir():Promise; 25 | 26 | export function OpenFileBrowser(arg1:string):Promise; 27 | 28 | export function OpenURL(arg1:string):Promise; 29 | 30 | export function PathExists(arg1:string):Promise; 31 | 32 | export function PathJoin(arg1:Array):Promise; 33 | 34 | export function SelectDir(arg1:string):Promise; 35 | 36 | export function SelectFile(arg1:string,arg2:string):Promise; 37 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_zh_使用手册_5.侧栏管理.md.C_pnq5SA.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as t}from"./chunks/c0c71ebe-9ddb-43f1-8801-0ffe6707dfc1.CJ83XWES.js";import{_ as s,c as a,o,l as e,a as i}from"./chunks/framework.71dsLfGE.js";const B=JSON.parse('{"title":"5.侧栏管理","description":"","frontmatter":{"title":"5.侧栏管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/zh/使用手册/5.侧栏管理.md","filePath":"en/zh/使用手册/5.侧栏管理.md"}'),n={name:"en/zh/使用手册/5.侧栏管理.md"},r=e("h1",{id:"侧栏管理",tabindex:"-1"},[i("侧栏管理 "),e("a",{class:"header-anchor",href:"#侧栏管理","aria-label":'Permalink to "侧栏管理"'},"​")],-1),c=e("p",null,[e("img",{src:t,alt:"c0c71ebe9ddb43f188010ffe6707dfc1.png"})],-1),d=e("p",null,"支持:多侧栏和单侧栏切换",-1),l=e("p",null,"当前编辑的侧栏:该列表时自动识别的,对应的识别规则如下:",-1),_=e("p",null,"1.多语言条件下:「语言目录」下的所有文件夹为独立的侧栏",-1),h=e("p",null,"2.单语言条件下:根目录下的所有文件夹为侧栏列表",-1),p=e("p",null,"如上图所示“/zh/使用手册”表示一个侧栏,当访问路径为/zh/使用手册时自动识别并显示该侧栏",-1),f=[r,c,d,l,_,h,p];function u(m,g,x,b,k,z){return o(),a("div",null,f)}const $=s(n,[["render",u]]);export{B as __pageData,$ as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_6.软件设置.md.3GYB_gLH.js: -------------------------------------------------------------------------------- 1 | import{_ as o}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as a,c as r,o as s,l as t,a as e}from"./chunks/framework.71dsLfGE.js";const v=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/6.软件设置.md","filePath":"en/使用手册/6.软件设置.md"}'),n={name:"en/使用手册/6.软件设置.md"},i=t("h1",{id:"introduction",tabindex:"-1"},[e("Introduction "),t("a",{class:"header-anchor",href:"#introduction","aria-label":'Permalink to "Introduction"'},"​")],-1),c=t("p",null,[t("img",{src:o,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=t("p",null,"The software settings are shown above.",-1),l=t("p",null,[e("Editor CDN: If the editor of the software is not displayed correctly, you can try "),t("strong",null,"changing the CDN and restarting the software"),e(".")],-1),_=[i,c,d,l];function h(p,u,f,m,g,b){return s(),r("div",null,_)}const w=a(n,[["render",h]]);export{v as __pageData,w as default}; 2 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/en_使用手册_6.软件设置.md.3GYB_gLH.lean.js: -------------------------------------------------------------------------------- 1 | import{_ as o}from"./chunks/8286944e-c79b-4bbe-83d5-4902316dc593.xRX_9jR4.js";import{_ as a,c as r,o as s,l as t,a as e}from"./chunks/framework.71dsLfGE.js";const v=JSON.parse('{"title":"4.导航管理","description":"","frontmatter":{"title":"4.导航管理","description":"","navbar":true,"sideBar":true,"footer":false,"outline":[1,3],"editLink":false,"lastUpdated":true,"aside":"right","layout":"doc","custom":{},"hero":{"image":{"src":"","alt":"","width":"","height":""},"name":"VitePressSimple","text":"quick to config vitePress","description":"","tagline":"","actions":[],"features":[],"head":[]}},"headers":[],"relativePath":"en/使用手册/6.软件设置.md","filePath":"en/使用手册/6.软件设置.md"}'),n={name:"en/使用手册/6.软件设置.md"},i=t("h1",{id:"introduction",tabindex:"-1"},[e("Introduction "),t("a",{class:"header-anchor",href:"#introduction","aria-label":'Permalink to "Introduction"'},"​")],-1),c=t("p",null,[t("img",{src:o,alt:"8286944ec79b4bbe83d54902316dc593.png"})],-1),d=t("p",null,"The software settings are shown above.",-1),l=t("p",null,[e("Editor CDN: If the editor of the software is not displayed correctly, you can try "),t("strong",null,"changing the CDN and restarting the software"),e(".")],-1),_=[i,c,d,l];function h(p,u,f,m,g,b){return s(),r("div",null,_)}const w=a(n,[["render",h]]);export{v as __pageData,w as default}; 2 | -------------------------------------------------------------------------------- /docs/zh/更新记录/v1.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "更新记录", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "editLink": true, 9 | "lastUpdated": true, 10 | "aside": "right", 11 | "layout": "doc", 12 | "custom": {}, 13 | "hero": { 14 | "image": { 15 | "src": "", 16 | "alt": "", 17 | "width": "", 18 | "height": "" 19 | }, 20 | "name": "VitePressSimple", 21 | "text": "quick to config vitePress", 22 | "description": "", 23 | "tagline": "", 24 | "actions": [], 25 | "features": [], 26 | "head": [] 27 | }, 28 | "outline": [ 29 | 1, 30 | 3 31 | ] 32 | } 33 | --- 34 | 35 | # v1.0.0-beta.1 36 | 37 | > 发布时间:2024-04-15 38 | 39 | 软件的初始版本发布,主要功能如下: 40 | 41 | * 支持在线编辑markdown文档 42 | * 支持直接将图片复制粘贴到markdown文档中 43 | * 【多语言】支持多语言配置 44 | * 【导航】支持导航栏可视化配置 45 | * 【侧栏】支持侧栏可视化配置,支持多侧栏配置中,支持自动识别侧栏 46 | * 【搜索】支持搜索配置 47 | 48 | # v1.0.0-beta.2 49 | 50 | * 【修复】主页切换时meta获取失败的问题 51 | * 【修复】单侧栏识别时异常问题 52 | 53 | # v1.0.0-beta.3 54 | 55 | * 【修复】主页切换时feature无法正常切换 56 | * 【修改】默认的vitepres修改成1.1.3 57 | 58 | # 后续计划 Todo[] 59 | 60 | * 接入AI实现一键文档多语言转换 61 | * 通过命令行实现命令的快捷运行 62 | * 主页features支持图标(目前主页暂不支持图标) 63 | * 开放更多markdown编辑器的自定义配置 64 | * 国际化支持(目前仅支持中文) 65 | -------------------------------------------------------------------------------- /frontend/src/components/configSwitch.vue: -------------------------------------------------------------------------------- 1 | 10 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs/en/zh/更新记录/v1.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | "title": "更新记录", 4 | "description": "", 5 | "navbar": true, 6 | "sideBar": true, 7 | "footer": false, 8 | "editLink": true, 9 | "lastUpdated": true, 10 | "aside": "right", 11 | "layout": "doc", 12 | "custom": {}, 13 | "hero": { 14 | "image": { 15 | "src": "", 16 | "alt": "", 17 | "width": "", 18 | "height": "" 19 | }, 20 | "name": "VitePressSimple", 21 | "text": "quick to config vitePress", 22 | "description": "", 23 | "tagline": "", 24 | "actions": [], 25 | "features": [], 26 | "head": [] 27 | }, 28 | "outline": [ 29 | 1, 30 | 3 31 | ] 32 | } 33 | --- 34 | 35 | # v1.0.0-beta.1 36 | 37 | > 发布时间:2024-04-15 38 | 39 | 软件的初始版本发布,主要功能如下: 40 | 41 | * 支持在线编辑markdown文档 42 | * 支持直接将图片复制粘贴到markdown文档中 43 | * 【多语言】支持多语言配置 44 | * 【导航】支持导航栏可视化配置 45 | * 【侧栏】支持侧栏可视化配置,支持多侧栏配置中,支持自动识别侧栏 46 | * 【搜索】支持搜索配置 47 | 48 | # v1.0.0-beta.2 49 | 50 | * 【修复】主页切换时meta获取失败的问题 51 | * 【修复】单侧栏识别时异常问题 52 | 53 | # v1.0.0-beta.3 54 | 55 | * 【修复】主页切换时feature无法正常切换 56 | * 【修改】默认的vitepres修改成1.1.3 57 | 58 | # 后续计划 Todo[] 59 | 60 | * 接入AI实现一键文档多语言转换 61 | * 通过命令行实现命令的快捷运行 62 | * 主页features支持图标(目前主页暂不支持图标) 63 | * 开放更多markdown编辑器的自定义配置 64 | * 国际化支持(目前仅支持中文) 65 | -------------------------------------------------------------------------------- /frontend/src/layout/nav/navTemplate1.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /frontend/src/components/configRadio.vue: -------------------------------------------------------------------------------- 1 | 18 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /frontend/src/i18n/locales/en/shell.ts: -------------------------------------------------------------------------------- 1 | import { defaultVpSimple } from "@/configs/defaultVpSimple"; 2 | 3 | export const EnShell = { 4 | //终端配置 5 | config: "Terminal Config", 6 | //运行日志 7 | runLog: "Run Log", 8 | //默认值 9 | default: "Default", 10 | //暂无运行中的终端 11 | noRunTerminal: "No Running Terminal", 12 | //起始目录不能为空 13 | runPathEmpty: "Run Path Can Not Be Empty", 14 | //"cmd不能为空" 15 | cmdEmpty: "Cmd Can Not Be Empty", 16 | 17 | docsBuild: "Docs Build Command", 18 | //运行目录 19 | labels: { 20 | //默认目录 21 | runPath: "Default Run Path", 22 | //git运行的目录 23 | gitPath: "Git Run Path", 24 | //文档dev命令 25 | docsDev: "Docs Dev Command", 26 | //文档build命令 27 | docsBuild: "Docs Build Command", 28 | }, 29 | tips: { 30 | //运行目录的路径,默认值是项目根目录 31 | runPath: "Run Path, Default Value Is Project Root Path", 32 | //git运行的目录,一般为vitepress项目根目录,但有时vitepres是做其它项目的子项目,所以需要指定 33 | gitPath: 34 | "Git Run Path, Default Value Is Vitepress Project Root Path, But Sometimes Vitepress Is A Sub Project Of Other Projects, So You Need To Specify", 35 | //文档dev命令,默认值是vitepress项目根目录下的dev命令 36 | docsDev: "Docs Dev Command, Default Value Is " + defaultVpSimple.cmdDocsDev, 37 | //文档build命令,默认值是vitepress项目根目录下的build命令 38 | docsBuild: 39 | "Docs Build Command, Default Value Is" + defaultVpSimple.cmdDocsBuild, 40 | }, 41 | }; 42 | -------------------------------------------------------------------------------- /docs/.vitepress/dist/static/app.mhwNdxkg.js: -------------------------------------------------------------------------------- 1 | import{V as o,a5 as p,a6 as u,a7 as l,a8 as c,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,Y as P,d as _,u as v,k as y,y as C,af as E,ag as b,ah as w,ai as R}from"./chunks/framework.71dsLfGE.js";import{t as S}from"./chunks/theme.B0jgJMLq.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=_({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&E(),b(),w(),s.setup&&s.setup(),()=>R(s.Layout)}});async function D(){globalThis.__VITEPRESS__=!0;const e=L(),a=V();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function V(){return h(T)}function L(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=P(()=>import(n),[])),o&&(e=!1),r},s.NotFound)}o&&D().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{D as createApp}; 2 | -------------------------------------------------------------------------------- /app.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "wailstemplate/application/wailshelper" 6 | ) 7 | 8 | // App struct 9 | type App struct { 10 | ctx context.Context 11 | } 12 | 13 | // NewApp creates a new App application struct 14 | // NewApp 创建一个新的 App 应用程序 15 | func NewApp() *App { 16 | return &App{} 17 | } 18 | 19 | // startup is called at application startup 20 | // startup 在应用程序启动时调用 21 | func (a *App) startup(ctx context.Context) { 22 | // Perform your setup here 23 | // 在这里执行初始化设置 24 | a.ctx = ctx 25 | wailshelper.SetCtx(&a.ctx) 26 | } 27 | 28 | // domReady is called after the front-end dom has been loaded 29 | // domReady 在前端Dom加载完毕后调用 30 | func (a *App) domReady(ctx context.Context) { 31 | // Add your action here 32 | // 在这里添加你的操作 33 | } 34 | 35 | // beforeClose is called when the application is about to quit, 36 | // either by clicking the window close button or calling runtime.Quit. 37 | // Returning true will cause the application to continue, 38 | // false will continue shutdown as normal. 39 | // beforeClose在单击窗口关闭按钮或调用runtime.Quit即将退出应用程序时被调用. 40 | // 返回 true 将导致应用程序继续,false 将继续正常关闭。 41 | func (a *App) beforeClose(ctx context.Context) (prevent bool) { 42 | return false 43 | } 44 | 45 | // shutdown is called at application termination 46 | // 在应用程序终止时被调用 47 | func (a *App) shutdown(ctx context.Context) { 48 | // Perform your teardown here 49 | // 在此处做一些资源释放的操作 50 | 51 | } 52 | -------------------------------------------------------------------------------- /frontend/src/components/emptyProject.vue: -------------------------------------------------------------------------------- 1 | 19 | 40 | 41 | -------------------------------------------------------------------------------- /application/services/update.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "wailstemplate/application/constant/keys" 5 | "wailstemplate/application/pkg/autoupdate" 6 | "wailstemplate/application/pkg/cfg" 7 | setting "wailstemplate/settings" 8 | ) 9 | 10 | type UpdateService struct { 11 | } 12 | 13 | func NewUpdateService() *UpdateService { 14 | return &UpdateService{} 15 | } 16 | 17 | func (s *UpdateService) UpdateNewVersion() { 18 | SetUpdateConfig() 19 | autoupdate.CheckUpdateEntry() 20 | } 21 | func (s *UpdateService) HasNewVersion() bool { 22 | SetUpdateConfig() 23 | info := autoupdate.GetGitRepoLatestReleaseInfo() 24 | if info == nil { 25 | return false 26 | } 27 | if info.Version != setting.Version { 28 | return true 29 | } 30 | return false 31 | } 32 | 33 | func SetUpdateConfig() { 34 | source := cfg.GetString(keys.ConfigKeySysUpdateSource) 35 | var gitType autoupdate.GitTypeEnum = autoupdate.GitTypeGithub 36 | if source == "gitee" { 37 | gitType = autoupdate.GitTypeGitee 38 | } 39 | autoupdate.SetUpdateConfig(autoupdate.UpdateConfig{ 40 | AppName: setting.AppName, 41 | CurrVersion: setting.Version, 42 | GitType: gitType, 43 | GitOwner: setting.GitAuthor, 44 | GitRepo: setting.GitRepo, 45 | WindowReleaseNameContainStr: setting.WindowZipContainStr, 46 | MacReleaseNameContainStr: setting.MacosZipContainStr, 47 | }) 48 | } 49 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexEditor.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /application/pkg/mynet/check_connect.go: -------------------------------------------------------------------------------- 1 | // Package mynet 2 | // @Author: zhangdi 3 | // @File: ping 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/23 18:30 6 | package mynet 7 | 8 | import ( 9 | "errors" 10 | "net" 11 | "net/url" 12 | "time" 13 | ) 14 | 15 | // Ping 16 | // 如果收到"network icmp unknown"的错误消息,操作系统不支持ICMP协议,可使用tcp协议 17 | func Ping(host string, timeout time.Duration) error { 18 | conn, err := net.DialTimeout("icmp", host, timeout) 19 | if err != nil { 20 | return err 21 | } 22 | defer conn.Close() 23 | return nil 24 | } 25 | 26 | // CheckConnection 通过TCP协议进行网络连接检查 27 | func CheckConnection() error { 28 | host := "www.baidu.com" //可自行输入 29 | port := "80" 30 | timeout := time.Second 31 | conn, err := net.DialTimeout("tcp", host+":"+port, timeout) 32 | if err != nil { 33 | return err 34 | } 35 | defer conn.Close() 36 | return nil 37 | } 38 | 39 | // CheckConnectionWithUrl 检测网络连接状态 40 | func CheckConnectionWithUrl(host, port string) error { 41 | domain, err := getDomain(host) 42 | if err != nil { 43 | return errors.New("链接解析异常" + err.Error()) 44 | } 45 | timeout := time.Second 46 | conn, err := net.DialTimeout("tcp", domain+":"+port, timeout) 47 | if err != nil { 48 | return err 49 | } 50 | defer conn.Close() 51 | return nil 52 | } 53 | func getDomain(link string) (string, error) { 54 | u, err := url.Parse(link) 55 | if err != nil { 56 | return "", err 57 | } 58 | 59 | domain := u.Hostname() 60 | 61 | return domain, nil 62 | } 63 | -------------------------------------------------------------------------------- /vitepress-template/docs/markdown-examples.md: -------------------------------------------------------------------------------- 1 | # Markdown Extension Examples 2 | 3 | This page demonstrates some of the built-in markdown extensions provided by VitePress. 4 | 5 | ## Syntax Highlighting 6 | 7 | VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: 8 | 9 | **Input** 10 | 11 | ````md 12 | ```js{4} 13 | export default { 14 | data () { 15 | return { 16 | msg: 'Highlighted!' 17 | } 18 | } 19 | } 20 | ``` 21 | ```` 22 | 23 | **Output** 24 | 25 | ```js{4} 26 | export default { 27 | data () { 28 | return { 29 | msg: 'Highlighted!' 30 | } 31 | } 32 | } 33 | ``` 34 | 35 | ## Custom Containers 36 | 37 | **Input** 38 | 39 | ```md 40 | ::: info 41 | This is an info box. 42 | ::: 43 | 44 | ::: tip 45 | This is a tip. 46 | ::: 47 | 48 | ::: warning 49 | This is a warning. 50 | ::: 51 | 52 | ::: danger 53 | This is a dangerous warning. 54 | ::: 55 | 56 | ::: details 57 | This is a details block. 58 | ::: 59 | ``` 60 | 61 | **Output** 62 | 63 | ::: info 64 | This is an info box. 65 | ::: 66 | 67 | ::: tip 68 | This is a tip. 69 | ::: 70 | 71 | ::: warning 72 | This is a warning. 73 | ::: 74 | 75 | ::: danger 76 | This is a dangerous warning. 77 | ::: 78 | 79 | ::: details 80 | This is a details block. 81 | ::: 82 | 83 | ## More 84 | 85 | Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). 86 | -------------------------------------------------------------------------------- /frontend/src/views/index/indexEditorWriter.vue: -------------------------------------------------------------------------------- 1 | 19 | 43 | 48 | -------------------------------------------------------------------------------- /frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue"; 2 | import { createPinia } from "pinia"; 3 | import "./style.scss"; 4 | import App from "./App.vue"; 5 | import router from "./router"; 6 | import i18n from "./i18n"; 7 | import { 8 | Alert, 9 | Button, 10 | Divider, 11 | Dropdown, 12 | Empty, 13 | Form, 14 | Input, 15 | InputNumber, 16 | List, 17 | Menu, 18 | message, 19 | Modal, 20 | Popconfirm, 21 | Radio, 22 | Switch, 23 | Tabs, 24 | Tag, 25 | Tooltip, 26 | Tree, 27 | } from "ant-design-vue"; 28 | 29 | // Import icon libraries 30 | import { Quasar } from "quasar"; 31 | import "@quasar/extras/material-icons/material-icons.css"; 32 | // Import Quasar css 33 | import "quasar/src/css/index.sass"; 34 | import { InstallCodemirro } from "codemirror-editor-vue3"; 35 | 36 | const app = createApp(App); 37 | 38 | app.use(createPinia()); 39 | app.use(router); 40 | app.use(i18n); 41 | app.use(Quasar, { 42 | plugins: {}, // import Quasar plugins and add here 43 | }); 44 | //局部注册Antd 45 | app 46 | .use(Button) 47 | .use(Tree) 48 | .use(Input) 49 | .use(Form) 50 | .use(Tabs) 51 | .use(List) 52 | .use(Switch) 53 | .use(InputNumber) 54 | .use(Radio) 55 | .use(Modal) 56 | .use(Dropdown) 57 | .use(Menu) 58 | .use(Empty) 59 | .use(Alert) 60 | .use(Tag) 61 | .use(Divider) 62 | .use(Popconfirm) 63 | .use(Tooltip); 64 | 65 | app.use(InstallCodemirro); 66 | 67 | app.config.globalProperties.$message = message; 68 | 69 | app.mount("#app"); 70 | -------------------------------------------------------------------------------- /application/pkg/cfg/helper_test.go: -------------------------------------------------------------------------------- 1 | // Package cfg 2 | // @Author: zhangdi 3 | // @File: helper_test 4 | // @Version: 1.0.0 5 | // @Date: 2023/11/22 12:45 6 | package cfg 7 | 8 | import ( 9 | "fmt" 10 | "sync" 11 | "testing" 12 | ) 13 | 14 | // 测试多线程下批量写入,是否安全 15 | func TestSaveBatch(t *testing.T) { 16 | err := InitCfg("cfg1.yaml") 17 | if err != nil { 18 | println(err.Error()) 19 | } 20 | var wg sync.WaitGroup 21 | wg.Add(6) 22 | go writeKey("test1.key", &wg) 23 | go writeKey("test2.key", &wg) 24 | go writeKey("test3.key", &wg) 25 | go writeKey("test4.key", &wg) 26 | go writeKey("test1.key", &wg) 27 | go writeKey("test2.key", &wg) 28 | wg.Wait() 29 | } 30 | 31 | func TestReadBatch(t *testing.T) { 32 | err := InitCfg("cfg1.yaml") 33 | if err != nil { 34 | println(err.Error()) 35 | } 36 | var wg sync.WaitGroup 37 | wg.Add(6) 38 | go Readkey("test1.key", &wg) 39 | go Readkey("test2.key", &wg) 40 | go Readkey("test3.key", &wg) 41 | go Readkey("test4.key", &wg) 42 | go Readkey("test1.key", &wg) 43 | go Readkey("test2.key", &wg) 44 | wg.Wait() 45 | } 46 | 47 | func Readkey(baseKey string, wg *sync.WaitGroup) { 48 | defer wg.Done() 49 | for i := 0; i < 100; i++ { 50 | k := fmt.Sprintf("%s%d", baseKey, i) 51 | println(Get(k)) 52 | } 53 | } 54 | func writeKey(baseKey string, wg *sync.WaitGroup) { 55 | defer wg.Done() 56 | for i := 0; i < 100; i++ { 57 | k := fmt.Sprintf("%s%d", baseKey, i) 58 | err := Set(k, i) 59 | if err != nil { 60 | println(k + err.Error()) 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /application/first/init.go: -------------------------------------------------------------------------------- 1 | package first 2 | 3 | import ( 4 | "fmt" 5 | "path" 6 | "path/filepath" 7 | "wailstemplate/application/constant/keys" 8 | "wailstemplate/application/db/dbinit" 9 | "wailstemplate/application/pkg/cfg" 10 | "wailstemplate/application/pkg/filehelper" 11 | "wailstemplate/application/pkg/mylog" 12 | "wailstemplate/application/pkg/mytask" 13 | "wailstemplate/application/pkg/startup" 14 | "wailstemplate/application/pkg/utils" 15 | setting "wailstemplate/settings" 16 | ) 17 | 18 | // InitDb 初始化sqlite数据库连接 19 | func InitDb() { 20 | 21 | dbinit.InitDb(filepath.Join(utils.GetUserHomeDir(), setting.AppName, "db"), 22 | setting.EntityAutoMigrateList) 23 | 24 | } 25 | 26 | // InitConfig 初始化配置文件 27 | func InitConfig() { 28 | yamlPath := filepath.Join(utils.GetUserHomeDir(), setting.AppName, "configs.yaml") 29 | err := cfg.InitCfg(yamlPath) 30 | if err != nil { 31 | mylog.Error(err.Error()) 32 | panic(err.Error()) 33 | } 34 | } 35 | 36 | // CheckStartup 检查开机自启 37 | func CheckStartup() { 38 | err := startup.SetAutoStart(setting.AppName, cfg.GetBool(keys.ConfigKeyIsStartup)) 39 | if err != nil { 40 | mylog.Error(fmt.Sprintf("设置开机自启失败:%s", err.Error())) 41 | } 42 | 43 | } 44 | 45 | // InitLog 初始化日志系统 46 | func InitLog() { 47 | LogDir := path.Join(utils.GetUserHomeDir(), setting.AppName, "logs") 48 | filehelper.CreateDir(LogDir) 49 | mylog.SetLogPath(LogDir) 50 | } 51 | 52 | // InitTask 初始化定时任务 53 | func InitTask() { 54 | Manager = mytask.NewTaskManager() 55 | taskAdd() //添加定时任务 56 | } 57 | --------------------------------------------------------------------------------