完善测试建表并统一前端格式
This commit is contained in:
@@ -2,7 +2,14 @@
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElInput, ElMessage } from 'element-plus'
|
||||
import { Bell, Document, Operation, Picture, QuestionFilled, Warning } from '@element-plus/icons-vue'
|
||||
import {
|
||||
Bell,
|
||||
Document,
|
||||
Operation,
|
||||
Picture,
|
||||
QuestionFilled,
|
||||
Warning,
|
||||
} from '@element-plus/icons-vue'
|
||||
import type { Announcement } from '@/features/announcement'
|
||||
import type {
|
||||
CreateAnnouncementRequest,
|
||||
@@ -134,7 +141,9 @@ async function handleImageChange(event: Event) {
|
||||
uploadingImage.value = true
|
||||
try {
|
||||
const uploaded = await uploadAdminFile(file, 'announcement')
|
||||
insertContentAtCursor(``)
|
||||
insertContentAtCursor(
|
||||
``
|
||||
)
|
||||
ElMessage.success('图片已插入')
|
||||
} catch (error) {
|
||||
ElMessage.error(readError(error, '图片上传失败'))
|
||||
@@ -205,7 +214,9 @@ function applyImageSettings() {
|
||||
return
|
||||
}
|
||||
|
||||
const widthMark = imageSettingsForm.value.useCustomWidth ? `|w=${imageSettingsForm.value.width}` : ''
|
||||
const widthMark = imageSettingsForm.value.useCustomWidth
|
||||
? `|w=${imageSettingsForm.value.width}`
|
||||
: ''
|
||||
const nextMarkdown = ``
|
||||
const content = formData.value.content
|
||||
formData.value.content = `${content.slice(0, range.start)}${nextMarkdown}${content.slice(range.end)}`
|
||||
@@ -358,7 +369,11 @@ function escapeMarkdownImageText(text: string) {
|
||||
</el-form-item>
|
||||
<el-form-item label="显示宽度">
|
||||
<div class="image-width-control">
|
||||
<el-switch v-model="imageSettingsForm.useCustomWidth" active-text="自定义" inactive-text="原宽" />
|
||||
<el-switch
|
||||
v-model="imageSettingsForm.useCustomWidth"
|
||||
active-text="自定义"
|
||||
inactive-text="原宽"
|
||||
/>
|
||||
<el-slider
|
||||
v-model="imageSettingsForm.width"
|
||||
:min="120"
|
||||
|
||||
@@ -208,7 +208,12 @@ function accountTypeLabel(type: string) {
|
||||
:admin="true"
|
||||
:preview-src-list="withdrawal.certificate_urls"
|
||||
fit="cover"
|
||||
:image-style="{ width: '100px', height: '100px', borderRadius: '4px', cursor: 'pointer' }"
|
||||
:image-style="{
|
||||
width: '100px',
|
||||
height: '100px',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
|
||||
Reference in New Issue
Block a user