From 87d8fa1c242f5d5e851a37f1c540004d07ed0c18 Mon Sep 17 00:00:00 2001 From: zttProjectSpace Date: Fri, 25 Apr 2025 11:44:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yamloutput/yamlContentOutput.jsx | 52 ++++++++++++ .../yamloutput/yamlContentOutput.scss | 79 +++++++++++++++++++ .../workFlowConfig/yamlEditDrawer.vue | 12 +-- 3 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 src/components/yamloutput/yamlContentOutput.jsx create mode 100644 src/components/yamloutput/yamlContentOutput.scss diff --git a/src/components/yamloutput/yamlContentOutput.jsx b/src/components/yamloutput/yamlContentOutput.jsx new file mode 100644 index 0000000..3f4541c --- /dev/null +++ b/src/components/yamloutput/yamlContentOutput.jsx @@ -0,0 +1,52 @@ +import { defineComponent, ref } from 'vue'; +import { IconCaretRight } from '@computing/opendesign-icons'; +import './yamlContentOutput.scss' + +export default defineComponent({ + name: 'YamlContentOutput', + props:{ + yamlOutPutContent:'' + }, + setup(props) { + const yamlContent = ref(props.yamlOutPutContent); + const handelOpsData = (data) => { + const yamlOutPut = Object.keys(data).map((item) => { + if (typeof data[item] === 'object' && item !== 'items') { + return +
+ + + +
+
{item}
+
{data[item].type}
+
+
, + }}> +
{data[item].description}
+ {Object.keys(data[item].items || {}).length ? handelOpsData(data[item].items) : null} + +
+
+ } + + if (typeof data[item] === 'object' && item === 'items') { + return handelOpsData(data[item]) + } + }); + + return yamlOutPut; + }; + return { + handelOpsData: handelOpsData, + yamlContent: yamlContent.value + }; + }, + + render() { + return
{this.handelOpsData(this.yamlContent)}
; + }, +}); diff --git a/src/components/yamloutput/yamlContentOutput.scss b/src/components/yamloutput/yamlContentOutput.scss new file mode 100644 index 0000000..eb194e6 --- /dev/null +++ b/src/components/yamloutput/yamlContentOutput.scss @@ -0,0 +1,79 @@ +.outputContainer { + display: flex; + flex-direction: column; + gap: 8px; + + .el-collapse-item__header { + width: fit-content !important; + display: flex; + flex-direction: row-reverse; + text-align: left; + padding: 0 !important; + height: 16px; + } + .el-collapse-item__header { + .el-icon { + display: none; + } + + .yamlTitle .el-icon { + display: inline-block; + font-size: 16px; + top: 2px; + } + } + + .el-collapse-item__header.is-active { + .yamlTitle { + .el-icon { + transform: rotate(90deg); + } + } + } + + .yamlKey { + color: var(--o-text-color-primary); + font-size: 12px; + font-weight: 500; + } + + .yamlTitle { + display: flex; + align-items: center; + + } + + .yamlBox,.yamlTitle{ + padding: 0 !important; + height: 16px; + display: flex; + align-items: center; + } + + .yamlBox { + display: flex; + gap: 8px; + align-items: center; + } + + .yamlKey{ + height: 16px; + line-height: 16px; + } + + .yamlKeyType { + display: inline-block; + height: 16px; + line-height: 16px; + border-radius: 2px; + padding: 0 8px; + display: flex; + align-items: center; + justify-content: center; + color: var(--o-text-color-secondary); + background-color: var(--o-border-color-lighter); + } + .el-collapse-item__content{ + margin-bottom: 0 !important; + } +} diff --git a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue index 71a13ac..09064d3 100644 --- a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue +++ b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue @@ -31,8 +31,7 @@
+
+ +
Date: Fri, 25 Apr 2025 11:45:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue index 09064d3..77c5305 100644 --- a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue +++ b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue @@ -166,7 +166,6 @@ watch( props.yamlContent.input_parameters, ); yamlExpress.value[2].yamlCode = props.yamlContent.output_parameters; - console.log(yamlExpress.value,'kjkjk') }, { deep: true, immediate: true }, ); -- Gitee From 7fa70f4fe630030b0e65581f077b6b063fd0b60c Mon Sep 17 00:00:00 2001 From: zttProjectSpace Date: Fri, 25 Apr 2025 11:46:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + vite.config.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/package.json b/package.json index b2a8904..9793cbb 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@typescript-eslint/eslint-plugin": "8.17.0", "@typescript-eslint/parser": "8.17.0", "@vitejs/plugin-vue": "5.2.1", + "@vitejs/plugin-vue-jsx": "^3.1.0", "@vue-flow/background": "^1.3.0", "@vue-flow/controls": "^1.1.2", "@vue-flow/core": "^1.38.5", diff --git a/vite.config.ts b/vite.config.ts index 1229411..bdb4151 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,6 +9,8 @@ // See the Mulan PSL v2 for more details. import { defineConfig, loadEnv } from "vite"; import vue from "@vitejs/plugin-vue"; +import vueJsx from '@vitejs/plugin-vue-jsx'; + import Qiankun from 'vite-plugin-qiankun' import { resolve } from "path"; @@ -35,6 +37,7 @@ export default ({ mode }): UserConfigExport => { }, plugins: [ vue(), + vueJsx(), Qiankun("copilot", { useDevMode: mode === 'development' }) -- Gitee