添加课程分类;修改接口地址
This commit is contained in:
16
src/utils/custom.js
Normal file
16
src/utils/custom.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const custom = {
|
||||
getStdSubject: (data) => { // 获取标准类型格式
|
||||
let arr= []
|
||||
for(let item of data) {
|
||||
// item.label = item.name
|
||||
if(item.children){
|
||||
arr.push(...custom.getStdSubject(item.children))
|
||||
}
|
||||
else{
|
||||
arr.push(item)
|
||||
}
|
||||
}
|
||||
return arr
|
||||
}
|
||||
}
|
||||
export default custom
|
Reference in New Issue
Block a user