From 147055fba26e6a77f8732e6e8d2ee5ce8eea4110 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Tue, 25 Oct 2022 11:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7online-lib=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E7=89=88=E6=9C=AC=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E9=87=8D=E5=A4=A7=E9=97=AE=E9=A2=98=201=E3=80=81=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=85=B3=E8=81=94=E8=AE=B0=E5=BD=95=E5=92=8C=E4=BB=96?= =?UTF-8?q?=E8=A1=A8=E5=AD=97=E6=AE=B5=E6=8E=A7=E4=BB=B6=202=E3=80=81?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=B8=89=E7=BA=A7=E8=81=94=E5=8A=A8=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=203=E3=80=81online=E6=8A=A5=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=94=AF=E6=8C=81=E5=AD=97=E5=85=B8=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=8E=A7=E4=BB=B6=204=E3=80=81online?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=9F=A5=E8=AF=A2=EF=BC=8C=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E7=B1=BB=E5=9E=8B=E9=BB=98=E8=AE=A4=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=EF=BC=8C=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E8=BE=93=E5=85=A5*=205=E3=80=81online=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=8C=E6=94=AF=E6=8C=81=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=82=A3=E7=A7=8D=E5=89=8D=E7=AB=AF=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=EF=BC=88vue3\vue2\vue3=E5=8E=9F=E7=94=9F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/Form/src/hooks/useForm.ts | 8 +++++++ .../Form/src/jeecg/components/JCodeEditor.vue | 15 ++++++++++++ .../jeecg/OnLine/SearchFormItem.vue | 24 ++++++++----------- src/enums/CompTypeEnum.ts | 2 +- 5 files changed, 35 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 7b74643..cef436c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "gen:icon": "esno ./build/generate/icon/index.ts" }, "dependencies": { - "@jeecg/online": "3.4.3-beta", + "@jeecg/online": "3.4.3", "@iconify/iconify": "^2.2.1", "@ant-design/colors": "^6.0.0", "@ant-design/icons-vue": "^6.1.0", diff --git a/src/components/Form/src/hooks/useForm.ts b/src/components/Form/src/hooks/useForm.ts index 1bef263..a4d6f8c 100644 --- a/src/components/Form/src/hooks/useForm.ts +++ b/src/components/Form/src/hooks/useForm.ts @@ -6,6 +6,9 @@ import { ref, onUnmounted, unref, nextTick, watch } from 'vue'; import { isProdMode } from '/@/utils/env'; import { error } from '/@/utils/log'; import { getDynamicProps, getValueType } from '/@/utils'; +import { add } from "/@/components/Form/src/componentMap"; +//集成online专用控件 +import { OnlineSelectCascade, LinkTableCard, LinkTableSelect } from '@jeecg/online'; export declare type ValidateFields = (nameList?: NamePath[]) => Promise; @@ -15,6 +18,11 @@ export function useForm(props?: Props): UseFormReturnType { const formRef = ref>(null); const loadedRef = ref>(false); + //集成online专用控件 + add("OnlineSelectCascade", OnlineSelectCascade) + add("LinkTableCard", LinkTableCard) + add("LinkTableSelect", LinkTableSelect) + async function getForm() { const form = unref(formRef); if (!form) { diff --git a/src/components/Form/src/jeecg/components/JCodeEditor.vue b/src/components/Form/src/jeecg/components/JCodeEditor.vue index 75683b5..9f06e4d 100644 --- a/src/components/Form/src/jeecg/components/JCodeEditor.vue +++ b/src/components/Form/src/jeecg/components/JCodeEditor.vue @@ -197,6 +197,15 @@ }); const getBindValue = Object.assign({}, unref(props), unref(attrs)); + + //update-begin-author:taoyan date:2022-10-18 for: VUEN-2480【严重bug】online vue3测试的问题 8、online js增强样式问题 + function refresh(){ + if(coder){ + coder.refresh(); + } + } + //update-end-author:taoyan date:2022-10-18 for: VUEN-2480【严重bug】online vue3测试的问题 8、online js增强样式问题 + return { state, textarea, @@ -206,6 +215,7 @@ isFullScreen, fullScreenIcon, onToggleFullScreen, + refresh }; }, }); @@ -279,5 +289,10 @@ height: 100%; } } + + /** VUEN-2344【vue3】这个样式有问题,是不是加个边框 */ + .CodeMirror{ + border: 1px solid #ddd; + } } diff --git a/src/components/jeecg/OnLine/SearchFormItem.vue b/src/components/jeecg/OnLine/SearchFormItem.vue index 8966db6..84f647f 100644 --- a/src/components/jeecg/OnLine/SearchFormItem.vue +++ b/src/components/jeecg/OnLine/SearchFormItem.vue @@ -44,7 +44,7 @@ - - - - + + @@ -202,7 +194,10 @@ -