deps: 组件类型
This commit is contained in:
parent
6d3f790a57
commit
6863859f8d
@ -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);
|
||||
|
||||
@ -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");
|
||||
};
|
||||
|
||||
// 退出登录
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="snow-page">
|
||||
<a-card title="简介">
|
||||
<div>
|
||||
<p>SnowAdmin 一款基于 Vue、TypeScript、Vite5、Pinia、arco-design开源的后台管理框架,使用目前最新技术栈开发。</p>
|
||||
<p>SnowAdmin 一款基于 Vue、TypeScript、Vite5、Pinia、arco.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>
|
||||
|
||||
@ -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
4
src/vite-env.d.ts
vendored
@ -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";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user