}
+ icon={
}
current={search.current}
num={0}
/>
@@ -59,10 +59,19 @@ export default defineComponent(() => {
prefix={translateUrl}
path={search.searchStr}
label="AI翻译:"
- icon={
}
+ icon={
}
current={search.current}
num={1}
/>
+ {
+ search.addList.map((el, idx) => (
+
+
+
{el.name}
+
+
+ ))
+ }
{search.sugList.map((el, idx) => (
- {
)
const debouncedHandler = debounce((newValue) => {
console.log('数值改变并已防抖处理:', newValue)
- request("GET", `/api/app/searchBars`).then((res) => {
+ request("GET", `/api/app/searchBars?keyword=${newValue || 'undefine'}`).then((res) => {
addList.value = res
+ console.log(addList.value);
+
})
}, 500) //
watch(searchStr, (newValue) => {
@@ -111,6 +113,7 @@ export default defineStore('search', () => {
focus,
showSearchConfig,
current,
- sugList
+ sugList, addList
+
}
})
diff --git a/src/main.css b/src/main.css
index 5250346..0ac2a4b 100644
--- a/src/main.css
+++ b/src/main.css
@@ -163,19 +163,16 @@ body {
.modal-enter-active,
.modal-leave-active {
transition:
- transform 0.3s ease-in-out,
- opacity 0.3s ease-in-out;
+ transform 2s ease-in-out,
+ opacity 2s ease-in-out;
}
.modal-enter-from {
- transform: translate(-50%, -60%);
opacity: 0;
}
.modal-leave-to {
- transform: translate(-50%, -40%);
opacity: 0;
}
-
/* 设置框动画 */
.settings-enter-active,
.settings-leave-active {
diff --git a/src/settings/SettingsOverlay.tsx b/src/settings/SettingsOverlay.tsx
index 693ca31..596616e 100644
--- a/src/settings/SettingsOverlay.tsx
+++ b/src/settings/SettingsOverlay.tsx
@@ -100,12 +100,17 @@ export default defineComponent(() => {
{
- router.go('settings-user')
+ if (profile.id) {
+ router.go('settings-user')
+ }else {
+ router.go('global-login')
+ }
+ // router.go('settings-user')
}}
>
登录注册
diff --git a/src/settings/useSettingsStore.ts b/src/settings/useSettingsStore.ts
index f397d60..d0c8fa7 100644
--- a/src/settings/useSettingsStore.ts
+++ b/src/settings/useSettingsStore.ts
@@ -3,6 +3,32 @@ import { computed, reactive } from 'vue'
export type VisibleState = 'show' | 'auto' | ''
export type TimeUnit = 'date' | 'week' | '12hour' | 'lunal' | 'second'
+
+
+export const SimpleShowStringType = [{
+ label: "侧边栏",
+ value: 'showSider',
+},
+{
+ label: "底部栏",
+ value: 'showDock',
+
+},
+{
+ label: "时间",
+ value: 'showTime',
+
+}, {
+ label: "日期",
+ value: 'showDate',
+
+}, {
+ label: "AI助手",
+ value: 'showPet',
+}
+]
+type SimpleValueType = typeof SimpleShowStringType[number]['value'];
+
export default defineStore(
'settings',
() => {
@@ -33,7 +59,9 @@ export default defineStore(
// 侧边栏
siderDirection: 'left' as 'left' | 'right',
// 禁用快捷键
- disabledShortcut: false
+ disabledShortcut: false,
+ // 极简模式显式
+ simpleModeShowString: ['showTime', 'showDate'] as SimpleValueType[]
})
return { state, blockInner: computed(() => state.blockSize - 2 * state.blockPadding) }
},
diff --git a/src/widgets/discount/Middle.tsx b/src/widgets/discount/Middle.tsx
index 1c91629..7b01d65 100644
--- a/src/widgets/discount/Middle.tsx
+++ b/src/widgets/discount/Middle.tsx
@@ -14,6 +14,7 @@ export default defineComponent(() => {
idx.value = 0
}
}, 5000)
+
})
return () => (
{
const audio = new Audio()
const time = useTimeStore()
const remainingTime = computed(() => {
- if (!state.isStart) {
- return 0
- }
+
return dayjs(state.beginTime).add(1, 'minute').diff(dayjs(time.date), 'second')
})
@@ -61,11 +59,7 @@ export default defineStore("work", () => {
state.isStart = false
state.beginTime = -1
stopMusic()
- if (remainingTime.value <= 0) {
- state.timeList.push(
- dayjs().valueOf()
- )
- }
+
}
const togglePlay = () => {
if (state.isPlaying) {
@@ -97,10 +91,16 @@ export default defineStore("work", () => {
}
watch(remainingTime, (val) => {
- if (val <= 0) {
+
+ if (val < 0) {
stopTomatoTime()
}
+ if (remainingTime.value === 0) {
+ state.timeList.push(
+ dayjs().valueOf()
+ )
+ }
})
const openShowModel = ref()
const openFullscreen = ref(false)