diff --git a/components.d.ts b/components.d.ts index d753653..a5bd864 100644 --- a/components.d.ts +++ b/components.d.ts @@ -24,11 +24,15 @@ declare module 'vue' { DMenu: typeof import('vue-devui/menu/index.es.js')['Menu'] DMenuItem: typeof import('vue-devui/menu/index.es.js')['MenuItem'] DModal: typeof import('vue-devui/modal/index.es.js')['Modal'] + DPopover: typeof import('vue-devui/popover/index.es.js')['Popover'] + DSearch: typeof import('vue-devui/search/index.es.js')['Search'] DSelect: typeof import('vue-devui/select/index.es.js')['Select'] DTab: typeof import('vue-devui/tabs/index.es.js')['Tab'] DTabs: typeof import('vue-devui/tabs/index.es.js')['Tabs'] + DUpload: typeof import('vue-devui/upload/index.es.js')['Upload'] HomeSide: typeof import('./src/components/homeSide.vue')['default'] - Menu: typeof import('./src/components/menu.vue')['default'] + Menu: typeof import('./src/components/menuH.vue')['default'] + MenuH: typeof import('./src/components/menuH.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/package.json b/package.json index 6fc7773..d3e61de 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@devui-design/icons": "^1.4.0", "@heroicons/vue": "^2.2.0", "@unocss/reset": "^66.3.3", + "@vicons/ionicons4": "^0.13.0", "aplayer": "^1.10.1", "axios": "^1.11.0", "devui-theme": "^0.0.7", @@ -29,8 +30,9 @@ "unocss": "^66.3.3", "unplugin-auto-import": "^19.3.0", "unplugin-vue-components": "^28.8.0", + "unplugin-vue-router": "^0.15.0", "vite-svg-loader": "^5.1.0", - "vue": "^3.5.18", + "vue": "^3.6.0-alpha.2", "vue-devui": "^1.6.33", "vue-router": "^4.5.1", "vue3-cookies": "^1.0.6", diff --git a/src/App.vue b/src/App.vue index b391568..007c684 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,8 @@ - + + @@ -18,6 +19,7 @@ diff --git a/src/api/file/index.ts b/src/api/file/index.ts index 5dfcb7c..43eb896 100644 --- a/src/api/file/index.ts +++ b/src/api/file/index.ts @@ -8,3 +8,19 @@ export function getFileList(params: Record) { params, }); } +//getMyList +export function getMyList(params: Record) { + return request({ + url: "/files/myfile", + method: "get", + params, + }); +} +//putShare +export function putShare(data: Record) { + return request({ + url: `/files/${data.pid}`, + method: "put", + data, + }); +} \ No newline at end of file diff --git a/src/assets/images/中秋节中国风边框34.png b/src/assets/images/中秋节中国风边框34.png new file mode 100644 index 0000000..18652a0 Binary files /dev/null and b/src/assets/images/中秋节中国风边框34.png differ diff --git a/src/assets/images/剑-粉.png b/src/assets/images/剑-粉.png new file mode 100644 index 0000000..d12b014 Binary files /dev/null and b/src/assets/images/剑-粉.png differ diff --git a/src/assets/images/剑.png b/src/assets/images/剑.png new file mode 100644 index 0000000..af7262c Binary files /dev/null and b/src/assets/images/剑.png differ diff --git a/src/assets/images/复古.png b/src/assets/images/复古.png new file mode 100644 index 0000000..e15a0e4 Binary files /dev/null and b/src/assets/images/复古.png differ diff --git a/src/assets/images/嫦娥.png b/src/assets/images/嫦娥.png new file mode 100644 index 0000000..5ab09d5 Binary files /dev/null and b/src/assets/images/嫦娥.png differ diff --git a/src/assets/images/小鹿.png b/src/assets/images/小鹿.png new file mode 100644 index 0000000..92271f6 Binary files /dev/null and b/src/assets/images/小鹿.png differ diff --git a/src/assets/images/树枝桃.png b/src/assets/images/树枝桃.png new file mode 100644 index 0000000..0d41b10 Binary files /dev/null and b/src/assets/images/树枝桃.png differ diff --git a/src/assets/images/灯笼.png b/src/assets/images/灯笼.png new file mode 100644 index 0000000..7cb1dd6 Binary files /dev/null and b/src/assets/images/灯笼.png differ diff --git a/src/components/homeSide.vue b/src/components/homeSide.vue index 823950b..38841e7 100644 --- a/src/components/homeSide.vue +++ b/src/components/homeSide.vue @@ -1,17 +1,19 @@ - - - - - 时间日期 - - - - {{ t }} - {{ d }} - - + + + + + + 时间日期 + + + + {{ t }} + {{ d }} + + + @@ -117,4 +119,9 @@ onUnmounted(() => { src: url('@/assets/font/LCDML.woff2'); } +.dt-card { + background-image: url('@/assets/images/中秋节中国风边框34.png'); + background-size: 100% 100%; + padding: 20px 40px; +} \ No newline at end of file diff --git a/src/components/menu.vue b/src/components/menuH.vue similarity index 99% rename from src/components/menu.vue rename to src/components/menuH.vue index 531ba99..c25d877 100644 --- a/src/components/menu.vue +++ b/src/components/menuH.vue @@ -164,10 +164,11 @@ function toLogin() { onMounted(() => { - console.log(route.name); + userinfo.value = $cookies.get('userinfo'); console.log('>>>>>>>>>>', userinfo.value); key.value = route.name as string; + console.log('>>> --> route.name:', route.name) getLocation(); // 组件挂载时获取位置 const h: number = nav.value.clientHeight diff --git a/src/icon/download.svg b/src/icon/download.svg new file mode 100644 index 0000000..84a06ff --- /dev/null +++ b/src/icon/download.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icon/lock.svg b/src/icon/lock.svg new file mode 100644 index 0000000..e1edeab --- /dev/null +++ b/src/icon/lock.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/icon/unlock.svg b/src/icon/unlock.svg new file mode 100644 index 0000000..ef22c0f --- /dev/null +++ b/src/icon/unlock.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main.ts b/src/main.ts index 8dc5da5..ec4cea9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,7 @@ import { useConfig } from "@/config"; import icon from "@/icon/index.ts"; import { createPinia } from "pinia"; import "virtual:uno.css"; -import { createApp } from "vue"; +import { createApp, vaporInteropPlugin } from "vue"; import App from "./App.vue"; import router from "./router"; // 自定义主题配置 - 设置主色和二级色 @@ -16,6 +16,7 @@ const themeService = ThemeServiceInit({ infinityTheme }, "infinityTheme"); themeService?.applyTheme(sweetTheme); const app = createApp(App); +app.use(vaporInteropPlugin) app.use(createPinia()); app.use(router); diff --git a/src/router/index.ts b/src/router/index.ts index f0ead0f..bb32ad8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,100 +1,21 @@ import { createRouter, createWebHistory } from "vue-router"; - -import layout from "@/Layout.vue"; -import Home from '@/views/Home.vue'; +import { routes } from 'vue-router/auto-routes'; +// import layout from "@/Layout.vue"; +// import Home from '@/views/Home.vue'; // 导入视图组件 - 修改为@开头的懒加载路径 -const Gallery = () => import("@/views/Gallery.vue"); -const Article = () => import("@/views/Article.vue"); -const Widget = () => import("@/views/Widget.vue"); -const AppShare = () => import("@/views/AppShare.vue"); -const Plink = () => import("@/views/Plink.vue"); -const Login = () => import("@/views/login/Login.vue"); -const NotFound = () => import("@/views/NotFound.vue"); +// const Gallery = () => import("@/views/Gallery.vue"); +// const Article = () => import("@/views/Article.vue"); +// const Widget = () => import("@/views/Widget.vue"); +// const AppShare = () => import("@/views/AppShare.vue"); +// const Plink = () => import("@/views/Plink.vue"); +// const Login = () => import("@/views/Login.vue"); +// const NotFound = () => import("@/views/NotFound.vue"); const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: "/", - - meta: {}, - children: [ - { - path: "/", - component: layout, - redirect: {name:'home'}, - children: [ - { - path: "/home", - name: "home", - component: Home, - meta: { - title:'首页' - }, - }, - { - path: "/gallery", - name: "gallery", - component: Gallery, - meta: { - title:'画廊' - }, - }, - { - path: "/article", - name: "article", - component: Article, - meta: { - title:'文章' - }, - }, - { - path: "/widget", - name: "widget", - component: Widget, - meta: { - title:'工具' - }, - }, - { - path: "/appshare", - name: "appShare", - component: AppShare, - meta: { - title:'软件分享' - }, - }, - { - path: "/plink", - name: "plink", - component: Plink, - meta: { - title:'友链' - }, - }, - ], - }, - { - path: "/login", - name: "login", - component: Login, - meta: { - title:'登录' - }, - }, - { - path: "/404", - name: "404", - component: NotFound, - meta: { - title:'错误页' - }, - }, - ], - }, - ], + routes:routes as any }); export default router; diff --git a/src/views/Gallery.vue b/src/views/Gallery.vue index fe2842a..bae8a75 100644 --- a/src/views/Gallery.vue +++ b/src/views/Gallery.vue @@ -1,8 +1,10 @@ - - + + + + class="gallery-item group relative my-[10px] rounded-lg overflow-hidden transition-transform duration-300 box-border hover:-translate-y-1.5"> + + {{ item.filename }} + + 由 {{ item.nickname }} 上传 + + + + 加载中... + 已全部加载完成 + + + + + + + + + 将文件拖到此处,或 + 点击上传 + + 注意图片大小不要大于5MB哟~ + + + + + + + + + + + {{ item.filename }} + + + + + 已共享 + 未共享 + + + + + + + + + + + + + + + + + + 加载中... + 已全部加载完成 - 我的 + + + + + + + + + +