<template>
    <div class="page">
        <headNav @backPage="backPage" title="图文说明"></headNav>

        <div class="item" v-for="item in list" :key="item.id">
            <div class="desc">{{item.problem_desc}}</div>
            <div v-if="item.problem_images" class="png">
                <van-image class="img" v-for="(url, index) in item.problem_images" :key="index" :src="url"/>
            </div>
        </div>
    </div>
</template>

<script>
import headNav from '@/components/headNav.vue'
import { handleProblemImgs } from '@/utils/index';

export default {
    components: {
        headNav
    },
    computed: {
        list() {
            return this.$route.params.list
        }
    },
    methods: {
        backPage() {
            this.$router.back()
        },
		handleProblemImgs(imageId) {
			return handleProblemImgs(imageId);
		},
    }
}
</script>

<style lang="scss" scoped>
.page {
    padding-top: 50px;
    height: calc(100vh - 50px);
    overflow-y: auto;

    .item {
        padding: 10px;
        .desc {
            font-size: 15px;
            color: #686868;
        }
        .png {
            display: flex;
            flex-direction: column;
            .img {
                width: 100%;
            }
        }
    }
}
</style>