This commit is contained in:
神仙 2024-06-28 08:58:57 +08:00
parent 601613d88e
commit e439a723c8
3 changed files with 59 additions and 66 deletions

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1719536095395" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2583" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M61.44 512C61.44 263.168 263.168 61.44 512 61.44s450.56 201.728 450.56 450.56-201.728 450.56-450.56 450.56S61.44 760.832 61.44 512z m397.312 180.85888c29.61408 31.92832 76.88192 31.92832 106.496 0l199.63904-215.28576 0.90112-1.00352c17.01888-19.456 16.52736-50.44224-1.10592-69.2224-19.29216-20.52096-48.82432-23.81824-71.4752-7.96672l-150.58944 105.49248c-18.67776 13.1072-42.55744 13.1072-61.2352 0L330.1376 398.9504c-22.26176-15.5648-51.3024-12.34944-70.26688 7.84384l-0.55296 0.57344a46.8992 46.8992 0 0 0-0.90112 1.024c-17.14176 19.31264-16.83456 50.29888 0.69632 69.2224l199.65952 215.26528z" p-id="2584"></path></svg>

After

Width:  |  Height:  |  Size: 957 B

View File

@ -30,7 +30,14 @@ export declare interface EpsData {
[key: string]: EpsModule[]; [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 { export declare interface PropRule {
value?: string; value?: string;

View File

@ -78,13 +78,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<el-input v-model="form.entity" maxlength="20" placeholder="请输入"> <el-input v-model="form.entity" maxlength="20" placeholder="请输入" />
<template #prefix>
<el-icon>
<arrow-right-bold />
</el-icon>
</template>
</el-input>
</div> </div>
<div class="row module"> <div class="row module">
@ -101,41 +95,38 @@
</el-tooltip> </el-tooltip>
</div> </div>
<el-input v-model="form.module" maxlength="20" placeholder="请输入"> <el-input v-model="form.module" maxlength="20" placeholder="请输入" />
<template #prefix>
<el-popover
:ref="setRefs('modulePopover')"
:teleported="false"
:popper-style="{
padding: '5px',
borderRadius: '6px'
}"
placement="left"
>
<template #reference>
<el-icon class="add">
<circle-plus-filled />
</el-icon>
</template>
<div class="module-list"> <el-popover
<div :ref="setRefs('modulePopover')"
class="item" :teleported="false"
v-for="(item, index) in module.dirs" :popper-style="{
:key="index" padding: '5px',
@click=" borderRadius: '6px',
() => { zIndex: 99
form.module = item; }"
refs.modulePopover?.hide(); placement="left"
} >
" <template #reference>
> <cl-svg class="add" name="arrow-down" />
{{ item }}
</div>
</div>
</el-popover>
</template> </template>
</el-input>
<div class="module-list">
<div
class="item"
v-for="(item, index) in module.dirs"
:key="index"
@click="
() => {
form.module = item;
refs.modulePopover?.hide();
}
"
>
{{ item }}
</div>
</div>
</el-popover>
</div> </div>
<div class="row"> <div class="row">
@ -152,13 +143,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<el-input v-model="form.column" maxlength="200" placeholder="请输入"> <el-input v-model="form.column" maxlength="200" placeholder="请输入" />
<template #prefix>
<el-icon class="icon">
<arrow-right-bold />
</el-icon>
</template>
</el-input>
</div> </div>
<div class="row"> <div class="row">
@ -175,13 +160,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<el-input v-model="form.other" maxlength="200" placeholder="请输入"> <el-input v-model="form.other" maxlength="200" placeholder="请输入" />
<template #prefix>
<el-icon>
<arrow-right-bold />
</el-icon>
</template>
</el-input>
</div> </div>
</div> </div>
</div> </div>
@ -304,6 +283,7 @@ import * as monaco from "monaco-editor";
import { sleep } from "/@/cool/utils"; import { sleep } from "/@/cool/utils";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { nextTick } from "vue"; import { nextTick } from "vue";
import type { CodeItem } from "../types";
const { service, refs, setRefs, router } = useCool(); const { service, refs, setRefs, router } = useCool();
const menu = useMenu(); const menu = useMenu();
@ -323,7 +303,7 @@ monaco.editor.defineTheme("ai-code--dark", {
// //
const form = reactive({ const form = reactive({
entity: "", entity: "收货地址",
module: "user", module: "user",
other: "", other: "",
column: "用户ID、用户名、收货人、手机号、收货地址、是否默认" column: "用户ID、用户名、收货人、手机号、收货地址、是否默认"
@ -383,13 +363,6 @@ const step = reactive({
} }
}); });
interface CodeItem {
label: string;
value: string;
content: string;
[key: string]: any;
}
// //
const code = reactive({ const code = reactive({
active: "", active: "",
@ -1177,14 +1150,13 @@ $color: #41d1ff;
margin: 0 auto; margin: 0 auto;
.editor { .editor {
box-shadow: 0 0 1px 1px rgba($color, 0.7);
border-radius: 8px; border-radius: 8px;
.content { .content {
color: #fff; color: #fff;
box-sizing: border-box; box-sizing: border-box;
border-radius: 0 0 8px 8px; border-radius: 0 0 8px 8px;
padding: 10px 0; padding: 5px 0 10px 0;
.row { .row {
font-size: 12px; font-size: 12px;
@ -1198,6 +1170,9 @@ $color: #41d1ff;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 5px 15px; padding: 5px 15px;
font-size: 12px;
margin-bottom: 5px;
color: #999;
.el-icon { .el-icon {
margin-left: 4px; margin-left: 4px;
@ -1206,8 +1181,9 @@ $color: #41d1ff;
} }
:deep(.el-input__wrapper) { :deep(.el-input__wrapper) {
background-color: transparent; background-color: #2f344722;
box-shadow: none; box-shadow: none;
padding: 0 15px;
.el-input__inner { .el-input__inner {
color: #fff; color: #fff;
@ -1219,9 +1195,18 @@ $color: #41d1ff;
} }
&.module { &.module {
position: relative;
:deep(.el-input__wrapper) {
padding-left: 35px;
}
.add { .add {
cursor: pointer; cursor: pointer;
margin-right: 8px; margin-right: 8px;
position: absolute;
left: 15px;
top: 40px;
} }
} }
} }