diff --git a/CHANGELOG.md b/CHANGELOG.md index 52420f12d7142d77030340584c01d0f93ed5b239..49a764392d11fd830e0345f70e5a8aa66b5e5bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,14 @@ ### Change +- 更新下拉代码表支持显示代码表项上配置的图标 - 数据看板的直接内容不显示标题栏 - 操作栏门户部件不显示标题区的操作按钮 +### Fixed + +- 修复列表绘制时如果初次加载的数据总高度未超过屏幕高度时,后续数据不会自动加载的问题 + ## [0.7.41-alpha.20] - 2025-11-17 ### Added diff --git a/src/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.tsx b/src/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.tsx index a0a8c64889df57b96ffde8663648e7d5ae6d9209..08e39472e4b5feb988486d2468c5815a83815208 100644 --- a/src/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.tsx @@ -107,6 +107,12 @@ export const IBizDropdownList = defineComponent({ showPicker.value = false; }; + const refreshCodeList = () => { + c.loadCodeList(props.data!).then((codeList: readonly IData[]) => { + items.value = codeList; + }); + }; + // 监听popstate事件 usePopstateListener(closeDrawer); @@ -122,6 +128,7 @@ export const IBizDropdownList = defineComponent({ onFocus, onRemove, onConfirm, + refreshCodeList, }; }, @@ -139,6 +146,7 @@ export const IBizDropdownList = defineComponent({ onClick={() => { if (!this.disabled) { this.showPicker = true; + this.refreshCodeList(); } }} > diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss index 589517927956262e4f16f83f0aeff9a47e7c3c1b..00b5ecfda0b8c495409f108f2de83a99cd5a42fe 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.scss @@ -31,8 +31,10 @@ $dropdown: ( pop-search-input-padding: getCssVar(spacing, extra-tight), pop-search-input-icon-padding: 0 getCssVar(spacing, extra-tight), pop-list-item-padding: getCssVar(spacing, base) 0, - pop-list-bg-item-padding: getCssVar(spacing, extra-tight) getCssVar(spacing, base), - + pop-list-item-icon-margin-right: getCssVar(spacing, tight), + pop-list-bg-item-padding: getCssVar(spacing, extra-tight) + getCssVar(spacing, base), + // 边框 pop-list-item-border-bottom: 1px solid getCssVar(color,border), @@ -179,9 +181,16 @@ $dropdown: ( color: getCssVar(dropdown, select-option-item-color); background-color: getCssVar(dropdown, select-option-item-bkcolor); border-radius: getCssVar(dropdown, pop-list-item-border-radius); - @include when('bkcolor'){ + display: flex; + align-items: center; + justify-content: center; + line-height: getCssVar(dropdown, line-height); + @include when('bkcolor') { padding: getCssVar(dropdown, pop-list-bg-item-padding); } + .#{bem(icon)} { + margin-right: getCssVar(dropdown, pop-list-item-icon-margin-right); + } } @include m('selected'){ color: getCssVar(dropdown, pop-list-item-selected-color); diff --git a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx index 4ec6251c910278645bc97f6d95cce41356184514..615f9676af341873eb440d944e83bd6b4dd4781c 100644 --- a/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx +++ b/src/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.tsx @@ -212,6 +212,9 @@ export const IBizDropdown = defineComponent({ : '' } > + {item.sysImage && ( + + )} {item.text} {item.value === curValue.value && ( @@ -242,6 +245,12 @@ export const IBizDropdown = defineComponent({ showPicker.value = false; }; + const refreshCodeList = () => { + c.loadCodeList(props.data!).then((codeList: readonly IData[]) => { + items.value = codeList; + }); + }; + // 监听popstate事件 usePopstateListener(closeDrawer); @@ -260,6 +269,7 @@ export const IBizDropdown = defineComponent({ getCodeListItem, renderPopHeader, renderPopContent, + refreshCodeList, }; }, @@ -308,6 +318,7 @@ export const IBizDropdown = defineComponent({ onClick={() => { if (!this.disabled) { this.showPicker = true; + this.refreshCodeList(); } }} style={ diff --git a/src/util/list-util/list-render-util.tsx b/src/util/list-util/list-render-util.tsx index 39f1226e878f980732347722b4e52d4f6f2228e3..a535588c3edd023b6acd0457bab36813d55c33f3 100644 --- a/src/util/list-util/list-render-util.tsx +++ b/src/util/list-util/list-render-util.tsx @@ -259,7 +259,6 @@ export function useListRender( v-model:error={isLoadError.value} offset={50} finished={isLodeFinished.value} - immediate-check={false} loading-text={ibiz.i18n.t('control.common.loadMore')} finished-text={ibiz.i18n.t('control.common.loadFinish')} error-text={ibiz.i18n.t('control.common.loadError')}