diff --git a/core/core-frontend/src/views/template-market/component/CategoryTemplate.vue b/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue
similarity index 80%
rename from core/core-frontend/src/views/template-market/component/CategoryTemplate.vue
rename to core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue
index fbdbf3d1a2..30797a68eb 100644
--- a/core/core-frontend/src/views/template-market/component/CategoryTemplate.vue
+++ b/core/core-frontend/src/views/template-market/component/CategoryTemplateV2.vue
@@ -3,13 +3,11 @@
{{ label }}
{{ label }}
- 的搜索结果是{{ fullTemplateShowList.length }}个
+ 的搜索结果是{{ searchResult }}个
import TemplateMarketV2Item from '@/views/template-market/component/TemplateMarketV2Item.vue'
+import { computed } from 'vue'
const emits = defineEmits(['templateApply', 'templatePreview'])
const templateApply = params => {
@@ -38,6 +37,17 @@ const templatePreview = params => {
emits('templatePreview', params)
}
+const searchResult = computed(
+ () => props.fullTemplateShowList.filter(item => showFlagCheck(item)).length
+)
+
+const showFlagCheck = template => {
+ if (!template.categoryNames) {
+ console.log('===templateTest' + JSON.stringify(template))
+ }
+ return template.showFlag && template.categoryNames?.includes(props.label)
+}
+
const props = defineProps({
searchText: {
type: String
diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue
index 53082db7a4..87f9e14cfb 100644
--- a/core/core-frontend/src/views/template-market/index.vue
+++ b/core/core-frontend/src/views/template-market/index.vue
@@ -102,8 +102,8 @@
id="template-show-area"
class="template-right"
>
-
-
+
+ >
-
-
+
-
+ >
-
+
@@ -154,18 +152,17 @@