随笔分类 - vue
摘要:<el-form-item prop="validity" label="预警有效期"> <el-date-picker v-model="form.validity" type="datetime" placeholder="选择日期时间" :picker-options="{ disabledD
阅读全文
摘要:<el-input v-model.trim="form.threshold" placeholder="请输入" class="flex-1 editNum" type="number" > </el-input> .editNum { input::-webkit-outer-spin-butt
阅读全文
摘要:一、echart的图表提供了一个resize函数,当resize函数被触发时,图表会进行重绘。 二、常用的浏览器,窗口自适应。(1) 将放置图表的容器div的宽设置为100%,不固定写死,height可以根据需求设置为vh或者px都行。 (2) 对浏览器窗口大小进行监听 window.addEven
阅读全文
摘要:webpack build打包报错: 解决方法: 参考链接:https://stackoverflow.com/questions/41254538/error-in-bundle-js-from-uglifyjs
阅读全文
摘要:// assets/js/mixin.js let mixin = { mounted() { var m = navigator.userAgent //解决iPhone6s plus 失去焦点以后,先隐藏软键盘,再弹出 (主要原因是setTimeout引起的,没有setTimeout就不会出现这
阅读全文
摘要:// html <div class="preview" v-show="previewImg" @click="previewImg=''"><img :src="previewImg" alt="" /></div> <div class="uploadBox2"> <div class="up
阅读全文
摘要:解决的核心思想就是:不允许用户访问到带 from 参数的地址,如果收到 from 参数,就去掉 from 重新拼接 url ,重定向到不带 from 的 url router.beforeEach((to, from, next) => { if (window.location.href.incl
阅读全文
摘要:一、引入微信js // index.html <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 二、封装wxshare.js // assets => js => 新建 wxshare.js export fu
阅读全文
摘要:ios中,用 swiper 实现轮播图 swiper圆角,图片滑动的时候会先变成直角然后变成圆角(vant) 解决方法: 在swiper的父盒子上加overflow:hidden 和 transform: translateY(0); <div class="my-swipe-box"> <van-
阅读全文
摘要:alert组件: <template> <div class="alertBox" :value="value" v-if="visible" @click="close_click" style="z-index: 999;"> <div class="alertMain" @click.stop
阅读全文