style(survey): 优化首页调查问卷展示样式
- 调整了 SurveyItem 组件中状态图标的样式,使其在首页适配更好 - 优化了 Survey 页面的整体布局,防止页面左右滚动
This commit is contained in:
@@ -7,9 +7,9 @@
|
|||||||
@click="() => $router.push({ name: 'search' })"
|
@click="() => $router.push({ name: 'search' })"
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="new-survey-container" v-loading="requestLoading">
|
<div v-loading="requestLoading" class="new-survey-container">
|
||||||
<div style="margin-bottom: 80px">
|
<div style="margin-bottom: 80px">
|
||||||
<van-list @load="handleLoadSurveys" v-model:loading="loading" :finished="finished">
|
<van-list v-model:loading="loading" :finished="finished" @load="handleLoadSurveys">
|
||||||
<template #finished>
|
<template #finished>
|
||||||
<!-- 如果存在搜索文字的话,显示没有更多了 -->
|
<!-- 如果存在搜索文字的话,显示没有更多了 -->
|
||||||
<span v-if="searchValue">
|
<span v-if="searchValue">
|
||||||
@@ -119,7 +119,7 @@ function handleEmptyClick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.new-survey-container {
|
.new-survey-container {
|
||||||
margin-top: 10px;
|
margin: 0px 3px;
|
||||||
|
|
||||||
.new-survey_item {
|
.new-survey_item {
|
||||||
margin: 0 10px 10px;
|
margin: 0 10px 10px;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import png31 from '@/assets/img/home/31.png';
|
|||||||
import { showDialog, showFailToast, showSuccessToast } from 'vant';
|
import { showDialog, showFailToast, showSuccessToast } from 'vant';
|
||||||
import { finish } from '@/api/survey';
|
import { finish } from '@/api/survey';
|
||||||
import { copySurveys } from '@/api/home';
|
import { copySurveys } from '@/api/home';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import {
|
import {
|
||||||
fetchSurveys,
|
fetchSurveys,
|
||||||
deleteItem,
|
deleteItem,
|
||||||
@@ -30,6 +30,7 @@ const form = ref({
|
|||||||
|
|
||||||
// router
|
// router
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
const emit = defineEmits(['post-analysis', 'post-surveys']);
|
const emit = defineEmits(['post-analysis', 'post-surveys']);
|
||||||
const survey = defineModel<SurveyItem>('survey', { required: true });
|
const survey = defineModel<SurveyItem>('survey', { required: true });
|
||||||
@@ -191,7 +192,15 @@ function copyItem(item: SurveyItem) {
|
|||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isAnalysis" class="survey_item_status">
|
<!-- 单独为主页做适配 -->
|
||||||
|
<div
|
||||||
|
v-if="isAnalysis"
|
||||||
|
class="survey_item_status"
|
||||||
|
:style="{
|
||||||
|
top: route.path === '/home' ? '-20px' : '-25px',
|
||||||
|
right: route.path === '/home' ? '-20px' : '-25px'
|
||||||
|
}"
|
||||||
|
>
|
||||||
<img v-if="survey.status === 0" src="@/assets/img/publish/edit.png" alt="" />
|
<img v-if="survey.status === 0" src="@/assets/img/publish/edit.png" alt="" />
|
||||||
<img v-else-if="survey.status === 1" src="@/assets/img/publish/publish.png" alt="" />
|
<img v-else-if="survey.status === 1" src="@/assets/img/publish/publish.png" alt="" />
|
||||||
<img v-else-if="survey.status === 2" src="@/assets/img/publish/end.png" alt="" />
|
<img v-else-if="survey.status === 2" src="@/assets/img/publish/end.png" alt="" />
|
||||||
|
|||||||
Reference in New Issue
Block a user