index.vue 739 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <div class="flex w-full h-full overflow-hidden">
  3. <div class="flex-1 flex flex-col">
  4. <div
  5. class="h-32px shrink-0 px-12px flex items-center justify-between border border-solid border-gray-200"
  6. @click="onClick"
  7. >
  8. <span class="text-12px">日志</span>
  9. <IconButton :icon="open ? 'lucide:chevron-down' : 'lucide:chevron-up'" link></IconButton>
  10. </div>
  11. <div class="flex-1 text-12px p-12px">日志内容...</div>
  12. </div>
  13. </div>
  14. </template>
  15. <script setup lang="ts">
  16. import { ref } from 'vue'
  17. import { IconButton } from '@repo/ui'
  18. const emit = defineEmits<{
  19. toggle: [open: boolean]
  20. }>()
  21. const open = ref(false)
  22. const onClick = () => {
  23. open.value = !open.value
  24. emit('toggle', open.value)
  25. }
  26. </script>