添加个人中心及按角色展示内容
This commit is contained in:
26
add_overlay_css.py
Normal file
26
add_overlay_css.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import codecs
|
||||
file_path = r'd:\\骅锋\\mall\\layouts\\admin\\components\\AdminHeader.uvue'
|
||||
with codecs.open(file_path, 'r', 'utf-8') as f:
|
||||
text = f.read()
|
||||
|
||||
overlay_css = r'''
|
||||
.user-dropdown-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
background-color: transparent;
|
||||
}
|
||||
'''
|
||||
if '.user-dropdown-overlay' not in text:
|
||||
text = text.replace('</style>', overlay_css + '\n</style>')
|
||||
|
||||
text = text.replace('z-index: 99;', 'z-index: 1001;')
|
||||
text = text.replace('z-index: 90;', 'z-index: 1001;')
|
||||
text = text.replace('z-index: 150;', 'z-index: 1001;')
|
||||
text = text.replace('.user-dropdown {', '.user-dropdown {\n z-index: 1002;')
|
||||
|
||||
with codecs.open(file_path, 'w', 'utf-8') as f:
|
||||
f.write(text)
|
||||
Reference in New Issue
Block a user