How to use vue-class-component for vue components

this is Vue-Socket.io component

is used as follows:

var vm = new Vue({
  sockets:{
    connect: function(){
      console.log("socket connected")
    },
    customEmit: function(val){
      console.log("this method was fired by the socket server. eg: io.emit("customEmit", data)")
    }
  },
  methods: {
    clickButton: function(val){
        // $socket is socket.io-client instance
        this.$socket.emit("emit_method", val);
    }
  }
})

now I want to use this component through vue-class-component .

import Vue from "vue"
import Component from "vue-class-component"

// @Component  Vue 
@Component({
  // 
  template: "<button @click="onClick">Click!</button>"
})
export default class MyComponent extends Vue {
  // 
  message: string = "Hello!"

  // 
  onClick (): void {
    window.alert(this.message)
  }
}

how can I use it?

Mar.01,2021

import Vue from 'vue'
import Component from 'vue-class-component'

// @Component  Vue 
@Component({
  //  <==========================
  template: '<button @click="onClick">Click!</button>'
})
export default class MyComponent extends Vue {
  // 
  message: string = 'Hello!'

  // 
  onClick (): void {
    window.alert(this.message)
  }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48dab-44ce7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48dab-44ce7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?