fukasawa减少动画、并支持调整;

图片画质参数支持调节;
博客支持外链文章
This commit is contained in:
tangly1024.com
2024-02-01 15:25:07 +08:00
parent 66fc70e4f9
commit 022706bb40
43 changed files with 308 additions and 180 deletions

View File

@@ -30,6 +30,33 @@ export const memorize = (Component) => {
}
return memo(MemoizedComponent)
}
// 转换外链
export function sliceUrlFromHttp(str) {
// 检查字符串是否包含http
if (str.includes('http')) {
// 如果包含找到http的位置
const index = str.indexOf('http');
// 返回http之后的部分
return str.slice(index, str.length);
} else {
// 如果不包含,返回原字符串
return str;
}
}
// 检查是否外链
export function checkContainHttp(str) {
// 检查字符串是否包含http
if (str.includes('http')) {
// 如果包含找到http的位置
return str.indexOf('http') > -1
} else {
// 不包含
return false;
}
}
/**
* 加载外部资源
* @param url 地址 例如 https://xx.com/xx.js