123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <template>
- <n-card class="info-box">
- <template #cover>
- <div class="cover">
- <img :src="cover" />
- </div>
- </template>
- <div class="info-line">
- <div class="title">{{ title }}</div>
- <div class="time-line">
- <span> {{ time }}</span>
- <div class="see-more" @click="$router.push(`/info-detail/${id}`)">
- 查看
- <img class="see-more-img" src="/img/see_more.png" alt="see more" />
- </div>
- </div>
- </div>
- </n-card>
- </template>
- <script setup>
- defineOptions({
- name: "collect-box",
- });
- defineProps({
- id: {
- type: [Number, String],
- default: () => NaN,
- },
- title: {
- type: [String, undefined],
- default: () => "",
- },
- cover: {
- type: [String, undefined],
- default: () => "",
- },
- time: {
- type: [String, undefined],
- default: () => "",
- },
- });
- </script>
- <style>
- .info-box {
- --box-remark-color: #9b9b9b;
- }
- </style>
- <style lang="scss" scoped>
- .n-card.info-box {
- padding: 10px;
- --n-padding-left: 0 !important;
- --n-padding-bottom: 0 !important;
- // width: 515px;
- // height: 424px;
- background: #f5f5f5;
- box-shadow: 0rem .125rem .25rem 0rem rgba(46,25,16,0.16);
- border-radius: 13px;
- border-top: .5rem solid var(--main-primary-color);
- .cover {
- background-color: gray;
- overflow: hidden;
- max-height: 284px;
- }
- .title {
- font-size: 26px;
- margin: 15px 0;
- }
- .info-line {
- display: flex;
- flex-direction: column;
- .time-line {
- width: 100%;
- flex: 1;
- display: flex;
- justify-content: space-between;
- color: var(--box-remark-color);
- .see-more {
- cursor: pointer;
- display: inline-flex;
- justify-content: center;
- align-items: center;
- img {
- max-height: 16px;
- width: auto;
- margin-left: 5px;
- }
- }
- }
- }
- }
- </style>
|