添加个人中心及按角色展示内容
This commit is contained in:
16
test_replace_map.py
Normal file
16
test_replace_map.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import codecs
|
||||
with open('layouts/admin/router/adminComponentMap.uts', 'r', encoding='utf-8') as f:
|
||||
text = f.read()
|
||||
|
||||
text = text.replace(
|
||||
"import HomeIndex from '@/pages/mall/admin/homePage/index.uvue'",
|
||||
"import HomeIndex from '@/pages/mall/admin/homePage/index.uvue'\nimport UserCenter from '@/pages/mall/admin/userCenter/index.uvue'"
|
||||
)
|
||||
|
||||
text = text.replace(
|
||||
"['HomeIndex', HomeIndex],",
|
||||
"['HomeIndex', HomeIndex],\n ['UserCenter', UserCenter],"
|
||||
)
|
||||
|
||||
with open('layouts/admin/router/adminComponentMap.uts', 'w', encoding='utf-8') as f:
|
||||
f.write(text)
|
||||
Reference in New Issue
Block a user