From cd0b5d58bad2ed1e04fa0626c9de7b13d9692fa9 Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期三, 24 四月 2024 16:25:18 +0800 Subject: [PATCH] 1 --- src/views/home.vue | 91 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 77 insertions(+), 14 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index ec58c69..3056d37 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -40,12 +40,23 @@ <!-- 鑿滃崟鍐呭 --> <div class="menuContent" v-if="menuState.open"> <div class="searchBox"> - <div class="inputBox"> + <div class="inputBox" v-if="activeMenu !== 2"> <el-input class="custom-input" placeholder="璇疯緭鍏ュ唴瀹�"> <template #prefix> <el-icon><Search /></el-icon> </template> </el-input> + </div> + <div v-else class="resourceTab"> + <div class="tabItem hover" @click="selectResourceType('default')"> + <p>榛樿璧勬簮</p> + <div :class="resourceType == 'default' ? 'text' : 'line'"></div> + </div> + <hr class="hr"/> + <div class="tabItem hover" @click="selectResourceType('teacher')"> + <p>鏁欏笀璧勬簮</p> + <div :class="resourceType == 'teacher' ? 'text' : 'line'"></div> + </div> </div> </div> <!-- 鐩綍 --> @@ -71,7 +82,17 @@ </div> </div> <!-- 璧勬簮 --> - <div class="" v-if="activeMenu == 2"></div> + <div class="" v-if="activeMenu == 2"> + <div class="resourceBox"> + <div class="inputBox"> + <el-input class="custom-input" placeholder="璇疯緭鍏ュ唴瀹�"> + <template #prefix> + <el-icon><Search /></el-icon> + </template> + </el-input> + </div> + </div> + </div> <!-- 鐭ヨ瘑鍥捐氨 --> <div class="" v-if="activeMenu == 3"></div> <!-- 鎴浘 --> @@ -494,9 +515,7 @@ import huabi2 from '../assets/images/operation/huabi.svg' import { start } from 'qiankun' onMounted(() => { - start() - }) // 鑿滃崟 const menuData = reactive([ @@ -527,12 +546,19 @@ ]) // 閫変腑鑿滃崟 const activeMenu = ref(0) +//璧勬簮绫诲瀷 +const resourceType = ref("default") // 鑿滃崟鐐瑰嚮 const menuItemClick = (index) => { activeMenu.value = index menuState.open = true } + +const selectResourceType = (type) => { + resourceType.value = type +} + const menuState = reactive({ open: true, notesColor: '' @@ -1120,16 +1146,53 @@ display: flex; justify-content: center; align-items: center; - .inputBox { - .custom-input { - border: 1px solid #0093ff !important; - border-radius: 50px; - overflow: hidden; - } - .is-focus, - .el-input__wrapper { - box-shadow: none !important; - } + } + .resourceBox{ + width: 100%; + height: 60px; + display: flex; + justify-content: center; + align-items: center; + } + .resourceTab{ + width:100%; + height: 60px; + display: flex; + justify-content: center; + align-items: center; + font-size:16px; + .hr{ + height:25px; + background:#DBDBDB !important; + } + .tabItem:first-child(1){ + border-right:1px solid #707070; + } + .tabItem{ + flex:1; + text-align: center; + line-height:57px; + } + .text { + width: 43px; + height: 3px; + margin: 0 auto; + background: #0093ff; + border-radius: 3px 3px 0px 0px; + } + .line{ + height: 3px; + } + } + .inputBox { + .custom-input { + border: 1px solid #0093ff !important; + border-radius: 50px; + overflow: hidden; + } + .is-focus, + .el-input__wrapper { + box-shadow: none !important; } } .screenBox { -- Gitblit v1.9.1