修改表单不能重置

This commit is contained in:
GGJ
2024-03-01 16:33:12 +08:00
parent 0b46fa89a9
commit 696cc76210
6 changed files with 386 additions and 7 deletions

View File

@@ -109,6 +109,7 @@ const rules = reactive({
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
})
const dialogFormVisible = ref(false)
const dialogTitle = ref('新增前置机')
const tableStore = new TableStore({
@@ -199,13 +200,16 @@ const tableStore = new TableStore({
],
beforeSearchFun: () => {
for (let key in tableStore.table.params) {
if (tableStore.table.params[key] === '') {
if (tableStore.table.params[key] === '' && key !== 'nodeGrade'&& key !== 'searchState') {
delete tableStore.table.params[key]
}
}
}
})
tableStore.table.params.orderBy = 'desc'
tableStore.table.params.nodeGrade = ''
tableStore.table.params.searchState = ''
provide('tableStore', tableStore)
// 新增
const add = () => {
@@ -246,8 +250,6 @@ const resetForm = () => {
}
}
provide('tableStore', tableStore)
onMounted(() => {
setTimeout(() => {
tableStore.index()