Merge branch '20220413-zjl-公共服务平台' into 'master-20220527'
5.27 公共服务平台对接 See merge request eshop/fe_service_ebtp_frontend!88
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user