摘要: 窗口和渲染进程是相同的东西 窗口向主进程传输数据 渲染进程传值 window.electron.ipcRenderer.invoke('aaa',{ a:1, b:2 }); 主进程接收 数据写在createWindow函数后面的mainWindow.on下面 ipcMain.handle('aaa 阅读全文
posted @ 2024-04-07 15:21 zongkm 阅读(86) 评论(0) 推荐(0) 编辑
摘要: helloword中 app中找不到模块 上面改成node 下面添加上 "baseUrl": ".", "paths": { "@/*": ["./src/*"] } 阅读全文
posted @ 2024-04-06 16:45 zongkm 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 登录 表单验证,正则判断 账号密码输入没问题点击登录或者输入手机号发验证码,验证码要做倒计时 验证码倒计时 let phoneTimer = null; //倒计时 const sendCode = () => { let timer = 10; captcha.value = `重新发送10秒`; 阅读全文
posted @ 2024-03-19 23:04 zongkm 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 当前使用Vite做为开发构建工具,而Vite默认不支持使用require方式进行模块导入导出 可以使用vite-plugin-require-transform插件来处理 安装npm install vite-plugin-require-transform 在vite.config.js中添加 i 阅读全文
posted @ 2024-03-19 19:26 zongkm 阅读(3118) 评论(0) 推荐(0) 编辑
摘要: 安装pinia npm install pinia 创建一个store/index.js import { createPinia } from 'pinia' //从pinia模块导入createPinia函数。Pinia是Vue.js的一个状态管理库,createPinia函数用于创建一个新的P 阅读全文
posted @ 2024-03-19 15:00 zongkm 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 在utils文件夹创建一个aes.js文件 安装 cnpm install crypto-js import CryptoJS from "crypto-js"; const key = CryptoJS.enc.Utf8.parse(""); //十六位十六进制数作为密钥 const iv = C 阅读全文
posted @ 2024-03-19 14:24 zongkm 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 这里用的是vue3 原来的写法不封装,直接卸载onBeforeMount内 onBeforeMount(() => { getSecondCategorys({ pageNum: 1, pageSize: 8 }).then((res) => { secondList.value = res.dat 阅读全文
posted @ 2024-03-17 18:21 zongkm 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 原理不清楚,记录一下 效果 点击哪个页面展示哪个 路由中 { path: "/news", name: "news", children: [ { path: "/news/:id", 这里固定 name: "newsId", 这里命名随意 component: () => import("../c 阅读全文
posted @ 2024-03-09 19:51 zongkm 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 在dom中 <div ref="box">12345 </div> 在mounted中 console.log(this.$refs.box) 阅读全文
posted @ 2024-03-09 14:11 zongkm 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1.nextTick是在所有东西执(onload)行完之后,最后执行的 2.想要获取更新后的dom可以使用 this.$nextTick 3.想在beforeCreate.created.beforeMount中获取dom可以使用$nextTick 阅读全文
posted @ 2024-03-09 14:05 zongkm 阅读(7) 评论(0) 推荐(0) 编辑