Commit 692fd702f9e65c0dc9e6107c230757bb70644c37

Authored by xp.Huang
2 parents cc94a694 6867d6d1

Merge branch 'fix/DEFECT-1987' into 'main_dev'

fix: 修复当新增通知先图片上传,再编辑文字,则一直会提示红框内容

See merge request yunteng/thingskit-front!1288
@@ -4,6 +4,7 @@ import { Tinymce } from '/@/components/Tinymce/index'; @@ -4,6 +4,7 @@ import { Tinymce } from '/@/components/Tinymce/index';
4 import { getOrganizationList } from '/@/api/system/system'; 4 import { getOrganizationList } from '/@/api/system/system';
5 import { copyTransFun } from '/@/utils/fnUtils'; 5 import { copyTransFun } from '/@/utils/fnUtils';
6 import { Tag } from 'ant-design-vue'; 6 import { Tag } from 'ant-design-vue';
  7 +import { useComponentRegister } from '/@/components/Form';
7 8
8 export enum IsOrgEnum { 9 export enum IsOrgEnum {
9 IS_ORG_ENUM = 1, 10 IS_ORG_ENUM = 1,
@@ -12,6 +13,8 @@ export const isOrg = (type: string) => { @@ -12,6 +13,8 @@ export const isOrg = (type: string) => {
12 return type === IsOrgEnum.IS_ORG_ENUM; 13 return type === IsOrgEnum.IS_ORG_ENUM;
13 }; 14 };
14 15
  16 +useComponentRegister('Tinymce', Tinymce);
  17 +
15 export const columns: BasicColumn[] = [ 18 export const columns: BasicColumn[] = [
16 { 19 {
17 title: '类型', 20 title: '类型',
@@ -92,21 +95,13 @@ export const formSchema: FormSchema[] = [ @@ -92,21 +95,13 @@ export const formSchema: FormSchema[] = [
92 }, 95 },
93 { 96 {
94 field: 'content', 97 field: 'content',
95 - component: 'Input', 98 + component: 'Tinymce',
96 colProps: { span: 24 }, 99 colProps: { span: 24 },
97 label: '通知内容', 100 label: '通知内容',
98 required: true, 101 required: true,
99 componentProps: { 102 componentProps: {
100 maxLength: 255, 103 maxLength: 255,
101 }, 104 },
102 - render: ({ model, field }) => {  
103 - return h(Tinymce, {  
104 - value: model[field],  
105 - onChange: (value: string) => {  
106 - model[field] = value;  
107 - },  
108 - });  
109 - },  
110 }, 105 },
111 { 106 {
112 field: 'receiverType', 107 field: 'receiverType',