deps: 组件类型

This commit is contained in:
WANGFan 2025-05-18 12:22:07 +08:00
parent 6d3f790a57
commit 6863859f8d
5 changed files with 14 additions and 8 deletions

View File

@ -1,13 +1,18 @@
import { computed } from "vue";
import { useWindowSize } from "@vueuse/core";
interface DeviceSize {
isPc: ComputedRef<boolean>;
isPad: ComputedRef<boolean>;
isMobile: ComputedRef<boolean>;
}
/**
* 768px
* 768px - 1024px
* 1024px
* @returns PC窗口isPc, isPad, isMobile
*/
export const useDevicesSize = () => {
export const useDevicesSize = (): DeviceSize => {
const { width } = useWindowSize();
const isPc = computed(() => width.value > 1024);
const isPad = computed(() => width.value > 768 && width.value <= 1024);

View File

@ -115,6 +115,7 @@ import { useThemeConfig } from "@/store/modules/theme-config";
import { useThemeMethods } from "@/hooks/useThemeMethods";
import { useDevicesSize } from "@/hooks/useDevicesSize";
import { useRoutesConfigStore } from "@/store/modules/route-config";
const i18n = useI18n();
const router = useRouter();
const { isMobile } = useDevicesSize();
@ -181,7 +182,7 @@ const onUpdate = () => {
//
const onProject = () => {
window.open("https://gitee.com/wang_fan_w/SnowAdmin", "_blank");
window.open("https://github.com/WANG-Fan0912/SnowAdmin", "_blank");
};
// 退

View File

@ -2,7 +2,7 @@
<div class="snow-page">
<a-card title="简介">
<div>
<p>SnowAdmin 一款基于 VueTypeScriptVite5Piniaarco-design开源的后台管理框架使用目前最新技术栈开发</p>
<p>SnowAdmin 一款基于 VueTypeScriptVite5Piniaarco.design开源的后台管理框架使用目前最新技术栈开发</p>
<p>融合了全新的UI框架高度可自定义的主题功能使得用户可以根据自身需求轻松定制界面</p>
<p>代码全注释可提供参考和学习</p>
</div>
@ -10,7 +10,7 @@
<a-card class="margin-top" title="项目信息">
<a-descriptions :column="2" bordered>
<a-descriptions-item v-for="item of projectInfo" :key="item.label" :label="item.label">
<a-link :href="item.value" v-if="item.link">{{ item.label }}</a-link>
<a-link :href="item.value" v-if="item.link" target="_blank">{{ item.label }}</a-link>
<span v-else>{{ item.value }}</span>
</a-descriptions-item>
</a-descriptions>

View File

@ -67,9 +67,9 @@ const list = reactive({
callMe: [
{ label: "📧邮箱", value: "2547096351@qq.com", link: false },
{ label: "📠微信", value: "fanction-w", link: false },
{ label: "🛰github", value: "兔子先森", link: true, url: "https://github.com/WANG-Fan0912" },
{ label: "📚思否", value: "兔子先森", link: true, url: "https://segmentfault.com/blog/dcodes" },
{ label: "✒️掘金", value: "兔子先森Ace", link: true, url: "https://juejin.cn/user/1728883023940600/posts" },
{ label: "🛰gitee", value: "兔子先森Ace", link: true, url: "https://gitee.com/wang_fan_w" }
{ label: "✒️掘金", value: "兔子先森Ace", link: true, url: "https://juejin.cn/user/1728883023940600/posts" }
],
other: [
{ label: "🧭公众号", value: "DCodes" },

4
src/vite-env.d.ts vendored
View File

@ -1,7 +1,7 @@
/// <reference types="vite/client" />
declare module "*.vue" {
import { defineComponent } from "vue";
const component: ReturnType<typeof defineComponent>;
import { DefineComponent } from "vue";
const component: DefineComponent<{}, {}, any>;
export default component;
}
declare module "vue-i18n";