docs: annotate payment, host operations and shared components

This commit is contained in:
cieanyau committed 2026-11-06 00:29:13 +08:00
1 parent d37ce57d09
commit dc32a74d7a
17 files changed
+100

No files matched your search

+7
View File
@@ -1,4 +1,8 @@
<script>
/**
* 敏感文本展示器:按 kind 掩码手机号、邮箱、姓名、证件或普通文本。
* 仅当父级确实传入未掩码原文时提供“显示”按钮;它是界面保护,不替代后端访问控制。
*/
import "~/assets/styles/SensitiveValue.BSZlaRHT.css";
import { toDisplayString } from "vue";
import { normalizeClass } from "vue";
@@ -14,12 +18,14 @@ import { openBlock } from "vue";
import { useRoute } from "#app";
import { t as _plugin_vue_export_helper_t } from "~/lib/_plugin-vue_export-helper.js";
function p(e) {
// 已由后端掩码的值不可在浏览器恢复;识别常见星号和圆点,避免误显示切换按钮。
return /[**•●]/u.test(e ?? ``);
}
function m(e) {
return !!e?.trim() && !p(e);
}
function h(e, t, n) {
// Array.from 按 Unicode 码点截取,短文本全部隐藏,避免前后保留区重叠泄漏原文。
let r = Array.from(e);
return r.length <= t + n
? `*`.repeat(Math.max(r.length, 1))
@@ -102,6 +108,7 @@ var _ = {
});
return (
watch(
// 数据、身份重置键或路由改变时恢复隐藏,不能延续上一条记录的展开状态。
[
() => f.value,
() => f.kind,