docs: annotate all shared frontend modules in Chinese
This commit is contained in:
1 parent
2be21c1c62
commit
408f8e5c98
55 files changed
+349
No files matched your search
@@ -1,3 +1,4 @@
|
||||
/** 优先使用商品已有描述;缺失时按商品 id 补查,最多等待 5 秒,失败不阻塞配置页。 */
|
||||
async function e(e, t) {
|
||||
if (typeof t.description == `string`) return t.description;
|
||||
let n = Number(t.id);
|
||||
@@ -18,6 +19,7 @@ async function e(e, t) {
|
||||
r = Array.isArray(t?.list)
|
||||
? t.list.find((e) => e && Number(e.id) === n)
|
||||
: void 0;
|
||||
// 返回值仍是后端富文本,展示端必须经过 HTML 清洗,不能直接视为可信 HTML。
|
||||
return typeof r?.description == `string` ? r.description : ``;
|
||||
} catch {
|
||||
return ``;
|
||||
|
||||
Reference in new issue
Block a user