mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-21 03:50:10 +08:00
Compare commits
2 Commits
9f2c90c5fa
...
f446221f45
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f446221f45 | ||
|
|
068c7e09e9 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nazhua",
|
"name": "nazhua",
|
||||||
"version": "0.5.5",
|
"version": "0.5.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -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