mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[Doc] site: update index preview image
This commit is contained in:
parent
8a865dbdce
commit
5a38af3721
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<img class="preview-image" :src="image">
|
<img :class="['preview-image', `preview-image--${imageName}`]" :src="image">
|
||||||
<div class="preview-popup">
|
<div class="preview-popup">
|
||||||
<div class="preview-content">
|
<div class="preview-content">
|
||||||
<img src="https://img.yzcdn.cn/vant-weapp/qrcode-201808101114.jpg">
|
<img src="https://img.yzcdn.cn/vant-weapp/qrcode-201808101114.jpg">
|
||||||
@ -13,15 +13,17 @@
|
|||||||
<script>
|
<script>
|
||||||
const PREFIX = 'https://img.yzcdn.cn/vant-weapp/';
|
const PREFIX = 'https://img.yzcdn.cn/vant-weapp/';
|
||||||
const MAP = {
|
const MAP = {
|
||||||
index: 'index-201904170551.png',
|
index: 'index-20190715.png',
|
||||||
transition: 'transition-20180821.png'
|
transition: 'transition-20180821.png'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
|
imageName() {
|
||||||
|
return location.hash.slice(1);
|
||||||
|
},
|
||||||
image() {
|
image() {
|
||||||
const hash = location.hash.slice(1);
|
return PREFIX + (MAP[this.imageName] || MAP.index);
|
||||||
return PREFIX + (MAP[hash] || MAP.index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -42,7 +44,10 @@ body {
|
|||||||
&-image {
|
&-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: -62px;
|
|
||||||
|
&--transition {
|
||||||
|
margin-top: -62px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-popup {
|
&-popup {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user