• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • ComponentCustomProps

    用于扩充允许的 TSX prosps,以便在 TSX 元素上使用未声明的prosps

    例子

    declare module 'vue' {
      interface ComponentCustomProps {
        hello?: string
      }
    }
    
    export {}
    
    // now works even if hello is not a declared prop
    <MyComponent hello="world" />