转数组

This commit is contained in:
shijingjing
2022-10-08 10:56:24 +08:00
parent b082164ff6
commit 1bbb14bf5d

View File

@@ -106,11 +106,13 @@ export default {
resourceNum: e.resourceNum, resourceNum: e.resourceNum,
categoryIcon: e.categoryIcon, categoryIcon: e.categoryIcon,
id: e.id, id: e.id,
categoryIconArr: [{0:e.categoryIcon}] // categoryIconArr: [{ 0: e.categoryIcon}],
categoryIconArr: [e.categoryIcon]
} }
}) })
this.total = res.data.total this.total = res.data.total
console.log(this.tableData); console.log(this.tableData);
} }
}) })
}, },
@@ -148,8 +150,9 @@ export default {
getDetail(ids) { getDetail(ids) {
this.instance.post(`/app/appresourcecategory/queryDetailById?id=${ids}`).then(res=> { this.instance.post(`/app/appresourcecategory/queryDetailById?id=${ids}`).then(res=> {
if(res.data) { if(res.data) {
console.log(res.data);
this.form = res.data this.form = res.data
// this.form.categoryIconArr = [...res.data.categoryIcon] this.form.categoryIconArr = [res.data.categoryIcon]
} }
}) })
} }