修改现场反馈问题
This commit is contained in:
@@ -1,28 +1,20 @@
|
||||
<template>
|
||||
<div style="border: 1px solid #e4e4e4; height: 100%">
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #e4e4e4; border-top: 1px solid #e4e4e4"
|
||||
:editor="editorRef"
|
||||
:defaultConfig="toolbarConfig"
|
||||
mode="default"
|
||||
/>
|
||||
<Editor
|
||||
v-bind="$attrs"
|
||||
:defaultConfig="editorConfig"
|
||||
mode="default"
|
||||
@onCreated="handleCreated"
|
||||
style="height: calc(100% - 42px)"
|
||||
/>
|
||||
<Toolbar style="border-bottom: 1px solid #e4e4e4; border-top: 1px solid #e4e4e4" :editor="editorRef"
|
||||
:defaultConfig="toolbarConfig" mode="default" />
|
||||
<Editor v-bind="$attrs" :defaultConfig="editorConfig" mode="default" @onCreated="handleCreated"
|
||||
style="height: calc(100% - 42px)" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import '@wangeditor/editor/dist/css/style.css' // 引入 css
|
||||
|
||||
import { getAccessToken, getTenantId } from '@/utils/auth'
|
||||
import { onBeforeUnmount, ref, shallowRef, onMounted } from 'vue'
|
||||
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
// 编辑器实例,必须用 shallowRef
|
||||
const editorRef = shallowRef()
|
||||
|
||||
const adminInfo = useAdminInfo()
|
||||
// 内容 HTML
|
||||
const valueHtml = ref('<p>hello</p>')
|
||||
|
||||
@@ -51,7 +43,12 @@ const editorConfig = {
|
||||
compress: true,
|
||||
uploadFileName: 'file',
|
||||
withCredentials: true,
|
||||
headers: {},
|
||||
|
||||
headers: {
|
||||
Accept: '*',
|
||||
Authorization: adminInfo.getToken(),
|
||||
|
||||
},
|
||||
meta: { path: '/supervision/' },
|
||||
timeout: 0,
|
||||
customInsert(res: any, insertFn: InsertFnType) {
|
||||
|
||||
Reference in New Issue
Block a user