This commit is contained in:
icssoa 2023-03-16 18:44:39 +08:00
parent 2f502b5a6c
commit 223badb2ec
7 changed files with 57 additions and 7 deletions

View File

@ -19,6 +19,8 @@
<!-- 工具栏 -->
<ul class="app-topbar__tools">
<auto-menu-btn />
<li>
<cl-chat />
</li>
@ -58,6 +60,7 @@ import { useBase } from "/$/base";
import { useCool } from "/@/cool";
import RouteNav from "./route-nav.vue";
import AMenu from "./amenu.vue";
import AutoMenuBtn from "/$/magic/components/auto-menu/btn.vue";
const { router, service } = useCool();
const { user, app } = useBase();

View File

@ -0,0 +1,48 @@
<template>
<li v-if="!browser.isMini">
<el-badge is-dot>
<div class="btn" @click="toCode">
<span>Ai</span>
<span>极速编码</span>
</div>
</el-badge>
</li>
</template>
<script lang="ts" name="auto-menu" setup>
import { useCool } from "/@/cool";
const { router, browser } = useCool();
function toCode() {
router.push("/magic/ai-code");
}
</script>
<style lang="scss" scoped>
.btn {
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
background-color: #2f3447;
color: #fff;
font-weight: 600;
height: 22px;
width: 76px;
position: relative;
span {
&:nth-child(1) {
margin-right: 5px;
background-color: #fff;
color: #000;
padding: 0 1px;
}
}
&:hover {
background-color: var(--color-primary);
}
}
</style>

View File

@ -6,10 +6,10 @@ export default (): ModuleConfig => {
{
path: "/magic/ai-code",
meta: {
label: "Ai编码",
label: "Ai 极速编码",
keepAlive: true
},
component: () => import("./views/ai-code/index.vue")
component: () => import("./views/ai-code.vue")
}
]
};

View File

@ -27,7 +27,6 @@ export const PropRules: {
>;
form?: ClForm.Item;
handler?: string;
order?: number;
}[] = [
{
group: ["province", "city", "district"],

View File

@ -187,11 +187,11 @@ import { Promotion, Loading, Close, Check, Refresh, VideoPlay } from "@element-p
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
import { debounce, isEmpty } from "lodash-es";
import { useClipboard } from "@vueuse/core";
import { useMenu, useChatGPT, useScroll } from "../../hooks";
import { useMenu, useChatGPT, useScroll } from "../hooks";
import { useForm } from "@cool-vue/crud";
import { isDev } from "/@/cool";
import Text2 from "./components/text.vue";
import { CodeType } from "../../types";
import Text2 from "../components/text.vue";
import { CodeType } from "../types";
const { service, mitt, refs, setRefs } = useCool();
const { copy } = useClipboard();

File diff suppressed because one or more lines are too long