Migrate all Vue components from Options API to <script setup>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 17:10:06 +08:00
parent a619be7881
commit 3b7b6ae859
61 changed files with 10835 additions and 11750 deletions

View File

@@ -10,24 +10,15 @@
</div>
</template>
<script>
<script setup>
import { onMounted } from 'vue';
import { storeToRefs } from 'pinia';
import { useLoginStore } from '@/stores/login';
export default {
setup() {
const store = useLoginStore();
const { userData } = storeToRefs(store);
const { getUserData } = store;
return {
userData,
getUserData,
}
},
mounted() {
this.getUserData();
}
};
const store = useLoginStore();
const { userData } = storeToRefs(store);
onMounted(() => {
store.getUserData();
});
</script>