update code

main
lijun 2024-12-26 22:27:57 +08:00
parent 10e140ffb9
commit c95cbcaaf8
6 changed files with 68 additions and 13 deletions

View File

@ -23,16 +23,19 @@ html.dark {
background-color: #191E32; background-color: #191E32;
} }
.lf-graph{ .lf-graph{
background: transparent; background: #222B45;
} }
.el-table__header th{ .el-table__header th{
background-color: #222B45 !important; background-color: #222B45 !important;
} }
.el-table tr{ .el-table tr{
background-color: #313C5D !important; background-color: #131626 !important;
} }
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{ .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{
background-color: #44527B !important; background-color: #1D223B !important;
}
.el-divider__text{
background-color: transparent !important;
} }
} }

View File

@ -50,8 +50,8 @@
<nodePanel :lf="lf" ref="ndPanel" /> <nodePanel :lf="lf" ref="ndPanel" />
</div> </div>
</div> </div>
<div style="flex-grow: 1;"> <div style="flex-grow: 1;" :key="info.flowKey">
<editFlow ref="edFlow" @initLf="doInitLf" @updateNode="doUpdateNode" @nodeClick="doNodeClick" /> <editFlow ref="edFlow" @initLf="doInitLf" @updateNode="doUpdateNode" @nodeClick="doNodeClick" />
</div> </div>
<div class="item flow-info" style="margin-left: 100px;" v-if="selNode.info"> <div class="item flow-info" style="margin-left: 100px;" v-if="selNode.info">
<div class="div-title"> <div class="div-title">
@ -120,6 +120,7 @@
</template> </template>
<script setup> <script setup>
import eventBus from '@/utils/eventBus.js'
import nodePanel from './nodePanel.vue' import nodePanel from './nodePanel.vue'
import editFlow from './editFlow.vue' import editFlow from './editFlow.vue'
import ConnApi from '@/api/connection' import ConnApi from '@/api/connection'
@ -148,6 +149,7 @@ const info = reactive({
nodes: [], nodes: [],
editObj: null, editObj: null,
type: '', type: '',
flowKey:0,
}) })
const selNode = reactive({ const selNode = reactive({
info: null, info: null,
@ -391,8 +393,14 @@ const initData = () => {
upForm.model_version = d.data.data.model_version; upForm.model_version = d.data.data.model_version;
}); });
} }
onUnmounted(()=>{
eventBus.off("changeTheme");
});
onMounted(() => { onMounted(() => {
eventBus.on("changeTheme",d=>{
info.flowKey++;
});
if (route.query.type == "edit") { if (route.query.type == "edit") {
info.type = "edit" info.type = "edit"
initEditData(); initEditData();
@ -555,4 +563,4 @@ html.dark{
} }
} }
} }
</style> </style>

View File

@ -12,7 +12,13 @@ import { Menu } from "@logicflow/extension";
import AiNodeExtension from '@/components/flow/index' import AiNodeExtension from '@/components/flow/index'
import RegisteMenu from '@/components/flow/menu.js' import RegisteMenu from '@/components/flow/menu.js'
import OperatorApi from '@/api/operator' import OperatorApi from '@/api/operator'
import { ThemeEnum } from "@/enums/ThemeEnum";
const emit = defineEmits(["initLf", "updateNode", "nodeClick"]) const emit = defineEmits(["initLf", "updateNode", "nodeClick"])
import {
useSettingsStore,
} from "@/store";
const settingsStore = useSettingsStore();
const themeApprove = { const themeApprove = {
rect: { // rect: { //
radius: 8, radius: 8,
@ -35,16 +41,16 @@ const themeApprove = {
}, },
}, },
} }
const isDark = ref(settingsStore.theme === ThemeEnum.DARK);
const config = { const config = {
stopScrollGraph: true, stopScrollGraph: true,
stopZoomGraph: true, stopZoomGraph: true,
grid: { grid: {
size: 10, size: 20,
visible: true, visible: true,
type: 'mesh', type: 'mesh',
config: { config: {
color: '#DCDCDC', color: isDark.value?'#2F3B60':'#DCDCDC',
} }
}, },
keyboard: { enabled: true }, keyboard: { enabled: true },
@ -210,4 +216,4 @@ defineExpose({
min-width: 200px; min-width: 200px;
} }
} }
</style> </style>

View File

@ -347,4 +347,13 @@ onMounted(() => {
} }
} }
} }
</style> </style>
<style lang="scss">
html.dark{
.simulation-add-task{
.log-content .log-item{
border-bottom-style: none !important;
}
}
}
</style>

View File

@ -188,4 +188,18 @@ defineExpose({
} }
} }
} }
</style> </style>
<style lang="scss">
html.dark{
.simulation-add-add-step31{
.model-info{
span{
color:#bbb;
}
}
.sp-label{
color: #bbb;
}
}
}
</style>

View File

@ -260,3 +260,18 @@ defineExpose({
} }
} }
</style> </style>
<style lang="scss">
html.dark{
.simulation-add-add-step41{
.model-info{
span{
color:#bbb;
}
}
.sp-label{
color: #bbb;
}
}
}
</style>