可信代码库-个人中心订阅列表字段修改
This commit is contained in:
@@ -58,7 +58,7 @@ const router = useRouter();
|
||||
const gotoDetail = (row) => {
|
||||
// 后续请换成params,暂时params传参没传过去
|
||||
router.push({
|
||||
path: 'repoDetail/' + row.id
|
||||
path: 'repoDetail/' + row.softwareId
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ const router = useRouter();
|
||||
const gotoDetail = (row) => {
|
||||
// 后续请换成params,暂时params传参没传过去
|
||||
router.push({
|
||||
path: 'repoDetail/' + row.id
|
||||
path: 'repoDetail/' + row.softwareId
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ const renameComponentsToChildren = (obj) => {
|
||||
|
||||
// 如果对象有 `components` 属性,将其改为 `children`
|
||||
if (obj.hasOwnProperty('component')) {
|
||||
if(!obj.component.$ref) {
|
||||
// 生成随机 UUID 并赋值给 id
|
||||
obj.id = generateUUID(); // 使用浏览器/Node.js 原生 API
|
||||
// obj.id = obj.component.id; // 将 components 改为 children
|
||||
@@ -103,6 +104,7 @@ const renameComponentsToChildren = (obj) => {
|
||||
obj.latestVersion = obj.component.latestVersion; // 将 components 改为 children
|
||||
// delete obj.components; // 删除原来的 components 属性
|
||||
}
|
||||
}
|
||||
|
||||
// 递归处理对象的子元素
|
||||
for (let key in obj) {
|
||||
@@ -126,6 +128,7 @@ const fetchDependencyTree = async () => {
|
||||
current: pager.value.pageIndex,
|
||||
size: pager.value.pageSize
|
||||
});
|
||||
debugger
|
||||
if (data.data.code === 200 && data?.data?.data?.components) {
|
||||
tableData.value = renameComponentsToChildren(data?.data?.data?.components);
|
||||
pager.value.total = data?.data.data.total || 0;
|
||||
|
||||
Reference in New Issue
Block a user