💊 fix: 修复动态css
This commit is contained in:
parent
304c1e23c8
commit
ac12391328
|
@ -231,19 +231,22 @@
|
|||
/* 动态font */
|
||||
fonts () {
|
||||
const { cash_amount_type, min_denomination, max_denomination } = this.goodsInfo.entity;
|
||||
const defaultCss = {
|
||||
b: '0.2rem',
|
||||
a: '0.32rem'
|
||||
};
|
||||
if (cash_amount_type === '2') {
|
||||
const count = String(parseFloat(min_denomination)).length + String(parseFloat(max_denomination)).length + 1;
|
||||
|
||||
if (count > 6) {
|
||||
return {
|
||||
a: 0.32 - ((count - 6) / 100 * 1.5) + 'rem',
|
||||
b: 0.2 - ((count - 6) / 100) + 'rem'
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
b: '0.2rem'
|
||||
};
|
||||
return defaultCss;
|
||||
}
|
||||
} else {
|
||||
return defaultCss;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue