Merge branch '20220413-zjl-公共服务平台' into 'master-20220527'

5.27 公共服务平台对接

See merge request eshop/fe_service_ebtp_frontend!88
This commit is contained in:
周建龙
2022-05-27 15:56:46 +08:00
13 changed files with 610 additions and 92 deletions

View File

@ -302,6 +302,18 @@ export const numberToChinese = (num: any) => {
re = re.replace("一", "");
return re;
}
/**
* 页面内锚点滚动方法
* @param anchorName
*/
export const scrollToAnchor = (anchorName: string) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if (anchorElement) { anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' }); }
}
}
/**
* 删除行首行尾的空白字符方法(包括空格、制表符、换页符等等)
* @param str