Skip to content

Commit 223badb

Browse files
committed
优化
1 parent 2f502b5 commit 223badb

File tree

7 files changed

+57
-7
lines changed

7 files changed

+57
-7
lines changed

src/modules/base/layout/components/topbar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
<!-- 工具栏 -->
2121
<ul class="app-topbar__tools">
22+
<auto-menu-btn />
23+
2224
<li>
2325
<cl-chat />
2426
</li>
@@ -58,6 +60,7 @@ import { useBase } from "/$/base";
5860
import { useCool } from "/@/cool";
5961
import RouteNav from "./route-nav.vue";
6062
import AMenu from "./amenu.vue";
63+
import AutoMenuBtn from "/$/magic/components/auto-menu/btn.vue";
6164
6265
const { router, service } = useCool();
6366
const { user, app } = useBase();
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<template>
2+
<li v-if="!browser.isMini">
3+
<el-badge is-dot>
4+
<div class="btn" @click="toCode">
5+
<span>Ai</span>
6+
<span>极速编码</span>
7+
</div>
8+
</el-badge>
9+
</li>
10+
</template>
11+
12+
<script lang="ts" name="auto-menu" setup>
13+
import { useCool } from "/@/cool";
14+
15+
const { router, browser } = useCool();
16+
17+
function toCode() {
18+
router.push("/magic/ai-code");
19+
}
20+
</script>
21+
22+
<style lang="scss" scoped>
23+
.btn {
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
font-size: 12px;
28+
background-color: #2f3447;
29+
color: #fff;
30+
font-weight: 600;
31+
height: 22px;
32+
width: 76px;
33+
position: relative;
34+
35+
span {
36+
&:nth-child(1) {
37+
margin-right: 5px;
38+
background-color: #fff;
39+
color: #000;
40+
padding: 0 1px;
41+
}
42+
}
43+
44+
&:hover {
45+
background-color: var(--color-primary);
46+
}
47+
}
48+
</style>

src/modules/magic/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export default (): ModuleConfig => {
66
{
77
path: "/magic/ai-code",
88
meta: {
9-
label: "Ai编码",
9+
label: "Ai 极速编码",
1010
keepAlive: true
1111
},
12-
component: () => import("./views/ai-code/index.vue")
12+
component: () => import("./views/ai-code.vue")
1313
}
1414
]
1515
};

src/modules/magic/dict/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const PropRules: {
2727
>;
2828
form?: ClForm.Item;
2929
handler?: string;
30-
order?: number;
3130
}[] = [
3231
{
3332
group: ["province", "city", "district"],

src/modules/magic/views/ai-code/index.vue renamed to src/modules/magic/views/ai-code.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ import { Promotion, Loading, Close, Check, Refresh, VideoPlay } from "@element-p
187187
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
188188
import { debounce, isEmpty } from "lodash-es";
189189
import { useClipboard } from "@vueuse/core";
190-
import { useMenu, useChatGPT, useScroll } from "../../hooks";
190+
import { useMenu, useChatGPT, useScroll } from "../hooks";
191191
import { useForm } from "@cool-vue/crud";
192192
import { isDev } from "/@/cool";
193-
import Text2 from "./components/text.vue";
194-
import { CodeType } from "../../types";
193+
import Text2 from "../components/text.vue";
194+
import { CodeType } from "../types";
195195
196196
const { service, mitt, refs, setRefs } = useCool();
197197
const { copy } = useClipboard();

stats.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)