diff --git a/src/components/wangeditor.vue b/src/components/wangeditor.vue index d0a4f66..9fe8d53 100644 --- a/src/components/wangeditor.vue +++ b/src/components/wangeditor.vue @@ -43,7 +43,7 @@ import {Editor, Toolbar} from '@wangeditor/editor-for-vue' var {getters}=inject("store") var editorRef=shallowRef() - window.e=editorRef + var toolbarKeys=[ 'headerSelect','|', { @@ -107,7 +107,7 @@ import {Editor, Toolbar} from '@wangeditor/editor-for-vue' } watch(()=>[props.modelValue,editorRef.value], n=>{ - if(n[1]){ + if(n[0] && n[1]){ n[1].setHtml(n[0]) } },{immediate:true}) diff --git a/src/view/center/company/info.vue b/src/view/center/company/info.vue index ae3545a..0d74ffb 100644 --- a/src/view/center/company/info.vue +++ b/src/view/center/company/info.vue @@ -139,14 +139,6 @@ - @@ -259,9 +251,9 @@ import {district} from '@/config/utils' if(await dispatch('data/getCompany')){ formData.value={ ...getters['data/companyInfo'], - pic: getters['data/companyInfo']?.pic?.split(',').filter(v=>v)||[], - region: getters['data/companyInfo']?.region.replace(/\d+,\d+,(\d+)/,'$1'), - businessType:getters['data/companyInfo']?.businessType?.split(',').filter(v=>v)||[], + pic: getters['data/companyInfo']?.pic?.split(',').filter?.(v=>v)||[], + region: getters['data/companyInfo']?.region?.replace?.(/\d+,\d+,(\d+)/,'$1'), + businessType:getters['data/companyInfo']?.businessType?.split?.(',')?.filter?.(v=>v)||[], } }else{ msg.error('获取企业详情失败!')