Prechádzať zdrojové kódy

reactor:515 知识库管理增加查询条件

zhangchong 4 dní pred
rodič
commit
d3e158f433

+ 24 - 7
src/components/Editor/index.vue

@@ -14,10 +14,10 @@
 	</div>
 </template>
 <script lang="ts" setup name="wngEditor">
-import '@wangeditor-next/editor/dist/css/style.css' // 引入 css
+import '@wangeditor-next/editor/dist/css/style.css'; // 引入 css
 import { onBeforeUnmount, reactive, shallowRef, watch, nextTick, ref } from 'vue';
-import { IDomEditor } from '@wangeditor-next/editor'
-import { Editor, Toolbar } from '@wangeditor-next/editor-for-vue'
+import { IDomEditor } from '@wangeditor-next/editor';
+import { Editor, Toolbar } from '@wangeditor-next/editor-for-vue';
 import { Cookie } from '@/utils/storage';
 import { uploadFile } from '@/api/public/upload';
 import { ElMessage } from 'element-plus';
@@ -62,12 +62,9 @@ const state = reactive<any>({
 	editorConfig: {
 		placeholder: props.placeholder,
 		MENU_CONF: {},
-		hoverbarKeys:{
-
-		},
+		hoverbarKeys: {},
 	},
 	editorVal: props.getHtml,
-
 });
 const toolConfig = ref({
 	excludeKeys: [
@@ -152,6 +149,26 @@ state.editorConfig.MENU_CONF['fontSize'] = {
 		'48px',
 	],
 };
+// 字体
+state.editorConfig.MENU_CONF['fontFamily'] = {
+	fontFamilyList: [
+		// 字符串形式
+		'黑体',
+		'仿宋',
+		'楷体',
+		'标楷体',
+		'华文仿宋',
+		'华文楷体',
+		'宋体',
+		'微软雅黑',
+		'Arial',
+		'Tahoma',
+		'Verdana',
+		'Times New Roman',
+		'Courier New',
+		'字体仿宋-GB2312',
+	],
+};
 // 默认字体
 /*const defaultContent =ref([
 	{

+ 17 - 0
src/views/knowledge/index/edit.vue

@@ -626,6 +626,23 @@ const defaultContent = ref([
 		lineHeight: '2',
 	},
 ]);
+/*if (themeConfig.value.appScope === 'YiBin') {
+	defaultContent.value = [
+		{
+			type: 'paragraph',
+			children: [{ text: '', fontFamily: '仿宋', fontSize: '21px' }],
+			lineHeight: '2.5',
+		},
+	];
+} else {
+	defaultContent.value = [
+		{
+			type: 'paragraph',
+			children: [{ text: '', fontFamily: '字体仿宋-GB2312', fontSize: '20px' }],
+			lineHeight: '2',
+		},
+	];
+}*/
 // 展示编写规范
 const KnowledgeStandardRef = ref<RefType>();
 const showStandard = () => {