fix: seach

This commit is contained in:
xingyu4j 2022-11-01 17:35:36 +08:00
parent 8917dcf6bf
commit 3cd6bb3148

View File

@ -123,6 +123,7 @@ const gridOptions = reactive<VxeGridProps>({
}, },
proxyConfig: { proxyConfig: {
seq: true, // seq: true, //
form: true, // reload
props: { props: {
result: 'list', result: 'list',
total: 'total' total: 'total'
@ -139,14 +140,7 @@ const gridOptions = reactive<VxeGridProps>({
} }
} }
}) })
const formData = ref<PostVO>({ const formData = ref<PostVO>()
name: '',
code: '',
sort: 0,
status: 0,
remark: '',
createTime: ''
})
const formItems = ref<VxeFormItemProps[]>([ const formItems = ref<VxeFormItemProps[]>([
{ {
field: 'id', field: 'id',
@ -208,9 +202,8 @@ const handleDetail = (row: PostVO) => {
} }
// //
const handleCreate = () => { const handleCreate = () => {
const $form = xForm.value
$form?.reset()
setDialogTile('create') setDialogTile('create')
xForm.value?.reset()
} }
// //
@ -232,8 +225,7 @@ const handleDelete = (rowId: number) => {
}) })
.finally(() => { .finally(() => {
ElMessage.success(t('common.delSuccess')) ElMessage.success(t('common.delSuccess'))
const $grid = xGrid.value xGrid.value?.commitProxy('query')
$grid?.commitProxy('query')
}) })
} }
// //
@ -253,8 +245,7 @@ const submitForm: VxeFormEvents.Submit = async () => {
dialogVisible.value = false dialogVisible.value = false
} finally { } finally {
actionLoading.value = false actionLoading.value = false
const $grid = xGrid.value xGrid.value?.commitProxy('query')
$grid?.commitProxy('query')
} }
} }
</script> </script>