Error - Vue - 解决 property should be a constructor

Error - Vue - 解决 property should be a constructor

VUE props支持多类型的写法 ,解决 property should be a constructor

defaultActive: {
  type: [String, Number], //String | Number
  default: '0'
}

使用 String | Number 有些eslint会报错 The "defaultActive" property should be a constructor.eslintvue/require-prop-type-constructor

posted @ 2022-01-20 10:49  zc-lee  阅读(4207)  评论(0编辑  收藏  举报