<template>
  <div class="me-box">
    <van-cell
      @click="toPage(item)"
      v-for="item in list"
      :key="item"
      :title="item"
    />
  </div>
</template>

<script setup>
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()

const list = ref([])

onMounted(() => {
  list.value = ['账本管理', '批量记录']
})

const toPage = (item) => {
  switch (item) {
    case '账本管理':
      router.push('/books')
      break
  }
}
</script>

<style lang="scss" scoped>
.me-box {
  padding: 24px;
}
</style>
