随笔分类 -  Vue3

摘要:现象:hls格式视频调试时,在测试服可以播放,在本地无法播放 原因:xgplayer-hls用到了浏览器的cryptoAPI,这个api使用是有限制的,仅在域名为localhost或者https:的域名下才能生效。否则会报错。 测试服因为是https协议,所以可以播放,本地用了http协议,所以播放 阅读全文
posted @ 2025-08-11 14:36 huihuihero 阅读(56) 评论(0) 推荐(0)
摘要:‌EventSourcePolyfill‌ 是一个用于在老版本浏览器上模拟Server-Sent Events(SSE)的 polyfill。SSE 是一种允许服务器向客户端推送实时更新的技术。EventSourcePolyfill 通过在不支持原生 EventSource API 的浏览器中提供相 阅读全文
posted @ 2025-03-27 10:49 huihuihero 阅读(604) 评论(0) 推荐(0)
摘要:const scrollTimer = ref(null) //滚动防抖定时器 const currentTop = ref(null) //实时滚动高度 const scrollTop = ref(0) //防抖结束后的滚动高度 function bindScrollEvent() { windo 阅读全文
posted @ 2025-03-04 09:05 huihuihero 阅读(19) 评论(0) 推荐(0)
摘要:定义pinia存储容器 /stores/piniause-demo.js import { defineStore } from 'pinia' /** * 定义并导出容器 * 参数1:容器ID,必须唯一 * 参数2:配置对象 */ export const useDemoStore = defin 阅读全文
posted @ 2024-09-04 09:43 huihuihero 阅读(168) 评论(0) 推荐(0)
摘要:以下方式仅适用于vue3+webpack vue3+vite环境有相似问题网上可以搜到,如下 https://blog.csdn.net/qq_40606563/article/details/132293376 https://blog.csdn.net/krico233/article/deta 阅读全文
posted @ 2024-06-25 16:04 huihuihero 阅读(656) 评论(0) 推荐(0)
摘要:参考方法 https://blog.csdn.net/sun12356499514452248/article/details/128518711 组件代码 <template> <div class="ks-audio"> <div class="audio-wrapper"> <van-slid 阅读全文
posted @ 2024-05-29 10:15 huihuihero 阅读(297) 评论(0) 推荐(0)
摘要:效果图 文件图 直接贴代码 emotion.vue <template> <div class="emotion-container beauty-scroll-livechat"> <div class="emotion-btn" @click="toggleEmotionShow"> <span 阅读全文
posted @ 2023-12-28 16:52 huihuihero 阅读(1132) 评论(0) 推荐(0)
摘要:移动端项目配置:在index.html里添加以下代码即可 <script> let sUserAgent = navigator.userAgent.toLowerCase(); let isIpad = sUserAgent.match(/ipad/i) == "ipad"; let isIpho 阅读全文
posted @ 2023-09-04 11:05 huihuihero 阅读(196) 评论(0) 推荐(0)
摘要:使用的vue-cropper.js,官方文档 https://github.com/xyxiao001/vue-cropper 附图片各格式之间的转换 https://www.cnblogs.com/huihuihero/p/17667325.html 注意:下载vue-cropper.js时,使用 阅读全文
posted @ 2023-08-30 15:21 huihuihero 阅读(1551) 评论(0) 推荐(0)
摘要:##直接贴代码 ``` /** * 截取视频画面 * @param {*} url 视频播放链接 * @param {*} width 画面的截取宽度 * @param {*} height 图片的截取高度 */ export function cutVideoCover(url, width = 阅读全文
posted @ 2023-08-09 13:15 huihuihero 阅读(478) 评论(0) 推荐(0)
摘要:直接贴代码 <template> <div class="demo-container"> <el-input onkeyup="value=value.replace(/\D|/g,'')" v-model="codeValue" ref="codeInputElem" placeholder=" 阅读全文
posted @ 2023-06-28 18:00 huihuihero 阅读(1048) 评论(0) 推荐(0)
摘要:###官方文档 https://docxtemplater.com/ ###博客 https://juejin.cn/post/7088221762965471269 阅读全文
posted @ 2023-05-05 15:34 huihuihero 阅读(193) 评论(0) 推荐(0)
摘要:DevTools failed to load source map: Could not load content for webpack:///node_modules/element-plus/es/index.mjs.map: Fetch through target failed: Uns 阅读全文
posted @ 2023-04-20 10:22 huihuihero 阅读(662) 评论(0) 推荐(0)
摘要:直接贴代码 <template> <div class="basic-view-container"> <div class="basic-view-header"> <global-header></global-header> </div> <div class="basic-view-menu 阅读全文
posted @ 2023-04-13 09:14 huihuihero 阅读(2) 评论(0) 推荐(0)
摘要:###src/store/index.js import { createStore } from "vuex"; import modules from "./modules"; // 创建store实例 const store = createStore({ modules, }) //挂载到v 阅读全文
posted @ 2023-04-13 08:56 huihuihero 阅读(468) 评论(0) 推荐(0)
摘要:##转自:槐序之夏: https://blog.csdn.net/qq_42403643/article/details/129264032 一、为什么要使用路由懒加载 为给客户更好的客户体验,首屏组件加载速度更快一些,解决白屏问题。 二、定义 懒加载简单来说就是延迟加载或按需加载,即在需要的时候的 阅读全文
posted @ 2023-04-10 15:35 huihuihero 阅读(1036) 评论(0) 推荐(0)
摘要:##提示:巧用filter 阅读全文
posted @ 2023-03-17 10:17 huihuihero 阅读(135) 评论(0) 推荐(0)
摘要:##官方文档 https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html ##贴代码 ``` 【index.html】引入wx文件 【微信登录页面】 //二维码dom容器 //引入 阅读全文
posted @ 2023-03-13 11:13 huihuihero 阅读(534) 评论(0) 推荐(0)
摘要:## 使用sortable.js实现 ###官方网站: http://www.sortablejs.com/ ###中文文档: https://www.itxst.com/sortablejs/neuinffi.html ``` 1、yarn add sortablejs 2、需要重新运行项目 `` 阅读全文
posted @ 2023-02-13 09:31 huihuihero 阅读(200) 评论(0) 推荐(0)
摘要:借鉴: https://blog.csdn.net/m0_48468380/article/details/121577011 流程图 贴下封装的request.js代码 import axios from "axios"; import JsCookie from "js-cookie"; imp 阅读全文
posted @ 2022-12-15 09:59 huihuihero 阅读(800) 评论(0) 推荐(0)