mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
feat: document
This commit is contained in:
parent
a4b6570110
commit
636f96178c
|
|
@ -1,2 +1,28 @@
|
|||
import { h } from 'vue'
|
||||
export default {}
|
||||
export default {
|
||||
'app-go': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
style: { height: '100%', width: '100%' },
|
||||
viewBox: '0 0 16 16',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M2.66671 4.66665V13.3333H13.3334V8.66665H14.6667V14C14.6667 14.3682 14.3682 14.6666 14 14.6666H2.00004C1.63185 14.6666 1.33337 14.3682 1.33337 14V3.99998C1.33337 3.63179 1.63185 3.33331 2.00004 3.33331H7.33337V4.66665H2.66671Z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M14.6665 1.99998V6.66665H13.3332V3.60931L9.34987 7.59265C9.28736 7.65514 9.20259 7.69024 9.11421 7.69024C9.02582 7.69024 8.94105 7.65514 8.87854 7.59265L8.40721 7.12131C8.34472 7.0588 8.30961 6.97403 8.30961 6.88565C8.30961 6.79726 8.34472 6.71249 8.40721 6.64998L12.3905 2.66665H9.33321V1.33331H13.9999C14.1767 1.33331 14.3463 1.40355 14.4713 1.52858C14.5963 1.6536 14.6665 1.82317 14.6665 1.99998Z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
],
|
||||
),
|
||||
])
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,23 +12,34 @@
|
|||
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="avatar-dropdown">
|
||||
<div class="userInfo">
|
||||
<p class="bold mb-4" style="font-size: 14px">{{ user.userInfo?.username }}</p>
|
||||
<p>
|
||||
<el-text type="info">
|
||||
{{ user.userInfo?.email }}
|
||||
</el-text>
|
||||
</p>
|
||||
<div class="userInfo flex align-center">
|
||||
<div class="mr-12 flex align-center">
|
||||
<el-avatar :size="30">
|
||||
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
|
||||
</el-avatar>
|
||||
</div>
|
||||
<div style="width: 90%">
|
||||
<p class="bold mb-4" style="font-size: 14px">{{ user.userInfo?.username }}</p>
|
||||
<template
|
||||
v-for="item in user.userInfo?.role"
|
||||
v-if="user.userInfo?.role && user.userInfo.role.length > 0"
|
||||
>
|
||||
<el-tag size="small" class="default-tag">{{ user.userInfo?.role[0] }}</el-tag>
|
||||
<el-tag size="small" class="default-tag ml-4" v-if="user.userInfo?.role?.length > 1"
|
||||
>+{{ user.userInfo?.role?.length - 1 }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<el-dropdown-item class="border-t p-8" @click="openResetPassword">
|
||||
{{ $t('views.login.resetPassword') }}
|
||||
</el-dropdown-item>
|
||||
<div v-hasPermission="new ComplexPermission([], ['x-pack'], 'OR')">
|
||||
<el-dropdown-item class="border-t p-8" @click="openAPIKeyDialog">
|
||||
<el-dropdown-item class="p-8" @click="openAPIKeyDialog">
|
||||
{{ $t('layout.apiKey') }}
|
||||
</el-dropdown-item>
|
||||
</div>
|
||||
<el-dropdown-item class="border-t" style="padding: 0" @click.stop>
|
||||
<el-dropdown-item style="padding: 0" @click.stop>
|
||||
<el-dropdown class="w-full" trigger="hover" placement="left-start">
|
||||
<div class="flex-between w-full" style="line-height: 22px; padding: 12px 11px">
|
||||
<span> {{ $t('layout.language') }}</span>
|
||||
|
|
@ -59,10 +70,17 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item class="border-t" @click="openAbout">
|
||||
<el-dropdown-item @click="openAbout">
|
||||
{{ $t('layout.about.title') }}
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item @click="router.push({ path: `/system/user` })">
|
||||
<div class="flex-between w-full">
|
||||
{{ $t('views.system.title') }}
|
||||
<AppIcon iconName="app-go"></AppIcon>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item class="border-t" @click="logout">
|
||||
{{ $t('layout.logout') }}
|
||||
</el-dropdown-item>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export default {
|
|||
github: '项目地址',
|
||||
wiki: '用户手册',
|
||||
forum: '论坛求助',
|
||||
logout: '退出',
|
||||
logout: '退出登录',
|
||||
apiKey: 'API Key 管理',
|
||||
apiServiceAddress: 'API 服务地址',
|
||||
language: '语言',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export default {
|
|||
github: '項目地址',
|
||||
wiki: '使用者手冊',
|
||||
forum: '論壇求助',
|
||||
logout: '退出',
|
||||
logout: '登出',
|
||||
|
||||
apiKey: 'API Key 管理',
|
||||
apiServiceAddress: 'API 服務地址',
|
||||
|
|
|
|||
|
|
@ -410,6 +410,46 @@ h5 {
|
|||
}
|
||||
}
|
||||
|
||||
/* tag */
|
||||
.default-tag {
|
||||
background: var(--el-color-primary-light-8);
|
||||
color: var(--el-color-primary);
|
||||
border: none;
|
||||
}
|
||||
.danger-tag {
|
||||
background: var(--tag-danger-bg);
|
||||
color: #d03f3b;
|
||||
border: none;
|
||||
}
|
||||
.success-tag {
|
||||
background: var(--tag-success-bg);
|
||||
color: var(--el-color-success);
|
||||
border: none;
|
||||
}
|
||||
.warning-tag {
|
||||
background: var(--tag-warning-bg);
|
||||
color: var(--el-color-warning);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.info-tag {
|
||||
background: var(--app-text-color-light-1);
|
||||
color: var(--app-text-color-secondary);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.purple-tag {
|
||||
background: #f2ebfe;
|
||||
color: #7f3bf5;
|
||||
border-color: #e0d7f0;
|
||||
}
|
||||
|
||||
.blue-tag {
|
||||
background: #ebf1ff;
|
||||
color: #3370ff;
|
||||
border-color: #d6e2ff;
|
||||
}
|
||||
|
||||
/*
|
||||
内容部分 自适应高度
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@
|
|||
{{ datetimeFormat(row.update_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common.operation')" align="left" width="110" fixed="right">
|
||||
<el-table-column :label="$t('common.operation')" align="left" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<span @click.stop>
|
||||
<el-switch
|
||||
|
|
@ -336,14 +336,16 @@
|
|||
/>
|
||||
</span>
|
||||
<el-divider direction="vertical" />
|
||||
<div v-if="datasetDetail.type === 0">
|
||||
<span class="mr-4">
|
||||
<template v-if="datasetDetail.type === 0">
|
||||
<span
|
||||
class="mr-4"
|
||||
v-if="
|
||||
([State.STARTED, State.PENDING] as Array<string>).includes(
|
||||
getTaskState(row.status, TaskType.EMBEDDING),
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-button
|
||||
v-if="
|
||||
([State.STARTED, State.PENDING] as Array<string>).includes(
|
||||
getTaskState(row.status, TaskType.EMBEDDING),
|
||||
)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
@click.stop="cancelTask(row, TaskType.EMBEDDING)"
|
||||
|
|
@ -352,7 +354,7 @@
|
|||
<AppIcon iconName="app-close" style="font-size: 16px"></AppIcon>
|
||||
</el-button>
|
||||
</span>
|
||||
<span class="mr-4">
|
||||
<span class="mr-4" v-else>
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
|
|
@ -413,8 +415,8 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="datasetDetail.type === 1 || datasetDetail.type === 2">
|
||||
</template>
|
||||
<template v-if="datasetDetail.type === 1 || datasetDetail.type === 2">
|
||||
<span class="mr-4">
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -495,7 +497,7 @@
|
|||
</template>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</app-table>
|
||||
|
|
|
|||
Loading…
Reference in New Issue