摘要: 在组合式 API 中使用 provide/inject,两个只能在 setup 期间调用,使用之前,必须从 vue 显示导入 provide/inject 方法。 provide 和 inject 通常成对一起使用,使一个祖先组件作为其后代组件的依赖注入方,无论这个组件的层级有多深都可以注入成功,只 阅读全文
posted @ 2024-07-05 15:20 林财钦 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 父组件 ParentComponent.vue <!-- ParentComponent.vue --> <template> <div> 子组件输入的数据 <p>Parent Value: {{ parentValue }}</p> 父输入框 <input v-model="parentValue 阅读全文
posted @ 2024-07-05 11:17 林财钦 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 一、问题描述 重装 Node 后,重新启动项目,报错未找到 node-sass 模块 试过各种 npm方法后依然无效,于是放弃安装。 网上常见的解决方法 使用 cnpm :cnpm install node-sass --save(失败) 指定镜像源:npm i node-sass --save - 阅读全文
posted @ 2024-07-05 09:58 林财钦 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 解决代码表单组件大量disable的麻烦,实现只读。只需要在需要的地方加上v-read-only即可达到只读效果,快捷方便。 实现思路 父元素下添加一个遮罩层元素 遮罩层元素的显示隐藏由参数决定 要想简单快捷的实现,最好用的就是写一个遮罩层,通过遮罩来隔绝用户的操作。 原始代码如下: <templa 阅读全文
posted @ 2024-07-05 09:48 林财钦 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 父组件:通过ref获取子组件实例 <template> <div style="text-align:center"> <button @click="callChildMethod">点击获取子组件数据</button> <div> 获取到子组件的数据如下: <div> {{childData}} 阅读全文
posted @ 2024-07-04 15:33 林财钦 阅读(6) 评论(0) 推荐(0) 编辑
摘要: <!-- 父组件 --> <template> <h1>I am ParentComponent</h1> <ChildComponent @child-click="zCf"/> <h2>{{ x }}</h2> </template> <script setup> import ChildCom 阅读全文
posted @ 2024-07-04 15:13 林财钦 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 父组件文件:parentcomponent.vue 子组件文件:childcomponent.vue 传普通值 传动态值 传对象 传数组 <!-- 父组件 --> <template> <h1>I am ParentComponent</h1> <ChildComponent msg="nice"/ 阅读全文
posted @ 2024-07-04 14:58 林财钦 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 一、背景 业务需求 需要这种 二、实现 `` 点击查看代码 <el-table ref="singleTableRef" highlight-current-row border :data="state.personData" class="data-table" max-height="600" 阅读全文
posted @ 2024-01-08 11:24 林财钦 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 一、背景 二、实现 模版 influx_inspect export -datadir "D:/WindowsService/Influxdb/data" -waldir "D:/WindowsService/Influxdb/wal" -out "D:/202311_lcq" -database 阅读全文
posted @ 2023-12-15 15:31 林财钦 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 一、背景 这几天数据中了病毒,服务器被黑,Mysql数据库遭比特币勒索!!!数据库有开启 binlog 那就还有恢复的可能。那么恭喜你可以参考这篇文章https://zhuanlan.zhihu.com/p/311435595 如果没有开启,那没办法了,只能吃一堑长一智,要么数据库做同步【做新增、修 阅读全文
posted @ 2023-12-15 11:09 林财钦 阅读(31) 评论(0) 推荐(0) 编辑