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

    用于扩充组件实例类型以支持自定义全局属性。

    例子

    import axios from 'axios'
    
    declare module 'vue' {
      interface ComponentCustomProperties {
        $http: typeof axios
        $translate: (key: string) => string
      }
    }
    
    增强必须放在模块.ts.d.ts文件中。