云
18 小时以前 c2e8526f8f857be5e3a8c6f2b39c5efd424de33e
src/packages/@core/ui-kit/shadcn-ui/src/components/input-password/input-password.vue
@@ -42,16 +42,21 @@
        <slot name="strengthText"> </slot>
      </p>
    </template>
    <div
    <button
      type="button"
      :aria-label="show ? '隐藏密码' : '显示密码'"
      :aria-pressed="show"
      :disabled="!!$attrs.disabled"
      :class="{
        'top-3': !!passwordStrength,
        'top-1/2 -translate-y-1/2 items-center': !passwordStrength,
      }"
      class="text-foreground/60 hover:text-foreground absolute inset-y-0 right-0 flex cursor-pointer pr-3 text-lg leading-5"
      @click="show = !show"
      @keydown.enter.stop
    >
      <Eye v-if="show" class="size-4" />
      <EyeOff v-else class="size-4" />
    </div>
    </button>
  </div>
</template>