diff --git a/docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue b/docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue
index 049dfa9a1f0f3f1b0c754c90055e3826ded8756c..92b84877a6a43d764cd9fd54ecae1cfb0a167e82 100644
--- a/docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue
+++ b/docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue
@@ -6,17 +6,13 @@
class="DocSearch-Hit-content-wrapper"
v-if="item.hierarchy[item.type] && item.type === 'lvl1'"
>
-
-
+
+
-
-
+
+
@@ -24,7 +20,7 @@
class="DocSearch-Hit-title"
v-html="snippetResultContent(`hierarchy.${item.type}`)"
/>
-
+
@@ -63,6 +59,16 @@
isContent() {
return this.item.type === 'content';
},
+ contentHtml() {
+ return this.snippetResultContent('content');
+ },
+ hierarchyLvl1Html() {
+ return this.snippetResultContent('hierarchy.lvl1');
+ },
+ hierarchyLvl2Html() {
+ const lvl2 = this.snippetResultContent('hierarchy.lvl2');
+ return this.isContent ? this.contentHtml === lvl2 ? '' : lvl2 : '';
+ },
},
methods: {
snippetResultContent(attribute) {