vue-class-component icon indicating copy to clipboard operation
vue-class-component copied to clipboard

In Vue2 and vue-class-component 7.2.3, how can i add a properties to the Object 'this'

Open toplyb opened this issue 1 year ago • 0 comments

In the shims-vue.d.ts file:

import Vue from 'vue';

declare module 'vue/types/vue' {
  interface Vue {
    $messageBox: any;
  }
}

declare module '*.vue' {
  import Vue from 'vue';
  export default Vue;
}
declare module '*.js';

I want to add the '$messageBox' in 'this', but i got the error in Vue component file: image My code is :

@Component({
  components: {
    [Dialog.Component.name]: Dialog.Component,
  },
})

toplyb avatar Dec 19 '23 06:12 toplyb