发布于 2年前

(Type of the default value for ‘arrNew‘ prop must be a function)

报错

Type of the default value for 'arrNew' prop must be a function. (vue/require-valid-default-prop)

 arrNew: {
  type: Array,
  default:[]
}

解决

arrNew: {
  type: Array,
  default() {
    return []
  }
}
Vue
©2020 edoou.com   京ICP备16001874号-3