fix: id=0导致sqlserver的insert失败

This commit is contained in:
dhb52
2024-05-06 23:28:33 +08:00
parent 0222eef6b5
commit 0fb70607d9
14 changed files with 24 additions and 24 deletions

View File

@ -138,7 +138,7 @@ const resetForm = () => {
const getProductCategoryTree = async () => {
productCategoryTree.value = []
const data = await ProductCategoryApi.getProductCategoryList()
const root: Tree = { id: 0, name: '顶级产品分类', children: [] }
const root: Tree = { id: undefined, name: '顶级产品分类', children: [] }
root.children = handleTree(data, 'id', 'parentId')
productCategoryTree.value.push(root)
}