随笔分类 -  vue

摘要:<el-form-item prop="validity" label="预警有效期"> <el-date-picker v-model="form.validity" type="datetime" placeholder="选择日期时间" :picker-options="{ disabledD 阅读全文
posted @ 2022-07-28 14:42 rachelch 阅读(1092) 评论(0) 推荐(0)
摘要:<el-input v-model.trim="form.threshold" placeholder="请输入" class="flex-1 editNum" type="number" > </el-input> .editNum { input::-webkit-outer-spin-butt 阅读全文
posted @ 2022-07-18 13:55 rachelch 阅读(2497) 评论(0) 推荐(0)
摘要:一、echart的图表提供了一个resize函数,当resize函数被触发时,图表会进行重绘。 二、常用的浏览器,窗口自适应。(1) 将放置图表的容器div的宽设置为100%,不固定写死,height可以根据需求设置为vh或者px都行。 (2) 对浏览器窗口大小进行监听 window.addEven 阅读全文
posted @ 2022-07-15 10:58 rachelch 阅读(2104) 评论(0) 推荐(1)
摘要:webpack build打包报错: 解决方法: 参考链接:https://stackoverflow.com/questions/41254538/error-in-bundle-js-from-uglifyjs 阅读全文
posted @ 2022-07-12 16:00 rachelch 阅读(542) 评论(0) 推荐(0)
摘要:// assets/js/mixin.js let mixin = { mounted() { var m = navigator.userAgent //解决iPhone6s plus 失去焦点以后,先隐藏软键盘,再弹出 (主要原因是setTimeout引起的,没有setTimeout就不会出现这 阅读全文
posted @ 2020-09-28 14:03 rachelch 阅读(381) 评论(0) 推荐(0)
摘要:// html <div class="preview" v-show="previewImg" @click="previewImg=''"><img :src="previewImg" alt="" /></div> <div class="uploadBox2"> <div class="up 阅读全文
posted @ 2020-07-28 15:04 rachelch
摘要:解决的核心思想就是:不允许用户访问到带 from 参数的地址,如果收到 from 参数,就去掉 from 重新拼接 url ,重定向到不带 from 的 url router.beforeEach((to, from, next) => { if (window.location.href.incl 阅读全文
posted @ 2020-07-01 09:53 rachelch
摘要:一、引入微信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 阅读全文
posted @ 2020-06-18 11:43 rachelch 阅读(481) 评论(0) 推荐(0)
摘要:ios中,用 swiper 实现轮播图 swiper圆角,图片滑动的时候会先变成直角然后变成圆角(vant) 解决方法: 在swiper的父盒子上加overflow:hidden 和 transform: translateY(0); <div class="my-swipe-box"> <van- 阅读全文
posted @ 2020-06-15 13:36 rachelch
摘要:alert组件: <template> <div class="alertBox" :value="value" v-if="visible" @click="close_click" style="z-index: 999;"> <div class="alertMain" @click.stop 阅读全文
posted @ 2020-06-11 16:33 rachelch
摘要:移动端页面中有一个search input想监听搜索键盘中的 “搜索按钮”,看了下keycode是13,但是每次按下回车,回报非法 return 的错误 报错: Uncaught SyntaxError: Illegal return statement 代码如下: <form action="ja 阅读全文
posted @ 2020-05-12 15:08 rachelch 阅读(1700) 评论(0) 推荐(0)
摘要:问题复现 <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad"> <van-cell v-for="item in list" :key="item" :title="item" / 阅读全文
posted @ 2020-04-13 09:59 rachelch 阅读(21123) 评论(0) 推荐(1)
摘要:更新的scss版本在vue cli3的项目里面的配置需要修改参数设置,具体在vue.config.js文件 sass-loader报错: 注:(F:\base\baseone\)是我们自己的项目存放的路径 css: { loaderOptions: { sass: { data: `@import 阅读全文
posted @ 2020-03-31 14:21 rachelch 阅读(1619) 评论(0) 推荐(0)
摘要:将 host的值localhost 改为本地 ip config -> index.js host: '172.7.0.41', 本地ip的获取方式: cmd -> 输入 ipconfig 即可得到 设置反向代理 config -> index.js -> 文件设置反向代理 配置api 配置开发ap 阅读全文
posted @ 2020-03-27 16:09 rachelch
摘要:1、始终在 `v-for` 中使用 `:key` 在需要操纵数据时,将 key 属性与 v-for 指令一起使用可以让程序保持恒定且可预测。 这是很有必要的,这样Vue就可以跟踪组件状态,并对不同的元素有一个常量引用。在使用动画或Vue转换时,key 非常有用。 如果没有 key ,Vue只会尝试使 阅读全文
posted @ 2020-03-12 14:17 rachelch
摘要:一、路由缓存 keepalive keep-alive 是 Vue 提供的一个抽象组件,用来对组件进行缓存,从而节省性能,由于是一个抽象组件,所以在 v 页面渲染完毕后不会被渲染成一个 DOM 元素。 <keep-alive> <router-view></router-view> </keep-a 阅读全文
posted @ 2019-12-06 16:49 rachelch
摘要:github: https://github.com/xyxiao001/vue-cropper 阅读全文
posted @ 2019-11-22 09:47 rachelch
摘要:关于页面刷新导致vuex(store)里面的数据消失问题,解决思路: 通过监听页面刷新或者关闭来将 vuex 里面的数据保存到 sessionStorage 里,在页面加载时读取 sessionStorage 里的状态信息,更新 vuex 的数据 【方法一】 参考文章: vuex中store保存的数 阅读全文
posted @ 2019-11-05 15:00 rachelch
摘要:参考文章: vue-vuex上手 阅读全文
posted @ 2019-10-18 14:38 rachelch
摘要:参考文章: Vue + axios 实现登录拦截、登出、拦截器 阅读全文
posted @ 2019-09-16 11:47 rachelch