|
@@ -67,13 +67,14 @@ export default defineComponent({
|
|
|
handleOpen()
|
|
|
}
|
|
|
const handleOpen = () => {
|
|
|
- console.log('🚀 ~ route', route, route.path)
|
|
|
- data.childPath = route?.path?.replaceAll?.('/', '') || 'accompany'
|
|
|
+ const src: string = route?.path || 'accompany'
|
|
|
+ console.log('🚀 ~ route.path', src)
|
|
|
+ data.childPath = src.replace(/\//g, '') || 'accompany'
|
|
|
}
|
|
|
watch(
|
|
|
() => route.path,
|
|
|
() => {
|
|
|
- data.childPath = route?.path?.replaceAll?.('/', '') || 'accompany'
|
|
|
+ handleOpen()
|
|
|
}
|
|
|
)
|
|
|
onMounted(() => {
|