fix: style

This commit is contained in:
wangdan-fit2cloud 2025-07-07 16:20:32 +08:00
parent 6effb8f0fb
commit 2d4e660c66
7 changed files with 36 additions and 12 deletions

View File

@ -37,7 +37,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import type { WorkspaceItem } from '@/api/type/workspace' import type { WorkspaceItem } from '@/api/type/workspace'
import useStore from '@/stores'
const props = defineProps({ const props = defineProps({
data: { data: {
type: Array<any>, type: Array<any>,
@ -48,9 +48,12 @@ const props = defineProps({
default: () => {}, default: () => {},
}, },
}) })
const { folder } = useStore()
const loading = ref(false) const loading = ref(false)
const emit = defineEmits(['changeWorkspace']) const emit = defineEmits(['changeWorkspace'])
function changeWorkspace(item: WorkspaceItem) { function changeWorkspace(item: WorkspaceItem) {
folder.setCurrentFolder({})
emit('changeWorkspace', item) emit('changeWorkspace', item)
} }
</script> </script>

View File

@ -46,7 +46,7 @@ export default {
EmbeddingModel: { EmbeddingModel: {
label: '向量模型', label: '向量模型',
placeholder: '请选择向量模型', placeholder: '请选择向量模型',
requiredMessage: '请输入Embedding模型', requiredMessage: '请选择向量模型',
}, },
source_url: { source_url: {

View File

@ -46,7 +46,7 @@ export default {
EmbeddingModel: { EmbeddingModel: {
label: '向量模型', label: '向量模型',
placeholder: '請選擇向量模型', placeholder: '請選擇向量模型',
requiredMessage: '請輸入Embedding模型', requiredMessage: '請選擇向量模型',
}, },
source_url: { source_url: {

View File

@ -3,16 +3,14 @@
v-model="drawer" v-model="drawer"
:direction="direction" :direction="direction"
size="600" size="600"
:destroy-on-close="true" append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="cancelClick" :before-close="cancelClick"
> >
<template #header> <template #header>
<h4> <h4>
{{ {{ isEdit ? $t('common.param.editParam') : $t('common.param.addParam') }}
isEdit
? $t('common.param.editParam')
: $t('common.param.addParam')
}}
</h4> </h4>
</template> </template>
<template #default> <template #default>

View File

@ -2,6 +2,7 @@
<el-card <el-card
shadow="hover" shadow="hover"
class="paragraph-box cursor" class="paragraph-box cursor"
:class="data.is_active ? '' : 'disabled'"
@mouseenter="cardEnter()" @mouseenter="cardEnter()"
@mouseleave="cardLeave()" @mouseleave="cardLeave()"
@click.stop="editParagraph(data)" @click.stop="editParagraph(data)"
@ -199,6 +200,16 @@ function refreshMigrateParagraph() {
background: rgba(31, 35, 41, 0.1); background: rgba(31, 35, 41, 0.1);
border: 1px solid #dee0e3; border: 1px solid #dee0e3;
} }
&.disabled {
color: var(--app-text-color-disable) !important;
:deep(.md-editor-preview) {
color: var(--app-text-color-disable) !important;
}
&:hover {
background: var(--app-layout-bg-color);
border: 1px solid #ffffff;
}
}
.paragraph-box-operation { .paragraph-box-operation {
position: absolute; position: absolute;
right: -10px; right: -10px;

View File

@ -8,18 +8,26 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@click.stop @click.stop
@mousemove.stop
@mousedown.stop
@keydown.stop
> >
<el-row v-loading="loading"> <el-row v-loading="loading">
<el-col :span="18"> <el-col :span="18">
<el-scrollbar height="500" wrap-class="paragraph-scrollbar"> <el-scrollbar height="500" wrap-class="paragraph-scrollbar">
<div class="p-24" style="padding-bottom: 8px"> <div class="p-24" style="padding-bottom: 8px">
<div style="position: absolute; right: 20px; top: 20px;"> <div style="position: absolute; right: 20px; top: 20px">
<el-button text @click="isEdit = true" v-if="paragraphId && !isEdit"> <el-button text @click="isEdit = true" v-if="paragraphId && !isEdit">
<el-icon><EditPen /></el-icon> <el-icon><EditPen /></el-icon>
</el-button> </el-button>
</div> </div>
<ParagraphForm ref="paragraphFormRef" :data="detail" :isEdit="isEdit" :knowledge-id="dataset_id"/> <ParagraphForm
ref="paragraphFormRef"
:data="detail"
:isEdit="isEdit"
:knowledge-id="dataset_id"
/>
</div> </div>
</el-scrollbar> </el-scrollbar>
<div class="text-right p-24 pt-0" v-if="paragraphId && isEdit"> <div class="text-right p-24 pt-0" v-if="paragraphId && isEdit">

View File

@ -26,6 +26,7 @@
@change="getList" @change="getList"
style="width: 220px" style="width: 220px"
clearable clearable
:placeholder="$t('common.inputPlaceholder')"
/> />
<el-input <el-input
v-else-if="search_type === 'nick_name'" v-else-if="search_type === 'nick_name'"
@ -33,6 +34,7 @@
@change="getList" @change="getList"
style="width: 220px" style="width: 220px"
clearable clearable
:placeholder="$t('common.inputPlaceholder')"
/> />
<el-input <el-input
v-else-if="search_type === 'email'" v-else-if="search_type === 'email'"
@ -40,6 +42,7 @@
@change="getList" @change="getList"
style="width: 220px" style="width: 220px"
clearable clearable
:placeholder="$t('common.inputPlaceholder')"
/> />
</div> </div>
</div> </div>
@ -252,7 +255,8 @@ function handleSizeChange() {
function getList() { function getList() {
const params: any = {} const params: any = {}
if (search_form.value[search_type.value as keyof typeof search_form.value]) { if (search_form.value[search_type.value as keyof typeof search_form.value]) {
params[search_type.value] = search_form.value[search_type.value as keyof typeof search_form.value] params[search_type.value] =
search_form.value[search_type.value as keyof typeof search_form.value]
} }
return userManageApi.getUserManage(paginationConfig, params, loading).then((res) => { return userManageApi.getUserManage(paginationConfig, params, loading).then((res) => {
userTableData.value = res.data.records.map((item: any) => ({ userTableData.value = res.data.records.map((item: any) => ({