hide search for non-System Users

This commit is contained in:
jingrow 2025-11-19 02:02:48 +08:00
parent 329a5d1c5c
commit bb93543abc

View File

@ -29,8 +29,9 @@
<div class="header-right"> <div class="header-right">
<n-space> <n-space>
<!-- 搜索框 - 使用Naive UI的响应式属性 --> <!-- 搜索框 - 使用Naive UI的响应式属性仅System User显示 -->
<n-input <n-input
v-if="isSystemUser"
v-model:value="searchQuery" v-model:value="searchQuery"
:placeholder="t('Search...')" :placeholder="t('Search...')"
clearable clearable
@ -93,6 +94,7 @@ const searchQuery = ref('')
const appName = computed(() => localStorage.getItem('appName') || 'Jingrow') const appName = computed(() => localStorage.getItem('appName') || 'Jingrow')
const user = computed(() => authStore.user) const user = computed(() => authStore.user)
const isSystemUser = computed(() => authStore.user?.user_type === 'System User')
const breadcrumbItems = computed(() => { const breadcrumbItems = computed(() => {
const items: Array<{ label: string; href?: string }> = [] const items: Array<{ label: string; href?: string }> = []