Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-11-30 09:39:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5ecf0c39d20ba4a47648971dfc9dca65cd59b7f9
5ecf0c39
1 parent
aa0df949
fix web端判断封面图片高度
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
src/views/index.vue
src/views/index.vue
View file @
5ecf0c3
...
...
@@ -10,8 +10,9 @@
<van-image
v-if="PHeader.type === '单张图'"
width="100%"
height="200
"
:height="PHeaderHeight
"
:src="PHeader.cover"
fit="cover"
/>
<template v-if="PHeader.type === '轮播图'">
<van-swipe class="my-swipe" lazy-render indicator-color="white">
...
...
@@ -50,7 +51,16 @@ import { useRoute } from "vue-router";
import { queryFormAPI } from "@/api/form.js";
import { addFormDataAPI } from "@/api/data.js";
import { showSuccessToast, showFailToast } from "vant";
import { wxInfo } from "@/utils/tools";
// web端判断封面图片高度
const is_pc = computed(() => wxInfo().isPC);
const PHeaderHeight = computed(() => {
if (is_pc.value) {
return "35vh";
} else {
return "20vh";
}
});
// TAG: 自定义主题颜色
const themeVars = {
buttonPrimaryBackground: "#c2915f",
...
...
Please
register
or
login
to post a comment