mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: Optimize some styles
This commit is contained in:
parent
3b4c133207
commit
5a546cb525
|
|
@ -10,7 +10,7 @@
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 90%">
|
<div style="width: 90%" class="mt-4">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span class="ellipsis-1" :title="title" style="width: 80%">
|
<span class="ellipsis-1" :title="title" style="width: 80%">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
|
|
@ -118,7 +118,7 @@ function subHoveredEnter() {
|
||||||
.status-tag {
|
.status-tag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
top: 15px;
|
top: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import { SourceTypeEnum } from '@/enums/common'
|
||||||
import KnowledgeApi from '@/api/knowledge/knowledge'
|
import KnowledgeApi from '@/api/knowledge/knowledge'
|
||||||
import ApplicationApi from '@/api/application/application'
|
import ApplicationApi from '@/api/application/application'
|
||||||
import ToolApi from '@/api/tool/tool'
|
import ToolApi from '@/api/tool/tool'
|
||||||
const { folder, application } = useStore()
|
const { folder } = useStore()
|
||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
// tree
|
// tree
|
||||||
.el-tree {
|
.el-tree {
|
||||||
background: none;
|
background: none;
|
||||||
|
color: var(--el-text-color-primary);
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.el-tree-node__content {
|
.el-tree-node__content {
|
||||||
border-radius: var(--el-border-radius-base);
|
border-radius: var(--el-border-radius-base);
|
||||||
|
|
@ -46,6 +48,7 @@
|
||||||
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
|
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
|
||||||
background: var(--el-color-primary-light-9);
|
background: var(--el-color-primary-light-9);
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.el-tree-node__expand-icon {
|
.el-tree-node__expand-icon {
|
||||||
color: var(--app-text-color-secondary);
|
color: var(--app-text-color-secondary);
|
||||||
|
|
|
||||||
|
|
@ -365,8 +365,11 @@ function openMoveToDialog(data: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshApplicationList(row: any) {
|
function refreshApplicationList(row: any) {
|
||||||
const index = applicationList.value.findIndex((v) => v.id === row.id)
|
// 不是根目录才会移除
|
||||||
applicationList.value.splice(index, 1)
|
if (folder.currentFolder?.parent_id) {
|
||||||
|
const index = applicationList.value.findIndex((v) => v.id === row.id)
|
||||||
|
applicationList.value.splice(index, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const goApp = (item: any) => {
|
const goApp = (item: any) => {
|
||||||
|
|
@ -650,6 +653,7 @@ function getFolder(bool?: boolean) {
|
||||||
.asyncGetFolder(SourceTypeEnum.APPLICATION, params, apiType.value, loading)
|
.asyncGetFolder(SourceTypeEnum.APPLICATION, params, apiType.value, loading)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
folderList.value = res.data
|
folderList.value = res.data
|
||||||
|
|
||||||
if (bool) {
|
if (bool) {
|
||||||
// 初始化刷新
|
// 初始化刷新
|
||||||
folder.setCurrentFolder(res.data?.[0] || {})
|
folder.setCurrentFolder(res.data?.[0] || {})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue