From bcd9534a34650237ceaf35c71e0fe269a3e86c03 Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Tue, 29 Oct 2024 18:47:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=9B=BE=E7=89=87=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=B0/tab=E7=9B=AE=E5=BD=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fox/index.tsx | 4 +- src/layout/adder/AdderPage.tsx | 14 +--- src/layout/adder/HotAdder.tsx | 2 +- src/layout/adder/WidgetAdder.tsx | 11 ++- src/layout/background/BackgroundPage.tsx | 39 ++++----- src/layout/background/BackgroundSwtich.tsx | 21 +---- src/layout/background/CustomWallpaper.tsx | 3 +- src/layout/grid/BlockSettings.tsx | 6 +- src/layout/grid/LinkBlock.tsx | 4 +- src/layout/grid/SearchSetting.tsx | 30 ++++++- src/layout/grid/TimeSetting.tsx | 82 +++++++++++++++++++ src/layout/header/GlobalTime.tsx | 22 ++++- .../header/search/useSearchConfigStore.ts | 8 +- src/main.css | 7 ++ src/settings/SettingsOverlay.tsx | 5 +- src/settings/SettingsOverlayContent.tsx | 5 +- src/settings/useSettingsStore.ts | 7 +- src/utils/ThemeProvider.tsx | 4 +- src/widgets/calendar/index.ts | 2 +- src/widgets/constellation/Large.tsx | 6 +- src/widgets/constellation/Middle.tsx | 6 +- src/widgets/constellation/Modal.tsx | 26 +++--- src/widgets/constellation/Small.tsx | 6 +- src/widgets/constellation/index.ts | 2 +- src/widgets/constellation/starCicle.tsx | 2 +- src/widgets/demo/index.ts | 2 +- src/widgets/discount/Small.tsx | 6 +- src/widgets/discount/index.ts | 2 +- src/widgets/eat/Middle.tsx | 4 +- src/widgets/eat/index.ts | 2 +- src/widgets/gameNews/Modal.tsx | 2 +- src/widgets/gameNews/Small.tsx | 6 +- src/widgets/gameNews/index.ts | 2 +- src/widgets/gameVideo/index.ts | 2 +- src/widgets/hotspot/Large.tsx | 2 +- src/widgets/hotspot/Middle.tsx | 2 +- src/widgets/hotspot/Modal.tsx | 4 +- src/widgets/hotspot/Small.tsx | 4 +- src/widgets/hotspot/index.ts | 2 +- src/widgets/weApply/index.ts | 2 +- src/widgets/weather/Large.tsx | 2 +- src/widgets/weather/Middle.tsx | 2 +- src/widgets/weather/Modal.tsx | 2 +- src/widgets/weather/index.ts | 2 +- src/widgets/weather/weatherIcon.tsx | 2 +- vite.config.ts | 1 + 46 files changed, 244 insertions(+), 135 deletions(-) create mode 100644 src/layout/grid/TimeSetting.tsx diff --git a/src/fox/index.tsx b/src/fox/index.tsx index 64b2cc0..3bba3d0 100644 --- a/src/fox/index.tsx +++ b/src/fox/index.tsx @@ -22,10 +22,10 @@ const stageStrList = [ ] const load = async (stageStr: string) => { - await Assets.load({ alias: stageStr, src: `/fox/xiaohuli_${stageStr}.json` }) + await Assets.load({ alias: stageStr, src: `/tab/fox/xiaohuli_${stageStr}.json` }) await Assets.load({ alias: stageStr + '_atlas', - src: `/fox/xiaohuli_${stageStr}.atlas` + src: `/tab/fox/xiaohuli_${stageStr}.atlas` }) } diff --git a/src/layout/adder/AdderPage.tsx b/src/layout/adder/AdderPage.tsx index f8aa9ae..a8f2206 100644 --- a/src/layout/adder/AdderPage.tsx +++ b/src/layout/adder/AdderPage.tsx @@ -1,11 +1,4 @@ -import { - computed, - defineComponent, - provide, - ref, - type InjectionKey, - type Ref -} from 'vue' +import { computed, defineComponent, provide, ref, type InjectionKey, type Ref } from 'vue' import useLayoutStore from '../useLayoutStore' import { OhVueIcon, addIcons } from 'oh-vue-icons' import { @@ -21,6 +14,7 @@ import WidgetAdder from './WidgetAdder' import { Form, Input, Select } from 'ant-design-vue' import HotAdder from './HotAdder' import GameAdder from './GameAdder' +import work_add_main_checked from '/tab/icons/work_add_main_checked.png' addIcons(MdKeyboardcommandkey, FaCompass, FaPencilRuler, IoGameController) const ItemButton = defineComponent({ @@ -60,7 +54,7 @@ const ItemButton = defineComponent({ > {props.active && ( )} @@ -87,7 +81,7 @@ export default defineComponent(() => { isGame.value ? 'bg-[#2C2E3D]' : 'bg-[#fffc] backdrop-blur' )} // style={{ - // backgroundImage: `url('/bg/gameModel.png')`, + // backgroundImage: `url('/tab/bg/gameModel.png')`, // backgroundSize: '100% 100%' // }} > diff --git a/src/layout/adder/HotAdder.tsx b/src/layout/adder/HotAdder.tsx index f0b7c19..48cba44 100644 --- a/src/layout/adder/HotAdder.tsx +++ b/src/layout/adder/HotAdder.tsx @@ -34,7 +34,7 @@ export const LinkItem = defineComponent({ const addTo = inject(AddToToken) return () => (
layout.state.current === 0) const addTo = inject(AddToToken) const isExist = computed(() => { - return ( layout.state.content[layout.state.current].pages[layout.state.currentPage].list.findIndex( (el) => el?.name === props.content.name @@ -33,7 +32,10 @@ export const WidgetItem = defineComponent({ key={props.content.name} >
- +
{ return () => (
-
+
{widgetList.map((el) => ( ))} diff --git a/src/layout/background/BackgroundPage.tsx b/src/layout/background/BackgroundPage.tsx index 40f5e80..1281147 100644 --- a/src/layout/background/BackgroundPage.tsx +++ b/src/layout/background/BackgroundPage.tsx @@ -1,12 +1,9 @@ import { Button, Select, Slider } from 'ant-design-vue' -import { computed, defineComponent, ref, Transition, watch } from 'vue' +import { defineComponent, ref, Transition, watch } from 'vue' import useLayoutStore from '../useLayoutStore' -import Rect from '@/utils/Rect' -import useResource from './useResource' import { DownloadOutlined, EyeInvisibleOutlined, SwapOutlined } from '@ant-design/icons-vue' import SettingItem from '@/settings/SettingItem' import useSettingsStore from '@/settings/useSettingsStore' -import { v4 as uuid } from 'uuid' import useRouterStore from '@/useRouterStore' export default defineComponent(() => { @@ -24,7 +21,7 @@ export default defineComponent(() => { const settings = useSettingsStore() return () => ( -
+
{ label: () =>
遮罩浓度
}} > - +
+ +
{ label: () =>
遮罩模糊
}} > - +
+ +
{(settings.state.maskFilter > 0 || settings.state.maskOpacity > 0) && ( diff --git a/src/layout/background/BackgroundSwtich.tsx b/src/layout/background/BackgroundSwtich.tsx index a3d0997..a85d971 100644 --- a/src/layout/background/BackgroundSwtich.tsx +++ b/src/layout/background/BackgroundSwtich.tsx @@ -9,28 +9,11 @@ import request from '@/utils/request' import useUserStore from '@/user/useUserStore' import useRouterStore from '@/useRouterStore' import useBackgroundStore from './useBackgroundStore' -import { Button } from 'ant-design-vue' import CustomWallpaper from './CustomWallpaper' addIcons(BiChevronLeft, BiChevronDown) -const typeList = [ - '热门', - 'COSPALY', - '二次元', - '风景', - '插画', - '热门', - 'COSPALY', - '二次元', - '风景', - '插画', - '热门', - 'COSPALY', - '二次元', - '风景', - '插画' -] + const wallpaperAttrList = ['动态壁纸', '静态壁纸', '自定义壁纸'] export type BackgroundType = { id: string @@ -90,7 +73,7 @@ export default defineComponent(() => { style={ isGame.value ? { - backgroundImage: `url('/bg/gameModel.png')`, + backgroundImage: `url('/tab/bg/gameModel.png')`, backgroundSize: '100% 100%' } : null diff --git a/src/layout/background/CustomWallpaper.tsx b/src/layout/background/CustomWallpaper.tsx index bac5140..7793228 100644 --- a/src/layout/background/CustomWallpaper.tsx +++ b/src/layout/background/CustomWallpaper.tsx @@ -64,7 +64,7 @@ export default defineComponent(() => { tempBackground.value ? 'bg-black/50 hidden group-hover:flex' : 'flex' )} > - 123 + 123 @@ -95,7 +95,6 @@ export default defineComponent(() => { onClick={() => { if (tempFile.value) { uploadLocal(tempFile.value).then((res) => { - useLayoutStore().changeBackground(res) tempFile.value = null diff --git a/src/layout/grid/BlockSettings.tsx b/src/layout/grid/BlockSettings.tsx index 5f8af26..c5f70f5 100644 --- a/src/layout/grid/BlockSettings.tsx +++ b/src/layout/grid/BlockSettings.tsx @@ -44,10 +44,10 @@ export default defineComponent(() => {
diff --git a/src/layout/grid/LinkBlock.tsx b/src/layout/grid/LinkBlock.tsx index 446ca32..cec8f0a 100644 --- a/src/layout/grid/LinkBlock.tsx +++ b/src/layout/grid/LinkBlock.tsx @@ -52,7 +52,7 @@ export default defineComponent({ window.open(props.block.link, '_blank') }} style={{ - backgroundImage: `url('/bg/game.webp')` + backgroundImage: `url('/tab/bg/game.webp')` }} > game icon @@ -61,7 +61,7 @@ export default defineComponent({ {props.block.label}
- game_icon + game_icon
) } diff --git a/src/layout/grid/SearchSetting.tsx b/src/layout/grid/SearchSetting.tsx index 129a2d6..c5d94bb 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, Switch, type SelectProps } from 'ant-design-vue' +import { Select, Slider, Switch, type SelectProps } from 'ant-design-vue' import { defineComponent, ref } from 'vue' import useSearchConfigStore from '../header/search/useSearchConfigStore' @@ -24,7 +24,20 @@ export default defineComponent({ label: () =>
搜索栏圆角
}} > - +
+
+ +
+ + {settings.state.searchRadius}px + +
搜索栏透明
}} > - +
+
+ +
+ {settings.state.searchOpacity} +
( + [...searchStore.defaultList, ...searchStore.customList].map((item) => ({ + value: item.name, + label: item.name + })) + ) + return () => ( +
+
显示时间
+ }} + > + +
{' '} +
+ 时间的样式 +
+ {list.map((item) => ( +
{ + if (settings.state.timeOptions.includes(item.value)) { + settings.state.timeOptions = settings.state.timeOptions.filter( + (el) => el !== item.value + ) + } else { + settings.state.timeOptions.push(item.value) + } + }} + class={clsx( + ' items-center justify-center flex rounded py-1 cursor-pointer', + settings.state.timeOptions.includes(item.value) + ? 'bg-[#ffa93d] text-white' + : 'bg-black/[0.05] text-[#999] ' + )} + > + {item.label} +
+ ))} +
+
+
+ ) + } +}) diff --git a/src/layout/header/GlobalTime.tsx b/src/layout/header/GlobalTime.tsx index 4140a71..f269bd9 100644 --- a/src/layout/header/GlobalTime.tsx +++ b/src/layout/header/GlobalTime.tsx @@ -8,6 +8,12 @@ export default defineComponent({ setup() { const time = useTimeStore() const text = computed(() => { + if (!useSettingsStore().state.timeOptions.includes('12hour')) { + return { + timeStr: `${time.date.getHours()}:${time.date.getMinutes()}:${time.date.getSeconds()}`, + dateStr: `${time.date.getMonth() + 1}月${time.date.getDate()}日` + } + } const h = time.date.getHours() const hour = h < 10 ? '0' + h : h const m = time.date.getMinutes() @@ -43,7 +49,7 @@ export default defineComponent({ }} > - {settings.state.showDate && ( + {settings.state.showTime && (
-
{text.value.dateStr}
- {!layout.isCompact &&
星期{info.value.dayWeek}
}
- {!layout.isCompact &&
{info.value.day}
}
+ {settings.state.timeOptions.includes('date') &&
{text.value.dateStr}
} + + {!layout.isCompact && settings.state.timeOptions.includes('week') && ( +
星期{info.value.dayWeek}
+ )} +
+ + {!layout.isCompact && settings.state.timeOptions.includes('lunal') && ( +
{info.value.day}
+ )} +
)}
diff --git a/src/layout/header/search/useSearchConfigStore.ts b/src/layout/header/search/useSearchConfigStore.ts index afefb1f..65e9c25 100644 --- a/src/layout/header/search/useSearchConfigStore.ts +++ b/src/layout/header/search/useSearchConfigStore.ts @@ -12,25 +12,25 @@ const defaultSearchList: SearchInfo[] = [ { name: '百度', url: 'https://www.baidu.com/s?wd=', - icon: 'searchIcons/baidu.png', + icon: 'tab/searchIcons/baidu.png', show: true }, { name: '必应', url: 'https://cn.bing.com/search?q=', - icon: 'searchIcons/bing.png', + icon: 'tab/searchIcons/bing.png', show: true }, { name: '谷歌', url: 'https://www.google.com/search?q=', - icon: 'searchIcons/google.png', + icon: 'tab/searchIcons/google.png', show: true }, { name: '360', url: 'https://www.so.com/s?q=', - icon: 'searchIcons/360.png', + icon: 'tab/searchIcons/360.png', show: true } diff --git a/src/main.css b/src/main.css index d5a92a6..c2c8c63 100644 --- a/src/main.css +++ b/src/main.css @@ -30,6 +30,13 @@ body { /* ! 全局禁用鼠标选择,需要在其他位置放开 */ user-select: none; } + +.ant-slider-rail { + background-color: #0000001a !important; +} +.ant-slider-track { + background-color: #ffa94d !important; +} @keyframes loading { 0% { transform: rotate(0deg); diff --git a/src/settings/SettingsOverlay.tsx b/src/settings/SettingsOverlay.tsx index 8cdee31..05a7446 100644 --- a/src/settings/SettingsOverlay.tsx +++ b/src/settings/SettingsOverlay.tsx @@ -50,8 +50,8 @@ export default defineComponent(() => { {/* 弹框主体 */} {show.value && ( -
-
+
+
{
+
diff --git a/src/settings/SettingsOverlayContent.tsx b/src/settings/SettingsOverlayContent.tsx index c7a1caa..8ef3bb5 100644 --- a/src/settings/SettingsOverlayContent.tsx +++ b/src/settings/SettingsOverlayContent.tsx @@ -5,12 +5,13 @@ import BackgroundPage from '@/layout/background/BackgroundPage' import ThemeProvider from '@/utils/ThemeProvider' import BlockSettings from '@/layout/grid/BlockSettings' import SearchSetting from '@/layout/grid/SearchSetting' +import TimeSetting from '@/layout/grid/TimeSetting' export default defineComponent(() => { const router = useRouterStore() return () => ( -
+
{router.path === 'settings-user' ? ( @@ -20,6 +21,8 @@ export default defineComponent(() => { ) : router.path === 'settings-search' ? ( + ) : router.path === 'settings-time' ? ( + ) : null}
diff --git a/src/settings/useSettingsStore.ts b/src/settings/useSettingsStore.ts index 9e6e3b4..3d824d0 100644 --- a/src/settings/useSettingsStore.ts +++ b/src/settings/useSettingsStore.ts @@ -2,7 +2,7 @@ import { defineStore } from 'pinia' import { computed, reactive } from 'vue' export type VisibleState = 'show' | 'auto' | '' - +export type TimeUnit = 'date' | 'week' | '12hour' | 'lunal' | 'second'; export default defineStore( 'settings', () => { @@ -15,8 +15,8 @@ export default defineStore( showSider: 'show' as VisibleState, showDock: 'show' as VisibleState, showPet: 'show' as VisibleState, - showDate: true, showTime: true, + timeOptions: ['date', 'week', '12hour', 'lunal', 'second'] as TimeUnit[], showAdder: true, showHistory: true, // 尺寸 @@ -27,7 +27,8 @@ export default defineStore( showBlockLabel: true, // 搜索 searchWidth: 30, - searchRadius: 12 + searchRadius: 12, + searchOpacity: 0.75 }) return { state, blockInner: computed(() => state.blockSize - 2 * state.blockPadding) } diff --git a/src/utils/ThemeProvider.tsx b/src/utils/ThemeProvider.tsx index 346f726..24395d1 100644 --- a/src/utils/ThemeProvider.tsx +++ b/src/utils/ThemeProvider.tsx @@ -19,10 +19,10 @@ export default defineComponent({ colorBgBase: props.dark ? '#393a41' : '#fff', colorBorder: 'transparent' }, - + components: { Slider: { - + railSize: 6 }, Button: { colorPrimary: '#f88e14' diff --git a/src/widgets/calendar/index.ts b/src/widgets/calendar/index.ts index a8445f9..933419b 100644 --- a/src/widgets/calendar/index.ts +++ b/src/widgets/calendar/index.ts @@ -5,7 +5,7 @@ export default { name: 'calendar', label: '日历', description: '日历信息', - icon: '/icons/calendarIcon.png', + icon: '/tab/icons/calendarIcon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/constellation/Large.tsx b/src/widgets/constellation/Large.tsx index 81e92bb..4555fd8 100644 --- a/src/widgets/constellation/Large.tsx +++ b/src/widgets/constellation/Large.tsx @@ -10,7 +10,7 @@ export default defineComponent(() => {
{
{ > {zodiacMap.get(store.state.selectCode)} diff --git a/src/widgets/constellation/Middle.tsx b/src/widgets/constellation/Middle.tsx index f08d1f0..bfe89ec 100644 --- a/src/widgets/constellation/Middle.tsx +++ b/src/widgets/constellation/Middle.tsx @@ -9,7 +9,7 @@ export default defineComponent(() => {
{
{dayjs().format('YYYY.MM.DD')} @@ -35,7 +35,7 @@ export default defineComponent(() => { {zodiacMap.get(store.state.selectCode)} diff --git a/src/widgets/constellation/Modal.tsx b/src/widgets/constellation/Modal.tsx index 604590b..2bcf467 100644 --- a/src/widgets/constellation/Modal.tsx +++ b/src/widgets/constellation/Modal.tsx @@ -11,7 +11,7 @@ export default defineComponent(() => {
{ @@ -22,27 +22,27 @@ export default defineComponent(() => {
{zodiacMap.get(store.state.selectCode)} { open.value = true @@ -64,7 +64,7 @@ export default defineComponent(() => { 'absolute top-1/2 -translate-y-1/2 hover:scale-110 duration-150 w-10 cursor-pointer', page.value === 1 ? 'right-5' : 'left-5 rotate-180 ' )} - src="/icons/constellation/xingzuo_right.png" + src="/tab/icons/constellation/xingzuo_right.png" >
{Array.from(zodiacMap) @@ -82,7 +82,7 @@ export default defineComponent(() => { >
@@ -111,8 +111,8 @@ export default defineComponent(() => { index - ? '/icons/stared.png' - : '/icons/starun.png' + ? '/tab/icons/stared.png' + : '/tab/icons/starun.png' } class={'w-[20px] h-[20px]'} > @@ -126,8 +126,8 @@ export default defineComponent(() => { index - ? '/icons/stared.png' - : '/icons/starun.png' + ? '/tab/icons/stared.png' + : '/tab/icons/starun.png' } class={'w-[20px] h-[20px]'} > @@ -141,8 +141,8 @@ export default defineComponent(() => { index - ? '/icons/stared.png' - : '/icons/starun.png' + ? '/tab/icons/stared.png' + : '/tab/icons/starun.png' } class={'w-[20px] h-[20px]'} > diff --git a/src/widgets/constellation/Small.tsx b/src/widgets/constellation/Small.tsx index b4c4562..a241753 100644 --- a/src/widgets/constellation/Small.tsx +++ b/src/widgets/constellation/Small.tsx @@ -5,18 +5,18 @@ export default defineComponent(() => {
- +
游戏折扣
立即查看
- +
diff --git a/src/widgets/constellation/index.ts b/src/widgets/constellation/index.ts index 3c76508..9e48747 100644 --- a/src/widgets/constellation/index.ts +++ b/src/widgets/constellation/index.ts @@ -5,7 +5,7 @@ export default { name: 'constellation', label: '星座运势', description: '你可查看星座运势', - icon: '/icons/constellation_icon.png', + icon: '/tab/icons/constellation_icon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/constellation/starCicle.tsx b/src/widgets/constellation/starCicle.tsx index f98340a..8d5ad7a 100644 --- a/src/widgets/constellation/starCicle.tsx +++ b/src/widgets/constellation/starCicle.tsx @@ -27,7 +27,7 @@ export default defineComponent({ backgroundPosition: 'center' }} > - + import('./Modal')), list: [ { diff --git a/src/widgets/discount/Small.tsx b/src/widgets/discount/Small.tsx index d759fd7..53b2455 100644 --- a/src/widgets/discount/Small.tsx +++ b/src/widgets/discount/Small.tsx @@ -6,18 +6,18 @@ export default defineComponent(() => {
- +
游戏折扣
立即查看
- +
diff --git a/src/widgets/discount/index.ts b/src/widgets/discount/index.ts index 1bac048..75fbae6 100644 --- a/src/widgets/discount/index.ts +++ b/src/widgets/discount/index.ts @@ -5,7 +5,7 @@ export default { name: 'discount', label: '游戏折扣', description: '游戏折扣', - icon: '/icons/discounts_icon.png', + icon: '/tab/icons/discounts_icon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/eat/Middle.tsx b/src/widgets/eat/Middle.tsx index 71ff2ce..f289201 100644 --- a/src/widgets/eat/Middle.tsx +++ b/src/widgets/eat/Middle.tsx @@ -81,7 +81,7 @@ export default defineComponent(() => {
{ @@ -89,7 +89,7 @@ export default defineComponent(() => { }} >
- eat_bg + eat_bg
{ }} >
- +
diff --git a/src/widgets/gameNews/Small.tsx b/src/widgets/gameNews/Small.tsx index 35947e4..c4cea1c 100644 --- a/src/widgets/gameNews/Small.tsx +++ b/src/widgets/gameNews/Small.tsx @@ -7,18 +7,18 @@ export default defineComponent(() => {
- +
游戏资讯
立即查看
- +
diff --git a/src/widgets/gameNews/index.ts b/src/widgets/gameNews/index.ts index 46a5db7..5f92e14 100644 --- a/src/widgets/gameNews/index.ts +++ b/src/widgets/gameNews/index.ts @@ -5,7 +5,7 @@ export default { name: 'gameNews', label: '游戏资讯', description: '游戏资讯', - icon: '/icons/game_news_icon.png', + icon: '/tab/icons/game_news_icon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/gameVideo/index.ts b/src/widgets/gameVideo/index.ts index 93d74e8..5a8d17c 100644 --- a/src/widgets/gameVideo/index.ts +++ b/src/widgets/gameVideo/index.ts @@ -5,7 +5,7 @@ export default { name: 'gameVideo', label: 'gameVideo', description: 'gameVideoDesc', - icon: '/icons/game_video.png', + icon: '/tab/icons/game_video.png', modal: null, list: [ { diff --git a/src/widgets/hotspot/Large.tsx b/src/widgets/hotspot/Large.tsx index 8238048..0fc0d14 100644 --- a/src/widgets/hotspot/Large.tsx +++ b/src/widgets/hotspot/Large.tsx @@ -23,7 +23,7 @@ export default defineComponent(() => { {value} {store.type === key && ( bg diff --git a/src/widgets/hotspot/Middle.tsx b/src/widgets/hotspot/Middle.tsx index faaa59d..812acf8 100644 --- a/src/widgets/hotspot/Middle.tsx +++ b/src/widgets/hotspot/Middle.tsx @@ -29,7 +29,7 @@ export default defineComponent(() => { {value} {store.type === key && ( bg diff --git a/src/widgets/hotspot/Modal.tsx b/src/widgets/hotspot/Modal.tsx index fb102af..343f4fc 100644 --- a/src/widgets/hotspot/Modal.tsx +++ b/src/widgets/hotspot/Modal.tsx @@ -8,7 +8,7 @@ export default defineComponent(() => { return () => (
- +
@@ -28,7 +28,7 @@ export default defineComponent(() => { )} > {value}热点 diff --git a/src/widgets/hotspot/Small.tsx b/src/widgets/hotspot/Small.tsx index 2704692..31a6ffa 100644 --- a/src/widgets/hotspot/Small.tsx +++ b/src/widgets/hotspot/Small.tsx @@ -7,14 +7,14 @@ export default defineComponent(() => { class="w-full h-full flex items-center px-3 bg-[#405fd2]" > - +
热点折扣
立即查看
- +
diff --git a/src/widgets/hotspot/index.ts b/src/widgets/hotspot/index.ts index 3a774a8..23f3844 100644 --- a/src/widgets/hotspot/index.ts +++ b/src/widgets/hotspot/index.ts @@ -5,7 +5,7 @@ export default { name: 'hotspot', label: '热点资讯', description: '热点信息尽在此处', - icon: '/icons/hot_information_icon.png', + icon: '/tab/icons/hot_information_icon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/weApply/index.ts b/src/widgets/weApply/index.ts index c349852..303bc0a 100644 --- a/src/widgets/weApply/index.ts +++ b/src/widgets/weApply/index.ts @@ -5,7 +5,7 @@ export default { name: 'weApply', label: '大家都在用', description: '盘点近期大热的应用软件和热门游戏', - icon: '/icons/recommendedIcon.png', + icon: '/tab/icons/recommendedIcon.png', modal: null, list: [ { diff --git a/src/widgets/weather/Large.tsx b/src/widgets/weather/Large.tsx index d6bc224..13756e7 100644 --- a/src/widgets/weather/Large.tsx +++ b/src/widgets/weather/Large.tsx @@ -59,7 +59,7 @@ export default defineComponent(() => {
{
{
- {store.weatherData?.city.name} + {nowWeather.value?.city.name} {nowWeather.value?.base.stemp}° {nowWeather.value?.base.weather} diff --git a/src/widgets/weather/index.ts b/src/widgets/weather/index.ts index 571cedb..6c69fec 100644 --- a/src/widgets/weather/index.ts +++ b/src/widgets/weather/index.ts @@ -5,7 +5,7 @@ export default { name: 'weather', label: '天气', description: '天气资讯', - icon: '/icons/weatherIcon.png', + icon: '/tab/icons/weatherIcon.png', modal: asyncLoader(() => import('./Modal')), list: [ { diff --git a/src/widgets/weather/weatherIcon.tsx b/src/widgets/weather/weatherIcon.tsx index e7ea211..0c99cac 100644 --- a/src/widgets/weather/weatherIcon.tsx +++ b/src/widgets/weather/weatherIcon.tsx @@ -91,7 +91,7 @@ export default defineComponent({ const idx = computed(() => list.indexOf(props.weather || '未知天气')) const url = computed(() => { - return idx.value < 0 ? '/weather_img/38.png' : `/weather_img/${idx.value}.png` + return idx.value < 0 ? '/tab/weather_img/38.png' : `/tab/weather_img/${idx.value}.png` }) return () => ( <> diff --git a/vite.config.ts b/vite.config.ts index 5c4d731..fd1ddb0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,6 +27,7 @@ export default defineConfig({ host: '0.0.0.0', port: 8200 }, + base: '/tab', resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url))