mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-02-06 08:05:35 +00:00
优化
This commit is contained in:
parent
2f502b5a6c
commit
223badb2ec
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
<!-- 工具栏 -->
|
<!-- 工具栏 -->
|
||||||
<ul class="app-topbar__tools">
|
<ul class="app-topbar__tools">
|
||||||
|
<auto-menu-btn />
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<cl-chat />
|
<cl-chat />
|
||||||
</li>
|
</li>
|
||||||
@ -58,6 +60,7 @@ import { useBase } from "/$/base";
|
|||||||
import { useCool } from "/@/cool";
|
import { useCool } from "/@/cool";
|
||||||
import RouteNav from "./route-nav.vue";
|
import RouteNav from "./route-nav.vue";
|
||||||
import AMenu from "./amenu.vue";
|
import AMenu from "./amenu.vue";
|
||||||
|
import AutoMenuBtn from "/$/magic/components/auto-menu/btn.vue";
|
||||||
|
|
||||||
const { router, service } = useCool();
|
const { router, service } = useCool();
|
||||||
const { user, app } = useBase();
|
const { user, app } = useBase();
|
||||||
|
|||||||
48
src/modules/magic/components/auto-menu/btn.vue
Normal file
48
src/modules/magic/components/auto-menu/btn.vue
Normal 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>
|
||||||
@ -6,10 +6,10 @@ export default (): ModuleConfig => {
|
|||||||
{
|
{
|
||||||
path: "/magic/ai-code",
|
path: "/magic/ai-code",
|
||||||
meta: {
|
meta: {
|
||||||
label: "Ai编码",
|
label: "Ai 极速编码",
|
||||||
keepAlive: true
|
keepAlive: true
|
||||||
},
|
},
|
||||||
component: () => import("./views/ai-code/index.vue")
|
component: () => import("./views/ai-code.vue")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@ -27,7 +27,6 @@ export const PropRules: {
|
|||||||
>;
|
>;
|
||||||
form?: ClForm.Item;
|
form?: ClForm.Item;
|
||||||
handler?: string;
|
handler?: string;
|
||||||
order?: number;
|
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
group: ["province", "city", "district"],
|
group: ["province", "city", "district"],
|
||||||
|
|||||||
@ -187,11 +187,11 @@ import { Promotion, Loading, Close, Check, Refresh, VideoPlay } from "@element-p
|
|||||||
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
|
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { debounce, isEmpty } from "lodash-es";
|
import { debounce, isEmpty } from "lodash-es";
|
||||||
import { useClipboard } from "@vueuse/core";
|
import { useClipboard } from "@vueuse/core";
|
||||||
import { useMenu, useChatGPT, useScroll } from "../../hooks";
|
import { useMenu, useChatGPT, useScroll } from "../hooks";
|
||||||
import { useForm } from "@cool-vue/crud";
|
import { useForm } from "@cool-vue/crud";
|
||||||
import { isDev } from "/@/cool";
|
import { isDev } from "/@/cool";
|
||||||
import Text2 from "./components/text.vue";
|
import Text2 from "../components/text.vue";
|
||||||
import { CodeType } from "../../types";
|
import { CodeType } from "../types";
|
||||||
|
|
||||||
const { service, mitt, refs, setRefs } = useCool();
|
const { service, mitt, refs, setRefs } = useCool();
|
||||||
const { copy } = useClipboard();
|
const { copy } = useClipboard();
|
||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user