-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
99 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
<template> | ||
<n-flex align="center" class="h-[35px] bg-[#3C3C3C]" style="flex-wrap: nowrap"> | ||
<n-flex> | ||
<Logo class="ml-[7px]" :logo-image="setting.INTERFACE?.logo_logout" /> | ||
</n-flex> | ||
<n-flex class="w-[calc(100%-35px)]" justify="center" align="center"> | ||
<n-input | ||
autosize | ||
bordered | ||
clearable | ||
size="small" | ||
class="h-[25px] rounded-[5px]" | ||
style="min-width: 50%" | ||
placeholder="Please enter the keyword you want to search" | ||
@update:value="handleSearch" | ||
> | ||
<template #prefix> | ||
<n-icon :component="Search24Regular" /> | ||
</template> | ||
</n-input> | ||
<template v-if="currentKeyWord"> | ||
<n-flex align="center" style="column-gap: 0"> | ||
<n-icon | ||
class="w-[25px] h-[25px] flex justify-center items-center cursor-pointer text-white rounded-[5px] hover:bg-[#101014] transition-colors duration-300" | ||
size="16" | ||
:component="ArrowSortUp24Regular" | ||
@click="findPrev" | ||
/> | ||
<n-icon | ||
class="w-[25px] h-[25px] flex justify-center items-center cursor-pointer text-white rounded-[5px] hover:bg-[#101014] transition-colors duration-300" | ||
size="16" | ||
:component="ArrowSortDown24Regular" | ||
@click="findNext" | ||
/> | ||
</n-flex> | ||
</template> | ||
<Logo class="ml-[10px]" :logo-image="setting.INTERFACE?.logo_logout" /> | ||
</n-flex> | ||
<!-- <n-flex class="w-[calc(100%-35px)]" justify="center" align="center">--> | ||
<!-- <n-input--> | ||
<!-- autosize--> | ||
<!-- bordered--> | ||
<!-- clearable--> | ||
<!-- size="small"--> | ||
<!-- class="h-[25px] rounded-[5px]"--> | ||
<!-- style="min-width: 50%"--> | ||
<!-- placeholder="Please enter the keyword you want to search"--> | ||
<!-- @update:value="handleSearch"--> | ||
<!-- >--> | ||
<!-- <template #prefix>--> | ||
<!-- <n-icon :component="Search24Regular" />--> | ||
<!-- </template>--> | ||
<!-- </n-input>--> | ||
<!-- <template v-if="currentKeyWord">--> | ||
<!-- <n-flex align="center" style="column-gap: 0">--> | ||
<!-- <n-icon--> | ||
<!-- class="w-[25px] h-[25px] flex justify-center items-center cursor-pointer text-white rounded-[5px] hover:bg-[#101014] transition-colors duration-300"--> | ||
<!-- size="16"--> | ||
<!-- :component="ArrowSortUp24Regular"--> | ||
<!-- @click="findPrev"--> | ||
<!-- />--> | ||
<!-- <n-icon--> | ||
<!-- class="w-[25px] h-[25px] flex justify-center items-center cursor-pointer text-white rounded-[5px] hover:bg-[#101014] transition-colors duration-300"--> | ||
<!-- size="16"--> | ||
<!-- :component="ArrowSortDown24Regular"--> | ||
<!-- @click="findNext"--> | ||
<!-- />--> | ||
<!-- </n-flex>--> | ||
<!-- </template>--> | ||
<!-- </n-flex>--> | ||
</n-flex> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { storeToRefs } from 'pinia'; | ||
import { useParamsStore } from '@/store/modules/params.ts'; | ||
import { ArrowSortDown24Regular, ArrowSortUp24Regular, Search24Regular } from '@vicons/fluent'; | ||
// import { ArrowSortDown24Regular, ArrowSortUp24Regular, Search24Regular } from '@vicons/fluent'; | ||
import Logo from '@/components/Kubernetes/Sidebar/components/Logo/index.vue'; | ||
import mittBus from '@/utils/mittBus.ts'; | ||
import { ref } from 'vue'; | ||
// import mittBus from '@/utils/mittBus.ts'; | ||
// import { ref } from 'vue'; | ||
const paramsStore = useParamsStore(); | ||
const { setting } = storeToRefs(paramsStore); | ||
const currentKeyWord = ref(''); | ||
const handleSearch = (value: string) => { | ||
currentKeyWord.value = value; | ||
mittBus.emit('terminal-search', { keyword: value }); | ||
}; | ||
const findNext = () => { | ||
mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'next' }); | ||
}; | ||
// const currentKeyWord = ref(''); | ||
const findPrev = () => { | ||
mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'prev' }); | ||
}; | ||
// const handleSearch = (value: string) => { | ||
// currentKeyWord.value = value; | ||
// mittBus.emit('terminal-search', { keyword: value }); | ||
// }; | ||
// | ||
// const findNext = () => { | ||
// mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'next' }); | ||
// }; | ||
// | ||
// const findPrev = () => { | ||
// mittBus.emit('terminal-search', { keyword: currentKeyWord.value, type: 'prev' }); | ||
// }; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters