取地址中的参数值工具
This commit is contained in:
parent
2072ece81d
commit
1818eb00ee
|
@ -100,7 +100,7 @@ export function dictToTree(list, tree, parentId) {
|
||||||
|
|
||||||
if (child.children.length <= 0) {
|
if (child.children.length <= 0) {
|
||||||
delete child.children
|
delete child.children
|
||||||
}else{
|
} else {
|
||||||
child.selectable = false;
|
child.selectable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,18 +110,7 @@ export function dictToTree(list, tree, parentId) {
|
||||||
return tree
|
return tree
|
||||||
}
|
}
|
||||||
|
|
||||||
//列表转🌲
|
//拿地址路径中的参数,不能用$route取的就用这个取
|
||||||
// export function list2Tree(list, parentId) {
|
export function getUrlKey(name) {
|
||||||
// let obj = []
|
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
|
||||||
// list.forEach(item => {
|
}
|
||||||
// item.children = []
|
|
||||||
// obj[item.id] = item
|
|
||||||
// })
|
|
||||||
// return list.filter(item => {
|
|
||||||
// if (item.parentId !== parentId) {
|
|
||||||
// obj[item.parentId].children.push(item)
|
|
||||||
// return false
|
|
||||||
// }
|
|
||||||
// return true
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
Loading…
Reference in New Issue