随笔分类 -  Vue

Vue的一些知识
摘要:##vue版本的相关操作 ####全局卸载vue npm uninstall vue -g ####全局安装最新vue版本(当前为3.0+) npm install vue@next -g ####全局安装vue2.6.14版本(当前2.0中的最新版本) npm install vue@2.6.14 阅读全文
posted @ 2022-05-26 11:00 huihuihero 阅读(2002) 评论(0) 推荐(0)
摘要:Workaround to fix heap out of memory when running node binaries. It's a common issue when using TypeScript 2.1+ and webpack. This tool will append --m 阅读全文
posted @ 2022-05-24 17:29 huihuihero 阅读(865) 评论(0) 推荐(0)
摘要:##移动端查看富文本大图:vant示例,先提取图片地址,再通过vant-ui图片预览组件预览。 <div v-html="richtextInfo" @click="judgeImg($event)"></div> import {ImagePreview} from "vant" //引入vant 阅读全文
posted @ 2022-05-07 10:46 huihuihero 阅读(511) 评论(0) 推荐(1)
摘要:###原理 1、通过 html2Canvas 将页面绘制成出来 2、通过 jspdf 将绘制出来的页面转为pdf 注意:想要绘制整个页面(包括滚动区域),建议 html2Canvas 的height使用scrollHeight+1000(或+500等,或不填也行) 如果使用clientHeight, 阅读全文
posted @ 2021-12-16 10:08 huihuihero 阅读(457) 评论(0) 推荐(0)
摘要:##方案一:vue中使用clipboard实现文本复制功能(推荐) ####1、安装clipboard.js依赖 地址:https://github.com/zenorocha/clipboard.js yarn add clipboard 或 npm install clipboard --sav 阅读全文
posted @ 2021-07-27 17:11 huihuihero 阅读(2204) 评论(0) 推荐(0)
摘要:###倒计时代码(兼容ios) beforeDestroy(){ //页面销毁前清除定时器 clearInterval(this.countTimes) } methods:{ //方案一:先处理成ios和安卓均可转换的时间格式,再统一处理 timer(){ let u = navigator.us 阅读全文
posted @ 2021-06-16 17:13 huihuihero 阅读(87) 评论(0) 推荐(0)
摘要:####vue-aplayer中文文档:https://github.com/SevenOutman/vue-aplayer/blob/develop/docs/README.zh-CN.md ####1、安装音频组件包vue-aplayer yarn add vue-aplayer 或 npm i 阅读全文
posted @ 2021-03-26 16:52 huihuihero 阅读(1782) 评论(0) 推荐(0)
摘要:####1、安装qrcodejs2包 yarn add qrcodejs2 或 npm install qrcodejs2 --save ####2、页面中引入 import QRCode from 'qrcodejs2' components:{ QRCode } ####3、使用 <button 阅读全文
posted @ 2021-03-26 16:37 huihuihero 阅读(1173) 评论(0) 推荐(0)
摘要:重新刷新当前页面 1、路由重新导入当前页面(全局设置,所有页面通用) this.$router.push({name:'goodsList',params:{vid:vid}}) 但是我们会发现用vue-router在当前页面再重定向路由到页面本身,就算改变id,页面也是不进行刷新的, 因为Vue会 阅读全文
posted @ 2020-12-24 13:15 huihuihero 阅读(909) 评论(0) 推荐(0)
摘要:详细文档 js-cookie是一个简单的,轻量级的处理cookies的js API. 官方文档:https://www.npmjs.com/package/js-cookie 一个很详细的博客:https://blog.csdn.net/qq_20802379/article/details/814 阅读全文
posted @ 2020-12-16 14:55 huihuihero 阅读(3333) 评论(0) 推荐(0)
摘要:1、安装screenfull包 yarn add screenfull 或 npm install screenfull --save 2、新建ScreenFull组件:ScreenFull.vue <template> <div class="screen-full"> <div v-show=" 阅读全文
posted @ 2020-12-04 10:55 huihuihero 阅读(6098) 评论(0) 推荐(0)
摘要:####1、安装依赖 yarn add particles.js 或 npm install particles.js ####2、src/components下新建particles文件夹,文件夹下新建index.vue和particles.json,代码如下 ####index.vue <tem 阅读全文
posted @ 2020-11-13 15:43 huihuihero 阅读(5544) 评论(0) 推荐(1)
摘要:####1、在src文件夹下新建utils文件夹,再在src/utils下新建utils.js ####2、在utils.js中写入公用函数并暴露(暴露方式为逐一暴露和统一暴露),如下 逐一暴露: /** * 公用函数111 * @param {*} e */ export function dem 阅读全文
posted @ 2020-11-09 09:35 huihuihero 阅读(3532) 评论(0) 推荐(0)
摘要:##查看文档: https://www.cnblogs.com/huihuihero/p/13877589.html 阅读全文
posted @ 2020-11-03 13:39 huihuihero 阅读(2719) 评论(0) 推荐(0)
摘要:相关文档 本文部分内容借鉴: https://www.cnblogs.com/zhongchao666/p/11142537.html tinymce中文文档: http://tinymce.ax-z.cn/ 安装tinymce 1、安装相关依赖 yarn add tinymce || npm in 阅读全文
posted @ 2020-10-26 11:30 huihuihero 阅读(29152) 评论(15) 推荐(3)
摘要:####流程介绍 用户点击取消收藏 -> 请求取消收藏接口 -> 取消收藏成功 -> 在视图层隐藏当前栏 ->视图层上给予用户取消收藏成功的直观感受 ####如何实现 <view v-for="(item,index) in videoList" :key="index" v-show="item. 阅读全文
posted @ 2020-08-28 15:05 huihuihero 阅读(1417) 评论(0) 推荐(0)
摘要:####功能介绍:用户输入emoji表情,如输入法里的附带的表情,然后前端这里编码这些表情成特定格式的字符,传到后端。之后从接口拿到后直接html渲染即可。 ####问题所在:移动端用户输入emoji表情,如果未做编码就提交到后端的话,是不能成功提交的。需要先编码才行。 ###编码 /** * 用于 阅读全文
posted @ 2020-07-24 10:38 huihuihero 阅读(1980) 评论(1) 推荐(0)
摘要:####子组件,有一个childMethod方法 <template> <view> </view> </template> <script> export default { data(){ return { } }, onLoad(){ }, methods:{ childMethod() { 阅读全文
posted @ 2020-07-21 17:37 huihuihero 阅读(469) 评论(0) 推荐(0)
摘要:###breadCrumb.vue <template> <div class="bread_crumb"> <div class="crumb"> <div class="crumb_content"> <a-breadcrumb separator=">"> <a-breadcrumb-item 阅读全文
posted @ 2020-06-19 14:32 huihuihero 阅读(975) 评论(0) 推荐(0)
摘要:###前期准备 1、npm install vod-js-sdk-v6 或 yarn add vod-js-sdk-v6 2、在main.js中 import TcVod from 'vod-js-sdk-v6' Vue.prototype.$TcVod = TcVod ##注: 1、获取腾讯云上传 阅读全文
posted @ 2020-06-19 12:01 huihuihero 阅读(2246) 评论(1) 推荐(2)