修改表单不能重置
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user