• Ajax
  • Ant design
  • Axios-Fetch
  • Avue
  • Browser
  • Canvas
  • CSS
  • Dos-bat
  • Dva
  • Dedecms
  • Echart
  • ElementUI
  • Editors
  • Git
  • GeoServer
  • GIS
  • H5
  • Jquery
  • Java安卓
  • Json
  • Javascript
  • Leaflet
  • Linux
  • Life-Info
  • Mock
  • MongoDB
  • Network
  • NodeJS
  • NPM
  • React
  • 设计运营
  • SEO
  • SVG
  • TypeScript
  • Tools
  • umi
  • uni-APP
  • Vant
  • Vue
  • Windows
  • webpack
  • 位置:OC中文网 > 其他 > ElementUI >

    解决el-date-picker的Avoid mutating a prop directly错误

    来源:openlayers-cesium.com 时间:06-28

    在使用element-UI的时候,引用了时间组件el-date-picker,出现了如下的错误:

    1. 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" 
    2.  
    3. found in 
    4.  
    5. ---> <ElDatePicker> at packages/date-picker/src/picker.vue 

    解决办法:

    卸载其他版本的,安装2.15.7版本。究其原因是其他版本存在时间组件的问题或者和目前项目中有些许冲突。
     

    npm uninstall element-ui

    npm i element-ui@2.15.7 -S