项目初始化

This commit is contained in:
2026-03-19 10:57:24 +08:00
commit ee94d420ad
3822 changed files with 582614 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
<template>
<Footer :class="prefixCls" v-if="getShowLayoutFooter" ref="footerRef">
<div :class="`${prefixCls}__links`">
<a @click="openWindow(SITE_URL)">{{ t('layout.footer.onlinePreview') }}</a>
<Icon icon="i-ant-design:github-filled" @click="openWindow(GITHUB_URL)" :class="`${prefixCls}__github`" />
<a @click="openWindow(DOC_URL)">{{ t('layout.footer.onlineDocument') }}</a>
</div>
<div>Copyright &copy;2021 <a href="https://jeesite.com" target="_blank">JeeSite</a></div>
</Footer>
</template>
<script lang="ts">
import { computed, defineComponent, unref, ref } from 'vue';
import { Layout } from 'ant-design-vue';
import { Icon } from '@jeesite/core/components/Icon';
import { DOC_URL, GITHUB_URL, SITE_URL } from '@jeesite/core/settings/siteSetting';
import { openWindow } from '@jeesite/core/utils';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useRootSetting } from '@jeesite/core/hooks/setting/useRootSetting';
import { useRouter } from 'vue-router';
import { useDesign } from '@jeesite/core/hooks/web/useDesign';
import { useLayoutHeight } from '../content/useContentViewHeight';
export default defineComponent({
name: 'LayoutFooter',
components: { Footer: Layout.Footer, Icon },
setup() {
const { t } = useI18n();
const { getShowFooter } = useRootSetting();
const { currentRoute } = useRouter();
const { prefixCls } = useDesign('layout-footer');
const footerRef = ref<ComponentRef>(null);
const { setFooterHeight } = useLayoutHeight();
const getShowLayoutFooter = computed(() => {
if (unref(getShowFooter)) {
const footerEl = unref(footerRef)?.$el;
setFooterHeight(footerEl?.offsetHeight || 0);
} else {
setFooterHeight(0);
}
return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter;
});
return {
getShowLayoutFooter,
prefixCls,
t,
DOC_URL,
GITHUB_URL,
SITE_URL,
openWindow,
footerRef,
};
},
});
</script>
<style lang="less">
@prefix-cls: ~'jeesite-layout-footer';
.@{prefix-cls} {
text-align: center;
opacity: 0.7;
a {
color: @text-color-base !important;
&:hover {
opacity: 1;
}
}
&__links {
margin-bottom: 8px;
}
&__github {
margin: 0 30px;
cursor: pointer;
&:hover {
opacity: 1;
}
}
}
</style>