docs: annotate all shared frontend modules in Chinese

This commit is contained in:
cieanyau committed 2026-11-06 00:30:15 +08:00
1 parent 2be21c1c62
commit 408f8e5c98
55 files changed
+349

No files matched your search

+4
View File
@@ -1,3 +1,4 @@
/** 实例业务状态与电源状态的统一显示;暂停原因只在确实暂停时展示。 */
function e(e, t) {
let n =
typeof t == `string` &&
@@ -14,6 +15,7 @@ function e(e, t) {
}[e.suspend_type || ``] ||
`暂停原因暂未提供,请联系支持`;
}
// 业务状态优先于电源状态;只有 Active 实例才显示运行/关机等即时状态。
function t(e, t = `Active`, n = !1) {
let r = {
Unpaid: `未付款`,
@@ -57,6 +59,7 @@ function t(e, t = `Active`, n = !1) {
severity: `warn`,
};
}
// 为已支持的模块选择状态接口;未知模块或非法实例编号返回 null,不拼接猜测路径。
function n(e, t) {
if (!/^[1-9]\d*$/.test(String(t))) return null;
let n = e.replace(/^mf_finance(?=$|_)/, `remf_finance`);
@@ -83,6 +86,7 @@ function n(e, t) {
}
: null;
}
/** e 为 API 客户端;仅返回字符串电源状态,缺少状态时返回空串供 UI 显示未知。 */
async function r(e, t, r) {
let i = n(t, r);
if (!i) return ``;