<!--
 * @Author: 文贝
 * @Date: 2022-03-22 18:22:43
 * @LastEditors: 文贝
 * @LastEditTime: 2022-11-10 16:29:44
 * @Description:
 * @FilePath: \src\components\TestComponent1\index.vue
-->
<template>
  <div @click="handleClick(1111)">{{ text }}</div>
</template>

<script>
export default {
  name: 'TestComponent1',
  props: {
    text: {
      type: String,
      required: true,
      default: null
    }
  },
  mounted() {
    console.log('mounted')
  },
  methods: {
    handleClick() {
      this.$emit('click', this.icon)
    }
  }
}
</script>
<style lang="scss" scoped>
div {
  background-color: blue;
  color:white;
}
</style>
