From cbc3f79a1c28e7866480529ee82a72807156e13e Mon Sep 17 00:00:00 2001 From: gemen666 <17035105+gemen666@user.noreply.gitee.com> Date: Sun, 10 May 2026 16:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=83=A8=E5=BC=95=E5=85=A5ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 32 +++++++++++++++++++++++++------- src/components/MySalary.ts | 13 +++++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 src/components/MySalary.ts diff --git a/src/App.vue b/src/App.vue index abfd315..fac9aec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,29 @@ - - + + diff --git a/src/components/MySalary.ts b/src/components/MySalary.ts new file mode 100644 index 0000000..14c2adb --- /dev/null +++ b/src/components/MySalary.ts @@ -0,0 +1,13 @@ +import { ref } from 'vue'; + +export default function(){ + const userName = ref("wkn") + const salary = ref(3000) + function zhanggongzi(){ + salary.value += 100 + } + function kougongzi(){ + salary.value -= 100 + } + return {userName, salary ,zhanggongzi, kougongzi } +} \ No newline at end of file