mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-11-13 22:11:42 +08:00
refactor: 整理项目代码风格与修复细节问题
本次提交包含多项优化: 1. 修复htmlToPlainText入参类型校验逻辑 2. 移除冗余的overflow-hidden类名,调整分类组件样式 3. 新增自定义导航占位hook统一处理导航栏间距 4. 优化投票筛选选项文字大小,修复文章摘要获取逻辑 5. 重构画廊页面分类吸顶逻辑,调整分类项样式与滚动行为 6. 统一about与contact页面的模糊样式类名,调整页面内文字大小与间距 7. 重构useDataLoading工具函数的导入与代码格式 8. 优化设置页面的UI样式与按钮文字大小 9. 统一投票卡片组件的代码缩进与文字样式 10. 重构联系页面的代码格式,统一变量声明风格
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ const MD_PREFIX_REG = /^\s{0,3}(#{1,6}[ \t]|>|[+*-][ \t]|\d+[.、)][ \t]|```|~~~
|
||||
* @param source 原文(可为空)
|
||||
*/
|
||||
export function htmlToPlainText(source?: string): string {
|
||||
if (!source)
|
||||
if (typeof source !== 'string' || !source)
|
||||
return ''
|
||||
let text = source
|
||||
// 剥离脚本/样式块
|
||||
|
||||
Reference in New Issue
Block a user