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