二、报错原因 这个报错的原因是 ElementUI 版本升级导致的,在 2.15.6 版本以后,日期选择控件的源码发生了变更,原本 placement 属性是放在组件的 data 里面的,直接修改没问题,版本升级后 placement 则是改成了通过 props 传入的,所以直接修改就报了上面的错误。 三、解决方案 因为是版本升级导致的,所以我们直接进行...
v-model="queryParams.startTime"type="date"placeholder="开始时间"value-format="yyyy-MM-dd HH:mm:ss"placement="bottom-start"> </el-date-picker>
Prop being mutated: "placement" 这个报错并没有影响实际操作,但是看着很难受 解决 根据报错显示是element ui data-picker 下的picker文件报错的,我这边在node_modules 中找到这个vue文件发现 props值中有加一个placement: Popper.props.placement, created的时候 placement 有个赋值操作 this.placement = PLACEMENT_MAP...
Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "placement" 避免直接更改道具,因为每当父组件重新渲染时,该值都会被覆盖。相反,使用基于道具值的数据或...
最近项目在控制台莫名的报Prop being mutated: "placement"错误。查看之后发现是 element的el-date-picker组件抛出的错误。 在网上搜索后发现是在某个版本 将placement从created赋值改到 props placement 来适应位置。 也就是说placement 是data对象现在是props传入的。
简介:解决使用elementUI的el-date-picker报[Vue warn]: Avoid mutating a prop ...Prop being mutated: “placement“的问题 一、错误背景 本人在一个vue2版本中用的elementUI版本是2.15.6: "dependencies": {"axios": "0.17.1","element-ui": "^2.15.6",} ...
报错上图所示, Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "placement"... 解决办法
因为elementUi升级到2.15.6以上版本的时候在date-picker组件里面添加了一行直接修改placement的代码,将placement从created赋值改到 props placement 来适应位置,也就是说placement 是data对象现在是props传入的,所有就报错了 解决方法有三 方法1.卸载再安装2.15.6版本 ...
Element-ui的date日期时间组件的bug 报错:prop’s value. Prop being mutated: “placement” [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop’s value. Prop being ...
报错Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "placement" 这个报错并没有影响实际操作,但是看着很难受 ...