![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
生气不如去争气
这个作者很懒,什么都没留下…
展开
-
自定义字段功能应用与开发流程分享
日常分享原创 2022-08-21 10:51:10 · 475 阅读 · 1 评论 -
Vue H5页面实现拍照解析二维码功能
因为需要做移动端实现扫码功能(app和h5都可用),H5不能调用手机扫码功能。所以采用先拍照获取二维码文件流再解析二维码数据。需要以下3个js文件支持,网上可以下载到:(引用顺序如下)上面js我做了些修改,方便把识别的结果通过回调函数返回出来。1.qrcode.js(function($) { var Qrcode = function(tempBtn, backfun) { var _this_ = this; var isWeiboWebView = /__weibo..原创 2021-09-06 14:45:05 · 739 阅读 · 0 评论 -
vue 悬浮球(带自动吸附功能)
封装的组件代码,可以引到页面直接使用<template> <div ref="floatDrag" class="float-position" :style="{ left: left + 'px', top: top + 'px', zIndex: zIndex }" @touchmove.prevent @mousemove.prevent @mousedown="mouseDown" @mouseup="mouseU.原创 2021-08-27 14:26:38 · 3268 阅读 · 3 评论 -
Vue路由配置有无‘/‘的区别
{ path:'/home', name:'Home', redirect:'/index', component:home, children:[{ path:'/index', name: 'Index', component: Index, meta:{ requireAuth:true } }] },1.加’/'表示原创 2021-07-02 14:02:16 · 748 阅读 · 0 评论 -
Vant 上传/录制视频文件,显示预览图,支持视频预览,上传base64到后台
html代码<van-uploader v-model="videoList" :max-count="1" preview-size="120px" accept="video/*" :after-read="handlevideosc" :before-read="handlebefread" @click-preview=".原创 2021-06-30 15:28:08 · 8113 阅读 · 4 评论 -
vue项目里swiper的使用方法,配合vant放大预览
安装swipernpm install swiper@4 vue-awesome-swiper@3 --save-devhtml代码<swiper class="swiper gallery-thumbs" :options="swiperOptionThumbs" ref="swiperThumbs" > <swiper-slide v-for="(item, index) in imgurl" :key="index" .原创 2021-06-28 14:00:19 · 569 阅读 · 0 评论 -
vue如何给自带默认回调参数的函数添加自定义参数:$event
原来的代码是这样的:handleAvatarSuccess会回调两个参数,这个时候如果直接在里面添加形参接不到<el-upload :on-success="handleAvatarSuccess"></el-upload> handleAvatarSuccess(res) { //自带的回调参数res跟file console.log('res', res)}代码片修改后:<el-upload :on-success="($event) =>{hand转载 2021-06-26 00:55:46 · 613 阅读 · 0 评论