修改表格右下角配置
This commit is contained in:
+16
-9
@@ -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)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user