{{ 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 = /
30 |
--------------------------------------------------------------------------------
/frontend/src/components/simSwitch.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ 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 |