fix: 修复空菜单无法切换为手动输入的bug,修复没有vueName无法读取到pathinfo.json中的bug

This commit is contained in:
pixel(奇淼
2024-10-26 12:17:54 +08:00
parent c3fd7b9077
commit 6bb8f8a030
3 changed files with 29 additions and 7 deletions
@@ -31,15 +31,14 @@ const emits = defineEmits(['change'])
const pathOptions = ref([])
const tempPath = ref('')
const activeComponent = ref('')
const activeComponent = ref([])
const pathIsSelect = ref(true)
const togglePathIsSelect = () => {
if(pathIsSelect.value){
tempPath.value = activeComponent.value?.join('/')
tempPath.value = activeComponent.value?.join('/') || ''
}else{
activeComponent.value = tempPath.value.split('/')
console.log(activeComponent.value)
activeComponent.value = tempPath.value?.split('/') || []
}
pathIsSelect.value = !pathIsSelect.value