修改样式

This commit is contained in:
2026-04-11 11:55:03 +08:00
parent ef9210a567
commit ec9282a64f
59 changed files with 8708 additions and 2558 deletions
+1
View File
@@ -17,3 +17,4 @@ export { Pinia, store }
export * from './module/user'
export * from './module/search'
export * from './module/config'
export * from './module/categoryNav'
+30
View File
@@ -0,0 +1,30 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
/**
* 菜谱分类列表页入口:由首页分类标签写入待选 id,列表页取出后清空,避免依赖路由 query。
*/
export const useCategoryNavStore = defineStore('categoryNav', () => {
const pendingRecipeCategoryId = ref<string | null>(null)
function setPendingRecipeCategoryId(id: string | number | null | undefined) {
if (id == null || id === '') {
pendingRecipeCategoryId.value = null
return
}
pendingRecipeCategoryId.value = String(id)
}
/** 读取并清空,保证仅消费一次 */
function consumePendingRecipeCategoryId(): string | null {
const v = pendingRecipeCategoryId.value
pendingRecipeCategoryId.value = null
return v
}
return {
pendingRecipeCategoryId,
setPendingRecipeCategoryId,
consumePendingRecipeCategoryId,
}
})
+4
View File
@@ -34,10 +34,14 @@ export const useSearchStore = defineStore(
historyList.value = historyListCopy
}
function clearHistory() {
historyList.value = []
}
return {
historyList,
setHistoryList,
clearHistory,
}
},
{