随笔分类 - vue3
摘要:ipcRenderer.send向主进程发送消息 主进程 接收进程 vue组件: window.myAPI.doSomething();
阅读全文
摘要:<div id="parentInUserDiv" class="div-in-image flex flex-nowrap" > <div id="childInUserContainer" class="div-in-image-list" ref="srcollInImage" > <temp
阅读全文
摘要:在 Vue 3 中使用 TypeScript,你可以通过 `navigator.mediaDevices` 访问设备的媒体流信息,包括摄像头。要读取指定的彩色摄像头,你可以使用 `getUserMedia` 方法来获取指定设备的媒体流。 首先,你需要在组件中引入 `getUserMedia` 方法:
阅读全文
摘要:如果 `<input>` 元素的 `autocomplete` 属性设置为 `"off"` 但并没有起作用,这可能是因为不同浏览器对此属性的实现方式存在一些差异。 为了更可靠地禁用自动填充功能,你可以尝试以下解决方案之一: 1. 添加 `autocomplete="new-password"` 属性
阅读全文
摘要:import ExcelJS from "exceljs"; async function exportExcelTemplate(deptList: any) { const workbook = new ExcelJS.Workbook(); const worksheet = workbook
阅读全文
摘要:1、新建number-format.ts import { Directive, DirectiveBinding } from "vue"; const numberFormat: Directive = { mounted(el, binding: DirectiveBinding) { con
阅读全文
摘要:1、新建 number-thousander-format.ts import { Directive, DirectiveBinding } from "vue"; const numberThousanderFormat: Directive = { mounted(el, binding: D
阅读全文
摘要:这个警告意味着在事件监听器中,添加了一个阻止页面滚动的 `mousewheel` 事件,但是该事件监听器并没有标记为被动事件监听器(passive event listener)。这可能会导致页面滚动变得不流畅,特别是在移动设备上。 为了解决这个问题,您需要将事件监听器标记为被动事件监听器。具体实现
阅读全文
摘要:参考链接:https://www.jianshu.com/p/0f4386d19c07 import path from "path"; const getLayerBgs = function () { const imgs: any = []; // 获取所有背景图层 //读取文件的路径 是否遍
阅读全文
摘要:参考链接:https://huaweicloud.csdn.net/638edf68dacf622b8df8d152.html 父组件: <Customabc ref="editor" v-model="data.introduction" :min-height="400" name="职能" p
阅读全文
摘要:如果数据比较密集,设置sampling: 'average'确实可以加速绘图,但同时也可能导致提示框无法正常显示的问题。这个问题的原因是,sampling会对数据进行抽样,因此不会显示原始的数据点,而是将数据点以一定规律进行采样,取平均值或最大或其他值,因此提示框的内容可能不准确。 不过,有一个简单
阅读全文
摘要:1、第一步下载ckplayer,然后把ckplayer复制到项目中public文件夹下 2、index.html引用ckplayer.js <script type="text/javascript" src="/ckplayer/ckplayer.min.js" charset="UTF-8" d
阅读全文
摘要:demo-father.vue <template> <div> <button @click="openNewWindow">点击开新窗口</button> <button @click="closeSonWin">关闭子窗口</button> <button @click="getSonWin"
阅读全文
摘要:参考链接:https://blog.csdn.net/weixin_45651609/article/details/120237623?ops_request_misc=&request_id=&biz_id=102&utm_term=Uncaught%20(in%20promise)%20DOM
阅读全文
摘要:参考链接:https://blog.csdn.net/liona_koukou/article/details/126605137 https://www.bilibili.com/read/cv14070290/ 1、下载webrtc-streamer,本机测试我下载的最新window版本 htt
阅读全文