chore: format category mock toggle updates
This commit is contained in:
@@ -3,4 +3,6 @@
|
||||
import './product';
|
||||
import './product-extensions';
|
||||
|
||||
console.warn('[Mock] 已启用非门店/非分类管理 Mock 数据(分类管理强制走真实 API)');
|
||||
console.warn(
|
||||
'[Mock] 已启用非门店/非分类管理 Mock 数据(分类管理强制走真实 API)',
|
||||
);
|
||||
|
||||
@@ -643,9 +643,10 @@ if (ENABLE_PRODUCT_CATEGORY_MOCK) {
|
||||
}
|
||||
|
||||
const currentSortMax =
|
||||
state.categories.reduce((max, item) => Math.max(max, item.sort), 0) +
|
||||
1;
|
||||
const existingIndex = state.categories.findIndex((item) => item.id === id);
|
||||
state.categories.reduce((max, item) => Math.max(max, item.sort), 0) + 1;
|
||||
const existingIndex = state.categories.findIndex(
|
||||
(item) => item.id === id,
|
||||
);
|
||||
|
||||
const next =
|
||||
existingIndex === -1
|
||||
|
||||
Reference in New Issue
Block a user