|
@@ -61,7 +61,8 @@
|
|
|
class="name"
|
|
|
:class="{
|
|
|
wide: item['名称'].length > 11,
|
|
|
- smallFontSize: item['名称'].length > 18
|
|
|
+ smallFontSize: item['名称'].length > 18,
|
|
|
+ smFontSize: item['序号'] === 95
|
|
|
}"
|
|
|
:title="item['名称']"
|
|
|
v-html="item['名称']"
|
|
@@ -79,6 +80,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="height: 100vh;" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
@@ -199,10 +201,10 @@ function getRelicThumbUrl(idx) {
|
|
|
const listEl = ref(null)
|
|
|
let scrollLeft = Number(localStorage.getItem(SCROLL_KEY) || 0)
|
|
|
const { width: listWidth, height: listHeight } = useElementSize(listEl)
|
|
|
-const { hasOperatedThisTime, updateWidth, updateTranslateLength } = useSmoothSwipe({
|
|
|
+const { translateLength, hasOperatedThisTime, updateWidth, updateTranslateLength } = useSmoothSwipe({
|
|
|
scrollTargetRef: listEl,
|
|
|
viewportWidth: listWidth,
|
|
|
- initTranslateLength: scrollLeft,
|
|
|
+ dontHandlerMobile: true
|
|
|
})
|
|
|
watch(relicData, (vNew) => {
|
|
|
nextTick(() => {
|
|
@@ -234,6 +236,7 @@ watch(cascaderValue, val => {
|
|
|
}
|
|
|
})
|
|
|
updateTranslateLength(0)
|
|
|
+ localStorage.setItem(SCROLL_KEY, 0)
|
|
|
})
|
|
|
|
|
|
router.beforeEach((to) => {
|
|
@@ -244,7 +247,7 @@ router.beforeEach((to) => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
if (scrollLeft) {
|
|
|
- listEl.value.scrollLeft = scrollLeft
|
|
|
+ updateTranslateLength(scrollLeft)
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -257,7 +260,7 @@ const handleScroll = debounce(() => {
|
|
|
@page-height-design-px: 970;
|
|
|
|
|
|
.relic-list {
|
|
|
- height: 100%;
|
|
|
+ height: 100vh;
|
|
|
background-image: url(@/assets/images/relic-list-bg.jpg);
|
|
|
background-size: cover;
|
|
|
background-repeat: no-repeat;
|
|
@@ -265,10 +268,10 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
>button.return {
|
|
|
position: absolute;
|
|
|
- width: 58px;
|
|
|
- height: 58px;
|
|
|
- left: 42px;
|
|
|
- top: 68px;
|
|
|
+ width: calc(58 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(58 / @page-height-design-px * 100vh);
|
|
|
+ left: calc(42 / @page-height-design-px * 100vh);
|
|
|
+ top: calc(68 / @page-height-design-px * 100vh);
|
|
|
background-image: url(@/assets/images/btn-return.png);
|
|
|
background-size: contain;
|
|
|
background-repeat: no-repeat;
|
|
@@ -278,10 +281,11 @@ const handleScroll = debounce(() => {
|
|
|
:deep {
|
|
|
.el-cascader {
|
|
|
position: absolute;
|
|
|
- width: 200px;
|
|
|
- height: 58px;
|
|
|
- left: 160px;
|
|
|
- top: 68px;
|
|
|
+ width: calc(200 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(58 / @page-height-design-px * 100vh);
|
|
|
+ left: calc(160 / @page-height-design-px * 100vh);
|
|
|
+ top: calc(68 / @page-height-design-px * 100vh);
|
|
|
+ z-index: 1;
|
|
|
|
|
|
.el-input {
|
|
|
height: 100%;
|
|
@@ -296,7 +300,7 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
.el-input__inner {
|
|
|
height: 100%;
|
|
|
- font-size: 30px;
|
|
|
+ font-size: calc(30 / @page-height-design-px * 100vh);
|
|
|
text-align: center;
|
|
|
font-family: 'SourceHanSerifCN-Heavy';
|
|
|
color: #6A3906;
|
|
@@ -307,8 +311,8 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
}
|
|
|
.icon-arrow-down {
|
|
|
- font-size: 24px;
|
|
|
- margin-top: 10px;
|
|
|
+ font-size: calc(24 / @page-height-design-px * 100vh);
|
|
|
+ margin-top: calc(10 / @page-height-design-px * 100vh);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -321,44 +325,45 @@ const handleScroll = debounce(() => {
|
|
|
|
|
|
>.search-ui {
|
|
|
position: absolute;
|
|
|
- top: 65px;
|
|
|
- right: 27px;
|
|
|
- width: 406px;
|
|
|
- height: 62px;
|
|
|
+ top: calc(65 / @page-height-design-px * 100vh);
|
|
|
+ right: calc(27 / @page-height-design-px * 100vh);
|
|
|
+ width: calc(406 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(62 / @page-height-design-px * 100vh);
|
|
|
background-image: url(@/assets/images/search-bg.png);
|
|
|
background-size: cover;
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center center;
|
|
|
+ z-index: 1;
|
|
|
|
|
|
>input {
|
|
|
position: absolute;
|
|
|
left: 50px;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
- height: 35px;
|
|
|
- width: 250PX;
|
|
|
- font-size: 24px;
|
|
|
+ height: calc(35 / @page-height-design-px * 100vh);
|
|
|
+ width: calc(250 / @page-height-design-px * 100vh);
|
|
|
+ font-size: calc(24 / @page-height-design-px * 100vh);
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
|
font-weight: 400;
|
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
- line-height: 28px;
|
|
|
+ line-height: calc(28 / @page-height-design-px * 100vh);
|
|
|
|
|
|
&::placeholder {
|
|
|
- font-size: 24px;
|
|
|
+ font-size: calc(24 / @page-height-design-px * 100vh);
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
|
font-weight: 400;
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
- line-height: 28px;
|
|
|
+ line-height: calc(28 / @page-height-design-px * 100vh);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
>button.search {
|
|
|
position: absolute;
|
|
|
- width: 31px;
|
|
|
- height: 31px;
|
|
|
+ width: calc(31 / @page-height-design-px * 100vh);
|
|
|
+ height: calc(31 / @page-height-design-px * 100vh);
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
- right: 53px;
|
|
|
+ right: calc(53 / @page-height-design-px * 100vh);
|
|
|
transform: translateY(-50%);
|
|
|
background-image: url(@/assets/images/icon-search.png);
|
|
|
background-size: cover;
|
|
@@ -371,7 +376,7 @@ const handleScroll = debounce(() => {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 55%;
|
|
|
- translate: 0 -50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
width: 100%;
|
|
|
height: calc(650 / @page-height-design-px * 100vh);
|
|
|
background-size: auto 100%;
|
|
@@ -456,13 +461,16 @@ const handleScroll = debounce(() => {
|
|
|
padding-right: calc(20 / @page-height-design-px * 100vh * 0.83);;
|
|
|
font-size: calc(14 / @page-height-design-px * 100vh * 0.83);
|
|
|
}
|
|
|
+ >.name.smFontSize {
|
|
|
+ font-size: calc(14 / @page-height-design-px * 100vh * 0.83);
|
|
|
+ }
|
|
|
>img {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
- translate: -50% 0;
|
|
|
+ transform: translateX(-50%) scale(calc(v-bind('windowHeight') / @page-height-design-px));
|
|
|
object-fit: contain;
|
|
|
- scale: calc(v-bind('windowHeight') / @page-height-design-px);
|
|
|
transform-origin: center bottom;
|
|
|
+ pointer-events: none;
|
|
|
}
|
|
|
}
|
|
|
>.relic-item.isOdd{
|