install npm -i text-width-overflow use import textWidthOverflow from 'text-width-overflow' return textWidthOverflow(string, widthNumber): boolean 判断字符串是否超出容器的宽度,返回布尔值