fix: 店铺流程审批人候选支持查看全部 (#971)

This commit is contained in:
renshen 2026-11-06 23:12:37 +08:00
parent 8ba8b1bb2e
commit a479e7a7ba

View File

@ -224,7 +224,7 @@
.directory-query-more > summary { width: fit-content; padding-top: 0.75rem; color: var(--vip-content-accent-dark, #856632); cursor: pointer; list-style: disclosure-closed; }
.directory-query-more[open] > summary { list-style: disclosure-open; }
.directory-query-more__fields { display: grid; grid-template-columns: repeat(4, minmax(12rem, 1fr)); gap: 1rem 1.25rem; margin-top: 1rem; }
.directory-query-suggestions { position: absolute; top: calc(100% + 0.25rem); right: 0; left: 0; z-index: 6; margin: 0; padding: 0.25rem; border: 1px solid var(--vip-border, #d8d2c7); border-radius: 0.375rem; background: #fff; box-shadow: 0 5px 12px rgba(23,23,23,0.12); list-style: none; }
.directory-query-suggestions { position: absolute; top: calc(100% + 0.25rem); right: 0; left: 0; z-index: 6; max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0.25rem; border: 1px solid var(--vip-border, #d8d2c7); border-radius: 0.375rem; background: #fff; box-shadow: 0 5px 12px rgba(23,23,23,0.12); list-style: none; }
.directory-query-suggestions[hidden] { display: none; }
.directory-query-suggestions button { display: block; width: 100%; overflow: hidden; padding: 0.4rem 0.5rem; border: 0; border-radius: 0.25rem; background: transparent; color: var(--vip-content-ink, #171717); font: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.directory-query-suggestions button:hover, .directory-query-suggestions button:focus { background: var(--vip-content-accent-soft, #f7f0de); outline: 0; }
@ -3733,9 +3733,10 @@
? rows().flatMap((row) => ['legal_representative', 'shareholders', 'supervisor', 'billing_officer']
.map((column) => (row.querySelector(`[data-column-key="${column}"]`)?.textContent || '').trim()))
: rows().map((row) => fieldValues(row, key));
const values = [...new Set([...serverOptions, ...candidates].filter(
const matchedValues = [...new Set([...serverOptions, ...candidates].filter(
(item) => item && item !== '—' && (!needle || String(item).toLocaleLowerCase().includes(needle)),
))].slice(0, 8);
))];
const values = serverOptions.length > 0 ? matchedValues : matchedValues.slice(0, 8);
list.innerHTML = values.map((item) => `<li><button type="button" data-directory-suggestion-value="${item.replaceAll('&','&amp;').replaceAll('\"','&quot;').replaceAll('<','&lt;').replaceAll('>','&gt;')}">${item.replaceAll('&','&amp;').replaceAll('<','&lt;').replaceAll('>','&gt;')}</button></li>`).join('');
list.hidden = values.length === 0;
list.querySelectorAll('button').forEach((button) => button.addEventListener('click', () => {