Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 260 Bytes

vue 父子组件传数组eslint报错(Type of the default value for 'arrNew' prop must be a function).md

File metadata and controls

18 lines (17 loc) · 260 Bytes

报错

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 []
  }
}