<template>
  <div class="demo1">
    <h3>姓名：{{ names }}</h3>
    <h3>年龄：{{ age }}</h3>
    <h3>性别：{{ sex }}</h3>
    <button @click="changeName">修改姓名</button>
    <button @click="changeAge">修改年龄</button>
    <button @click="changeSex">修改性别</button>

  </div>
</template>
<script setup lang="ts" name="Person">
    let names = "孙悟空";
    let age = 18;
    let sex = "男";

    function changeName() {
        names = "猪八戒";
    }
    function changeAge() {
        age = 20;
    }
    function changeSex() {
        sex = "女";
    }


</script>

<style></style>
