Skip to content

Commit

Permalink
fix:修复plus会显示头部搜索和描述问题
Browse files Browse the repository at this point in the history
  • Loading branch information
discreted66 committed Mar 4, 2025
1 parent 6cbb529 commit 2560988
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion examples/sites/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export default defineComponent({
menuId: '#layoutSider'
}
})
common.renderHeader()
// 非plus隐藏搜索
if (!location.href.includes('tiny-vue-plus')) {
common.renderHeader()
}
})
const { designConfig, currentThemeKey } = useTheme()
Expand Down
8 changes: 5 additions & 3 deletions examples/sites/src/views/overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span class="ti-f18">({{ getTotalComponentsNum() }})</span>
</h1>

<h1 class="overview-desc ti-f14 ti-my20 ti-lh21">
<h1 v-if="!isPlus" class="overview-desc ti-f14 ti-my20 ti-lh21">
{{ i18nByKey('overviewDesc') }}
</h1>
<!-- 搜索 -->
Expand Down Expand Up @@ -64,7 +64,7 @@
</template>

<script lang="js">
import { defineComponent, reactive, toRefs, onMounted } from 'vue'
import { defineComponent, reactive, toRefs, computed, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { cmpMenus } from '@menu/menus.js'
import { TinyInput } from '@opentiny/vue'
Expand All @@ -85,6 +85,8 @@ export default defineComponent({
value: '',
palceMenus: new Array(14)
})
const isPlus = computed(() => location.href.includes('tiny-vue-plus'))
function debounce(fn, delay) {
let timeout = 0
return (value) => {
Expand Down Expand Up @@ -162,7 +164,7 @@ export default defineComponent({
const common = new window.TDCommon(['#footer'], {})
common.renderFooter()
})
return { ...toRefs(state), ...fn, TinyInput, noDataSvg, searchSvg, isZhCn, getWord, i18nByKey, pubUrl }
return { ...toRefs(state), ...fn, TinyInput, noDataSvg, searchSvg, isZhCn, getWord, i18nByKey, pubUrl, isPlus }
}
})
</script>
Expand Down

0 comments on commit 2560988

Please sign in to comment.