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