viewScores.vue 798 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="h-full bg-white">
  3. <fs-crud ref="crudRef" v-bind="crudBinding" />
  4. </div>
  5. </template>
  6. <script setup lang="ts">
  7. import { onMounted } from 'vue';
  8. import { useFs } from '@fast-crud/fast-crud';
  9. import createCrudOptions from './crud';
  10. const props = defineProps({
  11. subjectId: {
  12. type: Number,
  13. default: 0
  14. }
  15. });
  16. interface Emits {
  17. (e: 'closeEmits', value: boolean): void;
  18. }
  19. const emits = defineEmits<Emits>();
  20. const context = {
  21. subjectId: props.subjectId,
  22. viewActiveCloseFunc: () => {
  23. emits('closeEmits', true);
  24. }
  25. };
  26. const { crudRef, crudBinding, crudExpose } = useFs({ createCrudOptions, context });
  27. onMounted(() => {
  28. crudExpose.doRefresh();
  29. });
  30. </script>
  31. <style scoped lang="scss">
  32. :deep(.fs-search-col) {
  33. margin-left: 2rem !important;
  34. }
  35. </style>