dashboard.vue 695 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <van-dropdown-menu>
  3. <van-dropdown-item v-model="dataGraph" :options="dataGraphList" @change="changeDropdown"/>
  4. </van-dropdown-menu>
  5. <project-sum v-if="dataGraph === 'projectSum'"/>
  6. <data-stat v-if="dataGraph === 'dataStat'" />
  7. </template>
  8. <script setup>
  9. import projectSum from './components/projectSum.vue'
  10. import dataStat from './components/dataStat.vue'
  11. defineOptions({
  12. name: 'Dashboard',
  13. })
  14. const dataGraph = ref('projectSum')
  15. const dataGraphList = [
  16. { text: '项目总表', value: 'projectSum' },
  17. { text: '数据统计', value: 'dataStat' },
  18. ]
  19. onMounted(() => {})
  20. const changeDropdown = (val) => {
  21. dataGraph.value = val
  22. }
  23. </script>
  24. <style scoped>
  25. </style>