修改editor样式

This commit is contained in:
GGJ
2024-10-12 11:23:52 +08:00
parent de872782d3
commit 7062305c01
6 changed files with 80 additions and 11 deletions

View File

@@ -63,7 +63,7 @@ const GetEchar = async (name: string) => {
legend: { legend: {
orient: 'vertical', orient: 'vertical',
left: 26, left: 25,
bottom: 40, bottom: 40,
itemWidth: 16, itemWidth: 16,
itemHeight: 16, itemHeight: 16,

View File

@@ -28,11 +28,11 @@ onMounted(() => {
const toolbarConfig = { const toolbarConfig = {
excludeKeys: ['fullScreen', 'emotion'] excludeKeys: ['fullScreen', 'emotion']
} }
let sever = '/system-boot/file/upload' let sever = '/api/system-boot/file/upload'
// 本地加api // 本地加api
if (process.env.NODE_ENV === 'development') { // if (process.env.NODE_ENV === 'development') {
sever = '/api' + sever // sever = '/api' + sever
} // }
type InsertFnType = (url: string, alt: string, href: string) => void type InsertFnType = (url: string, alt: string, href: string) => void
const editorConfig = { const editorConfig = {
placeholder: '请输入内容...', placeholder: '请输入内容...',
@@ -40,6 +40,7 @@ const editorConfig = {
uploadImage: { uploadImage: {
server: sever, server: sever,
fieldName: 'file', fieldName: 'file',
maxFileSize: 10 * 1024 * 1024,
compress: true, compress: true,
uploadFileName: 'file', uploadFileName: 'file',
withCredentials: true, withCredentials: true,

View File

@@ -82,7 +82,7 @@
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" /> @getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" />
<!-- 定义 --> <!-- 定义 -->
<el-dialog v-model="viewFlag" title="定义" width="60%"> <el-dialog v-model="viewFlag" title="定义" width="60%">
<div v-html="summary" style="min-height: 300px;" /> <div class="editor" v-html="summary" style="min-height: 300px;" />
</el-dialog> </el-dialog>
<!-- 删除 --> <!-- 删除 -->
<el-dialog v-model="dialogVisible" title="请选择需要删除的数据" width="400"> <el-dialog v-model="dialogVisible" title="请选择需要删除的数据" width="400">
@@ -287,4 +287,27 @@ const change = (row: any) => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.editor {
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
td {
background-color: #ffffff;
}
}
</style> </style>

View File

@@ -23,7 +23,7 @@
</el-descriptions-item>] </el-descriptions-item>]
<div> <div>
<el-descriptions-item label="事件简介"> <el-descriptions-item label="事件简介">
<div v-html="tableData.summary"></div> <div class='editor' v-html="tableData.summary"></div>
</el-descriptions-item> </el-descriptions-item>
</div> </div>
</el-descriptions> </el-descriptions>
@@ -109,4 +109,26 @@ defineExpose({ open })
margin-left: 10px; margin-left: 10px;
color: #0000EE; color: #0000EE;
} }
.editor {
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
td {
background-color: #ffffff;
}
}
</style> </style>

View File

@@ -20,7 +20,7 @@
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" /> <PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
<!-- 简介详情 --> <!-- 简介详情 -->
<el-dialog v-model="dialogVisible" title="事件简介" width="60%"> <el-dialog v-model="dialogVisible" title="事件简介" width="60%">
<div v-html="summary"></div> <div class="editor" v-html="summary"></div>
</el-dialog> </el-dialog>
<!-- 抽屉 --> <!-- 抽屉 -->
<drawer ref="drawerRef" /> <drawer ref="drawerRef" />
@@ -222,4 +222,27 @@ const downloadTheReport = () => {
}) })
} }
</script> </script>
<style lang="scss"></style> <style lang="scss">
.editor {
table {
width: 100%;
border-collapse: collapse;
}
th,
td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
font-weight: bold;
}
td {
background-color: #ffffff;
}
}
</style>

View File

@@ -102,7 +102,7 @@ const map = (res: any) => {
}, },
visualMap: { visualMap: {
left: 26, left: 25,
bottom: 40, bottom: 40,
show: true, show: true,
inRange: { inRange: {