update: 头部搜索功能补全
This commit is contained in:
@@ -14,6 +14,10 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
||||
const showTools = ref(true); // 是否展示工具栏
|
||||
const namespaceType = ref(-1); // 0 - 用户 1 - 组织
|
||||
const globalTheme = ref('light'); // 网站主题
|
||||
const headerSearch = ref({
|
||||
searchType: '软件',
|
||||
searchWord: ''
|
||||
})
|
||||
|
||||
const menuInfo = computed(() => {
|
||||
// 当前菜单
|
||||
@@ -63,6 +67,11 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
||||
}
|
||||
};
|
||||
|
||||
const updateHeaderSearch = (data: any) => {
|
||||
headerSearch.value = { ...data };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置菜单标题旁的数字(如:mr数量,成员数量)
|
||||
* @param id 菜单id
|
||||
@@ -107,6 +116,7 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
||||
showTools,
|
||||
namespaceType,
|
||||
globalTheme,
|
||||
headerSearch,
|
||||
setMenuType,
|
||||
updateMenuNum,
|
||||
setMenuInfo,
|
||||
@@ -114,6 +124,7 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
||||
setIsNotFound,
|
||||
setShowTools,
|
||||
setNamespaceType,
|
||||
setGlobalTheme
|
||||
setGlobalTheme,
|
||||
updateHeaderSearch
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user