mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-17 01:30:44 +08:00
🪄 移动端不显示烟花
This commit is contained in:
parent
9f2c90c5fa
commit
068c7e09e9
@ -16,7 +16,7 @@
|
|||||||
v-if="enableInnerSearch"
|
v-if="enableInnerSearch"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="config.nazhua.showFireworks">
|
<template v-if="showFireworks">
|
||||||
<fireworks />
|
<fireworks />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="config.nazhua.showLantern">
|
<template v-if="config.nazhua.showLantern">
|
||||||
@ -29,7 +29,10 @@
|
|||||||
/**
|
/**
|
||||||
* LayoutMain
|
* LayoutMain
|
||||||
*/
|
*/
|
||||||
import { computed } from 'vue';
|
import {
|
||||||
|
ref,
|
||||||
|
computed,
|
||||||
|
} from 'vue';
|
||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
import Fireworks from '@/components/fireworks.vue';
|
import Fireworks from '@/components/fireworks.vue';
|
||||||
import Lantern from '@/components/lantern.vue';
|
import Lantern from '@/components/lantern.vue';
|
||||||
@ -37,6 +40,8 @@ import LayoutHeader from './components/header.vue';
|
|||||||
import LayoutFooter from './components/footer.vue';
|
import LayoutFooter from './components/footer.vue';
|
||||||
import SearchBox from './components/search-box.vue';
|
import SearchBox from './components/search-box.vue';
|
||||||
|
|
||||||
|
const windowWidth = ref(window.innerWidth);
|
||||||
|
|
||||||
const layoutGroupStyle = computed(() => {
|
const layoutGroupStyle = computed(() => {
|
||||||
const style = {};
|
const style = {};
|
||||||
if (config.nazhua.lightBackground) {
|
if (config.nazhua.lightBackground) {
|
||||||
@ -54,7 +59,23 @@ const layoutBGStyle = computed(() => {
|
|||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
||||||
const enableInnerSearch = computed(() => config.nazhua.enableInnerSearch);
|
const showFireworks = computed(() => {
|
||||||
|
if (windowWidth.value < 800) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return config.nazhua.showFireworks;
|
||||||
|
});
|
||||||
|
|
||||||
|
const enableInnerSearch = computed(() => {
|
||||||
|
if (typeof config.nazhua.enableInnerSearch === 'undefined') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return config.nazhua.enableInnerSearch;
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
windowWidth.value = window.innerWidth;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user