New file |
| | |
| | | <template> |
| | | <div class="current-date-time"> |
| | | {{ time }} |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useDateFormat, useNow } from '@vueuse/core' |
| | | |
| | | const time = useDateFormat(useNow(), 'YYYY[年] MM[月] DD[日] dddd HH:mm:ss', { locales: 'zh-cn' }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | $color: #30decd; |
| | | |
| | | .current-date-time { |
| | | width: 370px; |
| | | color: $color; |
| | | font-size: 24px; |
| | | font-weight: 600; |
| | | } |
| | | </style> |
| | |
| | | import { useVModel } from '@vueuse/core' |
| | | |
| | | const props = defineProps<{ |
| | | /** tab 列表*/ |
| | | list: string[] |
| | | /** 当前选中的 tab*/ |
| | | modelValue?: string |
| | | }>() |
| | | const emit = defineEmits(['update:modelValue']) |
| | | const emit = defineEmits<{ |
| | | 'update:modelValue': [tabName: string] |
| | | }>() |
| | | const data = useVModel(props, 'modelValue', emit) |
| | | |
| | | function selectTab(tabName: string) { |
| | |
| | | <template #middleBlock2>主看板</template> |
| | | <template #middleBlock3>任务详情</template> |
| | | <template #middleBlock4>人员信息</template> |
| | | <template #rightBlock1>时间</template> |
| | | <template #rightBlock1> |
| | | <div class="date-time"> |
| | | <CurrentDateTime></CurrentDateTime> |
| | | </div> |
| | | </template> |
| | | <template #rightBlock2>状态面板</template> |
| | | <template #rightBlock3>知识库</template> |
| | | </DashboardLayout> |
| | |
| | | import type { Task } from '@/api/task' |
| | | import { chain } from 'lodash-es' |
| | | import TaskTabs from '@/views/dashboard/components/TaskTabs.vue' |
| | | import CurrentDateTime from '@/views/dashboard/components/CurrentDateTime.vue' |
| | | |
| | | defineOptions({ |
| | | name: 'DashboardView' |
| | |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | | <style scoped> |
| | | .date-time { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-top: 12px; |
| | | } |
| | | </style> |