index.vue 957 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <bs-modal :width="modalOptions.width" :visible="modalOptions.visible" :title="modalOptions.title" :modal-extra-props="modalOptions.modalExtraProps">
  3. <bs-table v-if="modalOptions.visible" v-bind="tableOptions" class="bs-table-modal" ref="bsTableRef" />
  4. </bs-modal>
  5. </template>
  6. <script setup>
  7. import { ref } from 'vue';
  8. import BsTable from '/@/components/BsUi/Table/index.js';
  9. import BsModal from '/@/components/BsUi/Modal/index.js';
  10. const bsTableRef = ref(null);
  11. const props = defineProps({
  12. modalOptions: {
  13. required: true,
  14. default: {
  15. width: 800,
  16. visible: false,
  17. title: '列表弹窗',
  18. modalExtraProps: {},
  19. },
  20. },
  21. tableOptions: {
  22. required: true,
  23. default: {},
  24. },
  25. });
  26. defineExpose({
  27. bsTableRef,
  28. });
  29. </script>
  30. <style lang="scss" scoped>
  31. .bs-table-modal {
  32. :deep(.vxe-grid--table-container) {
  33. padding: 0 0 10px 0;
  34. }
  35. }
  36. </style>