mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-26 10:05:57 +08:00
修复主题切换组件Bug,优化前端公告 markdown 样式
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<el-container>
|
||||
<el-aside v-show="store.chatListExtend">
|
||||
<div class="flex w-full justify-center pt-3 pb-3">
|
||||
<img :src="logo" style="max-height: 40px" :alt="title" v-if="logo !== ''"/>
|
||||
<img :src="logo" style="max-height: 40px" :alt="title" v-if="logo !== ''" />
|
||||
<h2 v-else>{{ title }}</h2>
|
||||
</div>
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</el-container>
|
||||
|
||||
<el-dialog v-model="showNotice" :show-close="true" class="notice-dialog" title="网站公告">
|
||||
<div class="notice p-4">
|
||||
<div class="notice">
|
||||
<div v-html="notice"></div>
|
||||
</div>
|
||||
|
||||
@@ -232,24 +232,24 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {nextTick, onMounted, onUnmounted, ref, watch} from "vue";
|
||||
import { nextTick, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
import ChatPrompt from "@/components/ChatPrompt.vue";
|
||||
import ChatReply from "@/components/ChatReply.vue";
|
||||
import {Delete, Edit, InfoFilled, More, Promotion, Search, Share, VideoPause} from "@element-plus/icons-vue";
|
||||
import { Delete, Edit, InfoFilled, More, Promotion, Search, Share, VideoPause } from "@element-plus/icons-vue";
|
||||
import "highlight.js/styles/a11y-dark.css";
|
||||
import {isMobile, randString, removeArrayItem, UUID} from "@/utils/libs";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import {useRouter} from "vue-router";
|
||||
import { isMobile, randString, removeArrayItem, UUID } from "@/utils/libs";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { httpGet, httpPost } from "@/utils/http";
|
||||
import { useRouter } from "vue-router";
|
||||
import Clipboard from "clipboard";
|
||||
import {checkSession, getClientId, getSystemInfo} from "@/store/cache";
|
||||
import { checkSession, getClientId, getSystemInfo } from "@/store/cache";
|
||||
import Welcome from "@/components/Welcome.vue";
|
||||
import {useSharedStore} from "@/store/sharedata";
|
||||
import { useSharedStore } from "@/store/sharedata";
|
||||
import FileSelect from "@/components/FileSelect.vue";
|
||||
import FileList from "@/components/FileList.vue";
|
||||
import ChatSetting from "@/components/ChatSetting.vue";
|
||||
import BackTop from "@/components/BackTop.vue";
|
||||
import {closeLoading, showLoading, showMessageError} from "@/utils/dialog";
|
||||
import { closeLoading, showLoading, showMessageError } from "@/utils/dialog";
|
||||
import MarkdownIt from "markdown-it";
|
||||
import emoji from "markdown-it-emoji";
|
||||
|
||||
@@ -977,6 +977,7 @@ const realtimeChat = () => {
|
||||
</style>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '@/assets/css/markdown/vue.css';
|
||||
.notice-dialog {
|
||||
.el-dialog__header {
|
||||
padding-bottom 0
|
||||
@@ -985,6 +986,10 @@ const realtimeChat = () => {
|
||||
.el-dialog__body {
|
||||
padding 0 20px
|
||||
|
||||
h2 {
|
||||
margin: 20px 0 15px 0;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
padding-left 10px
|
||||
}
|
||||
|
||||
@@ -320,6 +320,7 @@ onMounted(() => {
|
||||
models.value = res.data;
|
||||
selectedModel.value = models.value[0];
|
||||
params.value.model_id = selectedModel.value.id;
|
||||
changeModel(selectedModel.value);
|
||||
})
|
||||
.catch((e) => {
|
||||
showMessageError("获取模型列表失败:" + e.message);
|
||||
|
||||
@@ -39,25 +39,25 @@
|
||||
<el-popover v-if="moreNavs.length > 0" placement="right-end" trigger="hover">
|
||||
<template #reference>
|
||||
<li class="menu-list-item flex-center-col">
|
||||
<i class="iconfont icon-more"/>
|
||||
<i class="iconfont icon-more" />
|
||||
</li>
|
||||
</template>
|
||||
<template #default>
|
||||
<ul class="more-menus">
|
||||
<li
|
||||
v-for="(item, index) in moreNavs"
|
||||
:key="item.url"
|
||||
:class="{
|
||||
active: item.url === curPath,
|
||||
moreTitle: index !== 3 && index !== 4,
|
||||
twoTittle: index === 3 || index === 4,
|
||||
}"
|
||||
v-for="(item, index) in moreNavs"
|
||||
:key="item.url"
|
||||
:class="{
|
||||
active: item.url === curPath,
|
||||
moreTitle: index !== 3 && index !== 4,
|
||||
twoTittle: index === 3 || index === 4,
|
||||
}"
|
||||
>
|
||||
<a @click="changeNav(item)">
|
||||
<span v-if="item.icon.startsWith('icon')" class="mr-2">
|
||||
<i class="iconfont" :class="item.icon"></i>
|
||||
</span>
|
||||
<el-image :src="item.icon" style="width: 20px; height: 20px" v-else/>
|
||||
<span v-if="item.icon.startsWith('icon')" class="mr-2">
|
||||
<i class="iconfont" :class="item.icon"></i>
|
||||
</span>
|
||||
<el-image :src="item.icon" style="width: 20px; height: 20px" v-else />
|
||||
<span :class="item.url === curPath ? 'title active' : 'title'">{{ item.name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -67,7 +67,7 @@
|
||||
<el-popover placement="right-end" trigger="hover" v-if="loginUser.id">
|
||||
<template #reference>
|
||||
<li class="menu-list-item flex-center-col">
|
||||
<i class="iconfont icon-config"/>
|
||||
<i class="iconfont icon-config" />
|
||||
</li>
|
||||
</template>
|
||||
<template #default>
|
||||
@@ -75,7 +75,7 @@
|
||||
<li>
|
||||
<div @click="showConfigDialog = true" class="flex">
|
||||
<el-icon>
|
||||
<UserFilled/>
|
||||
<UserFilled />
|
||||
</el-icon>
|
||||
<span class="username title">{{ loginUser.nickname }}</span>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@
|
||||
<i class="iconfont icon-house"></i>
|
||||
</a>
|
||||
<div class="pl-1">
|
||||
<ThemeChange/>
|
||||
<ThemeChange size="small" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,17 +133,17 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {UserFilled} from "@element-plus/icons-vue";
|
||||
import { UserFilled } from "@element-plus/icons-vue";
|
||||
import ThemeChange from "@/components/ThemeChange.vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {computed, onMounted, ref, watch} from "vue";
|
||||
import {httpGet} from "@/utils/http";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {checkSession, getLicenseInfo, getSystemInfo} from "@/store/cache";
|
||||
import {removeUserToken} from "@/store/session";
|
||||
import {useSharedStore} from "@/store/sharedata";
|
||||
import { useRouter } from "vue-router";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { httpGet } from "@/utils/http";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { checkSession, getLicenseInfo, getSystemInfo } from "@/store/cache";
|
||||
import { removeUserToken } from "@/store/session";
|
||||
import { useSharedStore } from "@/store/sharedata";
|
||||
import ConfigDialog from "@/components/UserInfoDialog.vue";
|
||||
import {showMessageError} from "@/utils/dialog";
|
||||
import { showMessageError } from "@/utils/dialog";
|
||||
import LoginDialog from "@/components/LoginDialog.vue";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -188,7 +188,7 @@ const getFirstPathSegment = (url) => {
|
||||
|
||||
const stars = computed(() => {
|
||||
return 1000;
|
||||
})
|
||||
});
|
||||
|
||||
watch(
|
||||
() => store.showLoginDialog,
|
||||
|
||||
Reference in New Issue
Block a user