|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div :style="{ fontSize: amount_font_size + 'px' }">
|
|
|
<a-tooltip :title="amount" >
|
|
|
- <span class="content">{{ getBit(amount) }}</span>
|
|
|
+ <span class="content" :style="{ fontSize: amount_font_size + 'px' }">{{ getBit(amount) }}</span>
|
|
|
</a-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -30,7 +30,8 @@ watch(props, () => {
|
|
|
setFontSize()
|
|
|
})
|
|
|
function setFontSize(){
|
|
|
- let _num = parseInt(props.width / props.amount.length);
|
|
|
+ let amount = getBit(props.amount);
|
|
|
+ let _num = parseInt(props.width / amount.length);
|
|
|
amount_font_size.value = _num < props.fontSize ? _num : props.fontSize;
|
|
|
}
|
|
|
|