fix: seach
This commit is contained in:
parent
8917dcf6bf
commit
3cd6bb3148
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user