Commit 692fd702f9e65c0dc9e6107c230757bb70644c37
Merge branch 'fix/DEFECT-1987' into 'main_dev'
fix: 修复当新增通知先图片上传,再编辑文字,则一直会提示红框内容 See merge request yunteng/thingskit-front!1288
Showing
1 changed file
with
4 additions
and
9 deletions
| ... | ... | @@ -4,6 +4,7 @@ import { Tinymce } from '/@/components/Tinymce/index'; |
| 4 | 4 | import { getOrganizationList } from '/@/api/system/system'; |
| 5 | 5 | import { copyTransFun } from '/@/utils/fnUtils'; |
| 6 | 6 | import { Tag } from 'ant-design-vue'; |
| 7 | +import { useComponentRegister } from '/@/components/Form'; | |
| 7 | 8 | |
| 8 | 9 | export enum IsOrgEnum { |
| 9 | 10 | IS_ORG_ENUM = 1, |
| ... | ... | @@ -12,6 +13,8 @@ export const isOrg = (type: string) => { |
| 12 | 13 | return type === IsOrgEnum.IS_ORG_ENUM; |
| 13 | 14 | }; |
| 14 | 15 | |
| 16 | +useComponentRegister('Tinymce', Tinymce); | |
| 17 | + | |
| 15 | 18 | export const columns: BasicColumn[] = [ |
| 16 | 19 | { |
| 17 | 20 | title: '类型', |
| ... | ... | @@ -92,21 +95,13 @@ export const formSchema: FormSchema[] = [ |
| 92 | 95 | }, |
| 93 | 96 | { |
| 94 | 97 | field: 'content', |
| 95 | - component: 'Input', | |
| 98 | + component: 'Tinymce', | |
| 96 | 99 | colProps: { span: 24 }, |
| 97 | 100 | label: '通知内容', |
| 98 | 101 | required: true, |
| 99 | 102 | componentProps: { |
| 100 | 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 | 107 | field: 'receiverType', | ... | ... |