![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
贝茵斯都
bug
展开
-
Vue2 下, axios多下载处理,包含跨域
1.环境@vue/cli 4.5.13“ant-design-vue”: “^1.7.7”,“axios”: “^0.21.1”,“crypto-js”: “^4.1.1”,“jquery”: “^3.6.0”,“vue”: “^2.5.2”,“vue-router”: “^3.0.1”,“vuex”: “^3.6.2”项目地址:https://gitee.com/beiysd/react-methors.git效果2.跨域处理config -> index.j原创 2021-08-26 11:49:56 · 649 阅读 · 0 评论 -
vue中计时器初始化时会重复
描述计时器在 mounted 中被调用,会重复 mounted() { this.timer = setInterval(this.testWord, 1000); },原因旧有计时器没被清理,这和生命周期有关解决方法使用beforeDestroy刷新页面会清除旧有计时器 beforeDestroy() { if (this.timer) { clearInterval(this.timer); } },...原创 2021-04-28 11:07:37 · 459 阅读 · 0 评论 -
vue 监听路由变化
watch: { // 监听路由变化 "$route.path": function(newVal, oldVal) { console.log(`new_path = ${newVal}, old_path = ${oldVal}`); }, },原创 2021-04-22 17:24:17 · 103 阅读 · 0 评论 -
vuepress 图像放大
图片放大参考 @vuepress/plugin-medium-zoom安装yarn add -D @vuepress/plugin-medium-zoom# OR npm install -D @vuepress/plugin-medium-zoom使用简单使用plugins: [ "@vuepress/plugin-medium-zoom"],自定义选项属性类型默认值描述marginnumber0放大图像外的空间backgroundstri原创 2021-03-24 18:07:58 · 1339 阅读 · 1 评论 -
vuepress 侧边栏自动生成
参考文档:Node.js 中 __dirname 和 ./ 的区别https://github.com/Darcrandex/my-blogVuePress 自动生成侧边栏和导航栏,完美替代 GitBook1.第一种方法,安装插件"vuepress-plugin-autobar":"boboidream/vuepress-bar",可以自动生成侧边栏,但侧边栏分组的展开关闭是互斥的2.第二种方法,获取文件夹下结构自行处理安装插件:"directory-tree..原创 2021-03-24 11:22:36 · 3948 阅读 · 5 评论 -
swiper4.x在vue中使用,及鼠标滚轮控制失效问题解决
1.vue中,swiper使用安装npm install swiper@4.5.1 001 002 003 import Swiper from ‘swiper’mounted(){this.openFullScreen()//添加loading,loading控件来源于elementvar SwiperFather = new Swiper(’.swiper-con原创 2020-06-30 14:48:03 · 2363 阅读 · 0 评论 -
vue引入swiper4,修改分页器样式
1.需要分页器2.swiper使用(因为使用了多个swiper,名字会做改变来区分)3.修改分页器样式<style scoped></style>内写不受影响的样式在它下面新建一个<style></style>在这里面写修改分页器的样式/**分页器是vue挂载之后创建的,因此覆盖样式必须写在scoped样式之外*/...原创 2020-06-29 09:49:21 · 799 阅读 · 2 评论