From fe0b9edf016d40487baf64905062b822740a4760 Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Mon, 28 Oct 2024 19:05:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=BA=86=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/GlobalMenu.tsx | 1 - src/layout/adder/AdderPage.tsx | 2 -- src/layout/adder/CustomAdder.tsx | 1 - src/layout/adder/GameAdder.tsx | 5 +---- src/layout/adder/HotAdder.tsx | 2 -- src/layout/adder/WidgetAdder.tsx | 2 -- src/layout/grid/SearchSetting.tsx | 2 +- src/layout/header/search/SearchAdder.tsx | 1 - src/layout/useLayoutStore.ts | 5 ----- src/utils/CategoryTab.tsx | 1 - src/utils/ImageUploader.tsx | 1 - src/utils/Rect.tsx | 1 - 12 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/layout/GlobalMenu.tsx b/src/layout/GlobalMenu.tsx index 2fd2ddd..7f348de 100644 --- a/src/layout/GlobalMenu.tsx +++ b/src/layout/GlobalMenu.tsx @@ -81,7 +81,6 @@ export default defineComponent(() => { menu.show && (
{ - console.log(2333) menu.dismiss() }} class="fixed px-2 pt-4 pb-2 bg-white/60 backdrop-blur shadow-lg rounded-lg overflow-hidden w-[120px]" diff --git a/src/layout/adder/AdderPage.tsx b/src/layout/adder/AdderPage.tsx index 4d34101..f8aa9ae 100644 --- a/src/layout/adder/AdderPage.tsx +++ b/src/layout/adder/AdderPage.tsx @@ -3,11 +3,9 @@ import { defineComponent, provide, ref, - Transition, type InjectionKey, type Ref } from 'vue' -import AdderPageBack from './AdderPageBack' import useLayoutStore from '../useLayoutStore' import { OhVueIcon, addIcons } from 'oh-vue-icons' import { diff --git a/src/layout/adder/CustomAdder.tsx b/src/layout/adder/CustomAdder.tsx index ca989d5..368c284 100644 --- a/src/layout/adder/CustomAdder.tsx +++ b/src/layout/adder/CustomAdder.tsx @@ -3,7 +3,6 @@ import useLayoutStore from '../useLayoutStore' import { Button, Form, Input, InputGroup } from 'ant-design-vue' import { OhVueIcon, addIcons } from 'oh-vue-icons' import { MdUpload, MdImage, MdCheck } from 'oh-vue-icons/icons' -import ImageUploader from '@/utils/ImageUploader' import useLink from '../../utils/useLink' import { CheckOutlined } from '@ant-design/icons-vue' import { v4 as uuid } from 'uuid' diff --git a/src/layout/adder/GameAdder.tsx b/src/layout/adder/GameAdder.tsx index 61df251..ba7b19c 100644 --- a/src/layout/adder/GameAdder.tsx +++ b/src/layout/adder/GameAdder.tsx @@ -1,12 +1,10 @@ import CategoryTab from '@/utils/CategoryTab' import request from '@/utils/request' -import { computed, defineComponent, inject, onMounted, ref, watch } from 'vue' -import type { BackgroundType } from '../background/BackgroundSwtich' +import { computed, defineComponent, inject, ref, watch } from 'vue' import clsx from 'clsx' import useLayoutStore from '../useLayoutStore' import { AddToToken } from './AdderPage' import { v4 as uuid } from 'uuid' -import { Button } from 'ant-design-vue' import { frontAddress, ossBase } from '@/config' import dayjs from 'dayjs' import { generateRandomString } from '@/utils/tool' @@ -161,7 +159,6 @@ export default defineComponent(() => { } else { try { Promise.all([fetchGame(1), fetchGame(2), fetchGame(3)]).then((res) => { - console.log(res.flat()) const resData = res.flat() as OtherGame[] appList.value = resData.map((el) => ({ id: el.id.toString(), diff --git a/src/layout/adder/HotAdder.tsx b/src/layout/adder/HotAdder.tsx index 4793773..f0b7c19 100644 --- a/src/layout/adder/HotAdder.tsx +++ b/src/layout/adder/HotAdder.tsx @@ -6,7 +6,6 @@ import clsx from 'clsx' import useLayoutStore from '../useLayoutStore' import { AddToToken } from './AdderPage' import { v4 as uuid } from 'uuid' -import { Button } from 'ant-design-vue' interface HotAppCategoryType { id: string @@ -129,7 +128,6 @@ export default defineComponent(() => { const categoryList = ref([]) const selectType = ref('') onMounted(() => { - console.log('hot') request('GET', '/api/app/hotAppTypes').then((res) => { categoryList.value = res.map((el) => ({ id: el.id, diff --git a/src/layout/adder/WidgetAdder.tsx b/src/layout/adder/WidgetAdder.tsx index 8952f59..29102a4 100644 --- a/src/layout/adder/WidgetAdder.tsx +++ b/src/layout/adder/WidgetAdder.tsx @@ -1,7 +1,6 @@ import { computed, defineComponent, inject } from 'vue' import useLayoutStore from '../useLayoutStore' import widgetList, { type Widget } from '@/widgets' -import { Button } from 'ant-design-vue' import clsx from 'clsx' import { AddToToken } from './AdderPage' import { v4 as uuid } from 'uuid' @@ -18,7 +17,6 @@ export const WidgetItem = defineComponent({ const isGame = computed(() => layout.state.current === 0) const addTo = inject(AddToToken) const isExist = computed(() => { - console.log(layout.state.content[layout.state.currentPage].pages) return ( layout.state.content[layout.state.current].pages[layout.state.currentPage].list.findIndex( diff --git a/src/layout/grid/SearchSetting.tsx b/src/layout/grid/SearchSetting.tsx index 7ecae64..129a2d6 100644 --- a/src/layout/grid/SearchSetting.tsx +++ b/src/layout/grid/SearchSetting.tsx @@ -1,6 +1,6 @@ import SettingItem from '@/settings/SettingItem' import useSettingsStore from '@/settings/useSettingsStore' -import { Select, Slider, Switch, type SelectProps } from 'ant-design-vue' +import { Select, Switch, type SelectProps } from 'ant-design-vue' import { defineComponent, ref } from 'vue' import useSearchConfigStore from '../header/search/useSearchConfigStore' diff --git a/src/layout/header/search/SearchAdder.tsx b/src/layout/header/search/SearchAdder.tsx index 6a6aea6..ff32be9 100644 --- a/src/layout/header/search/SearchAdder.tsx +++ b/src/layout/header/search/SearchAdder.tsx @@ -37,7 +37,6 @@ export default defineComponent({ layout="vertical" model={addState} onFinish={(res) => { - console.log(res) }} > diff --git a/src/layout/useLayoutStore.ts b/src/layout/useLayoutStore.ts index 0000802..5341442 100644 --- a/src/layout/useLayoutStore.ts +++ b/src/layout/useLayoutStore.ts @@ -33,7 +33,6 @@ export default defineStore('layout', () => { [ready, state], ([re, s]) => { if (!re) return - console.log(toRaw(s)) db.setItem('layout', toRaw(s)) }, { deep: true } @@ -65,8 +64,6 @@ export default defineStore('layout', () => { // 添加图标 const addBlock = (block: Block, _page: number = -1) => { const page = _page >= 0 ? _page : state.currentPage - console.log(page) - console.log(state.content[state.current].pages[page]) if (!state.content[state.current].pages[page]) { globalToast.warning('请先添加页面') return @@ -99,8 +96,6 @@ export default defineStore('layout', () => { } // 处理不同的组件的名称 if (block.name === 'gameVideo') { - console.log(state.currentPage); - console.log(block); return state.current === 0 ? '游戏视频' : state.current === 1 ? '学习视频' : '娱乐视频' } diff --git a/src/utils/CategoryTab.tsx b/src/utils/CategoryTab.tsx index b077cc5..788edeb 100644 --- a/src/utils/CategoryTab.tsx +++ b/src/utils/CategoryTab.tsx @@ -51,7 +51,6 @@ export default defineComponent({ () => { const idx = props.list.findIndex((item) => item.id === props.selectType) if (idx === -1) return - console.log(tabRefs.value) if (tabRefs.value[idx]) { const childRef = tabRefs.value[idx] diff --git a/src/utils/ImageUploader.tsx b/src/utils/ImageUploader.tsx index 070d580..20ee600 100644 --- a/src/utils/ImageUploader.tsx +++ b/src/utils/ImageUploader.tsx @@ -45,7 +45,6 @@ export default defineComponent({ const file: File | undefined = el.files?.[0] el.value = '' if (!file) return - console.log(file.size, props.size) if (file.size > props.size * 1000 * 1000) { globalToast.warning(`大小不得超过${props.size}mb`) return diff --git a/src/utils/Rect.tsx b/src/utils/Rect.tsx index adb8560..af94ded 100644 --- a/src/utils/Rect.tsx +++ b/src/utils/Rect.tsx @@ -16,7 +16,6 @@ export default defineComponent({ const handle = () => { if (!dom) return const { width } = dom.getBoundingClientRect() - console.log(width) height.value = width * props.ratio } const listen = new ResizeObserver(handle)