增加表格重置

This commit is contained in:
龙运模
2024-07-30 10:08:04 +08:00
parent 337ed6fbb0
commit 67f098aa07
3 changed files with 50 additions and 16 deletions
+6 -4
View File
@@ -285,12 +285,14 @@
this.$refs.columnSetting.isSave = false
},
//自定义列重置
async columnSettingBack(){
async columnSettingBack(userColumn){
this.$refs.columnSetting.isSave = true
try {
const column = await config.columnSettingReset(this.tableName, this.column)
this.userColumn = column
this.$refs.columnSetting.usercolumn = JSON.parse(JSON.stringify(this.userColumn||[]))
const column = await config.columnSettingReset(this.tableName, userColumn,this.apiObj)
if(column){
this.userColumn = column
this.$refs.columnSetting.usercolumn = JSON.parse(JSON.stringify(this.userColumn||[]))
}
}catch(error){
this.$message.error('重置失败')
this.$refs.columnSetting.isSave = false