fix(V0.2): 智能截断去尾部标点; 看板左列收窄; 项目头像三处统一
Docker Build and Push / build-image (push) Successful in 1m7s
Docker Build and Push / build-image (push) Successful in 1m7s
- splitTitle: 截断后用 \p{P} 去掉标题尾部连续分隔符 (原字符类重组有
转义坑, 换 Unicode 属性类)
- 看板卡片左列 (状态点+⋯) 收窄至 14px 并负外距悬进卡片内边距
- 项目头像统一: 新增 .pavatar 基类与 projectIcon.colorOfProject,
项目管理预览改用同配色/同圆角/居中首字, 修复灰底与文字歪斜
This commit is contained in:
@@ -16,7 +16,10 @@ export function splitTitle(raw) {
|
||||
if (SEPARATOR.test(text[i - 1])) { cut = i; break }
|
||||
}
|
||||
if (cut < 0) cut = MAX_TITLE
|
||||
return { title: text.slice(0, cut).trim(), desc: text }
|
||||
// 截断落在分隔符上: 分隔符留在标题末尾很难看, 去掉尾部连续分隔符/空白
|
||||
// (\p{P} 覆盖中英文全部标点; 之前用 SEPARATOR.source 重组字符类有转义坑)
|
||||
const title = text.slice(0, cut).replace(/[\s\p{P}]+$/u, '').trim()
|
||||
return { title, desc: text }
|
||||
}
|
||||
|
||||
// 时间词 → 日期 (返回 YYYY-MM-DD):
|
||||
|
||||
Reference in New Issue
Block a user