禅游C端应用
约 1747 字大约 6 分钟
2026-11-09
上下文:
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/SQLFix.vue背景:优化数据库工具应用src/components/apps/DatabaseTools.vue
需求:
- 将数据同步面板的文本框外面的包裹的区域去除
- 将数据同步目标数据库的值默认为
mysql -u bip_znzz_serv -phbvzOoHcocB2y9SFtV8iWDjY5DKLXIjn -h dbproxy.diwork.com -P 12368 qms_qit - 当前工程的
MaterialTextarea.vue的说明文字和左边框离开一点 - 完成完整的后端同步功能实现,继续添加 Rust 后端命令
- 将数据同步面板中的源数据库和目标数据库中调整成一个文本框,填写的格式:
mysql -u 61adca51-c00c-41e8-a343-85aa1e911a45 -p9kf2AMzy6eMhY1yx -h jumper.diwork.com -P 33061 information_schema - 将
SQLFix.vue功能迁移过来 - 将
jc-dsync.py的功能补充到该应用新增一个面板中
背景:参考 /Users/jinchen/Documents/github/jc-blog/ 中的.vuepress,前端使用vuetify框架
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialActionButton.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialAutocomplete.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialDataTable.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialProgressBar.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialSearchField.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialSelect.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialTextarea.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/MaterialTextField.vue需求:
- 安装vuetify框架
- 将jc-blog的MaterialActionButton.vue、MaterialAutocomplete.vue、MaterialDataTable.vue、MaterialProgressBar.vue、MaterialSearchField.vue、MaterialSearchField.vue、MaterialSelect.vue、MaterialTextarea.vue、MaterialTextField.vue 迁移到当前工程
- 将当前工程中的MaterialActionButton.vue、MaterialProgressBar.vue、MaterialSearchField.vue、MaterialSelect.vue 替换
背景:目前该工程支持了打包Mac、Win
需求:支持下打包成安卓 apk
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/base/ButtonPanel.vue背景:参考 jc-blog 工程,实现了 ButtonPanel.vue 中的 显示隐藏机制
需求:将当前工程 的 ButtonPanel.vue 实现 滑动显示、隐藏逻辑
问题:目前git打标签v0.1.2后,标签推到GitHub后,releases会自动生成 Zenyu_aarch64.app.tar.gz、Zenyu_0.1.2_x64_en-US.msi、Zenyu_0.1.2_x64-setup.exe、Zenyu_0.1.2_aarch64.dmg,不会生成darwin-x86_64.json 、Zenyu-x86_64.sig、Zenyu-x86_64.app.tar.gz,导致本机安装的Zenyu_0.1.1检查更新提示已是最新版本
问题:Setting中主题颜色的切换,DockBar 中的图标色还是没有变化,再检查下原因
问题:Setting中点击检查更新显示检查更新失败,检查下原因
需求:Setting中支持下通过检查GitHub releases自动更新,访问 https://github.com/OrthogonalAndParallel/jc-rust-tools/releases 能看到 v0.1.1的版本,pubkey如何确定配置的是否正确
https://github.com/OrthogonalAndParallel/jc-rust-tools/releases/latest/download/darwin-aarch64.json
curl -sL https://api.github.com/repos/OrthogonalAndParallel/jc-rust-tools/releases
curl https://github.com/OrthogonalAndParallel/jc-rust-tools/releases/latest/download/darwin-aarch64.json这个工程使用pnpm tauri:dev启动后,
- Mac 应用点击设置应用的检查更新按钮,提示
检查更新失败2 - 访问
http://localhost:1420/,点击设置应用的检查更新按钮,提示:Cannot read properties of undefined (reading 'invoke'),控制台报错:
[Setting] 开始检查更新...
update-checker.js:31 [Updater] 开始检查更新...
update-checker.js:83 [Updater] 检查更新失败: TypeError: Cannot read properties of undefined (reading 'invoke')
at invoke (core.js:202:39)
at check (index.js:63:28)
at checkForUpdate (update-checker.js:33:26)
at Proxy.handleCheckUpdate (Setting.vue:329:30)
at callWithErrorHandling (runtime-core.esm-bundler.js:199:19)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:206:17)
at MdFilledButton2.invoker (runtime-dom.esm-bundler.js:745:5)
(匿名) @ update-checker.js:83
await in (匿名)
handleCheckUpdate @ Setting.vue:329
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
(匿名) @ runtime-dom.esm-bundler.js:745
update-checker.js:84 [Updater] 错误详情: Cannot read properties of undefined (reading 'invoke') TypeError: Cannot read properties of undefined (reading 'invoke')
at invoke (http://localhost:1420/node_modules/.vite/deps/chunk-ES5NGWZA.js?v=c594dddf:109:37)
at check (http://localhost:1420/node_modules/.vite/deps/@tauri-apps_plugin-updater.js?v=c594dddf:64:26)
at checkForUpdate (http://localhost:1420/src/utils/update-checker.js:33:26)
at Proxy.handleCheckUpdate (http://localhost:1420/src/components/apps/Setting.vue?t=1781599682200:141:30)
at callWithErrorHandling (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:2372:19)
at callWithAsyncErrorHandling (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:2379:17)
at MdFilledButton2.invoker (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:11570:5)
(匿名) @ update-checker.js:84
await in (匿名)
handleCheckUpdate @ Setting.vue:329
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
(匿名) @ runtime-dom.esm-bundler.js:745
Setting.vue:341 [Setting] 更新检查错误: TypeError: Cannot read properties of undefined (reading 'invoke')
at invoke (core.js:202:39)
at check (index.js:63:28)
at checkForUpdate (update-checker.js:33:26)
at Proxy.handleCheckUpdate (Setting.vue:329:30)
at callWithErrorHandling (runtime-core.esm-bundler.js:199:19)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:206:17)
at MdFilledButton2.invoker (runtime-dom.esm-bundler.js:745:5)
(匿名) @ Setting.vue:341
(匿名) @ update-checker.js:85
await in (匿名)
handleCheckUpdate @ Setting.vue:329
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
(匿名) @ runtime-dom.esm-bundler.js:745
Setting.vue:347 [Setting] 捕获到异常: TypeError: Cannot read properties of undefined (reading 'invoke')
at invoke (core.js:202:39)
at check (index.js:63:28)
at checkForUpdate (update-checker.js:33:26)
at Proxy.handleCheckUpdate (Setting.vue:329:30)
at callWithErrorHandling (runtime-core.esm-bundler.js:199:19)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:206:17)
at MdFilledButton2.invoker (runtime-dom.esm-bundler.js:745:5)
handleCheckUpdate @ Setting.vue:347
await in handleCheckUpdate
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
(匿名) @ runtime-dom.esm-bundler.js:745
Setting.vue:348 [Setting] 异常消息: Cannot read properties of undefined (reading 'invoke')
handleCheckUpdate @ Setting.vue:348
await in handleCheckUpdate
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
(匿名) @ runtime-dom.esm-bundler.js:745
Setting.vue:349 [Setting] 异常堆栈: TypeError: Cannot read properties of undefined (reading 'invoke')
at invoke (http://localhost:1420/node_modules/.vite/deps/chunk-ES5NGWZA.js?v=c594dddf:109:37)
at check (http://localhost:1420/node_modules/.vite/deps/@tauri-apps_plugin-updater.js?v=c594dddf:64:26)
at checkForUpdate (http://localhost:1420/src/utils/update-checker.js:33:26)
at Proxy.handleCheckUpdate (http://localhost:1420/src/components/apps/Setting.vue?t=1781599682200:141:30)
at callWithErrorHandling (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:2372:19)
at callWithAsyncErrorHandling (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:2379:17)
at MdFilledButton2.invoker (http://localhost:1420/node_modules/.vite/deps/vue.js?v=c594dddf:11570:5)README.md 中补充下 jc-rust-tools/scripts/中的脚本说明,是否可以去除一些无用的脚本
下面提问涉及到这些文件:
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/GitHelper.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/KnowledgeNotebook.vue
/Users/jinchen/Documents/github/jc-blog/docs/.vuepress/theme/components/apps/BPRHelper.vue背景:Md5Tool.vue的应用风格参考 jc-blog 中GitHelper.vue、KnowledgeNotebook.vue、BPRHelper.vue的应用风格
需求:
- 使用ButtonPanel、SlideTransition、HeaderActions等公共组件对当前工程的Md5Tool.vue风格修改
背景:优化Md5Tool.vue应用
需求:
- 选择文件Panel内容区只保留上传框、删除其他无用元素,HeaderActions中的清空历史也去除、空着就可以,内容区上下左右的距离保持统一,都和现在距离HeaderActions相同的宽度即可
- MD5操作Panel的开始计算、写入文件的按钮放到HeaderActions中,HeaderActions去除现在的重新选择按钮
- 历史记录Panel现在没有区分是开始计算还是写入文件的操作,补充个操作分类
问题:现在打开应用在Desktop.vue中是固定的
需求:要实现拖动应用标题可以在Desktop.vue移动
问题:现在Setting.vue中的配置信息存储在localStorage
需求:
- Tauri 后端工程支持下SQLite数据库
- 新增数据表,将Setting.vue的配置信息存储在SQLite数据库中
- 后端使用下面的分层结构
src-tauri/
├── src/
│ ├── commands/ # 接口层(薄层)
│ │ ├── mod.rs # 导出所有 command 函数
│ │ └── note.rs # 仅包含 #[tauri::command] 函数
│ ├── services/ # 业务层
│ │ ├── mod.rs
│ │ └── note_service.rs # 包含 NoteService 结构体,实现业务逻辑
│ ├── repositories/ # 数据层
│ │ ├── mod.rs
│ │ └── note_repository.rs # 数据库 CRUD 操作
│ ├── models/ # 数据模型(DTO/Entity)
│ │ └── note.rs
│ ├── utils/ # 工具函数(加密、日志等)
│ │ └── crypto.rs
│ ├── lib.rs # 注册 Tauri command 和 setup 函数
│ └── main.rs # 启动应用(极少逻辑)
├── Cargo.toml
└── tauri.conf.json问题:现在后端代码都放在 src/config,文件名称代表的分层关系,后面数据库表、业务对象多了后文件内容会比较庞大。
需求:按下面的文件目录分层示例调整下现在的后端代码
src-tauri/
├── src/
│ ├── commands/ # 接口层(薄层)
│ │ ├── mod.rs # 导出所有 command 函数
│ │ └── note.rs # 仅包含 #[tauri::command] 函数
│ ├── services/ # 业务层
│ │ ├── mod.rs
│ │ └── note_service.rs # 包含 NoteService 结构体,实现业务逻辑
│ ├── repositories/ # 数据层
│ │ ├── mod.rs
│ │ └── note_repository.rs # 数据库 CRUD 操作
│ ├── models/ # 数据模型(DTO/Entity)
│ │ └── note.rs
│ ├── utils/ # 工具函数(加密、日志等)
│ │ └── crypto.rs
│ ├── lib.rs # 注册 Tauri command 和 setup 函数
│ └── main.rs # 启动应用(极少逻辑)
├── Cargo.toml
└── tauri.conf.jsonCPJY202609210047
