1
This commit is contained in:
33
tmp/fix_coach_compare.py
Normal file
33
tmp/fix_coach_compare.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import sys
|
||||
path = r'c:\NeoZQYY\apps\miniprogram\miniprogram\pages\board-finance\board-finance.wxss'
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# 在 .coach-fin-val-sm 规则前插入助教环比固定宽度规则
|
||||
marker = '.coach-fin-val-sm {'
|
||||
insert = '''
|
||||
/* 助教分析环比列固定宽度,保证上下行对齐 */
|
||||
.coach-fin-col .compare-row-inline {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.coach-fin-col .compare-text-up-xs,
|
||||
.coach-fin-col .compare-text-down-xs,
|
||||
.coach-fin-col .compare-text-flat-xs {
|
||||
min-width: 72rpx;
|
||||
text-align: right;
|
||||
display: block;
|
||||
}
|
||||
|
||||
'''
|
||||
|
||||
idx = content.find(marker)
|
||||
if idx != -1:
|
||||
content = content[:idx] + insert + content[idx:]
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
print('OK')
|
||||
else:
|
||||
print('NOT FOUND')
|
||||
sys.stdout.flush()
|
||||
Reference in New Issue
Block a user