This commit is contained in:
2026-10-25 23:33:42 +08:00
parent c5a6ada6a6
commit 7ec6bd789f
23 changed files with 1473 additions and 110 deletions
+5 -1
View File
@@ -10,7 +10,11 @@ function normalize(binding: DirectiveBinding<AuthValue>): string[] {
}
/** 校验不通过时直接移除 DOM 节点,而非仅禁用 */
function check(el: HTMLElement, binding: DirectiveBinding<AuthValue>, checker: (code: string) => boolean) {
function check(
el: HTMLElement,
binding: DirectiveBinding<AuthValue>,
checker: (code: string) => boolean,
) {
const codes = normalize(binding)
if (!codes.length) return