<template> <div class="item"> <div class="left"> <div class="title"><span class="point"></span> {{ item.name }}</div> <div class="detail" @click="$router.push(item.detailUrl)"> <img :src="eyes" alt="" />点击查看体检套餐详情 </div> </div> <div class="right"> <a-button v-if="item.type == 2" style="background: #ffcc00; color: white; border: none; width: 86px" >查看</a-button > <a-button v-else style="background: #3f7ffb; color: white; border: none; width: 86px" >立即预约</a-button > <div class="date">有效期至:{{ item.date }}</div> </div> </div> </template> <script> export default { name: "item", components: {}, props: { item: { type: Object, default: () => {}, }, }, data() { return { eyes: require("@/assets/imgs/index/eyes.png"), }; }, methods: {}, }; </script> <style lang="less" scoped> .item { display: flex; justify-content: space-between; background: #fafafa; padding: 14.5px 12px; border-radius: 8px; margin-top: 12px; .right { text-align: right; .date { color: #999999; font-size: 12px; margin-top: 12px; } } .left { .title { color: #333333; font-size: 12px; font-weight: bold; } .detail { font-size: 12px; color: #999999; line-height: 30px; margin-top: 12px; cursor: pointer; img { position: relative; top: -2px; margin-right: 3px; } } } } </style>