Преглед на файлове

问答/笔记去除上传图片功能

canghailong преди 6 месеца
родител
ревизия
59b99b464c
променени са 2 файла, в които са добавени 18 реда и са изтрити 5 реда
  1. 7 3
      src/views/student/classCentre/ask.vue
  2. 11 2
      src/views/student/classCentre/note.vue

+ 7 - 3
src/views/student/classCentre/ask.vue

@@ -14,7 +14,7 @@
 			</a-col>
 			<a-col :span="24">
 				<a-form-item name="info" label="问题">
-					<xn-editor v-model="formDataAdd.info" placeholder="请输入问题" :height="400"></xn-editor>
+					<xn-editor v-model="formDataAdd.info" placeholder="请输入问题" :toolbar="toolbar" :height="400"></xn-editor>
 				</a-form-item>
 			</a-col>
 		</a-row>
@@ -112,7 +112,7 @@
 						</a-form-item>
 					</a-col>
 					<a-form-item name="info" label="问题">
-						<xn-editor v-model="formData.info" placeholder="请输入问题" :height="400"></xn-editor>
+						<xn-editor v-model="formData.info" :toolbar="toolbar" placeholder="请输入问题" :height="400"></xn-editor>
 					</a-form-item>
 				</a-col>
 			</a-row>
@@ -140,6 +140,10 @@
 	const formRefAdd = ref()
 	const submitLoading = ref(false)
 	const confirmLoading = ref(false)
+	const toolbar = ref(
+		'undo redo |  forecolor backcolor bold italic underline strikethrough link | blocks fontfamily fontsize | \
+				alignleft aligncenter alignright alignjustify outdent indent lineheight | bullist numlist | \ table  preview | code selectall'
+	)
 	// 默认要校验的
 	const formRules = {
 		info: [required('请输入问题')],
@@ -208,7 +212,7 @@
 	}
 
 	const editNote = (e) => {
-		formData.value = Object.assign(formData.value, {id:e.id,info:e.info,infoType:e.infoType})
+		formData.value = Object.assign(formData.value, { id: e.id, info: e.info, infoType: e.infoType })
 		visible.value = true
 	}
 	const delNote = (e) => {

+ 11 - 2
src/views/student/classCentre/note.vue

@@ -3,7 +3,12 @@
 		<a-row :gutter="16">
 			<a-col :span="24">
 				<a-form-item name="noteContent" label="笔记">
-					<xn-editor v-model="formDataAdd.noteContent" placeholder="请输入笔记" :height="400"></xn-editor>
+					<xn-editor
+						v-model="formDataAdd.noteContent"
+						:toolbar="toolbar"
+						placeholder="请输入笔记"
+						:height="400"
+					></xn-editor>
 				</a-form-item>
 			</a-col>
 		</a-row>
@@ -65,7 +70,7 @@
 			<a-row :gutter="16">
 				<a-col :span="24">
 					<a-form-item name="noteContent" label="问题">
-						<xn-editor v-model="formData.noteContent" placeholder="请输入笔记" :height="400"></xn-editor>
+						<xn-editor v-model="formData.noteContent" :toolbar="toolbar" placeholder="请输入笔记" :height="400"></xn-editor>
 					</a-form-item>
 				</a-col>
 			</a-row>
@@ -88,6 +93,10 @@
 	const formRefAdd = ref()
 	const submitLoading = ref(false)
 	const confirmLoading = ref(false)
+	const toolbar = ref(
+		'undo redo |  forecolor backcolor bold italic underline strikethrough link | blocks fontfamily fontsize | \
+				alignleft aligncenter alignright alignjustify outdent indent lineheight | bullist numlist | \ table  preview | code selectall'
+	)
 	// 默认要校验的
 	const formRules = {
 		noteContent: [required('请输入笔记')]