fix(lint): clean up ai rich text views

pull/336/head
xingyu4j 2026-03-14 13:28:13 +08:00
parent 577efa56a9
commit fb03afb6b7
10 changed files with 18 additions and 5 deletions

View File

@ -47,6 +47,7 @@ onMounted(async () => {
</script> </script>
<template> <template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div ref="contentRef" class="markdown-view" v-html="renderedMarkdown"></div> <div ref="contentRef" class="markdown-view" v-html="renderedMarkdown"></div>
</template> </template>

View File

@ -571,6 +571,7 @@ onMounted(async () => {
size="small" size="small"
@click="openChatConversationUpdateForm" @click="openChatConversationUpdateForm"
> >
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="activeConversation?.modelName"></span> <span v-html="activeConversation?.modelName"></span>
<IconifyIcon icon="lucide:settings" class="ml-2 size-4" /> <IconifyIcon icon="lucide:settings" class="ml-2 size-4" />
</Button> </Button>

View File

@ -21,7 +21,7 @@ const imageListRef = ref<any>(); // image 列表 ref
const dall3Ref = ref<any>(); // dall3(openai) ref const dall3Ref = ref<any>(); // dall3(openai) ref
const midjourneyRef = ref<any>(); // midjourney ref const midjourneyRef = ref<any>(); // midjourney ref
const stableDiffusionRef = ref<any>(); // stable diffusion ref const stableDiffusionRef = ref<any>(); // stable diffusion ref
//@ts-expect-error unused-imports/no-unused-vars // @ts-expect-error: template ref is retained for future provider expansion
const commonRef = ref<any>(); // stable diffusion ref const commonRef = ref<any>(); // stable diffusion ref
const selectPlatform = ref('common'); // const selectPlatform = ref('common'); //
@ -46,7 +46,9 @@ const platformOptions = [
const models = ref<AiModelModelApi.Model[]>([]); // const models = ref<AiModelModelApi.Model[]>([]); //
/** 绘画 start */ /** 绘画 start */
async function handleDrawStart() {} function handleDrawStart() {
// drawing state is handled by child components
}
/** 绘画 complete */ /** 绘画 complete */
async function handleDrawComplete() { async function handleDrawComplete() {

View File

@ -150,10 +150,12 @@ defineExpose({
ref="mdContainerRef" ref="mdContainerRef"
class="wh-full overflow-y-auto" class="wh-full overflow-y-auto"
> >
<!-- eslint-disable vue/no-v-html -->
<div <div
class="flex flex-col items-center justify-center" class="flex flex-col items-center justify-center"
v-html="html" v-html="html"
></div> ></div>
<!-- eslint-enable vue/no-v-html -->
</div> </div>
<div ref="mindMapRef" class="wh-full"> <div ref="mindMapRef" class="wh-full">
<svg <svg

View File

@ -20,6 +20,7 @@ const currentSong = inject<any>('currentSong', {});
{{ currentSong.date }} {{ currentSong.date }}
</div> </div>
<Button size="small" shape="round" class="my-2">信息复用</Button> <Button size="small" shape="round" class="my-2">信息复用</Button>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="text-xs" v-html="currentSong.lyric"></div> <div class="text-xs" v-html="currentSong.lyric"></div>
</Card> </Card>
</template> </template>

View File

@ -47,6 +47,7 @@ onMounted(async () => {
</script> </script>
<template> <template>
<!-- eslint-disable-next-line vue/no-v-html -->
<div ref="contentRef" class="markdown-view" v-html="renderedMarkdown"></div> <div ref="contentRef" class="markdown-view" v-html="renderedMarkdown"></div>
</template> </template>

View File

@ -582,7 +582,7 @@ onMounted(async () => {
size="small" size="small"
@click="openChatConversationUpdateForm" @click="openChatConversationUpdateForm"
> >
<span v-html="activeConversation?.modelName"></span> <span>{{ activeConversation?.modelName }}</span>
<IconifyIcon icon="lucide:settings" class="!ml-2 size-4" /> <IconifyIcon icon="lucide:settings" class="!ml-2 size-4" />
</ElButton> </ElButton>
<ElButton <ElButton

View File

@ -21,7 +21,7 @@ const imageListRef = ref<any>(); // image 列表 ref
const dall3Ref = ref<any>(); // dall3(openai) ref const dall3Ref = ref<any>(); // dall3(openai) ref
const midjourneyRef = ref<any>(); // midjourney ref const midjourneyRef = ref<any>(); // midjourney ref
const stableDiffusionRef = ref<any>(); // stable diffusion ref const stableDiffusionRef = ref<any>(); // stable diffusion ref
//@ts-expect-error unused-imports/no-unused-vars // @ts-expect-error: template ref is retained for future provider expansion
const commonRef = ref<any>(); // stable diffusion ref const commonRef = ref<any>(); // stable diffusion ref
const selectPlatform = ref('common'); // const selectPlatform = ref('common'); //
@ -46,7 +46,9 @@ const platformOptions = [
const models = ref<AiModelModelApi.Model[]>([]); // const models = ref<AiModelModelApi.Model[]>([]); //
/** 绘画 start */ /** 绘画 start */
async function handleDrawStart() {} function handleDrawStart() {
// drawing state is handled by child components
}
/** 绘画 complete */ /** 绘画 complete */
async function handleDrawComplete() { async function handleDrawComplete() {

View File

@ -155,10 +155,12 @@ defineExpose({
ref="mdContainerRef" ref="mdContainerRef"
class="wh-full overflow-y-auto" class="wh-full overflow-y-auto"
> >
<!-- eslint-disable vue/no-v-html -->
<div <div
class="flex flex-col items-center justify-center" class="flex flex-col items-center justify-center"
v-html="html" v-html="html"
></div> ></div>
<!-- eslint-enable vue/no-v-html -->
</div> </div>
<div ref="mindMapRef" class="wh-full"> <div ref="mindMapRef" class="wh-full">
<svg <svg

View File

@ -20,6 +20,7 @@ const currentSong = inject<any>('currentSong', {});
{{ currentSong.date }} {{ currentSong.date }}
</div> </div>
<ElButton size="small" round class="my-2">信息复用</ElButton> <ElButton size="small" round class="my-2">信息复用</ElButton>
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="text-xs" v-html="currentSong.lyric"></div> <div class="text-xs" v-html="currentSong.lyric"></div>
</ElCard> </ElCard>
</template> </template>