dbsd_kczx/src/views/site/index.vue

30 lines
580 B
Vue
Raw Normal View History

<template>
2023-03-29 10:43:46 +08:00
<a-card>
<div>
<h1>首页</h1>
</div>
<div>
{{ state }}
<a-button type="primary" @click="() => state.count++">点击+1</a-button>
</div>
<div>
{{ i }}
<a-button type="primary" @click="changeClick">点击+1</a-button>
</div>
<div>
<RouterLink to="/site/index2">跳转到子页</RouterLink>
</div>
</a-card>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
2023-03-29 10:43:46 +08:00
// reactive
const state = ref({ count: 0 });
2023-03-29 10:43:46 +08:00
let i = ref(1);
function changeClick() {
i.value++;
}
</script>