index.vue 515 B

1234567891011121314151617181920
  1. <template>
  2. <div class="wh-full">
  3. <fs-crud ref="crudRef" v-bind="crudBinding" />
  4. </div>
  5. </template>
  6. <script setup lang="ts">
  7. import { onMounted } from 'vue';
  8. import { useRoute } from 'vue-router';
  9. import { useFs } from '@fast-crud/fast-crud';
  10. import createCrudOptions from './crud';
  11. const route = useRoute();
  12. const context: any = {
  13. route
  14. };
  15. const { crudRef, crudBinding, crudExpose } = useFs({ createCrudOptions, context });
  16. onMounted(() => {
  17. crudExpose.doRefresh();
  18. });
  19. </script>
  20. <style scoped></style>