修改表格右下角配置

This commit is contained in:
龙运模
2024-07-10 23:25:20 +08:00
parent e3b1d2c9c8
commit 277eac69f2
5 changed files with 64 additions and 20 deletions
+16 -9
View File
@@ -28,7 +28,7 @@ export default {
* @tableName scTable组件的props->tableName
* @column 用户配置好的列
*/
columnSettingSave: function (tableName, column,params) {
columnSettingSave: function (tableName, column ,params) {
column.forEach((item,index)=>{
item.sort = index+1;
})
@@ -51,19 +51,26 @@ export default {
})
},
/**
* 获取自定义列
* 保存表格列表配置
* @tableName scTable组件的props->tableName
* @column 组件接受到的props->column
*/
columnSettingGet: function (tableName, column) {
columnSettingConfigSave: function (tableName, config, params) {
return new Promise((resolve) => {
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
const userColumn = tool.session.get(tableName)
if(userColumn){
resolve(userColumn)
}else{
resolve(column)
if(!params.url || params.url==''){
resolve(false)
return
}
let data = {
table_config:config,
}
http.post(params.url, data).then(res=>{
if(res.code == 200 && res.data.column){
resolve(true)
}else{
resolve(false)
}
});
})
},
/**