feat: 商品列表-单规格删除skulist

This commit is contained in:
duan 2025-03-01 13:43:01 +08:00
parent 467bfaa2eb
commit 3f02f0e6c8
2 changed files with 42 additions and 7 deletions

View File

@ -86,6 +86,36 @@ export interface IContentConfig<T = any> {
[key: string]: any;
};
// 请求数据的参数
indexActionData: object | any,
// 修改属性的网络请求函数(需返回promise)
modifyAction?: (data: {

View File

@ -21,11 +21,21 @@ const contentConfig: IContentConfig<UserPageQuery> = {
pageSizes: [10, 20, 30, 50],
},
indexActionData: {},
indexAction: function (params) {
indexAction: async function (params) {
let obj = { ...params, ...params.times }
obj.createBeginTime = obj['0']
obj.createEndTime = obj['1']
return UserAPI.getPage(obj);
const res = await UserAPI.getPage(obj);
res.records.forEach((element: any) => {
if (element.type == "single") {
delete element.skuList
}
});
return new Promise(function (resolve, reject) {
return resolve({
...res
})
})
},
modifyAction: function (data) {
let obj = {
@ -36,11 +46,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
// return UserAPI.onOff(obj);
},
deleteAction: UserAPI.deleteByIds,
// importAction(file) {
// return UserAPI.import(1, file);
// },
// exportAction: UserAPI.export,
// importTemplate: UserAPI.downloadTemplate,
importsAction(data) {
// 模拟导入数据
console.log("importsAction", data);