会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Mankii
不为五斗米闪到腰
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
14
下一页
2020年9月28日
VUE清除keepalive页面缓存
摘要: 需求说明: 本文章主要是解决第三个需求。 代码如下: (代码说明:store.state.pages是我存储标签页的列表,记录了当前打开的标签页的路由数据) 旧的方法: // 使用Vue.mixin的方法拦截了路由离开事件,并在该拦截方法中实现了销毁页面缓存的功能。 let cachePageDat
阅读全文
posted @ 2020-09-28 18:58 Mankii
阅读(3346)
评论(2)
推荐(0)
2020年5月18日
js设置html根节点的style字体【Vue动态调整全局字体大小】
摘要: html根节点即<html></html> ❌直接用document.getElementByTagName('HTML')获取不成功 ✅要使用document.documentElement,如下 var docEl = document.documentElement docEl.style.f
阅读全文
posted @ 2020-05-18 15:31 Mankii
阅读(7205)
评论(0)
推荐(0)
2020年4月17日
npm 依赖重新安装或更新版本
摘要: 依赖更新到最新 例如依赖:ant-design-vue npm update ant-design-vue --save 以上命令也可以通过加参数--save-dev,--save或-g来指定在什么范围更新依赖。 依赖重新安装 例如依赖:ant-design-vue 先卸载:npm uninstal
阅读全文
posted @ 2020-04-17 11:29 Mankii
阅读(8294)
评论(0)
推荐(3)
2020年4月16日
antd 自定义表头slots.title不生效
摘要: 原因:columns.title优先级别比slots.title高,所以优先显示title文字了!也就是说!!不能共存!!! { title: '序号', slots: { title: '$order' } }, 改成 { slots: { title: '$order' } }, 就好了!
阅读全文
posted @ 2020-04-16 16:55 Mankii
阅读(2526)
评论(0)
推荐(0)
2020年4月13日
antd 报错 Cannot read property 'filter' of undefined
摘要: 每次热更新的时候就莫名其妙的报错 一开始以为是我自定义组件有问题,后来发现antd的原始组件在热更新后输入值(即发生改变),也会报错 。 解决方法: mounted () { this.form.resetFields() }, 每次mounted时都重置表单,即可解决
阅读全文
posted @ 2020-04-13 13:45 Mankii
阅读(7201)
评论(0)
推荐(0)
2020年4月7日
js获取音频/视频时长+转换时间格式
摘要: html <input type="file" accept="video/*" οnchange="setVideoSrc(this)" /> 获取音视频时长+转换时间格式 function setVideoSrc(el){ //获取视频对象 var content = el.files[0] c
阅读全文
posted @ 2020-04-07 14:01 Mankii
阅读(3313)
评论(0)
推荐(0)
2020年4月1日
jquery监听开始滚动和停止滚动
摘要: html <div id="scroll-wrap"> 内容... </div> css #scroll-wrap{ height: 600px; overflow: auto; } js 先引入Jquery $(document).ready(function(){ const $ScrollWr
阅读全文
posted @ 2020-04-01 15:20 Mankii
阅读(3484)
评论(0)
推荐(2)
2020年3月31日
Vue将props值实时传递 并可修改
摘要: 我们都知道props值是只读的,子组件内不可直接修改,会报错滴 但是很多时候这个值是需要子组件主动修改的,一般我们会使用this.$emit()去修改,但比较麻烦 下面这种方式可以实现: 1、父组件实时修改props值时,子组件可以接收到改变 2、子组件可主动修改该值 <div>{{RealValu
阅读全文
posted @ 2020-03-31 11:32 Mankii
阅读(4037)
评论(0)
推荐(0)
2020年3月27日
layer弹窗间相互调用
摘要: A弹窗中,点击按钮,则在父页面中弹出B弹窗 // 在父页面弹出B弹窗 parent.layer.open({ type: 2, title: '添加生日营销', content: '。。。', success: function(layero, index){ var iframeWin = $(p
阅读全文
posted @ 2020-03-27 14:31 Mankii
阅读(523)
评论(0)
推荐(0)
2020年3月11日
vue/cli热更新失效
摘要: 一个ant-design-vue的项目,vue/cli版本: @vue/cli 4.2.3 今天开机后运行突然没有热更新,重新启动项目也没有热更新 无论是样式还是模板都不更新 上网查原因众说纷纭,有的说版本问题,有的说配置问题,还有的说要重装npm或者重装webpack。。。 可是明明昨天还好好的?
阅读全文
posted @ 2020-03-11 11:37 Mankii
阅读(2817)
评论(1)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
14
下一页
公告
返回顶部