From e439a723c8c574006d136825ccb77d50f27beef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A5=9E=E4=BB=99?= <615206459@qq.com>
Date: Fri, 28 Jun 2024 08:58:57 +0800
Subject: [PATCH] 1
---
src/modules/helper/static/svg/arrow-down.svg | 1 +
src/modules/helper/types/index.d.ts | 9 +-
src/modules/helper/views/ai-code.vue | 115 ++++++++-----------
3 files changed, 59 insertions(+), 66 deletions(-)
create mode 100644 src/modules/helper/static/svg/arrow-down.svg
diff --git a/src/modules/helper/static/svg/arrow-down.svg b/src/modules/helper/static/svg/arrow-down.svg
new file mode 100644
index 0000000..3348788
--- /dev/null
+++ b/src/modules/helper/static/svg/arrow-down.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/modules/helper/types/index.d.ts b/src/modules/helper/types/index.d.ts
index 8bd1774..588e939 100644
--- a/src/modules/helper/types/index.d.ts
+++ b/src/modules/helper/types/index.d.ts
@@ -30,7 +30,14 @@ export declare interface EpsData {
[key: string]: EpsModule[];
}
-export declare type CodeType = "entity" | "controller" | "vue";
+export declare type CodeType = "node-entity" | "node-controller" | "node-service" | "vue";
+
+export interface CodeItem {
+ label: string;
+ value: CodeType;
+ content: string;
+ [key: string]: any;
+}
export declare interface PropRule {
value?: string;
diff --git a/src/modules/helper/views/ai-code.vue b/src/modules/helper/views/ai-code.vue
index 3b0e8f1..17d0a3a 100644
--- a/src/modules/helper/views/ai-code.vue
+++ b/src/modules/helper/views/ai-code.vue
@@ -78,13 +78,7 @@
-
-
-
-
-
-
-
+
@@ -101,41 +95,38 @@
-
-
-
-
-
-
-
-
+
-
-
{
- form.module = item;
- refs.modulePopover?.hide();
- }
- "
- >
- {{ item }}
-
-
-
+
+
+
-
+
+
+
{
+ form.module = item;
+ refs.modulePopover?.hide();
+ }
+ "
+ >
+ {{ item }}
+
+
+
@@ -152,13 +143,7 @@
-
-
-
-
-
-
-
+
@@ -175,13 +160,7 @@
-
-
-
-
-
-
-
+
@@ -304,6 +283,7 @@ import * as monaco from "monaco-editor";
import { sleep } from "/@/cool/utils";
import dayjs from "dayjs";
import { nextTick } from "vue";
+import type { CodeItem } from "../types";
const { service, refs, setRefs, router } = useCool();
const menu = useMenu();
@@ -323,7 +303,7 @@ monaco.editor.defineTheme("ai-code--dark", {
// 表单
const form = reactive({
- entity: "",
+ entity: "收货地址",
module: "user",
other: "",
column: "用户ID、用户名、收货人、手机号、收货地址、是否默认"
@@ -383,13 +363,6 @@ const step = reactive({
}
});
-interface CodeItem {
- label: string;
- value: string;
- content: string;
- [key: string]: any;
-}
-
// 代码
const code = reactive({
active: "",
@@ -1177,14 +1150,13 @@ $color: #41d1ff;
margin: 0 auto;
.editor {
- box-shadow: 0 0 1px 1px rgba($color, 0.7);
border-radius: 8px;
.content {
color: #fff;
box-sizing: border-box;
border-radius: 0 0 8px 8px;
- padding: 10px 0;
+ padding: 5px 0 10px 0;
.row {
font-size: 12px;
@@ -1198,6 +1170,9 @@ $color: #41d1ff;
display: flex;
align-items: center;
padding: 5px 15px;
+ font-size: 12px;
+ margin-bottom: 5px;
+ color: #999;
.el-icon {
margin-left: 4px;
@@ -1206,8 +1181,9 @@ $color: #41d1ff;
}
:deep(.el-input__wrapper) {
- background-color: transparent;
+ background-color: #2f344722;
box-shadow: none;
+ padding: 0 15px;
.el-input__inner {
color: #fff;
@@ -1219,9 +1195,18 @@ $color: #41d1ff;
}
&.module {
+ position: relative;
+
+ :deep(.el-input__wrapper) {
+ padding-left: 35px;
+ }
+
.add {
cursor: pointer;
margin-right: 8px;
+ position: absolute;
+ left: 15px;
+ top: 40px;
}
}
}