From 4115ff9847a9e779484a14b3ea6da6f2444f0fe3 Mon Sep 17 00:00:00 2001 From: chaorenluo <1243357953@qq.com> Date: Wed, 29 May 2024 21:59:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E7=BB=9F=E4=B8=80B,C=E7=AB=AF?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E7=BB=84=E4=BB=B6,=E5=B0=86=E5=85=B6?= =?UTF-8?q?=E6=8A=BD=E7=A6=BB=E5=88=B0=E7=89=A9=E6=96=99=E5=8C=BA=20(#184)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:抽离B,C端通用组件 * refactor: 通用组件统一渲染 * 兼容修复问题 (+1 squashed commit) Squashed commits: [8d168ef] refactor: 替换统一渲染组件 * refactor:统一B,C端渲染组件,将其抽离到物料区 --- .../pages/edit/components/LogoPreview.vue | 85 ------- .../pages/edit/components/MainTitle.vue | 75 ------ .../pages/edit/components/SubmitButton.vue | 42 ---- .../modules/questionModule/PreviewPanel.vue | 219 ++++++++---------- .../components/BannerContent.vue | 122 ---------- .../settingModule/skin/PreviewPanel.vue | 107 ++++----- .../materials/communals/common/utils/index.js | 11 + web/src/materials/communals/communalLoader.js | 15 ++ .../HeaderContent/Components/HeaderBanner.jsx | 82 +++++++ .../HeaderContent/Components/HeaderVideo.jsx | 66 ++++++ .../communals/widgets/HeaderContent/index.jsx | 47 ++++ .../widgets/HeaderContent/index.scss | 69 ++++++ .../communals/widgets/LogoIcon/index.jsx | 67 ++++++ .../communals/widgets/LogoIcon/index.scss | 43 ++++ .../communals/widgets/MainTitle/index.jsx | 103 ++++++++ .../communals/widgets/MainTitle/index.scss | 63 +++++ .../communals/widgets/SubmitButton/index.jsx | 56 +++++ .../communals/widgets/SubmitButton/index.scss | 27 +++ web/src/render/App.vue | 9 +- web/src/render/components/HeaderSetter.vue | 123 ---------- web/src/render/components/LogoIcon.vue | 29 --- web/src/render/components/MainTitle.vue | 60 ----- web/src/render/components/SubmitSetter.vue | 62 ----- web/src/render/hooks/useShowInput.js | 1 - web/src/render/pages/IndexPage.vue | 35 ++- web/src/render/pages/SuccessPage.vue | 7 +- 26 files changed, 825 insertions(+), 800 deletions(-) delete mode 100644 web/src/management/pages/edit/components/LogoPreview.vue delete mode 100644 web/src/management/pages/edit/components/MainTitle.vue delete mode 100644 web/src/management/pages/edit/components/SubmitButton.vue delete mode 100644 web/src/management/pages/edit/modules/settingModule/components/BannerContent.vue create mode 100644 web/src/materials/communals/common/utils/index.js create mode 100644 web/src/materials/communals/communalLoader.js create mode 100644 web/src/materials/communals/widgets/HeaderContent/Components/HeaderBanner.jsx create mode 100644 web/src/materials/communals/widgets/HeaderContent/Components/HeaderVideo.jsx create mode 100644 web/src/materials/communals/widgets/HeaderContent/index.jsx create mode 100644 web/src/materials/communals/widgets/HeaderContent/index.scss create mode 100644 web/src/materials/communals/widgets/LogoIcon/index.jsx create mode 100644 web/src/materials/communals/widgets/LogoIcon/index.scss create mode 100644 web/src/materials/communals/widgets/MainTitle/index.jsx create mode 100644 web/src/materials/communals/widgets/MainTitle/index.scss create mode 100644 web/src/materials/communals/widgets/SubmitButton/index.jsx create mode 100644 web/src/materials/communals/widgets/SubmitButton/index.scss delete mode 100755 web/src/render/components/HeaderSetter.vue delete mode 100644 web/src/render/components/LogoIcon.vue delete mode 100644 web/src/render/components/MainTitle.vue delete mode 100644 web/src/render/components/SubmitSetter.vue diff --git a/web/src/management/pages/edit/components/LogoPreview.vue b/web/src/management/pages/edit/components/LogoPreview.vue deleted file mode 100644 index bb332c1e..00000000 --- a/web/src/management/pages/edit/components/LogoPreview.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - diff --git a/web/src/management/pages/edit/components/MainTitle.vue b/web/src/management/pages/edit/components/MainTitle.vue deleted file mode 100644 index 23658fa7..00000000 --- a/web/src/management/pages/edit/components/MainTitle.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - - - diff --git a/web/src/management/pages/edit/components/SubmitButton.vue b/web/src/management/pages/edit/components/SubmitButton.vue deleted file mode 100644 index 274b5c28..00000000 --- a/web/src/management/pages/edit/components/SubmitButton.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/web/src/management/pages/edit/modules/questionModule/PreviewPanel.vue b/web/src/management/pages/edit/modules/questionModule/PreviewPanel.vue index e4dfa24d..ea59380a 100644 --- a/web/src/management/pages/edit/modules/questionModule/PreviewPanel.vue +++ b/web/src/management/pages/edit/modules/questionModule/PreviewPanel.vue @@ -4,6 +4,7 @@
- diff --git a/web/src/management/pages/edit/modules/settingModule/components/BannerContent.vue b/web/src/management/pages/edit/modules/settingModule/components/BannerContent.vue deleted file mode 100644 index 255f1095..00000000 --- a/web/src/management/pages/edit/modules/settingModule/components/BannerContent.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/web/src/management/pages/edit/modules/settingModule/skin/PreviewPanel.vue b/web/src/management/pages/edit/modules/settingModule/skin/PreviewPanel.vue index d0bda6df..94071d1f 100644 --- a/web/src/management/pages/edit/modules/settingModule/skin/PreviewPanel.vue +++ b/web/src/management/pages/edit/modules/settingModule/skin/PreviewPanel.vue @@ -3,62 +3,70 @@
- +
- + - +
- diff --git a/web/src/render/components/LogoIcon.vue b/web/src/render/components/LogoIcon.vue deleted file mode 100644 index d266cda0..00000000 --- a/web/src/render/components/LogoIcon.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/web/src/render/components/MainTitle.vue b/web/src/render/components/MainTitle.vue deleted file mode 100644 index 7fa6099d..00000000 --- a/web/src/render/components/MainTitle.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/web/src/render/components/SubmitSetter.vue b/web/src/render/components/SubmitSetter.vue deleted file mode 100644 index fc0546ff..00000000 --- a/web/src/render/components/SubmitSetter.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - diff --git a/web/src/render/hooks/useShowInput.js b/web/src/render/hooks/useShowInput.js index de90ab59..b6cccb20 100644 --- a/web/src/render/hooks/useShowInput.js +++ b/web/src/render/hooks/useShowInput.js @@ -10,7 +10,6 @@ export const useShowInput = (questionKey) => { if (curRange.isShowInput) { const rangeKey = `${questionKey}_${key}` othersValue[rangeKey] = formValues[rangeKey] - ;(curRange.othersKey = rangeKey), (curRange.othersValue = formValues[rangeKey]) if (!questionVal.toString().includes(key) && formValues[rangeKey]) { // 如果分值被未被选中且对应的填写更多有值,则清空填写更多 diff --git a/web/src/render/pages/IndexPage.vue b/web/src/render/pages/IndexPage.vue index 4bbf0ca8..3f7e40bd 100644 --- a/web/src/render/pages/IndexPage.vue +++ b/web/src/render/pages/IndexPage.vue @@ -2,12 +2,18 @@
- +
- + - - + +
@@ -15,15 +21,12 @@