feat : 新增需求征集组件
This commit is contained in:
13
src/utils/matterTree.js
Normal file
13
src/utils/matterTree.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export const matterTree = (array,data, id) => {
|
||||
if (id) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].value == id) {
|
||||
array.push(data[i].label);
|
||||
}
|
||||
if (data[i].children && data[i].children.length > 0) {
|
||||
matterTree(data[i].children)
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user