fix: 侧边栏优化,内敛图调大
This commit is contained in:
parent
d69d16e196
commit
55588504a1
|
|
@ -255,6 +255,8 @@ const insertMentionImage = (item) => {
|
|||
editorRef.value.focus()
|
||||
restoreSelection()
|
||||
removeMentionKeywordBeforeCursor()
|
||||
// 删除 @关键字 后必须重新记录选区,否则 insertReference 里 restoreSelection 仍用删除前的 Range,会插错位置甚至覆盖后文
|
||||
saveSelection()
|
||||
insertReference(item)
|
||||
hideMentionPanel()
|
||||
emit('text-change', getPlainText())
|
||||
|
|
@ -488,7 +490,7 @@ onMounted(() => {
|
|||
flex: 1;
|
||||
min-height: 220px;
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
line-height: 1.9;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
overflow-y: auto;
|
||||
|
|
@ -496,7 +498,7 @@ onMounted(() => {
|
|||
caret-color: #00cae0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 14px;
|
||||
padding: 14px 16px;
|
||||
padding: 16px 18px;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
|
@ -512,22 +514,28 @@ onMounted(() => {
|
|||
display: block;
|
||||
}
|
||||
.video-rich-editor :deep(.inline-rich-image) {
|
||||
height: 1.1em;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
vertical-align: baseline;
|
||||
margin: 0 2px;
|
||||
border-radius: 4px;
|
||||
height: auto;
|
||||
max-width: min(260px, 100%);
|
||||
max-height: 148px;
|
||||
object-fit: contain;
|
||||
vertical-align: middle;
|
||||
margin: 6px 8px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.video-rich-editor :deep(.inline-rich-reference) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 0 6px;
|
||||
margin: 0 2px;
|
||||
margin: 0 3px;
|
||||
border-radius: 4px;
|
||||
background: rgba(0, 202, 224, 0.15);
|
||||
color: #5eebf5;
|
||||
font-size: 0.85em;
|
||||
line-height: 1.6;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.mention-panel {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
<a-menu-item :key="item.key">
|
||||
<template #icon>
|
||||
<a-image
|
||||
:width="24"
|
||||
:width="28"
|
||||
:preview="false"
|
||||
:height="24"
|
||||
:height="28"
|
||||
:src="`/images/nav/${
|
||||
selectedKeys.indexOf(item.key) > -1
|
||||
? item.icon + '-a'
|
||||
|
|
|
|||
|
|
@ -443,7 +443,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
generateVideo() {
|
||||
async generateVideo() {
|
||||
if (this.generateLoading) {
|
||||
return
|
||||
}
|
||||
const plain = this.plainPromptText()
|
||||
const text = plain || '一个优雅的女孩在阳光下跳舞'
|
||||
|
||||
|
|
@ -515,12 +518,12 @@ export default {
|
|||
params.referenceUrl = this.firstReferenceImageUrlFromEditor()
|
||||
}
|
||||
|
||||
this.$axios({
|
||||
url: path,
|
||||
method: 'POST',
|
||||
data: params
|
||||
}).then((res) => {
|
||||
this.generateLoading = false
|
||||
try {
|
||||
const res = await this.$axios({
|
||||
url: path,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
if (res.code == 200) {
|
||||
this.$message.success(
|
||||
'已经提交任务,请等待或者稍后到个人中心查看作品'
|
||||
|
|
@ -539,14 +542,15 @@ export default {
|
|||
const reason = res.msg || res.message || '提交失败'
|
||||
this.$message.error(`${reason},如需帮助请联系管理员`)
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.generateLoading = false
|
||||
} catch (err) {
|
||||
const tip =
|
||||
typeof err === 'string' && err
|
||||
? err
|
||||
: err?.message || err?.response?.data?.msg || '网络或服务异常,请稍后重试'
|
||||
this.$message.error(`${tip},如需帮助请联系管理员`)
|
||||
})
|
||||
} finally {
|
||||
this.generateLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
getVideo(videoId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue