随笔分类 - vue.js学习
摘要:uni-app 组件传值 props 对象中传有方法, 微信小程序上会被过滤, uniapp小程序props传值丢失 uniapp中父组件向子组件传递prop时,如果prop是对象,对象内部不能包含function属性 如果包含function属性则会被忽略掉 主要原因 uniapp props实现
阅读全文
摘要:通过this.$set() 更新数据,数据是更新成功了,视图不更新 解决办法,在后面 调用 this.$forceUpdate() 方法,成功更新视图 this.$set(itemValue, fieldKey, value) this.$forceUpdate()
阅读全文
摘要:无效 mounted () { window.onresize = () => { console.log('324') } } 使用 addEventListener有效 mounted () { window.addEventListener('resize', () => { console.
阅读全文
摘要:就是title可以用函数返回 ··· const obj = { key: key, dataIndex: key, // title: data, title: (val) => { const style = { maxWidth: '200px', overflow: 'hidden', wh
阅读全文
摘要:加这个属性 :getPopupContainer="prpupContainer" <a-select :getPopupContainer="prpupContainer" > </a-select> methods: { prpupContainer () { return document.q
阅读全文
摘要:1 新建 preventReClick.js import Vue from 'vue' const preventReClick = Vue.directive('preventReClick', { inserted: function (el, binding) { el.addEventLi
阅读全文
摘要:[Antd-vue] Warning: You cannot set a form field before rendering a field associated with the value. You can use https://www.cnblogs.com/cirry/p/124831
阅读全文
摘要:解决办法 style里不要 scoped,可以单独再加个style 宽度为固定的宽度,我这里是200,和你在columns设置的宽度一样就行 .ant-table-fixed-columns-in-body { display: inline-block; width: 200px; }
阅读全文
摘要:vue报错 Object(…) is not a function 这里显示的是这个对象不存在,通过断点调试,发现是在执行一个函数的时候显示的,继而查看引用文件, 发现是因为在引用一个请求api的时候,暴露的函数和引用的函数大小写不一致,导致请求该函数,找不到该函数, 所以出现这类型错误,建议检查下
阅读全文
摘要:摘抄:https://segmentfault.com/a/1190000012299511 摘抄2: http://shzhangji.com/cnblogs/2018/04/18/form handling in vuex strict mode/
阅读全文
摘要:.eslintrc.js 注释 '@vue/standard'
阅读全文
摘要:``` /deep/ .ant-input { border-radius: 50px; }
```
阅读全文
摘要:使用表格,在配置 columns时用到了 customRender,然后就报错了 报错原因, 没有把 columns放到data 里面,获取不到上下文 这样改
阅读全文
摘要:我报错的原因是 formData.append('file', file) 放在签名前面了 解决办法 formData.append('file', file) 一定在最后 感谢 原文 "https://segmentfault.com/a/1190000019481380"
阅读全文
摘要:```
在vue css中采用别名引入 背景图片,可以在前面加一个波浪号 css 属性中: background: url("~@/assets/xxx.jpg") Webpack 会将以~符号作为前缀的路径视作依赖模块而去解析,这样 @的 alias 配置就能生效了。
```
阅读全文
摘要:``` directives: { clickDown: { inserted (el, binding, item) { if (+binding.value.item.fromId === +item.context.userId) { // console.log(item.context) item.contex为vue的实例,也...
阅读全文
摘要:转自:https://www.cnblogs.com/scode2/p/9098579.html 在方法中获取
阅读全文
摘要:我用最笨的方法,先实现功能先,用两个input,一个可以编辑,一个不可以编辑,失去焦点后隐藏可以点击的那个,点“编辑”时,显示可以编辑的那个input 编辑
阅读全文
摘要:vue项目,输入框限制输入15个中文,或者30个英文 参考: "https://www.jianshu.com/p/17edabad526e"
阅读全文

浙公网安备 33010602011771号