|
@@ -1,7 +1,6 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import router from '@/router'
|
|
import router from '@/router'
|
|
|
import { ElMessage, ElMessageBox, type DialogProps } from 'element-plus'
|
|
import { ElMessage, ElMessageBox, type DialogProps } from 'element-plus'
|
|
|
-import type { PropType } from 'vue'
|
|
|
|
|
import type { AdvancedForm, BasicForm } from '@/types/form'
|
|
import type { AdvancedForm, BasicForm } from '@/types/form'
|
|
|
import type { TableProps } from 'element-plus/es/components/table/src/table/defaults'
|
|
import type { TableProps } from 'element-plus/es/components/table/src/table/defaults'
|
|
|
|
|
|
|
@@ -18,27 +17,18 @@ interface CustomTable {
|
|
|
}
|
|
}
|
|
|
type Table = Partial<Omit<TableProps<any>, 'data'> & CustomTable>
|
|
type Table = Partial<Omit<TableProps<any>, 'data'> & CustomTable>
|
|
|
|
|
|
|
|
-const props = defineProps({
|
|
|
|
|
- crud: {
|
|
|
|
|
- required: true,
|
|
|
|
|
- type: Object as PropType<CRUD>
|
|
|
|
|
- },
|
|
|
|
|
- pageSize: {
|
|
|
|
|
- type: Number,
|
|
|
|
|
- default: 10
|
|
|
|
|
- },
|
|
|
|
|
- selection: {
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- default: true
|
|
|
|
|
- },
|
|
|
|
|
- formConfig: {
|
|
|
|
|
- type: Object as PropType<BasicForm | AdvancedForm>,
|
|
|
|
|
- required: true
|
|
|
|
|
- },
|
|
|
|
|
- dialogConfig: {
|
|
|
|
|
- type: Object as PropType<DialogProps>
|
|
|
|
|
- },
|
|
|
|
|
- tableConfig: Object as PropType<Table>
|
|
|
|
|
|
|
+interface Props {
|
|
|
|
|
+ crud: CRUD
|
|
|
|
|
+ pageSize?: number
|
|
|
|
|
+ selection?: boolean
|
|
|
|
|
+ formConfig: BasicForm | AdvancedForm
|
|
|
|
|
+ dialogConfig?: DialogProps
|
|
|
|
|
+ tableConfig?: Table
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const props = withDefaults(defineProps<Props>(), {
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ selection: true
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// ============== 查询部分开始 ===============
|
|
// ============== 查询部分开始 ===============
|