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 @@
|
||||
/** 列表共用的实例/订单/交易状态文案和日期展示;未知状态保留原值便于识别新协议。 */
|
||||
import { n as product_name_n } from "~/lib/product-name.js";
|
||||
var t = {
|
||||
Unpaid: {
|
||||
@@ -79,6 +80,7 @@ var t = {
|
||||
function a(e) {
|
||||
return i[e] ?? e;
|
||||
}
|
||||
// 订单优先展示脱敏后的商品名列表,缺失时回落到订单名称/描述。
|
||||
function o(t) {
|
||||
let n = t.product_names;
|
||||
if (Array.isArray(n)) {
|
||||
@@ -102,12 +104,14 @@ function u(e) {
|
||||
function d(e) {
|
||||
return n[e]?.severity ?? `secondary`;
|
||||
}
|
||||
// 时间戳由后端以秒提供,使用浏览器本地时区显示;0/空值按未提供处理。
|
||||
function f(e) {
|
||||
if (!e) return `--`;
|
||||
let t = new Date(e * 1e3),
|
||||
n = (e) => String(e).padStart(2, `0`);
|
||||
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;
|
||||
}
|
||||
// 纯日期场景与完整日期时间共用同样的秒时间戳约定。
|
||||
function p(e) {
|
||||
if (!e) return `--`;
|
||||
let t = new Date(e * 1e3),
|
||||
|
||||
Reference in new issue
Block a user