|
@@ -7,6 +7,7 @@
|
|
|
>
|
|
|
<div
|
|
|
v-for="(paintingGroup, ageName) in menuInfo"
|
|
|
+ :id="`menu-item-${ageName}`"
|
|
|
:key="ageName"
|
|
|
class="menu-item"
|
|
|
>
|
|
@@ -93,14 +94,20 @@
|
|
|
</div>
|
|
|
<div class="img-wrap">
|
|
|
<img
|
|
|
- class=""
|
|
|
+ class="thumb"
|
|
|
:src="`${$env.BASE_URL}configMultiMedia/paintings-thumb/${item['标题']}.jpg`"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
>
|
|
|
+ <img
|
|
|
+ class="border"
|
|
|
+ src="@/assets/images/painting-thumb-border.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="size">
|
|
|
- {{ getPaintingSizeString(item['尺寸']) }}
|
|
|
+ {{ getPaintingSizeStringForShow(getPaintingSize(item['尺寸'])) }}
|
|
|
</div>
|
|
|
<div class="position">
|
|
|
{{ item['馆藏'] }}
|
|
@@ -135,6 +142,8 @@ import { useStore } from "vuex"
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
import PaintingStyleDesc from "@/views/PaintingStyleDesc.vue"
|
|
|
|
|
|
+const getPaintingSize = utils.getPaintingSize
|
|
|
+
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const store = useStore()
|
|
@@ -196,15 +205,11 @@ function getAuthorList(paintingGroup) {
|
|
|
return Array.from(new Set(temp))
|
|
|
}
|
|
|
|
|
|
-function getPaintingSizeString(raw) {
|
|
|
- const temp = raw.split('\n')
|
|
|
- let height = temp[0]
|
|
|
- let width = temp[1]
|
|
|
- height = height.substring(1, height.length - 2)
|
|
|
- width = width.substring(1, width.length - 2)
|
|
|
+function getPaintingSizeStringForShow({ width, height }) {
|
|
|
return `${width}\u00D7${height} 厘米`
|
|
|
}
|
|
|
|
|
|
+
|
|
|
const paintingWidthWhenDesign = 240
|
|
|
const paintingMarginWhenDesin = 75
|
|
|
const specialDescWidthWhenDesin = 444
|
|
@@ -222,6 +227,10 @@ function onClickAge(ageName) {
|
|
|
expandedAgeNameList.value.delete(ageName)
|
|
|
} else {
|
|
|
expandedAgeNameList.value.add(ageName)
|
|
|
+ const menuItemEl = document.getElementById(`menu-item-${ageName}`)
|
|
|
+ setTimeout(() => {
|
|
|
+ menuEl.value.scrollLeft = menuItemEl.offsetLeft
|
|
|
+ }, 200)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -254,6 +263,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
overflow: auto;
|
|
|
+ scroll-behavior: smooth;
|
|
|
>.menu-item{
|
|
|
flex: 0 0 auto;
|
|
|
height: 100%;
|
|
@@ -327,7 +337,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #476446;
|
|
|
line-height: 2;
|
|
|
- text-align: justified;
|
|
|
+ text-align: justify;
|
|
|
height: calc(552 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
letter-spacing: 0.15em;
|
|
|
}
|
|
@@ -380,7 +390,7 @@ watch(menuElScrollLeft, (v) => {
|
|
|
}
|
|
|
}
|
|
|
>.author.long{
|
|
|
- transform: initial;
|
|
|
+ transform: translateY(0);
|
|
|
letter-spacing: initial;
|
|
|
}
|
|
|
>.title{
|
|
@@ -407,14 +417,21 @@ watch(menuElScrollLeft, (v) => {
|
|
|
width: calc(240 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
height: calc(240 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
border-radius: 50%;
|
|
|
- border: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) solid #50361E;
|
|
|
overflow: hidden;
|
|
|
margin-bottom: calc(21 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- >img{
|
|
|
+ position: relative;
|
|
|
+ >img.thumb{
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
object-fit: cover;
|
|
|
}
|
|
|
+ >img.border{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
>.size{
|
|
|
font-family: KingHwa_OldSong, KingHwa_OldSong;
|