{withQuote == '1' && (
<div id={`${id}_formula_dot`} style={{ width: '30%', position: 'relative' }}>
{renderDot()}
<span
style={{ position: 'absolute', top: '3px', right: '8px' }}
>{`(${quoteNo})`}</span>
</div>
)}
// 动态渲染引用后的 .
const renderDot = () => {
setInterval(() => {
let dot = ' .';
const dotDiv = document.getElementById(`${id}_formula_dot`);
const spanWidth = dotDiv && dotDiv.getElementsByTagName('span')[1].clientWidth;
const dotCount = dotDiv && Math.floor((dotDiv.clientWidth - spanWidth - 32) / 7);
for (let i = 0; i < dotCount; i++) {
dot += ' .';
}
setDotSpan(dot);
}, 1000);
return <span style={{ margin: '0 12px' }}>{dotSpan}</span>;
};