├── .github ├── release-drafter.yml ├── releasesText.md └── workflows │ ├── debug.yml │ ├── jekyll-gh-pages.yml │ └── 发布软件.yml ├── .gitignore ├── .gitmodules ├── CNAME ├── GoEasyDesigner ├── .gitignore ├── Dockerfile ├── TemplateProject │ └── newWindow.zip ├── Terminal │ ├── Terminal_darwin.go │ ├── Terminal_darwin_test.go │ ├── Terminal_window.go │ └── Terminal_window_test.go ├── app.go ├── build │ ├── README.md │ ├── appicon.png │ ├── darwin │ │ ├── Info.dev.plist │ │ └── Info.plist │ ├── dmg.sh │ └── windows │ │ ├── icon.ico │ │ ├── info.json │ │ ├── installer │ │ ├── project.nsi │ │ └── wails_tools.nsh │ │ └── wails.exe.manifest ├── docker-compose.yml ├── frontend │ ├── README.md │ ├── index.html │ ├── jsconfig.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── postcss.config.js │ ├── public │ │ ├── 1.html │ │ ├── cdn.tailwindcss.com_3.4.5.js │ │ ├── font-awesome.css │ │ ├── releases_latest.json │ │ ├── webfonts │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff2 │ │ │ ├── fa-v4compatibility.ttf │ │ │ └── fa-v4compatibility.woff2 │ │ └── 自定义组件 │ │ │ ├── ColorfulText │ │ │ ├── ColorfulText.js │ │ │ ├── ColorfulText.vue │ │ │ └── ColorfulTextAttr.vue │ │ │ ├── TimeProgressBar │ │ │ ├── TimeProgressBar.js │ │ │ ├── TimeProgressBar.vue │ │ │ └── TimeProgressBarAttr.vue │ │ │ ├── components.json │ │ │ ├── 流光边框 │ │ │ ├── 流光边框.js │ │ │ ├── 流光边框.vue │ │ │ └── 流光边框属性.vue │ │ │ └── 登录框 │ │ │ ├── 登录框.js │ │ │ ├── 登录框.vue │ │ │ └── 登录框属性.vue │ ├── src │ │ ├── Helper.js │ │ ├── action │ │ │ └── app.js │ │ ├── app10.vue │ │ ├── app11.vue │ │ ├── assets │ │ │ ├── base.css │ │ │ └── main.css │ │ ├── components │ │ │ ├── RenderDesignComponent.vue │ │ │ ├── RenderDesignComponentPreview.vue │ │ │ ├── RenderDesignComponentWin.vue │ │ │ ├── Shape.vue │ │ │ ├── boxs │ │ │ │ ├── el │ │ │ │ │ ├── Button │ │ │ │ │ │ ├── Button.js │ │ │ │ │ │ ├── Button.vue │ │ │ │ │ │ └── ButtonAttr.vue │ │ │ │ │ ├── CheckBox │ │ │ │ │ │ ├── CheckBox.js │ │ │ │ │ │ ├── CheckBox.vue │ │ │ │ │ │ └── CheckBoxAttr.vue │ │ │ │ │ ├── CommonLayout │ │ │ │ │ │ ├── CommonLayout.js │ │ │ │ │ │ ├── CommonLayout.vue │ │ │ │ │ │ └── CommonLayoutAttr.vue │ │ │ │ │ ├── Container │ │ │ │ │ │ ├── Container.js │ │ │ │ │ │ └── ContainerAttr.vue │ │ │ │ │ ├── ControlButton │ │ │ │ │ │ ├── ControlButton.js │ │ │ │ │ │ ├── ControlButton.vue │ │ │ │ │ │ └── ControlButtonAttr.vue │ │ │ │ │ ├── CustomComponent │ │ │ │ │ │ ├── CustomComponent.js │ │ │ │ │ │ ├── CustomComponent.vue │ │ │ │ │ │ └── CustomComponentAttr.vue │ │ │ │ │ ├── FlexLayout │ │ │ │ │ │ ├── FlexLayout.js │ │ │ │ │ │ ├── FlexLayout.vue │ │ │ │ │ │ └── FlexLayoutAttr.vue │ │ │ │ │ ├── Label │ │ │ │ │ │ ├── Label.js │ │ │ │ │ │ ├── Label.vue │ │ │ │ │ │ └── LabelAttr.vue │ │ │ │ │ ├── Menu │ │ │ │ │ │ ├── Menu.js │ │ │ │ │ │ ├── Menu.vue │ │ │ │ │ │ └── MenuAttr.vue │ │ │ │ │ ├── ProgressBar │ │ │ │ │ │ ├── ProgressBar.js │ │ │ │ │ │ ├── ProgressBar.vue │ │ │ │ │ │ └── ProgressBarAttr.vue │ │ │ │ │ ├── RadioButton │ │ │ │ │ │ ├── RadioButton.js │ │ │ │ │ │ ├── RadioButton.vue │ │ │ │ │ │ └── RadioButtonAttr.vue │ │ │ │ │ ├── Switch │ │ │ │ │ │ ├── Switch.js │ │ │ │ │ │ ├── Switch.vue │ │ │ │ │ │ └── SwitchAttr.vue │ │ │ │ │ ├── Table │ │ │ │ │ │ ├── Table.js │ │ │ │ │ │ ├── Table.vue │ │ │ │ │ │ └── TableAttr.vue │ │ │ │ │ ├── Tabs │ │ │ │ │ │ ├── Tabs.js │ │ │ │ │ │ ├── Tabs.vue │ │ │ │ │ │ └── TabsAttr.vue │ │ │ │ │ ├── TabsTW │ │ │ │ │ │ ├── TabsTW.js │ │ │ │ │ │ ├── TabsTW.vue │ │ │ │ │ │ ├── TabsTWAttr.vue │ │ │ │ │ │ └── fontawesome_free_icon_names.js │ │ │ │ │ ├── TextEdit │ │ │ │ │ │ ├── TextEdit.js │ │ │ │ │ │ ├── TextEdit.vue │ │ │ │ │ │ └── TextEditAttr.vue │ │ │ │ │ ├── Tooltip │ │ │ │ │ │ ├── Tooltip.js │ │ │ │ │ │ ├── Tooltip.vue │ │ │ │ │ │ └── TooltipAttr.vue │ │ │ │ │ └── Tree │ │ │ │ │ │ ├── Tree.js │ │ │ │ │ │ ├── Tree.vue │ │ │ │ │ │ └── TreeAttr.vue │ │ │ │ ├── td │ │ │ │ │ ├── Button │ │ │ │ │ │ ├── Button.js │ │ │ │ │ │ ├── Button.vue │ │ │ │ │ │ └── ButtonAttr.vue │ │ │ │ │ ├── Link │ │ │ │ │ │ ├── Link.js │ │ │ │ │ │ ├── Link.vue │ │ │ │ │ │ └── LinkAttr.vue │ │ │ │ │ ├── Progress │ │ │ │ │ │ ├── Progress.js │ │ │ │ │ │ ├── Progress.vue │ │ │ │ │ │ └── ProgressAttr.vue │ │ │ │ │ ├── Select │ │ │ │ │ │ ├── Select.js │ │ │ │ │ │ ├── Select.vue │ │ │ │ │ │ └── SelectAttr.vue │ │ │ │ │ └── Switch │ │ │ │ │ │ ├── Switch.js │ │ │ │ │ │ ├── Switch.vue │ │ │ │ │ │ └── SwitchAttr.vue │ │ │ │ └── tw │ │ │ │ │ └── Button │ │ │ │ │ ├── Button.js │ │ │ │ │ ├── Button.vue │ │ │ │ │ └── ButtonAttr.vue │ │ │ ├── common │ │ │ │ └── IconSelector.vue │ │ │ └── designer │ │ │ │ ├── PreviewDialog.vue │ │ │ │ ├── header │ │ │ │ └── ToolBtn.vue │ │ │ │ ├── left │ │ │ │ ├── ComponentLeft.vue │ │ │ │ ├── PropertyTable.vue │ │ │ │ └── TreeSelectBox.vue │ │ │ │ └── public │ │ │ │ ├── DraggableDivider.vue │ │ │ │ ├── WindowAttr.vue │ │ │ │ ├── common-event-component.vue │ │ │ │ ├── common-properties.vue │ │ │ │ ├── 代码编辑器.vue │ │ │ │ ├── 支持库.vue │ │ │ │ ├── 新建项目对话框.vue │ │ │ │ ├── 项目管理.vue │ │ │ │ └── 项目配置对话框.vue │ │ ├── helpDoc │ │ │ └── systemFcDoc.json │ │ ├── i18n │ │ │ ├── index.js │ │ │ └── locales │ │ │ │ ├── en.json │ │ │ │ └── zh-Hans.json │ │ ├── main.js │ │ ├── public.js │ │ ├── stores │ │ │ ├── HistoryManager.js │ │ │ └── appStore.js │ │ ├── update_github_latest_releases.sh │ │ ├── 提示语法生成器.js │ │ ├── 测试代码编辑器.vue │ │ ├── 编辑器 │ │ │ ├── 窗口事件代码模板.js │ │ │ ├── 编辑器提示数据.js │ │ │ └── 编辑器语法文件.js │ │ └── 编辑的语法提示.js │ ├── tailwind.config.js │ ├── vite.config.js │ └── wailsjs │ │ ├── go │ │ └── main │ │ │ ├── App.d.ts │ │ │ └── App.js │ │ └── runtime │ │ ├── package.json │ │ ├── runtime.d.ts │ │ └── runtime.js ├── go.mod ├── go.sum ├── main.go ├── myfunc │ ├── myfunc.go │ └── myfunc_test.go ├── mymodel │ ├── Version.go │ ├── git项目操作.go │ ├── git项目操作_test.go │ ├── 文件监视模块.go │ ├── 文件监视模块_test.go │ ├── 自动更新模块.go │ └── 自动更新模块_test.go ├── ssh_nginx │ ├── Caddyfile │ ├── default.conf │ └── docker-compose.yml └── wails.json ├── LICENSE ├── QtEsayDesigner IDE插件.jar ├── README.assets ├── image-20230828083413650.png ├── image-20230828084834120.png └── swskm.jpg ├── README.md ├── README.zh-Hans.md ├── script └── main.go └── tool └── 一键环境配置.e /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: 'v$RESOLVED_VERSION' 2 | tag-template: 'v$RESOLVED_VERSION' 3 | categories: 4 | - title: '🚀 新功能' 5 | labels: 6 | - '新功能' 7 | - title: '🐛 Bug 修复' 8 | labels: 9 | - 'bug' 10 | - title: '🧰 日常维护' 11 | label: '日常维护' 12 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)' 13 | change-title-escapes: '\<*_&' 14 | version-resolver: 15 | major: 16 | labels: 17 | - 'major' 18 | minor: 19 | labels: 20 | - 'minor' 21 | patch: 22 | labels: 23 | - 'patch' 24 | default: patch 25 | template: | 26 | # GoEasyDesigner 窗口设计师 27 | * 基于 go 语言 使用 wails框架, 支持 window macos linux 等系统. 28 | 29 | $CHANGES 30 | no-changes-template: | 31 | 快下载体验~ -------------------------------------------------------------------------------- /.github/releasesText.md: -------------------------------------------------------------------------------- 1 | # GoEasyDesigner 窗口设计师 2 | 3 | 奋斗了{{用了多少时间}},本次更新内容如下: 4 | 5 | {{最新发布信息}} 6 | 7 | {{变更内容}} -------------------------------------------------------------------------------- /.github/workflows/jekyll-gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: 部署 GitHub Pages 2 | 3 | on: 4 | # Runs on pushes targeting the default branch 5 | # push: 6 | # branches: ["main"] 7 | 8 | # Allows you to run this workflow manually from the Actions tab 9 | workflow_dispatch: 10 | # push: 11 | # paths-ignore: 12 | # - '**/*.md' 13 | # - '**/*.yml' 14 | # - .gitignore 15 | # - .editorconfig 16 | 17 | # workflow_run: 18 | # workflows: ["发布软件"] 19 | # types: 20 | # - completed 21 | 22 | 23 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 24 | permissions: 25 | contents: read 26 | pages: write 27 | id-token: write 28 | 29 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 30 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 31 | concurrency: 32 | group: "pages" 33 | cancel-in-progress: false 34 | 35 | jobs: 36 | # Build job 37 | build: 38 | runs-on: ubuntu-latest 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@v3 42 | - name: Setup Pages 43 | uses: actions/configure-pages@v3 44 | - uses: actions/cache@v3 45 | with: 46 | path: | 47 | /home/runner/.npm 48 | key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }} 49 | restore-keys: | 50 | ${{ runner.os }}-js- 51 | - name: install 52 | run: | 53 | cd GoEasyDesigner/frontend/src 54 | ./update_github_latest_releases.sh 55 | cd ../ 56 | npm i 57 | npm run build 58 | 59 | - name: Build with Jekyll 60 | uses: actions/jekyll-build-pages@v1 61 | with: 62 | source: ./GoEasyDesigner/frontend/dist 63 | destination: ./_site 64 | - name: Upload artifact 65 | uses: actions/upload-pages-artifact@v2 66 | - name: Deploy file 67 | uses: wlixcc/SFTP-Deploy-Action@v1.2.4 68 | with: 69 | server: ${{ secrets.FTP_SERVER }} 70 | port: ${{ secrets.FTP_PORT }} 71 | username: ${{ secrets.FTP_USERNAME }} 72 | password: ${{ secrets.FTP_PASSWORD }} 73 | local_path: './GoEasyDesigner/frontend/dist/*' 74 | remote_path: '/config/www' 75 | sftp_only: true 76 | 77 | # Deployment job 78 | deploy: 79 | environment: 80 | name: github-pages 81 | url: ${{ steps.deployment.outputs.page_url }} 82 | runs-on: ubuntu-latest 83 | needs: build 84 | steps: 85 | - name: Deploy to GitHub Pages 86 | id: deployment 87 | uses: actions/deploy-pages@v2 88 | -------------------------------------------------------------------------------- /.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 | .vscode 30 | *.lockb 31 | GoEasyDesigner/frontend/package.json.md5 32 | package-lock.json 33 | package.json.md5 34 | wails-demo/frontend/package.json.md5 35 | wails-demo/frontend/package-lock.json 36 | GoEasyDesigner/ssh_nginx/.env 37 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "go-easy-demo"] 2 | path = go-easy-demo 3 | url = https://github.com/duolabmeng6/wails-template-vue-go-easy 4 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | ggg.yx24.me 2 | -------------------------------------------------------------------------------- /GoEasyDesigner/.gitignore: -------------------------------------------------------------------------------- 1 | build/bin 2 | node_modules 3 | frontend/dist 4 | -------------------------------------------------------------------------------- /GoEasyDesigner/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18-alpine 2 | WORKDIR /app 3 | COPY ./frontend . 4 | 5 | RUN npm install --registry=http://registry.npmmirror.com 6 | RUN npm run build 7 | 8 | # docker build -t my-node-app . 9 | # docker run -v ./frontend:/app -p 3000:3000 -it --rm --name my-running-app my-node-app /bin/sh 10 | 11 | FROM nginx:alpine-slim 12 | COPY --from=0 /app/dist /usr/share/nginx/html/ 13 | COPY nginx.conf /etc/nginx/conf.d/default.conf 14 | EXPOSE 3005 -------------------------------------------------------------------------------- /GoEasyDesigner/TemplateProject/newWindow.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/TemplateProject/newWindow.zip -------------------------------------------------------------------------------- /GoEasyDesigner/Terminal/Terminal_darwin.go: -------------------------------------------------------------------------------- 1 | //go:build darwin 2 | // +build darwin 3 | 4 | package Terminal 5 | 6 | import ( 7 | "bufio" 8 | "errors" 9 | "fmt" 10 | "os/exec" 11 | "sync" 12 | "syscall" 13 | ) 14 | 15 | type Terminal struct { 16 | cmd *exec.Cmd 17 | stdout *bufio.Scanner 18 | isRunning bool 19 | isDone bool 20 | lock sync.Mutex 21 | } 22 | 23 | func NewTerminal() *Terminal { 24 | return &Terminal{} 25 | } 26 | 27 | func (t *Terminal) StartCommand(command string, fn func(string, error)) bool { 28 | t.lock.Lock() 29 | defer t.lock.Unlock() 30 | 31 | if t.isRunning { 32 | fn("", fmt.Errorf("已有命令在运行")) 33 | return false 34 | } 35 | 36 | cmd := exec.Command("bash", "-c", command) 37 | cmd.SysProcAttr = &syscall.SysProcAttr{ 38 | Setpgid: true, 39 | } 40 | 41 | stdout, err := cmd.StdoutPipe() 42 | if err != nil { 43 | fn("", err) 44 | return false 45 | } 46 | 47 | if err := cmd.Start(); err != nil { 48 | fn("", err) 49 | return false 50 | } 51 | t.cmd = cmd 52 | t.stdout = bufio.NewScanner(stdout) 53 | t.isRunning = true 54 | 55 | go func() { 56 | for t.stdout.Scan() { 57 | output := t.stdout.Text() 58 | fn(output, nil) 59 | } 60 | 61 | if err := t.stdout.Err(); err != nil { 62 | fn("", err) 63 | } 64 | 65 | t.lock.Lock() 66 | t.isRunning = false 67 | t.isDone = true 68 | t.lock.Unlock() 69 | }() 70 | 71 | go func() { 72 | cmd.Wait() 73 | t.lock.Lock() 74 | t.isRunning = false 75 | t.lock.Unlock() 76 | println("命令已完成") 77 | fn("", errors.New("命令已完成")) 78 | 79 | }() 80 | return true 81 | } 82 | 83 | func (t *Terminal) StopCommand() { 84 | t.lock.Lock() 85 | defer t.lock.Unlock() 86 | 87 | if t.isRunning { 88 | err := syscall.Kill(-t.cmd.Process.Pid, syscall.SIGKILL) 89 | if err != nil { 90 | return 91 | } 92 | } 93 | } 94 | 95 | func (t *Terminal) StopCommand2() { 96 | t.lock.Lock() 97 | defer t.lock.Unlock() 98 | //发送 ctrl + c 的信号 让程序平稳的退出 99 | 100 | // 向进程发送Ctrl+C信号 101 | process := t.cmd.Process 102 | if process != nil { 103 | //err := process.Signal(syscall.SIGHUP) 104 | err := syscall.Kill(-t.cmd.Process.Pid, syscall.SIGTERM) 105 | 106 | if err != nil { 107 | // 处理错误 108 | } 109 | } 110 | } 111 | func (t *Terminal) IsCommandDone() bool { 112 | t.lock.Lock() 113 | defer t.lock.Unlock() 114 | return t.isDone 115 | } 116 | -------------------------------------------------------------------------------- /GoEasyDesigner/Terminal/Terminal_darwin_test.go: -------------------------------------------------------------------------------- 1 | package Terminal 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | ) 7 | 8 | func TestNewTerminalMac(t *testing.T) { 9 | terminal := NewTerminal() 10 | if terminal == nil { 11 | t.Error("NewTerminalWindow() failed") 12 | } 13 | // 14 | 命令 := ` 15 | cd /Users/ll/Documents/GitHub/GoEasyDesigner/wails-demo/frontend 16 | npm run dev 17 | ` 18 | 19 | terminal.StartCommand(命令, func(output string, err error) { 20 | if err != nil { 21 | print("err:", output) 22 | print("err2:", err.Error()) 23 | //t.Error(err.Error()) 24 | } 25 | println(output) 26 | }) 27 | 28 | time.Sleep(3 * time.Second) 29 | terminal.StopCommand2() 30 | println("停止命令2") 31 | time.Sleep(10 * time.Second) 32 | terminal.StopCommand() 33 | println("停止命令1") 34 | 35 | } 36 | -------------------------------------------------------------------------------- /GoEasyDesigner/Terminal/Terminal_window.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package Terminal 5 | 6 | import ( 7 | "bufio" 8 | "errors" 9 | "fmt" 10 | "github.com/duolabmeng6/goefun/ecore" 11 | "os/exec" 12 | "sync" 13 | "syscall" 14 | ) 15 | 16 | type Terminal struct { 17 | cmd *exec.Cmd 18 | stdout *bufio.Scanner 19 | isRunning bool 20 | isDone bool 21 | lock sync.Mutex 22 | } 23 | 24 | func NewTerminal() *Terminal { 25 | return &Terminal{} 26 | } 27 | 28 | func (t *Terminal) StartCommand(command string, fn func(string, error)) bool { 29 | t.lock.Lock() 30 | defer t.lock.Unlock() 31 | 32 | if t.isRunning { 33 | fn("", fmt.Errorf("已有命令在运行")) 34 | return false 35 | } 36 | 37 | cmd := exec.Command("cmd", "/C", command) 38 | // 隐藏黑色窗口 39 | // For Windows, use Start instead of Run to hide the console window 40 | cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} 41 | 42 | stdout, err := cmd.StdoutPipe() 43 | if err != nil { 44 | fn("", err) 45 | return false 46 | } 47 | 48 | if err := cmd.Start(); err != nil { 49 | fn("", err) 50 | return false 51 | } 52 | t.cmd = cmd 53 | t.stdout = bufio.NewScanner(stdout) 54 | t.isRunning = true 55 | 56 | go func() { 57 | for t.stdout.Scan() { 58 | output := t.stdout.Text() 59 | output = ecore.E文本编码转换(output, "", "utf8") 60 | fn(output, nil) 61 | } 62 | 63 | if err := t.stdout.Err(); err != nil { 64 | fn("", err) 65 | } 66 | 67 | t.lock.Lock() 68 | t.isRunning = false 69 | t.isDone = true 70 | t.lock.Unlock() 71 | }() 72 | 73 | go func() { 74 | cmd.Wait() 75 | t.lock.Lock() 76 | t.isRunning = false 77 | t.lock.Unlock() 78 | println("命令已完成") 79 | fn("", errors.New("命令已完成")) 80 | 81 | }() 82 | return true 83 | 84 | } 85 | 86 | func (t *Terminal) StopCommand() { 87 | t.lock.Lock() 88 | defer t.lock.Unlock() 89 | 90 | if t.isRunning { 91 | if err := t.cmd.Process.Kill(); err != nil { 92 | fmt.Println("无法终止命令:", err) 93 | } 94 | } 95 | } 96 | 97 | func (t *Terminal) IsCommandDone() bool { 98 | t.lock.Lock() 99 | defer t.lock.Unlock() 100 | return t.isDone 101 | } 102 | -------------------------------------------------------------------------------- /GoEasyDesigner/Terminal/Terminal_window_test.go: -------------------------------------------------------------------------------- 1 | package Terminal 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | ) 7 | 8 | func TestNewTerminalWindow(t *testing.T) { 9 | terminal := NewTerminal() 10 | if terminal == nil { 11 | t.Error("NewTerminalWindow() failed") 12 | } 13 | // 14 | 命令 := ` 15 | set PATH=%PATH%;C:\Users\l\go\bin 16 | set PATH=%PATH%;C:\Users\l\go\go1.21.0\bin 17 | set PATH=%PATH%;C:\Program Files\nodejs 18 | set PATH=%PATH%;C:\Program Files\nodejs\node_modules\npm\bin 19 | wails 20 | ` 21 | 22 | terminal.StartCommand(命令, func(output string, err error) { 23 | if err != nil { 24 | t.Error(err.Error()) 25 | } 26 | println(output) 27 | }) 28 | 29 | time.Sleep(3 * time.Second) 30 | } 31 | -------------------------------------------------------------------------------- /GoEasyDesigner/build/README.md: -------------------------------------------------------------------------------- 1 | # Build Directory 2 | 3 | The build directory is used to house all the build files and assets for your application. 4 | 5 | The structure is: 6 | 7 | * bin - Output directory 8 | * darwin - macOS specific files 9 | * windows - Windows specific files 10 | 11 | ## Mac 12 | 13 | The `darwin` directory holds files specific to Mac builds. 14 | These may be customised and used as part of the build. To return these files to the default state, simply delete them 15 | and 16 | build with `wails build`. 17 | 18 | The directory contains the following files: 19 | 20 | - `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`. 21 | - `Info.dev.plist` - same as the main plist file but used when building using `wails dev`. 22 | 23 | ## Windows 24 | 25 | The `windows` directory contains the manifest and rc files used when building with `wails build`. 26 | These may be customised for your application. To return these files to the default state, simply delete them and 27 | build with `wails build`. 28 | 29 | - `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to 30 | use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file 31 | will be created using the `appicon.png` file in the build directory. 32 | - `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`. 33 | - `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer, 34 | as well as the application itself (right click the exe -> properties -> details) 35 | - `wails.exe.manifest` - The main application manifest file. -------------------------------------------------------------------------------- /GoEasyDesigner/build/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/build/appicon.png -------------------------------------------------------------------------------- /GoEasyDesigner/build/darwin/Info.dev.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundlePackageType 5 | APPL 6 | CFBundleName 7 | {{.Info.ProductName}} 8 | CFBundleExecutable 9 | {{.Name}} 10 | CFBundleIdentifier 11 | com.wails.{{.Name}} 12 | CFBundleVersion 13 | {{.Info.ProductVersion}} 14 | CFBundleGetInfoString 15 | {{.Info.Comments}} 16 | CFBundleShortVersionString 17 | {{.Info.ProductVersion}} 18 | CFBundleIconFile 19 | iconfile 20 | LSMinimumSystemVersion 21 | 10.13.0 22 | NSHighResolutionCapable 23 | true 24 | NSHumanReadableCopyright 25 | {{.Info.Copyright}} 26 | NSAppTransportSecurity 27 | 28 | NSAllowsLocalNetworking 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /GoEasyDesigner/build/darwin/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundlePackageType 5 | APPL 6 | CFBundleName 7 | {{.Info.ProductName}} 8 | CFBundleExecutable 9 | {{.Name}} 10 | CFBundleIdentifier 11 | com.wails.{{.Name}} 12 | CFBundleVersion 13 | {{.Info.ProductVersion}} 14 | CFBundleGetInfoString 15 | {{.Info.Comments}} 16 | CFBundleShortVersionString 17 | {{.Info.ProductVersion}} 18 | CFBundleIconFile 19 | iconfile 20 | LSMinimumSystemVersion 21 | 10.13.0 22 | NSHighResolutionCapable 23 | true 24 | NSHumanReadableCopyright 25 | {{.Info.Copyright}} 26 | 27 | -------------------------------------------------------------------------------- /GoEasyDesigner/build/dmg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APP_NAME="GoEasyDesigner" 4 | APP_VERSION="$version" 5 | DMG_NAME="${APP_NAME}-${APP_VERSION}.dmg" 6 | TEMP_DIR="./install" 7 | 8 | mkdir -p "${TEMP_DIR}" 9 | 10 | cp -r "./${APP_NAME}.app" "${TEMP_DIR}" 11 | 12 | # 创建 Applications 文件夹的快捷方式 13 | ln -s "/Applications" "${TEMP_DIR}/Applications" 14 | 15 | # 创建空的镜像文件 16 | hdiutil create -srcfolder "${TEMP_DIR}" -volname "${APP_NAME}" -format UDZO "${DMG_NAME}" 17 | 18 | echo "${DMG_NAME} 已经创建完成!" -------------------------------------------------------------------------------- /GoEasyDesigner/build/windows/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/build/windows/icon.ico -------------------------------------------------------------------------------- /GoEasyDesigner/build/windows/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "fixed": { 3 | "file_version": "{{.Info.ProductVersion}}" 4 | }, 5 | "info": { 6 | "0000": { 7 | "ProductVersion": "{{.Info.ProductVersion}}", 8 | "CompanyName": "{{.Info.CompanyName}}", 9 | "FileDescription": "{{.Info.ProductName}}", 10 | "LegalCopyright": "{{.Info.Copyright}}", 11 | "ProductName": "{{.Info.ProductName}}", 12 | "Comments": "{{.Info.Comments}}" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /GoEasyDesigner/build/windows/wails.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true/pm 12 | permonitorv2,permonitor 13 | 14 | 15 | -------------------------------------------------------------------------------- /GoEasyDesigner/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | goeasy: 4 | container_name: goeasy 5 | build: . 6 | ports: 7 | - "3005:3005" -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + Vite 2 | 3 | This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["src/*"] 6 | } 7 | }, 8 | "include": ["src/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eview", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@element-plus/icons-vue": "^2.3.1", 12 | "@guolao/vue-monaco-editor": "1.3.0", 13 | "@vitejs/plugin-vue-jsx": "latest", 14 | "element-plus": "^2.9.9", 15 | "lodash-es": "^4.17.21", 16 | "monaco-editor": "0.38.0", 17 | "pinia": "^3.0.2", 18 | "pinyin-pro": "^3.26.0", 19 | "tdesign-icons-vue-next": "^0.3.6", 20 | "tdesign-vue-next": "^1.12.0", 21 | "uuid": "^11.1.0", 22 | "vue": "^3.5.13", 23 | "vue-i18n": "^11.1.3", 24 | "vue3-menus": "^1.1.2", 25 | "vue3-sfc-loader": "^0.9.5" 26 | }, 27 | "devDependencies": { 28 | "@iconify/vue": "^5.0.0", 29 | "@vitejs/plugin-vue": "^5.2.3", 30 | "autoprefixer": "^10.4.21", 31 | "monaco-editor-webpack-plugin": "^7.1.0", 32 | "postcss": "^8.5.3", 33 | "tailwindcss": "^3.4.17", 34 | "unplugin-auto-import": "^19.2.0", 35 | "unplugin-icons": "^22.1.0", 36 | "unplugin-vue-components": "^28.5.0", 37 | "vite": "^6.3.5" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/1.html: -------------------------------------------------------------------------------- 1 | 7 | 13 | 19 | 25 |
26 |
27 | Made with Material Tailwind by Creative Tim. 28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-v4compatibility.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-v4compatibility.ttf -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/webfonts/fa-v4compatibility.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/GoEasyDesigner/frontend/public/webfonts/fa-v4compatibility.woff2 -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/ColorfulText/ColorfulText.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | top: "150", 4 | left: "440", 5 | width: "400", 6 | height: "80", 7 | no_place: true, 8 | visible: true, 9 | disable: false, 10 | zIndex: 0, 11 | customListening:true, 12 | 13 | fontSize: "48px", 14 | data:{ 15 | title: "Go Easy Designer", 16 | }, 17 | html:"" 18 | } 19 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/ColorfulText/ColorfulText.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 64 | 65 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/ColorfulText/ColorfulTextAttr.vue: -------------------------------------------------------------------------------- 1 | 15 | 36 | 37 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBar.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "200", 5 | height: "30", 6 | noPlace: true, 7 | 8 | visible: true, 9 | disable: false, 10 | size: "custom", 11 | zIndex: 0, 12 | min: 0, 13 | max: 100, 14 | step: 1, 15 | n: 0, 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBar.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBarAttr.vue: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "components": [ 3 | { 4 | "componentName": "流光边框", 5 | "组件路径": "/自定义组件/流光边框/流光边框.vue", 6 | "组件默认属性": "/自定义组件/流光边框/流光边框.js", 7 | "组件属性框": "/自定义组件/流光边框/流光边框属性.vue" 8 | }, 9 | { 10 | "componentName": "登录框", 11 | "组件路径": "/自定义组件/登录框/登录框.vue", 12 | "组件默认属性": "/自定义组件/登录框/登录框.js", 13 | "组件属性框": "/自定义组件/登录框/登录框属性.vue" 14 | }, 15 | { 16 | "componentName": "TimeProgressBar", 17 | "组件路径": "/自定义组件/TimeProgressBar/TimeProgressBar.vue", 18 | "组件默认属性": "/自定义组件/TimeProgressBar/TimeProgressBar.js", 19 | "组件属性框": "/自定义组件/TimeProgressBar/TimeProgressBarAttr.vue" 20 | }, 21 | { 22 | "componentName": "ColorfulText", 23 | "组件路径": "/自定义组件/ColorfulText/ColorfulText.vue", 24 | "组件默认属性": "/自定义组件/ColorfulText/ColorfulText.js", 25 | "组件属性框": "/自定义组件/ColorfulText/ColorfulTextAttr.vue" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/流光边框/流光边框.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | top: "150", 4 | left: "440", 5 | width: "240", 6 | height: "80", 7 | no_place: true, 8 | visible: true, 9 | disable: false, 10 | zIndex: 0, 11 | customListening:true, 12 | 13 | fontSize: "24px", 14 | data:{ 15 | background: '#000000', 16 | title: "流光边框", 17 | }, 18 | html:"" 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/流光边框/流光边框.vue: -------------------------------------------------------------------------------- 1 | 17 | 33 | 34 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/流光边框/流光边框属性.vue: -------------------------------------------------------------------------------- 1 | 15 | 36 | 37 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/登录框/登录框.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "350", 5 | height: "350", 6 | no_place: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | customListening:true, 11 | 12 | HTML: "", 13 | data: { 14 | username: 'admin', 15 | password: 'admin', 16 | password_error_msg: '', 17 | username_error_msg: '', 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/登录框/登录框.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/public/自定义组件/登录框/登录框属性.vue: -------------------------------------------------------------------------------- 1 | 24 | 36 | 37 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/Helper.js: -------------------------------------------------------------------------------- 1 | function registerBoxComponentNames(app, uiName, meta) { 2 | let ComponentNames = [] 3 | const componentsContext = meta; 4 | 5 | const keys = Object.keys(componentsContext).map((path) => { 6 | const name = path.split('/').pop().replace(/\.\w+$/, ''); 7 | const module = componentsContext[path]; 8 | //如果名称后面是 属性 或者是 Attr 就不要加入 9 | if (!(name.endsWith("属性") || name.endsWith("Attr"))) { 10 | ComponentNames.push(name) 11 | } 12 | // console.log("注册组件", uiName, name) 13 | app.component(uiName + name, module.default); 14 | // app.component(name, module.default); 15 | return name; 16 | }); 17 | 18 | return ComponentNames; 19 | 20 | } 21 | 22 | function registerBoxComponentDefaultValue(app, uiName, meta) { 23 | let ComponentDefaultValue = {} 24 | const componentsContext = meta; 25 | 26 | const keys = Object.keys(componentsContext).map((path) => { 27 | const name = path.split('/').pop().replace(/\.\w+$/, ''); 28 | const module = componentsContext[path]; 29 | ComponentDefaultValue[name] = module.default; 30 | return name; 31 | }); 32 | 33 | return ComponentDefaultValue; 34 | } 35 | 36 | export default { 37 | registerBoxComponentNames, 38 | registerBoxComponentDefaultValue 39 | } -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/assets/base.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/assets/main.css: -------------------------------------------------------------------------------- 1 | 2 | html, body{ 3 | margin: 0; 4 | padding: 0; 5 | overflow: hidden; 6 | } 7 | 8 | .clear-select{ 9 | user-select: none; 10 | -webkit-user-select: none; /* Safari */ 11 | -moz-user-select: none; /* Firefox */ 12 | -ms-user-select: none; /* Internet Explorer / Edge */ 13 | } 14 | 15 | .app { 16 | width: 100% !important; 17 | display: grid; 18 | grid-template-columns: auto 1fr 1fr 1fr auto; 19 | grid-template-rows: 0fr 1fr 1fr 1fr 1fr; 20 | gap: 12px 12px; 21 | grid-auto-flow: row; 22 | height: 100vh; 23 | overflow: hidden; 24 | padding-bottom: 26px; 25 | padding-right: 16px; 26 | padding-left: 8px; 27 | padding-top: 12px 28 | } 29 | 30 | .绘制的组件 * { 31 | pointer-events: none; 32 | 33 | } 34 | 35 | .头部 { 36 | grid-area: 1 / 1 / 2 / 6; 37 | } 38 | 39 | .属性框 { 40 | grid-area: 2 / 1 / 5 / 2; 41 | width: 280px; 42 | min-width: 280px; 43 | box-shadow: 5px 5px 10px #dddfe5; 44 | 45 | } 46 | 47 | .设计区域 { 48 | grid-area: 2 / 2 / 5 / 5; 49 | box-shadow: 5px 5px 10px #dddfe5; 50 | 51 | } 52 | 53 | .工具箱 { 54 | grid-area: 2 / 5 / 5 / 6; 55 | width: 160px; 56 | min-width: 160px; 57 | box-shadow: 5px 5px 10px #dddfe5; 58 | 59 | } 60 | 61 | .调试信息 { 62 | box-shadow: 5px 5px 10px #dddfe5; 63 | 64 | grid-area: 5 / 1 / 6 / 6; 65 | } 66 | 67 | .标题 { 68 | 69 | grid-area: 1 / 1 / 2 / 2; 70 | display: flex; 71 | justify-content: center; 72 | align-items: center; 73 | } 74 | 75 | .工具条 { 76 | grid-area: 1 / 2 / 2 / 6; 77 | padding: 6px; 78 | } 79 | 80 | .属性框 .el-tabs__content { 81 | height: 100%; 82 | padding: 4px; 83 | } 84 | 85 | .工具箱 .el-tabs__content { 86 | height: 90% !important; 87 | overflow-y: auto; 88 | } 89 | 90 | .app2 { 91 | display: grid; 92 | grid-template-columns: 1fr; 93 | grid-template-rows: 0.1fr 2.6fr 0.1fr; 94 | gap: 10px 0px; 95 | grid-auto-flow: row; 96 | grid-template-areas: 97 | "组件列表" 98 | "属性表格" 99 | "添加组件事件"; 100 | 101 | justify-content: space-between; 102 | height: 91%; 103 | } 104 | 105 | .组件列表 { 106 | grid-area: 组件列表; 107 | } 108 | 109 | .属性表格 { 110 | grid-area: 属性表格; 111 | overflow-y: auto; 112 | padding-left: 6px; 113 | padding-right: 4px; 114 | } 115 | 116 | .添加组件事件 { 117 | grid-area: 添加组件事件; 118 | } 119 | 120 | .el-form-item { 121 | margin-bottom: 8px; 122 | } 123 | 124 | .画布 { 125 | background: rgb(240, 240, 240); 126 | position: relative; 127 | overflow: hidden; 128 | } 129 | 130 | .app2 .el-form-item { 131 | margin-bottom: 8px; 132 | } 133 | #pane-1{ 134 | height: 100%; 135 | } 136 | .调试信息 .el-tab-pane{ 137 | padding: 8px; 138 | } 139 | 140 | /* 修改滚动条轨道的宽度 */ 141 | ::-webkit-scrollbar { 142 | width: 4px; /* 调整滚动条宽度为8像素 */ 143 | height: 4px; /* 调整滚动条高度为2像素 */ 144 | } 145 | 146 | /* 修改滚动条轨道的背景颜色 */ 147 | ::-webkit-scrollbar-track { 148 | background-color: #f1f1f1; /* 设置轨道的背景颜色 */ 149 | } 150 | 151 | /* 修改滚动条的滑块(拖动条)颜色 */ 152 | ::-webkit-scrollbar-thumb { 153 | background-color: #c4c4c4; /* 设置滑块的颜色 */ 154 | } 155 | 156 | /* 修改滚动条的边框颜色 */ 157 | ::-webkit-scrollbar-thumb:hover { 158 | background-color: #a9a9a9; /* 设置滑块的悬停颜色 */ 159 | } 160 | 161 | * { 162 | box-sizing: border-box; 163 | } 164 | 165 | .el-tree-node__children{ 166 | width: 500px !important; 167 | } 168 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/RenderDesignComponentWin.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 55 | 56 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Button/Button.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "76", 5 | height: "40", 6 | noPlace: true, 7 | buttonType: "default", 8 | visible: true, 9 | disable: false, 10 | size: "custom", 11 | zIndex: 0, 12 | text: "Button", 13 | } 14 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Button/Button.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 26 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Button/ButtonAttr.vue: -------------------------------------------------------------------------------- 1 | 39 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CheckBox/CheckBox.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "250", 5 | height: "80", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | size: "default", 11 | currentSelected: [], 12 | options:[ 13 | {"label": "Default", "value": "default"}, 14 | {"label": "Large", "value": "large"}, 15 | {"label": "Small", "value": "small"}, 16 | ], 17 | buttonGroup: false, 18 | withBorder: false 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CheckBox/CheckBox.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 42 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CheckBox/CheckBoxAttr.vue: -------------------------------------------------------------------------------- 1 | 63 | 114 | 115 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CommonLayout/CommonLayout.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "200", 6 | value: "0", 7 | noPlace: true, 8 | visible: true, 9 | disable: false, 10 | zIndex: 0, 11 | layoutMethod: "header-main", 12 | childComponents: [ 13 | { 14 | componentName: "elContainer", 15 | name: "ContentAreaHeader", 16 | area: "header", 17 | top: "0", 18 | left: "0", 19 | width: "100%", 20 | height: "100%", 21 | // background: "#fff", 22 | position: "relative", 23 | noPlace: false, 24 | noDrag: true, 25 | visible: true, 26 | disable: false, 27 | pid: 0, 28 | zIndex: 0, 29 | childComponents: [] 30 | }, 31 | 32 | { 33 | componentName: "elContainer", 34 | name: "ContentAreaMain", 35 | area: "main", 36 | top: "0", 37 | left: "0", 38 | width: "100%", 39 | height: "100%", 40 | // background: "red", 41 | position: "relative", 42 | noPlace: false, 43 | noDrag: true, 44 | visible: true, 45 | disable: false, 46 | zIndex: 0, 47 | pid: 0, 48 | childComponents: [] 49 | }, 50 | 51 | { 52 | componentName: "elContainer", 53 | name: "ContentAreaFooter", 54 | area: "footer", 55 | 56 | top: "0", 57 | left: "0", 58 | width: "100%", 59 | height: "100%", 60 | // background: "green", 61 | position: "relative", 62 | noPlace: false, 63 | noDrag: true, 64 | visible: true, 65 | disable: false, 66 | zIndex: 0, 67 | pid: 0, 68 | childComponents: [] 69 | }, 70 | 71 | { 72 | componentName: "elContainer", 73 | name: "ContentAreaAside", 74 | area: "aside", 75 | top: "0", 76 | left: "0", 77 | width: "100px", 78 | height: "100%", 79 | // background: "green", 80 | position: "relative", 81 | noPlace: false, 82 | noDrag: true, 83 | visible: true, 84 | disable: false, 85 | zIndex: 0, 86 | pid: 0, 87 | childComponents: [] 88 | }, 89 | 90 | ] 91 | } 92 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CommonLayout/CommonLayoutAttr.vue: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Container/Container.js: -------------------------------------------------------------------------------- 1 | export default { 2 | noPlace: false, 3 | visible: true, 4 | disable: false, 5 | top: "0", 6 | left: "0", 7 | width: "200", 8 | height: "200", 9 | background: "#fff", 10 | zIndex: 0, 11 | overflowY: "visible", 12 | overflowX: "visible", 13 | childComponents: [] 14 | } 15 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Container/ContainerAttr.vue: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ControlButton/ControlButton.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "inherit", 3 | left: "inherit", 4 | width: "146", 5 | height: "32", 6 | right: "0", 7 | bottom: "inherit", 8 | noPlace: true, 9 | visible: true, 10 | disable: false, 11 | zIndex: 0, 12 | block: true, 13 | ghost: false, 14 | loading: false, 15 | shape: "rectangle", 16 | size: "medium", 17 | theme: "primary", 18 | variant: "base", 19 | text:"按钮", 20 | } 21 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ControlButton/ControlButton.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 62 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ControlButton/ControlButtonAttr.vue: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CustomComponent/CustomComponent.js: -------------------------------------------------------------------------------- 1 | import {defineEmits} from "vue"; 2 | 3 | export default { 4 | top: "150", 5 | left: "440", 6 | width: "300", 7 | height: "300", 8 | noPlace: true, 9 | visible: true, 10 | disable: false, 11 | zIndex: 0, 12 | customListening:true, 13 | data:{ 14 | username: 'admin', 15 | password: 'admin', 16 | }, 17 | 18 | HTML: ` 52 | 53 | 65 | ` 66 | } 67 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/CustomComponent/CustomComponent.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/FlexLayout/FlexLayout.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "200", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | 11 | type: "border-card", 12 | tagPosition: "top", 13 | gutter: 10, 14 | justify: "start", 15 | childComponents: [ 16 | { 17 | componentName: "elContainer", 18 | name: "ContentArea", 19 | top: "0", 20 | left: "0", 21 | width: "100%", 22 | height: "100%", 23 | // background: "#fff", 24 | position: "relative", 25 | noPlace: false, 26 | noDrag: true, 27 | visible: true, 28 | disable: false, 29 | pid: 0, 30 | zIndex: 0, 31 | span: 8, 32 | childComponents: [] 33 | }, 34 | { 35 | componentName: "elContainer", 36 | name: "ContentArea", 37 | top: "0", 38 | left: "0", 39 | width: "100%", 40 | height: "100%", 41 | // background: "#fff", 42 | position: "relative", 43 | noPlace: false, 44 | noDrag: true, 45 | visible: true, 46 | disable: false, 47 | pid: 0, 48 | zIndex: 0, 49 | span: 8, 50 | childComponents: [] 51 | }, 52 | { 53 | componentName: "elContainer", 54 | name: "ContentArea", 55 | top: "0", 56 | left: "0", 57 | width: "100%", 58 | height: "100%", 59 | // background: "#fff", 60 | position: "relative", 61 | noPlace: false, 62 | noDrag: true, 63 | visible: true, 64 | disable: false, 65 | pid: 0, 66 | zIndex: 0, 67 | span: 8, 68 | childComponents: [] 69 | } 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/FlexLayout/FlexLayout.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 29 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/FlexLayout/FlexLayoutAttr.vue: -------------------------------------------------------------------------------- 1 | 53 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Label/Label.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "120", 5 | height: "40", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | size: "default", 11 | truncated: false, 12 | tag: "p", 13 | tagPosition: "text-center", 14 | corlor: "#606266", 15 | text: "标签" 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Label/Label.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 31 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Menu/Menu.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "600", 5 | height: "100", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | mode: "horizontal", 11 | collapse : false, 12 | 13 | menuOption:[ 14 | { 15 | id: 1, 16 | label: '菜单 1', 17 | children: [ 18 | { 19 | id: 4, 20 | label: '二级菜单 1-1', 21 | children: [ 22 | { 23 | id: 9, 24 | label: '三级菜单 1-1-1', 25 | }, 26 | { 27 | id: 10, 28 | label: '三级菜单 1-1-2', 29 | }, 30 | ], 31 | }, 32 | ], 33 | }, 34 | { 35 | id: 2, 36 | label: '菜单 2', 37 | children: [ 38 | { 39 | id: 5, 40 | label: '二级菜单 2-1', 41 | }, 42 | { 43 | id: 6, 44 | label: '二级菜单 2-2', 45 | }, 46 | ], 47 | }, 48 | { 49 | id: 3, 50 | label: '菜单 3', 51 | children: [ 52 | { 53 | id: 7, 54 | label: '二级菜单 3-1', 55 | }, 56 | { 57 | id: 8, 58 | label: '二级菜单 3-2', 59 | }, 60 | ], 61 | }, 62 | { 63 | id: 4, 64 | label: '菜单 4', 65 | }, 66 | ] 67 | 68 | } 69 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Menu/Menu.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 43 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ProgressBar/ProgressBar.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "200", 5 | height: "30", 6 | noPlace: true, 7 | 8 | visible: true, 9 | disable: false, 10 | size: "custom", 11 | zIndex: 0, 12 | min: 0, 13 | max: 100, 14 | step: 1, 15 | n: 0, 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ProgressBar/ProgressBar.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/ProgressBar/ProgressBarAttr.vue: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/RadioButton/RadioButton.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "250", 5 | height: "80", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | size: "default", 11 | value: "", 12 | options:[ 13 | {"label": "默认", "value": "default"}, 14 | {"label": "大号", "value": "large"}, 15 | {"label": "小号", "value": "small"}, 16 | ], 17 | buttonGroup:false, 18 | border:false 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/RadioButton/RadioButton.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 42 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/RadioButton/RadioButtonAttr.vue: -------------------------------------------------------------------------------- 1 | 63 | 116 | 117 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Switch/Switch.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "50", 5 | height: "40", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | size: "default", 11 | value: false, 12 | activeText: "开", 13 | inactiveText: "关", 14 | inlinePrompt: true, 15 | 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Switch/Switch.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 26 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Switch/SwitchAttr.vue: -------------------------------------------------------------------------------- 1 | 43 | 69 | 70 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Table/Table.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "200", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | stripe: false, 11 | border: false, 12 | select: false, 13 | value: [], 14 | tableLayout: "fixed", 15 | header:[ 16 | { 17 | "label":"日期","prop":"date","width":"180","fixed":true 18 | }, 19 | { 20 | "label":"名称","prop":"name","width":"180","fixed":false 21 | }, 22 | { 23 | "label":"地址","prop":"address","width":"180","fixed":false 24 | }, 25 | ], 26 | data:[ 27 | { 28 | date: '2016-05-03', 29 | name: 'Tom', 30 | address: 'No. 189, Grove St, Los Angeles', 31 | }, 32 | { 33 | date: '2016-05-02', 34 | name: 'Tom', 35 | address: 'No. 189, Grove St, Los Angeles', 36 | }, 37 | { 38 | date: '2016-05-04', 39 | name: 'Tom', 40 | address: 'No. 189, Grove St, Los Angeles', 41 | }, 42 | { 43 | date: '2016-05-01', 44 | name: 'Tom', 45 | address: 'No. 189, Grove St, Los Angeles', 46 | }, 47 | ] 48 | 49 | } 50 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Table/Table.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tabs/Tabs.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "300", 6 | value: "0", 7 | noPlace: true, 8 | visible: true, 9 | disable: false, 10 | zIndex: 0, 11 | overflowY: "hidden", 12 | overflowX: "hidden", 13 | type: "border-card", 14 | tagPosition: "top", 15 | 16 | childComponents: [ 17 | { 18 | componentName: "elContainer", 19 | name: "ContentArea", 20 | text: "tab", 21 | top: "0", 22 | left: "0", 23 | width: "100%", 24 | height: "100%", 25 | noPlace: false, 26 | noDrag: true, 27 | visible: true, 28 | disable: false, 29 | pid: 0, 30 | zIndex: 0, 31 | childComponents: [] 32 | }, 33 | { 34 | componentName: "elContainer", 35 | name: "ContentArea", 36 | text: "tab", 37 | top: "0", 38 | left: "0", 39 | width: "100%", 40 | height: "100%", 41 | noPlace: false, 42 | noDrag: true, 43 | visible: true, 44 | disable: false, 45 | pid: 0, 46 | zIndex: 0, 47 | childComponents: [] 48 | }, 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tabs/Tabs.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 33 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tabs/TabsAttr.vue: -------------------------------------------------------------------------------- 1 | 53 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TabsTW/TabsTW.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "300", 6 | value: "0", 7 | noPlace: true, 8 | visible: true, 9 | disable: false, 10 | zIndex: 0, 11 | overflowY: "hidden", 12 | overflowX: "hidden", 13 | type: "border-card", 14 | tagPosition: "top", 15 | 16 | 17 | childComponents: [ 18 | { 19 | componentName: "elContainer", 20 | name: "ContentArea", 21 | text: "tab", 22 | 图标: "fa fa-server", 23 | top: "0", 24 | left: "0", 25 | width: "100%", 26 | height: "100%", 27 | noPlace: false, 28 | noDrag: true, 29 | visible: true, 30 | disable: false, 31 | pid: 0, 32 | zIndex: 0, 33 | childComponents: [] 34 | }, 35 | { 36 | componentName: "elContainer", 37 | name: "ContentArea", 38 | text: "tab", 39 | 图标: "fa fa-cog", 40 | top: "0", 41 | left: "0", 42 | width: "100%", 43 | height: "100%", 44 | noPlace: false, 45 | noDrag: true, 46 | visible: true, 47 | disable: false, 48 | pid: 0, 49 | zIndex: 0, 50 | childComponents: [] 51 | }, 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TabsTW/TabsTW.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 55 | 100 | 101 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TabsTW/TabsTWAttr.vue: -------------------------------------------------------------------------------- 1 | 72 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TextEdit/TextEdit.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "120", 5 | height: "40", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | size: "custom", 11 | 内容: "", 12 | type: "text", 13 | placeholder: "请输入..", 14 | maxlength:-1, 15 | } 16 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TextEdit/TextEdit.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 28 | 29 | 36 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/TextEdit/TextEditAttr.vue: -------------------------------------------------------------------------------- 1 | 47 | 90 | 91 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tooltip/Tooltip.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "240", 5 | height: "60", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | type: "success", 11 | text:"text", 12 | description:"", 13 | center: true, 14 | closable: false, 15 | 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tooltip/Tooltip.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 28 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tooltip/TooltipAttr.vue: -------------------------------------------------------------------------------- 1 | 41 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tree/Tree.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "150", 3 | left: "440", 4 | width: "300", 5 | height: "200", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | 11 | select: false, 12 | 选中项: [], 13 | 14 | data:[ 15 | { 16 | label: 'Level one 1', 17 | children: [ 18 | { 19 | label: 'Level two 1-1', 20 | children: [ 21 | { 22 | label: 'Level three 1-1-1', 23 | }, 24 | ], 25 | }, 26 | ], 27 | }, 28 | { 29 | label: 'Level one 2', 30 | children: [ 31 | { 32 | label: 'Level two 2-1', 33 | children: [ 34 | { 35 | label: 'Level three 2-1-1', 36 | }, 37 | ], 38 | }, 39 | { 40 | label: 'Level two 2-2', 41 | children: [ 42 | { 43 | label: 'Level three 2-2-1', 44 | }, 45 | ], 46 | }, 47 | ], 48 | }, 49 | { 50 | label: 'Level one 3', 51 | children: [ 52 | { 53 | label: 'Level two 3-1', 54 | children: [ 55 | { 56 | label: 'Level three 3-1-1', 57 | }, 58 | ], 59 | }, 60 | { 61 | label: 'Level two 3-2', 62 | children: [ 63 | { 64 | label: 'Level three 3-2-1', 65 | }, 66 | ], 67 | }, 68 | ], 69 | }, 70 | ] 71 | 72 | } 73 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tree/Tree.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 49 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/el/Tree/TreeAttr.vue: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Button/Button.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "80", 5 | height: "32", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | block: true, 11 | ghost: false, 12 | loading: false, 13 | shape: "rectangle", 14 | size: "medium", 15 | theme: "primary", 16 | variant: "base", 17 | text:"按钮", 18 | } 19 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Button/Button.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Link/Link.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "80", 5 | height: "32", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | 11 | text:"Link", 12 | download: "", 13 | hover: "underline", 14 | href: "", 15 | prefixIcon: "", 16 | size: "medium", 17 | suffixIcon: "", 18 | target: "", 19 | theme: "default", 20 | underline: false, 21 | } 22 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Link/Link.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 31 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Link/LinkAttr.vue: -------------------------------------------------------------------------------- 1 | 64 | 65 | 98 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Progress/Progress.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "200", 5 | height: "32", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | 11 | color: '', 12 | label: true, 13 | percentage: 50, 14 | size: 'medium', 15 | status: '', 16 | strokeWidth: '', 17 | theme: 'line', 18 | trackColor: '', 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Progress/Progress.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Select/Select.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "80", 5 | height: "32", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | value: "small", 11 | options:[ 12 | {"label": "默认", "value": "default"}, 13 | {"label": "大号", "value": "large"}, 14 | {"label": "小号", "value": "small"}, 15 | ], 16 | multiple: false, 17 | autoWidth: false, 18 | 19 | } 20 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Select/Select.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 34 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Switch/Switch.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "80", 5 | height: "32", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | customListening:true, 11 | 12 | label: ['yes','no'], 13 | loading: false, 14 | size: "medium", 15 | value: false, 16 | } 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Switch/Switch.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 29 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/td/Switch/SwitchAttr.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 65 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/tw/Button/Button.js: -------------------------------------------------------------------------------- 1 | export default { 2 | top: "0", 3 | left: "0", 4 | width: "120", 5 | height: "40", 6 | noPlace: true, 7 | visible: true, 8 | disable: false, 9 | zIndex: 0, 10 | block: true, 11 | ghost: false, 12 | loading: false, 13 | shape: "rectangle", 14 | size: "medium", 15 | theme: "primary", 16 | variant: "base", 17 | text: "按钮", 18 | } 19 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/tw/Button/Button.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 50 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/boxs/tw/Button/ButtonAttr.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 121 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/header/ToolBtn.vue: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/left/ComponentLeft.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/left/PropertyTable.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/left/TreeSelectBox.vue: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/DraggableDivider.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 118 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/WindowAttr.vue: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/common-event-component.vue: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/代码编辑器.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/支持库.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/项目管理.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/components/designer/public/项目配置对话框.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 64 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/i18n/index.js: -------------------------------------------------------------------------------- 1 | import { createI18n } from "vue-i18n"; 2 | import zhHans from "./locales/zh-Hans.json"; 3 | import en from "./locales/en.json"; 4 | 5 | // 实例化I18n 6 | const i18n = createI18n({ 7 | locale: "English", 8 | globalInjection: true, 9 | fallbackLocale: "English", 10 | legacy: false, 11 | messages: { 12 | "简体中文": zhHans, 13 | "English": en, 14 | }, 15 | }) 16 | 17 | export default i18n -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/i18n/locales/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "NewProject": "NewProject", 4 | "OpenProject": "OpenProject", 5 | "Attribute": "Attribute", 6 | "Custom": "Custom", 7 | "File": "File", 8 | "ReleaseAndPlace": "Release and place", 9 | "clear": "clear", 10 | "compile": "Compile", 11 | "components": "Components", 12 | "debug_info": "Debug info", 13 | "design": "Design", 14 | "downloadClient": "Download Client", 15 | "edit_code": "Code", 16 | "environmentCheck": "Environment Check", 17 | "help": "Help", 18 | "helpDesc": "Window projects need to be created manually.\n wails init -n \"go-easy-demo\" -t https://github.com/duolabmeng6/wails-template-vue-go-easy \n
\n\nOnly the design interface can be saved in the browser.\n\n
\n\nIt is recommended to use the client to save it more simply. At present, you still need to install the go and node environment by yourself.", 19 | "help_info": "Help info", 20 | "inCompile": "in compile...", 21 | "inOperation": "in operation...", 22 | "language": "language", 23 | "name": "GoEasyDesigner", 24 | "new": "New", 25 | "open": "Open", 26 | "projectConfig": "Project Config", 27 | "project_management": "Project", 28 | "run": "Run", 29 | "save": "Save", 30 | "selectImage": "select Image", 31 | "stop": "stop", 32 | "stopped": "stopped", 33 | "support_library": "Library", 34 | "system_components": "System", 35 | "td_components": "T Design", 36 | "tw_components": "tailwindcss", 37 | "updateCheck": "Check Update" 38 | }, 39 | "attr": { 40 | "addEvent": "add event function", 41 | "backgroundColor": "backgroundColor", 42 | "backgroundImage": "backgroundImage", 43 | "border": "border", 44 | "bottom": "bottom", 45 | "disable": "disable", 46 | "fontSize": "fontSize", 47 | "height": "height", 48 | "left": "left", 49 | "name": "name", 50 | "right": "right", 51 | "title": "title", 52 | "top": "top", 53 | "visible": "visible", 54 | "width": "width", 55 | "xAxisRollingMode": "xAxis Rolling Mode", 56 | "yAxisRollingMode": "yAxis Rolling Mode", 57 | "zIndex": "zIndex" 58 | }, 59 | "componentName": { 60 | "Button": "Button", 61 | "CheckBox": "CheckBox", 62 | "CommonLayout": "CommonLayout", 63 | "CustomComponent": "CustomComponent", 64 | "FlexLayout": "FlexLayout", 65 | "Label": "Label", 66 | "Menu": "Menu", 67 | "ProgressBar": "ProgressBar", 68 | "RadioButton": "RadioButton", 69 | "Switch": "Switch", 70 | "Table": "Table", 71 | "Tabs": "Tabs", 72 | "TabsTW": "TabsTW", 73 | "TextEdit": "TextEdit", 74 | "Tooltip": "Tooltip", 75 | "Tree": "Tree", 76 | "Window": "Win" 77 | }, 78 | "eventName": { 79 | "blur": "blur", 80 | "click": "click", 81 | "contextmenu": "contextmenu", 82 | "created": "created", 83 | "dblclick": "dblclick", 84 | "focus": "focus", 85 | "keydown": "keydown", 86 | "keyup": "keyup", 87 | "mousedown": "mousedown", 88 | "mousemove": "mousemove", 89 | "mouseup": "mouseup", 90 | "mousewheel": "mousewheel" 91 | } 92 | } -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/i18n/locales/zh-Hans.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "NewProject": "新建项目", 4 | "OpenProject": "打开项目", 5 | "Attribute": "属性", 6 | "Custom": "自定义组件", 7 | "File": "文件", 8 | "ReleaseAndPlace": "松开放置", 9 | "clear": "清除", 10 | "compile": "编译", 11 | "components": "组件", 12 | "debug_info": "调试信息", 13 | "design": "界面设计", 14 | "downloadClient": "下载客户端", 15 | "edit_code": "编辑代码", 16 | "environmentCheck": "运行环境检测", 17 | "help": "帮助", 18 | "helpDesc": "窗口项目需要手动创建\n wails init -n \"go-easy-demo\" -t https://github.com/duolabmeng6/wails-template-vue-go-easy
\n 在浏览器中仅可保存设计界面\n
\n 建议使用客户端保存更简单 目前仍需自行安装 go 和 node 环境", 19 | "help_info": "帮助信息", 20 | "inCompile": "编译中...", 21 | "inOperation": "运行中...", 22 | "language": "语言", 23 | "name": "窗口设计师", 24 | "new": "新建", 25 | "open": "打开", 26 | "projectConfig": "项目配置", 27 | "project_management": "项目管理", 28 | "run": "运行", 29 | "save": "保存", 30 | "selectImage": "选择图片", 31 | "stop": "停止", 32 | "stopped": "已停止...", 33 | "support_library": "支持库", 34 | "system_components": "系统组件", 35 | "td_components": "T Design", 36 | "tw_components": "tailwindcss", 37 | "updateCheck": "检查更新", 38 | "preview": "预览" 39 | }, 40 | "attr": { 41 | "addEvent": "在此处选择加入事件处理函数", 42 | "backgroundColor": "背景颜色", 43 | "backgroundImage": "背景图片", 44 | "border": "边框", 45 | "bottom": "底边", 46 | "disable": "禁用", 47 | "fontSize": "字体大小", 48 | "height": "高度", 49 | "left": "左边", 50 | "name": "名称", 51 | "right": "右边", 52 | "title": "标题", 53 | "top": "顶边", 54 | "visible": "可视", 55 | "width": "宽度", 56 | "xAxisRollingMode": "x轴滚动模式", 57 | "yAxisRollingMode": "y轴滚动模式", 58 | "zIndex": "层级" 59 | }, 60 | "componentName": { 61 | "Button": "按钮", 62 | "CheckBox": "多选框", 63 | "CommonLayout": "常用布局", 64 | "ControlButton": "窗口控制按钮", 65 | "CustomComponent": "自定义组件", 66 | "FlexLayout": "弹性布局", 67 | "Label": "标签", 68 | "Menu": "菜单", 69 | "ProgressBar": "进度条", 70 | "RadioButton": "单选框", 71 | "Switch": "开关", 72 | "Table": "表格", 73 | "Tabs": "选择夹", 74 | "TabsTW": "选择夹tw", 75 | "TextEdit": "编辑框", 76 | "Tooltip": "提示框", 77 | "Tree": "树形框", 78 | "Window": "窗口" 79 | }, 80 | "eventName": { 81 | "blur": "失去焦点", 82 | "click": "被单击", 83 | "contextmenu": "鼠标右键被按下", 84 | "created": "创建完毕", 85 | "dblclick": "被双击", 86 | "focus": "获得焦点", 87 | "keydown": "按下某键", 88 | "keyup": "放开某键", 89 | "mousedown": "鼠标左键被按下", 90 | "mousemove": "鼠标位置被移动", 91 | "mouseup": "鼠标左键被放开", 92 | "mousewheel": "滚轮被滚动" 93 | } 94 | } -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/stores/HistoryManager.js: -------------------------------------------------------------------------------- 1 | 2 | class HistoryManager { 3 | constructor() { 4 | this.historicalRecord = []; 5 | this.currentPosition = -1; 6 | } 7 | // 记录最新数据到最新的一条(内容){ 8 | // console.log("记录最新数据到最新的一条=========") 9 | // console.log("历史currentPosition",this.currentPosition) 10 | // console.log("查看当前历史所有记录",this.查看当前历史所有记录()) 11 | // this.historicalRecord[this.currentPosition]=内容 12 | // } 13 | 记录(内容) { 14 | this.historicalRecord = this.historicalRecord.slice(0, this.currentPosition + 1); 15 | this.historicalRecord.push(内容); 16 | this.currentPosition = this.historicalRecord.length - 1; 17 | // console.log("记录=========") 18 | // console.log("历史currentPosition",this.currentPosition) 19 | // console.log("查看当前历史所有记录",this.查看当前历史所有记录()) 20 | } 21 | 22 | 撤销(内容) { 23 | if (内容){ 24 | this.historicalRecord[this.currentPosition]=内容 25 | } 26 | // console.log("撤销=========")Ï 27 | // console.log("历史currentPosition",this.currentPosition) 28 | // console.log("查看当前历史所有记录",this.查看当前历史所有记录()) 29 | if (this.currentPosition > 0) { 30 | // 移动到前一个historicalRecord 31 | this.currentPosition--; 32 | return this.historicalRecord[this.currentPosition]; 33 | } else { 34 | // 已经没有historicalRecord可以撤销了 35 | return null; 36 | } 37 | } 38 | 39 | 恢复(内容) { 40 | // console.log("恢复=========") 41 | // console.log("历史currentPosition",this.currentPosition) 42 | // console.log("查看当前历史所有记录",this.查看当前历史所有记录()) 43 | if (this.currentPosition < this.historicalRecord.length - 1) { 44 | if (内容){ 45 | this.historicalRecord[this.currentPosition]=内容 46 | } 47 | // 移动到后一个historicalRecord 48 | this.currentPosition++; 49 | return this.historicalRecord[this.currentPosition]; 50 | } else { 51 | // 已经到达最新historicalRecord 52 | return null; 53 | } 54 | } 55 | 56 | 57 | 查看当前历史所有记录() { 58 | return this.historicalRecord; 59 | } 60 | } 61 | const HistoryManagerLiving = new HistoryManager(); 62 | 63 | export {HistoryManagerLiving} 64 | // 示例使用 65 | 66 | // // 记录 67 | // HistoryManager.记录("第一步操作"); 68 | // HistoryManager.记录("第二步操作"); 69 | // 70 | // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 71 | // 72 | // // 撤销 73 | // const 撤销结果 = HistoryManager.撤销(); 74 | // console.log("撤销结果:", 撤销结果); // 输出:撤销结果: 第一步操作 75 | // 76 | // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 77 | // 78 | // // // 恢复 79 | // // const 恢复结果 = HistoryManager.恢复(); 80 | // // console.log("恢复结果:", 恢复结果); // 输出:恢复结果: 第二步操作 81 | // // 82 | // // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 83 | // 84 | // // 记录新操作 85 | // HistoryManager.记录("第三步操作"); 86 | // 87 | // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 88 | // 89 | // // 清除后续历史 90 | // HistoryManager.已修改清除后续历史(); 91 | // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 92 | // 93 | // 94 | // 95 | // // 恢复 96 | // const 恢复结果 = HistoryManager.恢复(); 97 | // console.log("恢复结果:", 恢复结果); // 输出:恢复结果: 第二步操作 98 | // 99 | // console.log("当前历史所有记录:", HistoryManager.查看当前历史所有记录()); 100 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/update_github_latest_releases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 访问 https://api.github.com/repos/duolabmeng6/GoEasyDesigner/releases/latest 保存为 releases_latest.json 4 | 5 | #curl -o releases_latest.json https://api.github.com/repos/duolabmeng6/GoEasyDesigner/releases/latest 6 | 7 | # 检查 releases_latest.json 的修改时间,如果超过 1 天,则重新下载 8 | 9 | #!/bin/bash 10 | #!/bin/bash 11 | 12 | JSON_FILE="../public/releases_latest.json" 13 | URL="https://api.github.com/repos/duolabmeng6/GoEasyDesigner/releases" 14 | 15 | echo "正在下载最新的releases..." 16 | curl -o "$JSON_FILE" "$URL" 17 | cat $JSON_FILE 18 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/提示语法生成器.js: -------------------------------------------------------------------------------- 1 | function 提取key(components) { 2 | const codeLines = []; 3 | for (const component of components) { 4 | // 遍历 component 所有的 key 5 | for (const key in component) { 6 | // console.log("component", component) 7 | let name = component["name"]; 8 | if (name == "" || name == undefined) { 9 | continue 10 | } 11 | // console.log("name", name, key) 12 | // if (检查是否全部为数字或者字母(name)) { 13 | // continue 14 | // } 15 | // if (检查是否全部为数字或者字母(key)) { 16 | // continue 17 | // } 18 | codeLines.push(key); 19 | codeLines.push(name); 20 | // console.log("加入自动补全列表",component,name) 21 | 22 | } 23 | if (component["childComponents"] && component["childComponents"].length > 0) { 24 | const childCodeLines = 提取key(component["childComponents"]); 25 | codeLines.push(...childCodeLines); 26 | } 27 | } 28 | // console.log("提取的key", codeLines) 29 | return codeLines; 30 | } 31 | 32 | function 检查是否全部为数字或者字母(str) { 33 | var reg = /^[0-9a-zA-Z]+$/; 34 | return reg.test(str); 35 | } 36 | function 检查是否存在中文(str) { 37 | //检查str中是否包含中文字符 不含 数字字母 如果有汉字返回 真 如果没有汉字返回假 38 | var reg = /[\u4e00-\u9fa5]/; 39 | return reg.test(str); 40 | } 41 | 42 | const 生成提示词 = async (keys, fn) => { 43 | // const pinyin = require('pinyin-pro') 44 | return import('pinyin-pro').then((exports) => { 45 | // exports.pinyin('汉语拼音'); // 'hàn yǔ pīn yīn' 46 | // console.log(exports.pinyin('汉语拼音')) 47 | let res = 查询返回(exports) 48 | if (fn !== undefined) { 49 | fn(res) 50 | } 51 | return res 52 | }); 53 | // import { pinyin } from 'pinyin-pro'; 54 | // const { pinyin } = require('pinyin-pro'); 55 | function 查询返回(pinyin) { 56 | const keywordMappings = { 57 | // "bjk": { insertText: "编辑框", label: "bjk编辑框" }, 58 | }; 59 | for (const key of keys) { 60 | const pinyinArray = pinyin.pinyin(key, { 61 | toneType: 'none', type: 'array', pattern: 'first', 62 | }); 63 | const abbreviation = pinyinArray.join('').toLowerCase(); 64 | let newNmae = abbreviation 65 | // console.log("abbreviation", abbreviation, key,检查是否存在中文(key)) 66 | 67 | if (检查是否存在中文(key)) { 68 | newNmae = abbreviation + key 69 | 70 | }else{ 71 | newNmae = key 72 | 73 | } 74 | keywordMappings[abbreviation] = { 75 | insertText: key, 76 | label: newNmae, 77 | } 78 | } 79 | // console.log(keywordMappings) 80 | return keywordMappings 81 | } 82 | } 83 | 84 | const 生成提示辅助代码 = async (obj, fn) => { 85 | let kyes = 提取key(obj); 86 | // console.log("提取key",JSON.stringify(kyes, null, 4)) 87 | 88 | // let 额外keys = ["组件"] 89 | let 额外keys = ["组件"] 90 | kyes = [...kyes, ...额外keys] 91 | //过滤重复的值 92 | kyes = [...new Set(kyes)] 93 | kyes = await 生成提示词(kyes, fn) 94 | // console.log("提取key2",JSON.stringify(kyes, null, 4)) 95 | return JSON.stringify(kyes, null, 4); 96 | } 97 | // const jsonData = require('/Users/ll/Documents/GitHub/GoEasyDesigner/go-easy-demo/frontend/src/窗口/设计文件.json'); 98 | // const test = async () => { 99 | // let data = await 生成提示辅助代码(jsonData) 100 | // console.log('data', data) 101 | // } 102 | // test() 103 | 104 | export {生成提示辅助代码} -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/测试代码编辑器.vue: -------------------------------------------------------------------------------- 1 | 9 | 43 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/编辑器/窗口事件代码模板.js: -------------------------------------------------------------------------------- 1 | export const 窗口事件代码模板 =`import * as systemFc from "../../wailsjs/runtime"; 2 | import * as goFc from "../../wailsjs/go/main/App"; 3 | import {__load_data} from './__load_data' 4 | 5 | export function BindWindowEvent() { 6 | const c = __load_data() 7 | let comps = c.comps 8 | //Don't delete the event function flag 9 | }` -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/编辑器/编辑器提示数据.js: -------------------------------------------------------------------------------- 1 | const keywordMappings = { 2 | "nr": { 3 | "insertText": "text", 4 | "label": "nrtext" 5 | }, 6 | } 7 | export default keywordMappings -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/src/编辑的语法提示.js: -------------------------------------------------------------------------------- 1 | function createCustomProposal(range, insertText, label) { 2 | return { 3 | label: label, 4 | kind: monaco.languages.CompletionItemKind.Function, 5 | documentation: "", 6 | insertText: insertText, 7 | range: range, 8 | }; 9 | } 10 | 11 | monaco.languages.registerCompletionItemProvider("javascript", { 12 | provideCompletionItems: function (model, position) { 13 | var word = model.getWordUntilPosition(position); 14 | var range = { 15 | startLineNumber: position.lineNumber, 16 | endLineNumber: position.lineNumber, 17 | startColumn: word.startColumn, 18 | endColumn: word.endColumn, 19 | }; 20 | 21 | var keywordMappings = { 22 | "bjk": { insertText: "编辑框", label: "bjk编辑框" }, 23 | "zj": { insertText: "组件", label: "zj组件" }, 24 | "nr": { insertText: "内容", label: "nr内容" }, 25 | }; 26 | 27 | // 检查用户输入的关键词是否在映射中 28 | var suggestions = []; 29 | Object.keys(keywordMappings).forEach(function (keyword) { 30 | var regex = new RegExp("^" + word.word, "i"); 31 | if (regex.test(keyword)) { 32 | var { insertText, label } = keywordMappings[keyword]; 33 | suggestions.push(createCustomProposal(range, insertText, label)); 34 | } 35 | }); 36 | 37 | return { suggestions: suggestions }; 38 | }, 39 | }); 40 | 41 | monaco.editor.create(document.getElementById("container"), { 42 | value: `export function 绑定窗口事件(c, 组件) { 43 | c.窗口创建完毕 = function () { 44 | console.log("窗口创建完毕") 45 | } 46 | 47 | c.按钮1被单击 = function () { 48 | console.log("按钮1被单击") 49 | 组件.编辑框1text = "祖国,您好!" 50 | } 51 | //事件函数位置不要删除 52 | }`, 53 | language: "javascript", 54 | }); -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | } 12 | 13 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import {fileURLToPath, URL} from 'node:url' 2 | 3 | import {defineConfig} from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | 6 | import AutoImport from 'unplugin-auto-import/vite' 7 | import Components from 'unplugin-vue-components/vite' 8 | import {ElementPlusResolver, TDesignResolver} from 'unplugin-vue-components/resolvers' 9 | import IconsResolver from 'unplugin-icons/resolver' 10 | import vueJsx from '@vitejs/plugin-vue-jsx' 11 | 12 | // https://vitejs.dev/config/ 13 | export default defineConfig({ 14 | server: { 15 | host: "0.0.0.0", 16 | hmr: { 17 | host: 'localhost', 18 | protocol: 'ws', 19 | } 20 | }, 21 | preview: { 22 | host: "0.0.0.0", 23 | port: 3000, 24 | }, 25 | publicDir: "public", 26 | plugins: [ 27 | vue(), 28 | vueJsx(), 29 | AutoImport({ 30 | imports: ['vue'], 31 | resolvers: [ 32 | ElementPlusResolver(), 33 | 34 | // Auto import icon components 35 | // 自动导入图标组件 36 | IconsResolver({ 37 | prefix: 'Icon', 38 | }), 39 | TDesignResolver({ 40 | library: 'vue-next' 41 | }) 42 | ], 43 | }), 44 | Components({ 45 | resolvers: [ 46 | // Auto register icon components 47 | // 自动注册图标组件 48 | IconsResolver({ 49 | enabledCollections: ['ep'], 50 | }), 51 | // Auto register Element Plus components 52 | // 自动导入 Element Plus 组件 53 | ElementPlusResolver(), 54 | TDesignResolver({ 55 | library: 'vue-next' 56 | }) 57 | ], 58 | }), 59 | 60 | ], 61 | resolve: { 62 | alias: { 63 | '@': fileURLToPath(new URL('./src', import.meta.url)) 64 | } 65 | }, 66 | esbuild: { 67 | jsxFactory: 'h', 68 | jsxFragment: 'Fragment', 69 | // jsxInject: `import React from 'react'`, 70 | }, 71 | }) 72 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/wailsjs/go/main/App.d.ts: -------------------------------------------------------------------------------- 1 | // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL 2 | // This file is automatically generated. DO NOT EDIT 3 | 4 | export function E下载github项目(arg1:string,arg2:string):Promise; 5 | 6 | export function E保存(arg1:string,arg2:string):Promise; 7 | 8 | export function E保存件对话框():Promise; 9 | 10 | export function E停止命令():Promise; 11 | 12 | export function E创建函数(arg1:string,arg2:string,arg3:string):Promise; 13 | 14 | export function E发送跳转代码到ide(arg1:string,arg2:string,arg3:number):Promise; 15 | 16 | export function E发送跳转代码到ide_命令行方式(arg1:string,arg2:string,arg3:string):Promise; 17 | 18 | export function E取当前目录():Promise; 19 | 20 | export function E取文件修改时间(arg1:string):Promise; 21 | 22 | export function E取运行目录():Promise; 23 | 24 | export function E取配置信息():Promise; 25 | 26 | export function E打开文件对话框():Promise; 27 | 28 | export function E打开选择文件夹对话框():Promise; 29 | 30 | export function E搜索文件(arg1:string,arg2:string):Promise>; 31 | 32 | export function E文件是否存在(arg1:string):Promise; 33 | 34 | export function E文件枚举(arg1:string):Promise>; 35 | 36 | export function E检查更新():Promise; 37 | 38 | export function E添加文件监视(arg1:string):Promise; 39 | 40 | export function E清空文件监视():Promise; 41 | 42 | export function E读入文件(arg1:string):Promise; 43 | 44 | export function E运行命令(arg1:string,arg2:string):Promise; 45 | 46 | export function Greet(arg1:string):Promise; 47 | -------------------------------------------------------------------------------- /GoEasyDesigner/frontend/wailsjs/go/main/App.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 E下载github项目(arg1, arg2) { 6 | return window['go']['main']['App']['E下载github项目'](arg1, arg2); 7 | } 8 | 9 | export function E保存(arg1, arg2) { 10 | return window['go']['main']['App']['E保存'](arg1, arg2); 11 | } 12 | 13 | export function E保存件对话框() { 14 | return window['go']['main']['App']['E保存件对话框'](); 15 | } 16 | 17 | export function E停止命令() { 18 | return window['go']['main']['App']['E停止命令'](); 19 | } 20 | 21 | export function E创建函数(arg1, arg2, arg3) { 22 | return window['go']['main']['App']['E创建函数'](arg1, arg2, arg3); 23 | } 24 | 25 | export function E发送跳转代码到ide(arg1, arg2, arg3) { 26 | return window['go']['main']['App']['E发送跳转代码到ide'](arg1, arg2, arg3); 27 | } 28 | 29 | export function E发送跳转代码到ide_命令行方式(arg1, arg2, arg3) { 30 | return window['go']['main']['App']['E发送跳转代码到ide_命令行方式'](arg1, arg2, arg3); 31 | } 32 | 33 | export function E取当前目录() { 34 | return window['go']['main']['App']['E取当前目录'](); 35 | } 36 | 37 | export function E取文件修改时间(arg1) { 38 | return window['go']['main']['App']['E取文件修改时间'](arg1); 39 | } 40 | 41 | export function E取运行目录() { 42 | return window['go']['main']['App']['E取运行目录'](); 43 | } 44 | 45 | export function E取配置信息() { 46 | return window['go']['main']['App']['E取配置信息'](); 47 | } 48 | 49 | export function E打开文件对话框() { 50 | return window['go']['main']['App']['E打开文件对话框'](); 51 | } 52 | 53 | export function E打开选择文件夹对话框() { 54 | return window['go']['main']['App']['E打开选择文件夹对话框'](); 55 | } 56 | 57 | export function E搜索文件(arg1, arg2) { 58 | return window['go']['main']['App']['E搜索文件'](arg1, arg2); 59 | } 60 | 61 | export function E文件是否存在(arg1) { 62 | return window['go']['main']['App']['E文件是否存在'](arg1); 63 | } 64 | 65 | export function E文件枚举(arg1) { 66 | return window['go']['main']['App']['E文件枚举'](arg1); 67 | } 68 | 69 | export function E检查更新() { 70 | return window['go']['main']['App']['E检查更新'](); 71 | } 72 | 73 | export function E添加文件监视(arg1) { 74 | return window['go']['main']['App']['E添加文件监视'](arg1); 75 | } 76 | 77 | export function E清空文件监视() { 78 | return window['go']['main']['App']['E清空文件监视'](); 79 | } 80 | 81 | export function E读入文件(arg1) { 82 | return window['go']['main']['App']['E读入文件'](arg1); 83 | } 84 | 85 | export function E运行命令(arg1, arg2) { 86 | return window['go']['main']['App']['E运行命令'](arg1, arg2); 87 | } 88 | 89 | export function Greet(arg1) { 90 | return window['go']['main']['App']['Greet'](arg1); 91 | } 92 | -------------------------------------------------------------------------------- /GoEasyDesigner/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 | -------------------------------------------------------------------------------- /GoEasyDesigner/go.mod: -------------------------------------------------------------------------------- 1 | module changeme 2 | 3 | go 1.22.0 4 | 5 | toolchain go1.23.8 6 | 7 | require ( 8 | github.com/duolabmeng6/goefun v1.3.6 9 | github.com/fsnotify/fsnotify v1.8.0 10 | github.com/ncruces/zenity v0.10.10 11 | github.com/wailsapp/wails/v2 v2.10.1 12 | ) 13 | 14 | require ( 15 | github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect 16 | github.com/akavel/rsrc v0.10.2 // indirect 17 | github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 // indirect 18 | github.com/bep/debounce v1.2.1 // indirect 19 | github.com/dchest/jsmin v0.0.0-20220218165748-59f39799265f // indirect 20 | github.com/go-ole/go-ole v1.3.0 // indirect 21 | github.com/godbus/dbus/v5 v5.1.0 // indirect 22 | github.com/gogf/gf/v2 v2.4.1 // indirect 23 | github.com/google/go-cmp v0.5.8 // indirect 24 | github.com/google/uuid v1.6.0 // indirect 25 | github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect 26 | github.com/joho/godotenv v1.5.1 // indirect 27 | github.com/josephspurrier/goversioninfo v1.4.0 // indirect 28 | github.com/kr/pretty v0.3.0 // indirect 29 | github.com/kr/text v0.2.0 // indirect 30 | github.com/labstack/echo/v4 v4.13.3 // indirect 31 | github.com/labstack/gommon v0.4.2 // indirect 32 | github.com/leaanthony/go-ansi-parser v1.6.1 // indirect 33 | github.com/leaanthony/gosod v1.0.4 // indirect 34 | github.com/leaanthony/slicer v1.6.0 // indirect 35 | github.com/leaanthony/u v1.1.1 // indirect 36 | github.com/mattn/go-colorable v0.1.13 // indirect 37 | github.com/mattn/go-isatty v0.0.20 // indirect 38 | github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect 39 | github.com/pkg/errors v0.9.1 // indirect 40 | github.com/randall77/makefat v0.0.0-20210315173500-7ddd0e42c844 // indirect 41 | github.com/rivo/uniseg v0.4.7 // indirect 42 | github.com/rogpeppe/go-internal v1.8.0 // indirect 43 | github.com/samber/lo v1.49.1 // indirect 44 | github.com/tkrajina/go-reflector v0.5.8 // indirect 45 | github.com/valyala/bytebufferpool v1.0.0 // indirect 46 | github.com/valyala/fasttemplate v1.2.2 // indirect 47 | github.com/wailsapp/go-webview2 v1.0.19 // indirect 48 | github.com/wailsapp/mimetype v1.4.1 // indirect 49 | go.opentelemetry.io/otel v1.7.0 // indirect 50 | go.opentelemetry.io/otel/trace v1.7.0 // indirect 51 | golang.org/x/crypto v0.33.0 // indirect 52 | golang.org/x/image v0.12.0 // indirect 53 | golang.org/x/net v0.35.0 // indirect 54 | golang.org/x/sys v0.30.0 // indirect 55 | golang.org/x/text v0.22.0 // indirect 56 | ) 57 | -------------------------------------------------------------------------------- /GoEasyDesigner/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "changeme/mymodel" 5 | "embed" 6 | "fmt" 7 | "os" 8 | "strings" 9 | 10 | "github.com/wailsapp/wails/v2" 11 | "github.com/wailsapp/wails/v2/pkg/options" 12 | "github.com/wailsapp/wails/v2/pkg/options/assetserver" 13 | ) 14 | 15 | //go:embed all:frontend/dist 16 | var assets embed.FS 17 | 18 | func main() { 19 | //获取传入的命令行参数 20 | args := os.Args 21 | // Create an instance of the app structure 22 | app := NewApp() 23 | if len(args) > 2 { 24 | 设计文件路径 := args[1] 25 | 插件端口号 := args[2] 26 | app.S设计文件路径 = strings.Replace(设计文件路径, "文件路径=", "", 1) 27 | app.IDE插件端口号 = strings.Replace(插件端口号, "port=", "", 1) 28 | fmt.Println("设计文件路径", 设计文件路径) 29 | fmt.Println("插件端口号", 插件端口号) 30 | } 31 | 32 | version := mymodel.Version 33 | // Create application with options 34 | err := wails.Run(&options.App{ 35 | Title: "GoEasyDesigner 窗口设计师 " + version, 36 | Width: 1280, 37 | Height: 768, 38 | AssetServer: &assetserver.Options{ 39 | Assets: assets, 40 | }, 41 | BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 1}, 42 | OnStartup: app.startup, 43 | Bind: []interface{}{ 44 | app, 45 | }, 46 | }) 47 | 48 | if err != nil { 49 | println("Error:", err.Error()) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /GoEasyDesigner/myfunc/myfunc.go: -------------------------------------------------------------------------------- 1 | package myfunc 2 | 3 | import ( 4 | "fmt" 5 | "github.com/duolabmeng6/goefun/ecore" 6 | . "github.com/duolabmeng6/goefun/ehttp" 7 | "regexp" 8 | "runtime" 9 | "strings" 10 | ) 11 | 12 | func InsertCode(jscode string, insertionCode string) string { 13 | // 获取函数名称 窗口.按钮3被点击 = function () { 截取 按钮3被点击 14 | 函数名称 := insertionCode[strings.Index(insertionCode, ".")+1 : strings.Index(insertionCode, "=")] 15 | // 检查是否已经存在 16 | if strings.Contains(jscode, 函数名称) { 17 | return jscode 18 | } 19 | // Define the regular expression pattern 20 | pattern := `(//事件函数位置不要删除[^\n]*)` 21 | 22 | // Compile the regular expression 23 | re := regexp.MustCompile(pattern) 24 | 25 | // Replace the matching pattern with the insertion code 26 | result := re.ReplaceAllString(jscode, insertionCode+"$1") 27 | 28 | return result 29 | } 30 | 31 | func E发送跳转代码到ide(插件URL地址 string, 文件路径 string, 跳转位置 int) bool { 32 | 文件名 := ecore.E文件取文件名(文件路径, true) 33 | 文件名 = ecore.URL编码(文件名) 34 | 跳转URL := 插件URL地址 + "/myserver?type=target&file=" + 文件名 + "&def=" + ecore.E到文本(跳转位置) 35 | ecore.E调试输出("调用pycharm代码跳转", 跳转URL) 36 | eh := NewHttp() 37 | 返回文本, err := eh.Get(跳转URL) 38 | println("调用pycharm代码跳转", 返回文本) 39 | if err != nil { 40 | println("调用pycharm代码跳转", err.Error()) 41 | return false 42 | } 43 | return true 44 | } 45 | 46 | // 计算跳转位置 47 | func 计算跳转位置(文件内容 string, 跳转字符串 string) (int, int, bool) { 48 | 跳转位置行 := 0 49 | 跳转位置列 := 0 50 | 51 | if 文件内容 != "" && 跳转字符串 != "" { 52 | index := strings.Index(文件内容, 跳转字符串) 53 | if index != -1 { 54 | lines := strings.Split(文件内容, "\n") 55 | current := 0 56 | for i, line := range lines { 57 | lineLength := len(line) + 1 // 加 1 是为了算上换行符 58 | if current+lineLength > index { 59 | 跳转位置行 = i + 1 // 行号从 1 开始 60 | 跳转位置列 = index - current // 列号从 0 开始 61 | return 跳转位置行, 跳转位置列, true 62 | } 63 | current += lineLength 64 | } 65 | } else { 66 | ecore.E调试输出("未找到跳转字符串", 跳转字符串) 67 | return 0, 0, false 68 | } 69 | } else { 70 | ecore.E调试输出("文件内容或跳转字符串为空", 跳转字符串) 71 | return 0, 0, false 72 | } 73 | 74 | return 0, 0, false 75 | } 76 | 77 | func E发送跳转代码到ide_命令行方式(ide string, 文件路径 string, 跳转字符串 string) bool { 78 | 文件内容 := ecore.E读入文本(文件路径) 79 | 跳转位置行, 跳转位置列, 成功 := 计算跳转位置(文件内容, 跳转字符串) 80 | if !成功 { 81 | return false 82 | } 83 | 跳转URL := "" 84 | if ide == "vscode" { 85 | 跳转URL = fmt.Sprintf("code -g %s:%d:%d", 文件路径, 跳转位置行, 跳转位置列) 86 | } else if ide == "goland" { 87 | 跳转URL = fmt.Sprintf("goland --line %d %s", 跳转位置行, 文件路径) 88 | } else if ide == "webstorm" { 89 | 跳转URL = fmt.Sprintf("webstorm --line %d %s", 跳转位置行, 文件路径) 90 | } else if ide == "cursor" { 91 | 跳转URL = fmt.Sprintf("cursor -g %s:%d:%d", 文件路径, 跳转位置行, 跳转位置列) 92 | } else { 93 | ecore.E调试输出("未知的IDE", ide) 94 | } 95 | ecore.E调试输出("调用代码跳转", 跳转URL) 96 | ecore.E运行_mac(跳转URL, true, func(line string) { 97 | println(line) 98 | }) 99 | return true 100 | } 101 | 102 | func E运行命令(执行目录 string, 执行命令 string, 回调函数 func(回显内容 string)) string { 103 | 命令 := "cd " + 执行目录 + " && " + 执行命令 104 | println("执行命令", 命令) 105 | return ecore.E运行_mac(命令, true, func(line string) { 106 | //println(line) 107 | 回调函数(line) 108 | }) 109 | } 110 | 111 | func E是否为window系统() bool { 112 | return runtime.GOOS == "windows" 113 | } 114 | 115 | func E是否为macOS系统() bool { 116 | return runtime.GOOS == "darwin" 117 | } 118 | 119 | func E是否为UbuntuLinux系统() bool { 120 | return runtime.GOOS == "linux" 121 | } 122 | -------------------------------------------------------------------------------- /GoEasyDesigner/myfunc/myfunc_test.go: -------------------------------------------------------------------------------- 1 | package myfunc 2 | 3 | import ( 4 | "fmt" 5 | "regexp" 6 | "testing" 7 | ) 8 | 9 | func TestInsertCode(t *testing.T) { 10 | jscode := ` 11 | export function 绑定窗口事件(窗口) { 12 | 窗口.窗口创建完毕 = function () { 13 | console.log("窗口创建完毕") 14 | } 15 | 窗口.按钮1被点击 = function () { 16 | console.log("按钮1被点击了") 17 | 窗口.组件.按钮1.标题 = "祖国你好222" 18 | } 19 | 20 | 21 | //事件函数位置不要删除 22 | 23 | 窗口.按钮1被点击xxx = function () { 24 | console.log("按钮1被点击了") 25 | 窗口.组件.按钮1.标题 = "祖国你好222" 26 | } 27 | } 28 | ` 29 | insertionCode := ` 30 | 窗口.按钮2被点击 = function () { 31 | console.log("按钮2被点击") 32 | } 33 | ` 34 | result := InsertCode(jscode, insertionCode) 35 | fmt.Println(result) 36 | insertionCode2 := ` 37 | 窗口.按钮3被点击 = function () { 38 | console.log("按钮3被点击") 39 | } 40 | ` 41 | result2 := InsertCode(result, insertionCode2) 42 | fmt.Println(result2) 43 | } 44 | 45 | func TestE发送跳转代码到ide(t *testing.T) { 46 | 插件URL地址 := "http://127.0.0.1:13403" 47 | 文件路径 := "C:\\eview\\v2\\wails-demo\\frontend\\src\\event.js" 48 | 跳转位置 := 1 49 | E发送跳转代码到ide(插件URL地址, 文件路径, 跳转位置) 50 | } 51 | 52 | func TestE发送跳转代码到ide_命令行方式(t *testing.T) { 53 | 文件路径 := "/Users/ll/Documents/GitHub/GoEasyDesigner/GoEasyDesigner/myfunc/myfunc_test.go" 54 | //E发送跳转代码到ide_vscode("code",文件路径, "wails dev") 55 | E发送跳转代码到ide_命令行方式("cursor", 文件路径, "wails dev") 56 | } 57 | 58 | func TestE运行命令(t *testing.T) { 59 | 项目根目录 := "/Users/ll/Documents/GitHub/GoEasyDesigner/wails-demo" 60 | 执行命令 := "wails dev" 61 | E运行命令(项目根目录, 执行命令, func(回显内容 string) { 62 | regex := regexp.MustCompile("\x1b\\[[0-9;]*m") 63 | cleaned := regex.ReplaceAllString(回显内容, "") 64 | println("回显内容", cleaned) 65 | }) 66 | } 67 | func TestE运行命令2(t *testing.T) { 68 | //mymodel.E检查更新() 69 | } 70 | -------------------------------------------------------------------------------- /GoEasyDesigner/mymodel/Version.go: -------------------------------------------------------------------------------- 1 | package mymodel 2 | 3 | var Version = `v0.0.1` -------------------------------------------------------------------------------- /GoEasyDesigner/mymodel/git项目操作.go: -------------------------------------------------------------------------------- 1 | package mymodel 2 | 3 | import ( 4 | "fmt" 5 | "github.com/duolabmeng6/goefun/ecore" 6 | "github.com/ncruces/zenity" 7 | ) 8 | 9 | func E下载github项目(github项目地址, 保存目录 string) error { 10 | // github项目地址 = https://github.com/duolabmeng6/wails-template-vue-go-easy 11 | // 保存目录 = d:/test 12 | // 我希望通过https下载github的项目到指定的目录上 13 | //修改 GitHub 项目地址以指向 ZIP 压缩包 14 | //检查github项目地址 是否包含https:// 15 | fmt.Println("下载URL", github项目地址) 16 | 17 | name := ecore.E文件取文件名(github项目地址, false) 18 | savePath := 保存目录 + "/" + name + "_project.zip" 19 | 删除文件 := false 20 | if ecore.E判断文本(github项目地址, "https://") { 21 | zipURL := github项目地址 + "/archive/refs/heads/main.zip" 22 | progress, _ := zenity.Progress( 23 | zenity.Title("下载项目中..."), 24 | zenity.MaxValue(100), // 设置最大进度值为100 25 | ) 26 | 27 | progress.Text("正在下载...") 28 | 29 | err := E下载带进度回调(zipURL, savePath, func(进度 float64) { 30 | fmt.Println("正在下载...", 进度) 31 | progress.Text("正在下载..." + fmt.Sprintf("%.2f", 进度) + "%") 32 | progress.Value(int(进度)) 33 | }) 34 | if err != nil { 35 | fmt.Println("下载出错:", err) 36 | zenity.Info("下载错误,检查你的网络") 37 | progress.Close() 38 | return err 39 | } 40 | progress.Text("下载完成 即将完成更新") 41 | if progress.Close() != nil { 42 | fmt.Println("点击了取消") 43 | return nil 44 | } 45 | fmt.Println("下载完成了") 46 | 删除文件 = true 47 | } else { 48 | //检查文件是否存在 49 | if !ecore.E文件是否存在(github项目地址) { 50 | fmt.Println("文件不存在") 51 | return nil 52 | } 53 | savePath = github项目地址 54 | } 55 | 56 | if !zip解压2(savePath, 保存目录, nil, func(解压路径 string) string { 57 | println("解压路径", 解压路径) 58 | //wails-template-vue-go-easy-main/.gitignore 59 | // 删除前面的文件夹 60 | 解压路径 = ecore.StrCut(解压路径, "/$") 61 | 62 | return 解压路径 63 | }) { 64 | fmt.Println("解压失败") 65 | return nil 66 | } 67 | if 删除文件 { 68 | ecore.E删除文件(savePath) 69 | } 70 | 71 | return nil 72 | } 73 | -------------------------------------------------------------------------------- /GoEasyDesigner/mymodel/git项目操作_test.go: -------------------------------------------------------------------------------- 1 | package mymodel 2 | 3 | import ( 4 | "github.com/duolabmeng6/goefun/ecore" 5 | "testing" 6 | ) 7 | 8 | func TestE下载github项目(t *testing.T) { 9 | E下载github项目("https://github.com/duolabmeng6/wails-template-vue-go-easy", "d:/test/app") 10 | //https://github.com/duolabmeng6/wails-template-vue-go-easy/archive/refs/heads/main.zip 11 | } 12 | 13 | func TestE搜索design文件(t *testing.T) { 14 | //func E文件枚举(欲寻找的目录 string, 欲寻找的文件名 string, files *[]string, 是否带路径 bool, 是否遍历子目录 bool) error { 15 | var files []string 16 | ecore.E文件枚举("C:\\eview\\project\\myporject", "design.json", &files, true, true) 17 | for _, v := range files { 18 | println(v) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GoEasyDesigner/mymodel/文件监视模块.go: -------------------------------------------------------------------------------- 1 | package mymodel 2 | 3 | import ( 4 | "fmt" 5 | "github.com/fsnotify/fsnotify" 6 | "sync" 7 | ) 8 | 9 | type E文件监视模块接口 interface { 10 | 开始() error 11 | 停止() error 12 | 清空() error 13 | 添加监视文件(文件路径 string, 处理函数 func(文件路径 string)) error 14 | 删除监视文件(文件路径 string) error 15 | } 16 | 17 | type E文件监视模块 struct { 18 | watcher *fsnotify.Watcher 19 | 监视文件列表 map[string]func(文件路径 string) 20 | mutex sync.Mutex 21 | } 22 | 23 | func New文件监视模块() (*E文件监视模块, error) { 24 | watcher, err := fsnotify.NewWatcher() 25 | if err != nil { 26 | return nil, err 27 | } 28 | 29 | m := &E文件监视模块{ 30 | watcher: watcher, 31 | 监视文件列表: make(map[string]func(文件路径 string)), 32 | } 33 | 34 | return m, nil 35 | } 36 | 37 | func (m *E文件监视模块) E开始() error { 38 | done := make(chan bool) 39 | 40 | go func() { 41 | for { 42 | select { 43 | case event, ok := <-m.watcher.Events: 44 | if !ok { 45 | return 46 | } 47 | if event.Op&fsnotify.Write == fsnotify.Write { 48 | m.mutex.Lock() 49 | 处理函数, 存在 := m.监视文件列表[event.Name] 50 | m.mutex.Unlock() 51 | 52 | if 存在 { 53 | fmt.Println("文件被修改:", event.Name) 54 | 处理函数(event.Name) 55 | } 56 | } 57 | case err, ok := <-m.watcher.Errors: 58 | if !ok { 59 | return 60 | } 61 | fmt.Println("错误:", err) 62 | } 63 | } 64 | }() 65 | 66 | //err := m.watcher.Add("/path/to/default/file.txt") // 可以添加默认监视的文件路径 67 | //if err != nil { 68 | // return err 69 | //} 70 | 71 | <-done 72 | return nil 73 | } 74 | 75 | func (m *E文件监视模块) E停止() error { 76 | return m.watcher.Close() 77 | } 78 | func (m *E文件监视模块) E清空() error { 79 | m.mutex.Lock() 80 | defer m.mutex.Unlock() 81 | 82 | for 文件路径 := range m.监视文件列表 { 83 | err := m.watcher.Remove(文件路径) 84 | if err != nil { 85 | return err 86 | } 87 | } 88 | 89 | m.监视文件列表 = make(map[string]func(文件路径 string)) 90 | return nil 91 | } 92 | 93 | func (m *E文件监视模块) E添加监视文件(文件路径 string, 处理函数 func(文件路径 string)) error { 94 | m.mutex.Lock() 95 | defer m.mutex.Unlock() 96 | //检查是否已经添加过 97 | _, 存在 := m.监视文件列表[文件路径] 98 | if 存在 { 99 | return nil 100 | } 101 | err := m.watcher.Add(文件路径) 102 | if err != nil { 103 | return err 104 | } 105 | 106 | m.监视文件列表[文件路径] = 处理函数 107 | return nil 108 | } 109 | 110 | func (m *E文件监视模块) E删除监视文件(文件路径 string) error { 111 | m.mutex.Lock() 112 | defer m.mutex.Unlock() 113 | 114 | err := m.watcher.Remove(文件路径) 115 | if err != nil { 116 | return err 117 | } 118 | 119 | delete(m.监视文件列表, 文件路径) 120 | return nil 121 | } 122 | -------------------------------------------------------------------------------- /GoEasyDesigner/mymodel/文件监视模块_test.go: -------------------------------------------------------------------------------- 1 | package mymodel 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | func TestE文件监视模块(t *testing.T) { 10 | 文件监视, _ := New文件监视模块() 11 | go func() { 12 | 文件监视.E开始() 13 | }() 14 | 15 | 文件监视.E添加监视文件("/Users/ll/Documents/GitHub/projection_screen_tv/easyToTV/frontend/src/win/event.js", func(文件路径 string) { 16 | fmt.Println("文件被修改,触发处理函数:", 文件路径) 17 | // 在这里可以添加通知你的程序的逻辑 18 | }) 19 | 20 | 文件监视.E添加监视文件("/Users/ll/Documents/GitHub/projection_screen_tv/easyToTV/frontend/src/App.vue", func(文件路径 string) { 21 | fmt.Println("文件被修改,触发处理函数:", 文件路径) 22 | }) 23 | 24 | time.Sleep(10 * time.Second) 25 | println("删除监视") 26 | 27 | 文件监视.E删除监视文件("/Users/ll/Documents/GitHub/projection_screen_tv/easyToTV/frontend/src/App.vue") 28 | 29 | time.Sleep(60 * time.Second) 30 | 31 | } 32 | -------------------------------------------------------------------------------- /GoEasyDesigner/ssh_nginx/Caddyfile: -------------------------------------------------------------------------------- 1 | go.kenhong.com { 2 | root * /srv 3 | encode { 4 | zstd 5 | gzip 9 6 | } 7 | file_server 8 | } 9 | 10 | -------------------------------------------------------------------------------- /GoEasyDesigner/ssh_nginx/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name go.kenhong.com; 4 | return 301 https://$host$request_uri; 5 | } 6 | 7 | server { 8 | listen 443 ssl http2; 9 | server_name go.kenhong.com; 10 | 11 | ssl_certificate /etc/nginx/certs/fullchain.cer; 12 | ssl_certificate_key /etc/nginx/certs/go.kenhong.com.key; 13 | 14 | gzip on; 15 | gzip_disable "msie6"; 16 | 17 | gzip_vary on; 18 | gzip_proxied any; 19 | gzip_comp_level 9; 20 | gzip_buffers 16 8k; 21 | gzip_http_version 1.1; 22 | gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 23 | 24 | location / { 25 | root /usr/share/nginx/html; 26 | index index.html; 27 | # Allow only requests with the host header matching go.kenhong.com 28 | if ($host != "go.kenhong.com") { 29 | return 444; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /GoEasyDesigner/ssh_nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | 3 | services: 4 | openssh-server: 5 | image: linuxserver/openssh-server:latest 6 | container_name: openssh-server 7 | hostname: openssh-server #optional 8 | environment: 9 | - PUID=1000 10 | - PGID=1000 11 | - TZ=Asia/Shanghai 12 | # - PUBLIC_KEY=yourpublickey #optional 13 | # - PUBLIC_KEY_FILE=/path/to/file #optional 14 | # - PUBLIC_KEY_DIR=/path/to/directory/containing/_only_/pubkeys #optional 15 | # - PUBLIC_KEY_URL=https://github.com/username.keys #optional 16 | - SUDO_ACCESS=false #optional 17 | - PASSWORD_ACCESS=true #optional 18 | - USER_PASSWORD=${USER_PASSWORD} 19 | # - USER_PASSWORD_FILE=/path/to/file #optional 20 | - USER_NAME=${USER_NAME} #optional 21 | volumes: 22 | - ./config:/config 23 | - ./www:/config/www 24 | ports: 25 | - ${SSH_PORT}:2222 26 | restart: unless-stopped 27 | 28 | caddy: 29 | image: caddy:2-alpine 30 | ports: 31 | - "80:80" 32 | - "443:443" 33 | - "443:443/udp" 34 | volumes: 35 | - ./Caddyfile:/etc/caddy/Caddyfile 36 | - ./www:/srv 37 | - ./caddy_data:/data 38 | - ./caddy_config:/config 39 | # nginx: 40 | # image: nginx:latest 41 | # ports: 42 | # - "80:80" 43 | # - "443:443" 44 | # volumes: 45 | # - ./www:/usr/share/nginx/html 46 | # - /root/.acme.sh/go.kenhong.com:/etc/nginx/certs 47 | # - ./default.conf:/etc/nginx/conf.d/default.conf 48 | 49 | -------------------------------------------------------------------------------- /GoEasyDesigner/wails.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://wails.io/schemas/config.v2.json", 3 | "name": "GoEasyDesigner", 4 | "outputfilename": "GoEasyDesigner", 5 | "frontend:install": "pnpm install", 6 | "frontend:build": "pnpm run build", 7 | "frontend:dev:watcher": "pnpm run dev", 8 | "frontend:dev:serverUrl": "auto", 9 | "author": { 10 | "name": "多啦b梦", 11 | "email": "1715109585@qq.com" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /QtEsayDesigner IDE插件.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/QtEsayDesigner IDE插件.jar -------------------------------------------------------------------------------- /README.assets/image-20230828083413650.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/README.assets/image-20230828083413650.png -------------------------------------------------------------------------------- /README.assets/image-20230828084834120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/README.assets/image-20230828084834120.png -------------------------------------------------------------------------------- /README.assets/swskm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/README.assets/swskm.jpg -------------------------------------------------------------------------------- /script/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "os" 7 | "path/filepath" 8 | "strings" 9 | ) 10 | 11 | func copyFile(src, dst string) error { 12 | sourceFile, err := os.Open(src) 13 | if err != nil { 14 | return err 15 | } 16 | defer sourceFile.Close() 17 | 18 | // Create destination directory if it doesn't exist 19 | if err := os.MkdirAll(filepath.Dir(dst), os.ModePerm); err != nil { 20 | return err 21 | } 22 | 23 | destinationFile, err := os.Create(dst) 24 | if err != nil { 25 | return err 26 | } 27 | defer destinationFile.Close() 28 | 29 | _, err = io.Copy(destinationFile, sourceFile) 30 | return err 31 | } 32 | 33 | func copyFiles(sourcePath, destinationPath string, excludeFiles []string) error { 34 | err := filepath.Walk(sourcePath, func(path string, f os.FileInfo, err error) error { 35 | if err != nil { 36 | fmt.Println(err) // can't walk here, 37 | return nil // ignore this error 38 | } 39 | if f.IsDir() { 40 | return nil // ignore directories 41 | } 42 | 43 | // 排除指定文件和后缀 44 | exclude := false 45 | for _, excludeFile := range excludeFiles { 46 | if strings.HasSuffix(path, excludeFile) { 47 | exclude = true 48 | break 49 | } 50 | } 51 | if exclude { 52 | return nil 53 | } 54 | 55 | // 构建目标路径,保持相同的目录结构 56 | relPath, err := filepath.Rel(sourcePath, path) 57 | if err != nil { 58 | fmt.Printf("Error getting relative path: %v\n", err) 59 | return err 60 | } 61 | destinationFilePath := filepath.Join(destinationPath, relPath) 62 | 63 | // 复制文件 64 | err = copyFile(path, destinationFilePath) 65 | if err != nil { 66 | fmt.Printf("Error copying file %s: %v\n", path, err) 67 | return err 68 | } 69 | 70 | fmt.Printf("Copied %s to %s\n", path, destinationFilePath) 71 | return nil 72 | }) 73 | 74 | return err 75 | } 76 | 77 | func main() { 78 | sourcePath := "/Users/ll/Documents/GitHub/GoEasyDesigner/GoEasyDesigner/frontend/src/components/boxs" 79 | destinationPath := "/Users/ll/Documents/GitHub/GoEasyDesigner/go-easy-demo/frontend/src/components/boxs" 80 | excludeFiles := []string{"Attr.vue", ".js"} 81 | //删除 destinationPath 下的所有文件 82 | err := os.RemoveAll(destinationPath) 83 | if err != nil { 84 | return 85 | } 86 | err = copyFiles(sourcePath, destinationPath, excludeFiles) 87 | if err != nil { 88 | fmt.Printf("Error copying files: %v\n", err) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /tool/一键环境配置.e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duolabmeng6/GoEasyDesigner/a41b30318e6495022f767c26110f383329fc204f/tool/一键环境配置.e --------------------------------------------------------------------------------