@@ -98,12 +111,18 @@ export default defineComponent(() => {
{
const file = e.target?.files?.[0]
if (!file) return
tempFile.value = file
+ if (file.type.includes('image')) {
+ type.value = 'img'
+ } else {
+ type.value = 'video'
+ }
tempBackground.value = URL.createObjectURL(file)
}}
/>
@@ -121,7 +140,6 @@ export default defineComponent(() => {
useLayoutStore().changeBackground(res)
backgroundStore.state.isCustom = true
tempFile.value = null
- tempBackground.value = ''
message.success('应用成功')
})
}
diff --git a/src/layout/background/index.tsx b/src/layout/background/index.tsx
index 1766224..c14ef7c 100644
--- a/src/layout/background/index.tsx
+++ b/src/layout/background/index.tsx
@@ -29,12 +29,14 @@ export const BgContent = defineComponent({
}}
>
{props.video ? (
-
+
) : (
)}
diff --git a/src/layout/grid/WelcomePage.tsx b/src/layout/grid/WelcomePage.tsx
index 4c73ff0..633b7c6 100644
--- a/src/layout/grid/WelcomePage.tsx
+++ b/src/layout/grid/WelcomePage.tsx
@@ -15,25 +15,25 @@ export const DefaultPageSetting = [
{
name: '游戏',
backgroundUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/831a4d4c-61ff-4bae-ad31-9c0f4fa2db1c.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/831a4d4c-61ff-4bae-ad31-9c0f4fa2db1c.webp',
contentUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/b2f3ed2f-f550-499b-8ea1-dfd192cfd388.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/b2f3ed2f-f550-499b-8ea1-dfd192cfd388.webp',
desct: '聚合多类游戏工具,以及 资讯、排行榜等'
},
{
name: '工作',
backgroundUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/b82fd47c-24c1-4f58-b0db-51414b3bdda4.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/b82fd47c-24c1-4f58-b0db-51414b3bdda4.webp',
contentUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/7e4cf74a-85cb-4e39-9e61-385b222ac8c4.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/7e4cf74a-85cb-4e39-9e61-385b222ac8c4.webp',
desct: '结合番茄计时法等效率工具,让您可以高效学习'
},
{
name: '轻娱',
backgroundUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/73164094-cb0d-4366-8d1a-afc84ac119cc.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/73164094-cb0d-4366-8d1a-afc84ac119cc.webp',
contentUrl:
- 'https://newfatfox.oss-cn-beijing.aliyuncs.com/000/user_upload/1/resource/bcbbffc6-c8a4-4c8e-8ba5-36fa1fbad4f9.webp',
+ 'https://oss.goosetab.com/000/user_upload/1/resource/bcbbffc6-c8a4-4c8e-8ba5-36fa1fbad4f9.webp',
desct: '综合办公、学习、游戏等 属性,功能较为均勺'
}
]
@@ -193,15 +193,13 @@ export default defineComponent(() => {
if (res) {
const affix = val.background.split('.').pop()
if (!affix) return
-
- console.log(`background${uuid()}.${affix}`)
- console.log(`${res.type}`)
-
const file = new File([res], `${uuid()}.${affix}`, {
type: `${res.type}`
})
uploadLocal(file).then((res2) => {
val.background = res2
+ console.log(res2);
+
})
}
})
diff --git a/src/layout/header/GlobalTime.tsx b/src/layout/header/GlobalTime.tsx
index d10287f..a9990db 100644
--- a/src/layout/header/GlobalTime.tsx
+++ b/src/layout/header/GlobalTime.tsx
@@ -46,6 +46,10 @@ export default defineComponent({
? 'text-[13px] flex z-20 items-center pointer-events-none gap-x-2'
: 'h-[110px]'
)}
+ onDblclick={(e) => {
+ e.stopPropagation()
+ layout.state.simple = !layout.state.simple
+ }}
style={{
color: 'white',
transitionDuration: '.4s',
diff --git a/src/layout/useLayoutStore.ts b/src/layout/useLayoutStore.ts
index 752c2a4..aa69be5 100644
--- a/src/layout/useLayoutStore.ts
+++ b/src/layout/useLayoutStore.ts
@@ -77,7 +77,6 @@ export default defineStore('layout', () => {
}
const pageList = state.content[state.current].pages[page].list
pageList.push(block)
- globalToast.success('添加成功')
}
const changeBlock = (item: EditBlockItemType, target: string) => {
const idx = currentPage.value.list.findIndex((el) => el.id === target)
diff --git a/src/main.css b/src/main.css
index bf80a0f..6d52af2 100644
--- a/src/main.css
+++ b/src/main.css
@@ -265,8 +265,7 @@ body {
.background-enter-active,
.background-leave-active {
transform: scale(1);
- transition:
- transform 0.6s cubic-bezier(0.47, 1.64, 0.41, 0.8),
+ transition: transform 0.6s cubic-bezier(0.47, 1.64, 0.41, 0.8);
}
.background-enter-from {
@@ -275,3 +274,27 @@ body {
.background-leave-to {
transform: scale(1);
}
+
+.eat-enter-active,
+.eat-leave-active {
+ transition: transform 0.25s ease-in;
+}
+
+.eat-enter-from {
+ transform: translateY(0);
+}
+.eat-leave-to {
+ transform: translateY(100%);
+}
+.neweat-enter-active,
+.neweat-leave-active {
+ transition: transform 0.25s ease-out ;
+
+}
+
+.neweat-enter-from {
+ transform: translateY(0);
+}
+.neweat-leave-to {
+ transform: translateY(107%);
+}
diff --git a/src/widgets/eat/Middle.tsx b/src/widgets/eat/Middle.tsx
index f289201..8fc5224 100644
--- a/src/widgets/eat/Middle.tsx
+++ b/src/widgets/eat/Middle.tsx
@@ -1,6 +1,6 @@
import clsx from 'clsx'
import dayjs from 'dayjs'
-import { defineComponent, ref } from 'vue'
+import { defineComponent, reactive, ref, Transition, watch } from 'vue'
export default defineComponent(() => {
const list = [
@@ -77,6 +77,11 @@ export default defineComponent(() => {
'炒年糕'
]
const text = ref('')
+ const open = ref(false)
+ const pair = reactive({ front: true, back: true })
+ watch(open, (val) => {
+ if (!val) text.value = ''
+ })
return () => (
{
backgroundSize: '100% 100%'
}}
onClick={() => {
- text.value = ''
+ open.value = false
}}
>
@@ -95,12 +100,12 @@ export default defineComponent(() => {
-
- {text.value}
-
+
+
+
+ {pair.front && (
+
+
+ {text.value}
+
+
+ )}
+
+
+ {pair.back && (
+
+
+ {text.value}
+
+
+ )}
+
+
+
{!text.value && (
<>
今天吃什么
diff --git a/src/widgets/work/Large.tsx b/src/widgets/work/Large.tsx
index cd4c106..ed29c67 100644
--- a/src/widgets/work/Large.tsx
+++ b/src/widgets/work/Large.tsx
@@ -26,7 +26,7 @@ export default defineComponent(() => {
'w-full bg-white/20 text-center rounded text-[14px] overflow-hidden text-ellipsis whitespace-nowrap'
}
>
- {store.state.list ? store.state.list.filter((val) => !val.isCompleted).shift()?.title : '无目标'}
+ {store.state.list ? store.state.list.filter((val) => !val.isCompleted).pop()?.title : '无目标'}
{store.state.beginTime < 0 ? '15:00' : formatSeconds(store.remainingTime)}