From 44abc3903062f1d7a3b5369ddce3431465a25445 Mon Sep 17 00:00:00 2001 From: of-HaiQin <5372604@qq.com> Date: Wed, 15 Jan 2025 11:56:28 +0800 Subject: [PATCH] [feat]fix models contains workflow --- src/components/community/modules/ModelFilterBar.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/community/modules/ModelFilterBar.vue b/src/components/community/modules/ModelFilterBar.vue index c3f8bdf..132663c 100644 --- a/src/components/community/modules/ModelFilterBar.vue +++ b/src/components/community/modules/ModelFilterBar.vue @@ -97,12 +97,16 @@ sort: 'Recently' } } + if ( - props.page === 'mainContent' && - store[props.page].filterState.selected_model_types.length === 0 + props.page === 'mainContent' ) { - store[props.page].filterState.model_types = store.modelTypes.map(type => type.value) + if(store[props.page].filterState.selected_model_types.length === 0){ + store[props.page].filterState.model_types = store.modelTypes + .filter(type => type.value !== 'Workflow') + .map(type => type.value) + } } if ((props.page === 'posts' || props.page === 'forked') && store.modelTypes.length > 0) { const hasWorkflow = store.modelTypes.some(type => type.value === 'Workflow')