document the single UI stack and strengthen resize focus coverage

This commit is contained in:
cieanyau committed 2026-11-07 02:23:19 +08:00
1 parent 5c2342d4c5
commit ec918674ee
5 files changed
+20 -4

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
<script setup>
/** 复用 PrimeVue 的密码/反馈状态,只统一原生输入语义与可键盘访问的显隐操作。 */
/** 复用 OpenVue 的密码/反馈状态,只统一原生输入语义与可键盘访问的显隐操作。 */
import { computed, nextTick, ref, useSlots } from "vue";
import Password from "openvue/password";
@@ -22,7 +22,7 @@ const nativeProps = computed(() => ({
const toggleButton = ref(null);
async function togglePassword(callback) {
callback();
// PrimeVue切换两个显隐slot时会替换按钮;把焦点交回新按钮,键盘才能连续显示/隐藏。
// OpenVue切换两个显隐slot时会替换按钮;把焦点交回新按钮,键盘才能连续显示/隐藏。
await nextTick();
toggleButton.value?.focus();
}
@@ -71,7 +71,7 @@ async function togglePassword(callback) {
.password-field {
--password-toggle-size: 44px;
}
/* PrimeVue公开的输入样式类位于子组件内;操作宽度与逻辑末端留白必须同源,避免文字被按钮截获。 */
/* OpenVue公开的输入样式类位于子组件内;操作宽度与逻辑末端留白必须同源,避免文字被按钮截获。 */
.password-field:has(.password-toggle) :deep(.p-password-input) {
padding-inline-end: calc(
var(--password-toggle-size) + var(--p-form-field-padding-x)
+1 -1
View File
@@ -169,7 +169,7 @@ var m = {
!S.disabled && S.removable && C(`remove`);
}
async function I(t) {
// PrimeVue 完成内部输入更新后再同步合法值与 aria 状态,避免显示值和实际容量不一致。
// OpenVue 完成内部输入更新后再同步合法值与 aria 状态,避免显示值和实际容量不一致。
(await Promise.resolve(), await nextTick());
let n = t.originalEvent.target;
((n.value = String(O.value)),