|
|
@ -88,6 +88,12 @@ const placeholder = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isOpen = computed(() => { |
|
|
|
|
|
|
|
if (readOnly.value) return false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (readOnly.value || (localState.value && isPk)) && !active.value && !editable.value ? false : open.value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
useSelectedCellKeyupListener(active, (e: KeyboardEvent) => { |
|
|
|
useSelectedCellKeyupListener(active, (e: KeyboardEvent) => { |
|
|
|
switch (e.key) { |
|
|
|
switch (e.key) { |
|
|
|
case 'Enter': |
|
|
|
case 'Enter': |
|
|
@ -114,7 +120,7 @@ useSelectedCellKeyupListener(active, (e: KeyboardEvent) => { |
|
|
|
:placeholder="placeholder" |
|
|
|
:placeholder="placeholder" |
|
|
|
:allow-clear="(!readOnly && !localState && !isPk) || isEditColumn" |
|
|
|
:allow-clear="(!readOnly && !localState && !isPk) || isEditColumn" |
|
|
|
:input-read-only="true" |
|
|
|
:input-read-only="true" |
|
|
|
:open="(readOnly || (localState && isPk)) && !active && !editable ? false : open" |
|
|
|
:open="isOpen" |
|
|
|
:dropdown-class-name="`${randomClass} nc-picker-year ${open ? 'active' : ''}`" |
|
|
|
:dropdown-class-name="`${randomClass} nc-picker-year ${open ? 'active' : ''}`" |
|
|
|
@click="open = (active || editable) && !open" |
|
|
|
@click="open = (active || editable) && !open" |
|
|
|
@change="open = (active || editable) && !open" |
|
|
|
@change="open = (active || editable) && !open" |
|
|
|