From a0f6776c5ea6c45c9262a07246dbe1957baef69e Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Mon, 3 Apr 2023 12:06:34 +0800 Subject: [PATCH] 123 --- src/store/index.js | 3 +- src/store/modules/detail.js | 16 +++ src/style.scss | 18 ++++ .../Index/components/CaseDetails/PicCard/index.vue | 49 +++++++++ .../Index/components/CaseDetails/Tabs/index.vue | 88 +++++++++++++++++ .../Index/components/CaseDetails/Trumbs/index.vue | 109 +++++++++++++++++++++ src/views/Index/components/CaseDetails/index.vue | 88 ++++++++++++++++- .../Index/components/MechanicalControl/index.vue | 42 ++++++-- 8 files changed, 401 insertions(+), 12 deletions(-) create mode 100644 src/store/modules/detail.js create mode 100644 src/views/Index/components/CaseDetails/PicCard/index.vue create mode 100644 src/views/Index/components/CaseDetails/Tabs/index.vue create mode 100644 src/views/Index/components/CaseDetails/Trumbs/index.vue diff --git a/src/store/index.js b/src/store/index.js index 4840e76..cd42b5b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,7 +1,8 @@ import { createPinia } from 'pinia' import { useCountStore } from './modules/count' import { useSwiperStore } from './modules/swiper' +import { useDetailStore } from './modules/detail' const store = createPinia() export default store -export { useCountStore, useSwiperStore } +export { useCountStore, useSwiperStore, useDetailStore } diff --git a/src/store/modules/detail.js b/src/store/modules/detail.js new file mode 100644 index 0000000..8b95561 --- /dev/null +++ b/src/store/modules/detail.js @@ -0,0 +1,16 @@ +import { defineStore } from 'pinia' +export const useDetailStore = defineStore({ + id: 'detail', // id必填,且需要唯一 + // state + state: () => { + return { + industry_id: '1', + } + }, + // actions + actions: { + updateIndustryId(industry_id) { + this.industry_id = industry_id + }, + }, +}) diff --git a/src/style.scss b/src/style.scss index e6d77a8..cb2d6ca 100644 --- a/src/style.scss +++ b/src/style.scss @@ -135,6 +135,24 @@ body { } } +.case_detail_swiper { + position: relative; + .swiper-pagination { + display: block; + position: absolute; + bottom: 20px !important; + .swiper-pagination-bullet { + width: 8px; + height: 8px; + background: #fafafa; + border-radius: 50%; + } + .swiper-pagination-bullet-active { + background-color: $theme_color; + } + } +} + .autoplay-progress { position: absolute; left: 90vw; diff --git a/src/views/Index/components/CaseDetails/PicCard/index.vue b/src/views/Index/components/CaseDetails/PicCard/index.vue new file mode 100644 index 0000000..cd48c6f --- /dev/null +++ b/src/views/Index/components/CaseDetails/PicCard/index.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/views/Index/components/CaseDetails/Tabs/index.vue b/src/views/Index/components/CaseDetails/Tabs/index.vue new file mode 100644 index 0000000..4aac7be --- /dev/null +++ b/src/views/Index/components/CaseDetails/Tabs/index.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/views/Index/components/CaseDetails/Trumbs/index.vue b/src/views/Index/components/CaseDetails/Trumbs/index.vue new file mode 100644 index 0000000..83e0d7a --- /dev/null +++ b/src/views/Index/components/CaseDetails/Trumbs/index.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/views/Index/components/CaseDetails/index.vue b/src/views/Index/components/CaseDetails/index.vue index 83ab69d..059c3e2 100644 --- a/src/views/Index/components/CaseDetails/index.vue +++ b/src/views/Index/components/CaseDetails/index.vue @@ -1,9 +1,89 @@ - + - + diff --git a/src/views/Index/components/MechanicalControl/index.vue b/src/views/Index/components/MechanicalControl/index.vue index 9cde01d..de007ec 100644 --- a/src/views/Index/components/MechanicalControl/index.vue +++ b/src/views/Index/components/MechanicalControl/index.vue @@ -9,18 +9,30 @@
-
-
-
+
+
舵机
+
+
+
直流电机
+
+
+
伺服电机
+
-
-
-
+
+
步进电机
+
+
+
有刷电机
+
+
+
无刷电机
+
@@ -115,7 +127,23 @@ onMounted(() => { width: 222px; height: 100px; border-radius: 6px; - background: #000; + position: relative; + overflow: hidden; + .dialog_text { + position: absolute; + display: flex; + align-items: center; + justify-content: center; + font-size: 23px; + font-weight: 400; + color: #ffffff; + background: #000; + opacity: 0.5; + left: 0; + right: 0; + top: 0; + bottom: 0; + } } } .main_imgwrap {