完善卡片上标签显示逻辑的算法

This commit is contained in:
fofolee
2024-12-21 19:38:17 +08:00
parent b230088a3a
commit 5c02214063
7 changed files with 273 additions and 99 deletions

View File

@@ -0,0 +1,9 @@
export const textDisplayRules = {
string: (cmd) => cmd,
window: (cmd, isTooltip) => isTooltip ? cmd.match.app.join(", ") : cmd.match.app[0],
files: (cmd) => cmd.match || (cmd.fileType === "directory" ? "所有文件夹" : "所有文件"),
regex: (cmd) => cmd.match,
over: () => "所有文本",
img: () => "图片",
add: (cmd) => cmd.count,
};