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

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

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

 

 

改传数组就行了  [String, Number]

 

相关文章:

  • 2021-09-05
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-10-19
  • 2022-12-23
  • 2021-12-18
  • 2021-07-11
相关资源
相似解决方案