MenuEdit.vue 516 B

12345678910111213141516171819202122
  1. <script setup lang="ts">
  2. import { computed } from 'vue';
  3. import { breakpointsTailwind, useBreakpoints } from '@vueuse/core';
  4. import { useEditShell } from '#/adapter/shell';
  5. import { menuForm } from '../menu.data';
  6. const { Form, Shell } = useEditShell(menuForm);
  7. const breakpoints = useBreakpoints(breakpointsTailwind);
  8. const layout = computed(() =>
  9. breakpoints.greaterOrEqual('md').value ? 'horizontal' : 'vertical',
  10. );
  11. </script>
  12. <template>
  13. <Shell>
  14. <Form class="mx-4" :layout />
  15. </Shell>
  16. </template>