<template>
  <div><div>
    {{ text }}
  </div><button @click="showMessage">测试</button></div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      text:'一个VUE控件'
    }
  },
  methods: {
    showMessage() {
      this.$emit("showSomeData",{name:this.text})
    },
    setWord(text){
      this.text = text
    }
  }

}
</script>

<style scoped>

</style>
