1234567891011121314151617181920212223242526272829 |
- <template>
- <van-dropdown-menu>
- <van-dropdown-item v-model="dataGraph" :options="dataGraphList" @change="changeDropdown"/>
- </van-dropdown-menu>
- <project-sum v-if="dataGraph === 'projectSum'"/>
- <data-stat v-if="dataGraph === 'dataStat'" />
- </template>
- <script setup>
- import projectSum from './components/projectSum.vue'
- import dataStat from './components/dataStat.vue'
- defineOptions({
- name: 'Dashboard',
- })
- const dataGraph = ref('projectSum')
- const dataGraphList = [
- { text: '项目总表', value: 'projectSum' },
- { text: '数据统计', value: 'dataStat' },
- ]
- onMounted(() => {})
- const changeDropdown = (val) => {
- dataGraph.value = val
- }
- </script>
- <style scoped>
- </style>
|