fix(collection): finish B02a boundary checks and stage acceptance

This commit is contained in:
maoyingjie
2026-10-25 16:45:07 +08:00
parent c8b0aa26c3
commit ff486fb665
8 changed files with 100 additions and 3 deletions
@@ -163,7 +163,7 @@ const visibleKeys = computed(
const eligible = () => visibleKnown().filter((item) => !item.disabled);
/** Empty channel needs a settled collection: static children register on mount. */
const visibleIsEmpty = computed(
() => visibleKeys.value.size === 0 && (!!props.items || known().length > 0),
() => visibleKeys.value.size === 0 && (!!props.items || mounted.value),
);
// A removed, disabled or filtered-out row cannot stay active. The collection
@@ -249,7 +249,12 @@ export default defineComponent({
// calls preventDefault, otherwise every row would look cancelled.
const cancelled = event.defaultPrevented;
keepInputFocus(event);
if (!cancelled && !disabled.value && event.button === 0)
if (
!cancelled &&
!disabled.value &&
event.button === 0 &&
!nestedInteractive(event.target)
)
pressed.value = true;
},
onMousedown: (event: MouseEvent) => {