|
@@ -12,11 +12,14 @@
|
|
|
<el-input
|
|
|
@keyup.enter="handleQuery"
|
|
|
@input="handleInputQuery"
|
|
|
+ @focus="handleInputFocus"
|
|
|
+ @blur="handleInputBlur"
|
|
|
v-model="queryStr"
|
|
|
style="max-width: 600px"
|
|
|
placeholder="请输入教材名称"
|
|
|
clearable
|
|
|
class="iptSelect"
|
|
|
+ :class="{ isInputFocus: isInputFocus }"
|
|
|
>
|
|
|
<template #prepend>
|
|
|
<img src="@/img/cloudTextbooks/ss.png" />
|
|
@@ -32,9 +35,14 @@
|
|
|
<div class="cloudTextbooksBox">
|
|
|
<div class="bookshelf" v-for="(list, index) in listData" :key="index">
|
|
|
<div class="book" v-for="item in list" :key="item.id">
|
|
|
- <ElImage class="img" :src="item.img" @click="handleClick(item.id)" />
|
|
|
+ <div class="imgCon">
|
|
|
+ <ElImage class="img" :src="item.img" @click="handleClick(item.id)" />
|
|
|
+ <img class="imgbg" src="@/img/cloudTextbooks/yy.png" />
|
|
|
+ <img class="imgbg1" src="@/img/cloudTextbooks/hd1.png" />
|
|
|
+ <img class="imgbg2" src="@/img/cloudTextbooks/hd.png" />
|
|
|
+ <div class="courseNum">共{{ item.courseNum }}课</div>
|
|
|
+ </div>
|
|
|
<div class="name">{{ item.name }}</div>
|
|
|
- <div class="courseNum">共{{ item.courseNum }}课</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-empty
|
|
@@ -81,6 +89,15 @@ const classType = ref("")
|
|
|
const classTypeOpt = shallowRef<{ value: string; label: string }[]>([])
|
|
|
const queryStr = ref("")
|
|
|
|
|
|
+// 选中样式
|
|
|
+const isInputFocus = ref(false)
|
|
|
+function handleInputFocus() {
|
|
|
+ isInputFocus.value = true
|
|
|
+}
|
|
|
+function handleInputBlur() {
|
|
|
+ isInputFocus.value = false
|
|
|
+}
|
|
|
+
|
|
|
handleGetClassTypeOpt()
|
|
|
handleGetList()
|
|
|
|
|
@@ -166,17 +183,26 @@ function handleClick(id: string) {
|
|
|
.el-input__wrapper {
|
|
|
border-radius: 20px;
|
|
|
box-shadow: none;
|
|
|
- padding: 1px 26px;
|
|
|
+ padding: 1px 26px 1px 16px;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ &.is-focus {
|
|
|
+ border-color: #ff8057 !important;
|
|
|
+ box-shadow: 0px 0px 4px 0px rgba(255, 155, 109) !important;
|
|
|
+ }
|
|
|
.el-input__inner {
|
|
|
--el-input-inner-height: 40px;
|
|
|
- text-align: center;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .isInputFocus {
|
|
|
+ border-color: #ff8057 !important;
|
|
|
+ box-shadow: 0px 0px 4px 0px rgba(255, 155, 109);
|
|
|
+ }
|
|
|
& > :deep(.iptSelect) {
|
|
|
+ border: 1px solid transparent;
|
|
|
margin-left: 12px;
|
|
|
width: 382px;
|
|
|
- background: #ffffff;
|
|
|
+ background: #fff;
|
|
|
border-radius: 21px;
|
|
|
&.el-input {
|
|
|
--el-input-text-color: #333;
|
|
@@ -232,6 +258,7 @@ function handleClick(id: string) {
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
min-width: 1500px;
|
|
|
+ padding-top: 10px;
|
|
|
.bookshelf {
|
|
|
width: 1500px;
|
|
|
padding: 0 116px;
|
|
@@ -248,38 +275,72 @@ function handleClick(id: string) {
|
|
|
width: 20%;
|
|
|
text-align: center;
|
|
|
position: relative;
|
|
|
- .img {
|
|
|
- cursor: pointer;
|
|
|
+ padding-top: 4px;
|
|
|
+ .imgCon {
|
|
|
width: 172px;
|
|
|
height: 212px;
|
|
|
+ display: inline-block;
|
|
|
+ position: relative;
|
|
|
&:hover {
|
|
|
- opacity: $opacity-hover;
|
|
|
+ transform: translateY(-4px);
|
|
|
+ }
|
|
|
+ .img {
|
|
|
+ cursor: pointer;
|
|
|
+ width: 172px;
|
|
|
+ height: 212px;
|
|
|
+ }
|
|
|
+ .imgbg {
|
|
|
+ position: absolute;
|
|
|
+ top: -20px;
|
|
|
+ right: -50px;
|
|
|
+ width: 76px;
|
|
|
+ height: 247px;
|
|
|
+ }
|
|
|
+ .imgbg1 {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ right: -4px;
|
|
|
+ width: 4px;
|
|
|
+ height: 212px;
|
|
|
+ }
|
|
|
+ .imgbg2 {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ left: 0px;
|
|
|
+ width: 9px;
|
|
|
+ height: 212px;
|
|
|
+ }
|
|
|
+ .courseNum {
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 10px;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ background: #ffffff;
|
|
|
+ padding: 0 10px;
|
|
|
+ border-radius: 13px;
|
|
|
+ opacity: 0.83;
|
|
|
+ line-height: 25px;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #6b3c2d;
|
|
|
}
|
|
|
}
|
|
|
.name {
|
|
|
- margin-top: 50px;
|
|
|
+ margin-top: 48px;
|
|
|
font-weight: 400;
|
|
|
font-size: 19px;
|
|
|
color: #393939;
|
|
|
line-height: 26px;
|
|
|
}
|
|
|
- .courseNum {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 176px;
|
|
|
- transform: translateX(-50%);
|
|
|
- background: #ffffff;
|
|
|
- padding: 0 10px;
|
|
|
- border-radius: 13px;
|
|
|
- opacity: 0.83;
|
|
|
- line-height: 25px;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
- color: #6b3c2d;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+:global(.headDropdown.el-dropdown__popper.el-popper) {
|
|
|
+ box-shadow: 0px 2px 17px 0px rgba(0, 0, 0, 0.08);
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 16px;
|
|
|
+ inset: 84px 54px auto auto !important;
|
|
|
+}
|
|
|
</style>
|