1樓:
最近也碰到了這個問題,研究了一下,發現解決方法是這樣子的:
假設有個路由如下:
{ path: '/example',
component: Example,
childrenpath: 'index'component: Index,
childrenpath: 'submenu1'name: 'Form'component:
Indexpath: 'submenu2'name: 'Form'component:
Index
對應的選單為:example/index/submenu1~submenu2,我們的想法是想讓submenu1和submenu2和index同級,也就是說將submenu1和submenu2渲染到Example元件中去,而不是渲染到Index元件中去,但是查了官方文件好像沒有類似的實現,所以只能換一種思路.
其實很簡單,只要將Index對應的元件中只寫乙個router-view就可以了,如下:
這樣子雖然是渲染在Index中的,但是效果是一樣的.
2樓:
如何把巢狀的python list轉成乙個一維的python list
明天 import numpy as np a np.random.randint 1,10,1,4 b np.squeeze a 結果如下圖 我還是我123 也貢獻乙個一行展開任意維的 li 1,2 3 4,5 6 7,8,9 f lambdal sum i if notisinstance i,...
python 如何處理提取巢狀中括號 的內容
unaguo 題主好,我也遇到同樣的問題。由於自己洗資料作的死 還有一部分是收集的資料整理的不好 所以我洗完後的那個list巢狀情況更複雜。How to make a flat list out of list of lists?裡面試了好幾個,發現都不能解決我的複雜的巢狀情況。How to mak...
Python中如何實現結構體巢狀結構體指標?
include using namespace std 該檔名稱 cpptest.cpp 終端下編譯指令 g o cpptest.so shared fPIC cpptest.cpp struct sub struct struct struct def extern C cout cout 輸出子...