优化分类选择功能:新增默认展开分类列表设置,更新相关页面以支持此功能

This commit is contained in:
2026-04-06 14:06:06 +08:00
parent 9c4a0493ee
commit b82533233e
9 changed files with 48 additions and 16 deletions
@@ -21,7 +21,7 @@
</f7-list>
<f7-treeview class="tree-view-selection-treeview">
<f7-treeview-item item-toggle
:opened="isPrimaryItemHasSecondaryValue(item)"
:opened="props.defaultExpanded || isPrimaryItemHasSecondaryValue(item)"
:label="ti((primaryTitleField ? item[primaryTitleField] : item) as string, !!primaryTitleI18n)"
:key="primaryKeyField ? item[primaryKeyField] : item"
v-for="item in filteredItems">
@@ -59,6 +59,7 @@ import { type Framework7Dom, scrollSheetToTop } from '@/lib/ui/mobile.ts';
interface MobileTwoLevelItemSelectionBaseProps extends TwoLevelItemSelectionBaseProps {
show: boolean;
defaultExpanded?: boolean;
}
const props = defineProps<MobileTwoLevelItemSelectionBaseProps>();