feat(字典管理): ✨ 字典管理
完成字典管理的对接
This commit is contained in:
@@ -7,7 +7,7 @@ interface CreateCrudOptionsTypes {
|
||||
crudOptions: CrudOptions;
|
||||
}
|
||||
|
||||
export const createCrudOptions = function ({ crudExpose,currentRow }: { crudExpose: CrudExpose,currentRow:any }): CreateCrudOptionsTypes {
|
||||
export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExpose }): CreateCrudOptionsTypes {
|
||||
const pageRequest = async (query: PageQuery) => {
|
||||
return await api.GetList(query);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineProps, computed } from 'vue';
|
||||
import {ref, onMounted, defineProps, computed, watch} from 'vue';
|
||||
import { useExpose, useCrud } from '@fast-crud/fast-crud';
|
||||
import { createCrudOptions } from './crud';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
@@ -40,10 +40,11 @@ const handleClose = (done: () => void) => {
|
||||
// catch error
|
||||
});
|
||||
};
|
||||
|
||||
defineExpose({ drawer });
|
||||
const {setSearchFormData,doRefresh} = crudExpose
|
||||
defineExpose({ drawer,setSearchFormData,doRefresh });
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
// console.log(48,currentRow)
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user