需求变更整改
This commit is contained in:
@@ -119,7 +119,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
type: '',
|
||||
data: []
|
||||
})
|
||||
const process = ref('2')
|
||||
const process = ref('')
|
||||
const route = useRoute()
|
||||
const { proxy } = useCurrentInstance()
|
||||
const menuCollapse = ref(false)
|
||||
@@ -238,12 +238,16 @@ const filterNode = (value: string, data: any, node: any) => {
|
||||
}
|
||||
}
|
||||
function filterProcess(nodes: any) {
|
||||
if (process.value == '') {
|
||||
return nodes
|
||||
}
|
||||
return nodes
|
||||
.map(node => {
|
||||
// 递归处理子节点
|
||||
const children = node.children ? filterProcess(node.children) : []
|
||||
|
||||
// 如果当前节点的process=4,或者有子节点满足条件,则保留当前节点
|
||||
|
||||
if (node.process == process.value || children.length > 0) {
|
||||
return {
|
||||
...node,
|
||||
|
||||
Reference in New Issue
Block a user