报错:use a data or computed property based on the prop‘s value. Prop being mutated: “placement“

报错信息

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"

避免直接更改道具,因为每当父组件重新渲染时,该值都会被覆盖。相反,使用基于道具值的数据或计算属性。道具正在变异:“放置”

解决方法

添加属性:align="center"

<el-date-picker
  align="center"
  v-model="listQuery.time"
  class="filter-item"
  type="daterange"
  range-separator="至"
  start-placeholder="开始日期"
  end-placeholder="结束日期"
  :picker-options="pickerOptions"
  @keyup.enter.native="handleFilter"
></el-date-picker>

报错原因

element-ui版本问题

猜你喜欢

转载自blog.csdn.net/m0_61663332/article/details/132115344