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 @@
/** 购买页限购检查的响应式状态;序号隔离连续修改数量引发的乱序返回。 */
import { ref } from "vue";
function t(t) {
let n = ref(!1),
@@ -5,15 +6,18 @@ function t(t) {
i = ref(!1),
a = ref(``),
o = 0;
// 配置变化时重置并作废在途响应,不能沿用上一份 allowed 状态。
function s() {
(o++, (n.value = !1), (r.value = !1), (i.value = !1), (a.value = ``));
}
// t 为真实限购请求函数,e 为当前购买信息;只有最后一次请求能更新页面状态。
async function c(e) {
let s = ++o;
((n.value = !0), (r.value = !1), (i.value = !1), (a.value = ``));
try {
let n = await t(e);
if (s !== o) return;
// checked 代表检查已结束,不代表允许购买;协议异常时 allowed 继续保持 false。
if (
!n ||
typeof n != `object` ||