123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <template>
-
- <div class="item" @click="handleClick(item)" :data-id="item.id">
- <div class="card-img">
- <!-- <img class="full" :src="`data/${item.id}/${item.id}-1.jpg`" alt="" /> -->
- <img v-if="item.thumb" class="real" :src="`${$cdn}data/thumb/${item.id}.jpg`" alt=""/>
-
- <img v-else class="real" :src="`${$cdn}/${item.id}.jpg`" alt=""/>
- </div>
- <div class="card-txt">
- <div class="title">
- <span :title="item.name">{{ item.name }}</span>
- </div>
- <!-- <div class="tag">
- <span :title="item.material">{{ item.material }}</span>
- </div> -->
- <div class="icon_3d" :data="item.link" v-show="item.link"><img src="../../assets/img/icon3d.png" alt=""></div>
- </div>
- </div>
- </template>
- <script>
- import browser from "@/utils/browser.js";
- export default {
- props: ["item"],
- data() {
- return {
- isMobile: browser.mobile
- };
- },
- methods:{
- handleClick(item){
- this.$store.commit('getCurrentItem',item)
- this.$emit('handleItem',item)
- }
- }
- };
- </script>
- <style lang="less" scoped>
- @margin: 36px;
- .item {
- text-align: center;
- display: inline-block;
- /* width: calc((100% - @margin * 3) / 4); */
- width:15.9vw;
- height:12.2vw;
- margin-right: @margin;
- margin-bottom: 61px;
- background: #9f292d;
- border-radius: 10px;
- overflow: hidden;
- cursor: pointer;
- border:1px solid #997748;
- &:nth-of-type(4n) {
- margin-right: 0;
- }
- .card-img {
- width: 15.4vw;
- height: 9.47vw;
- position: relative;
- max-height: 182px;
- overflow: hidden;
- border-radius:10px 10px 0 0;
- margin:0 auto;
- img {
- width: 100%;
- }
- .full {
- opacity: 0;
- }
- .real {
- position: absolute;
- z-index: 99;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- .card-txt {
- display: flex;
- height:2.5vw;
- line-height:2.5vw;
- padding-top:0.26vw;
- box-sizing:border-box;
- justify-content: space-between;
- align-items: center;
- font-size: 14px;
- padding:0 10px;
- background:#9f292d;
- .tag {
- color: @theme;
- }
- div{
- /* overflow: hidden;
- text-overflow:ellipsis; */
-
- }
- .title {
- width:80%;
- overflow:hidden;
- span {
- font-size:19px;
- color:#e6d6c3;
- display:block;
- white-space: nowrap;
- &:hover {
- animation: marquee 3s linear infinite
- }
- }
-
- }
- .icon_3d {
- display:flex;
- font-size:0;
- margin-left:20px;
- }
- }
- }
- @keyframes marquee {
- from {
- transform: translateX(0%)
- }
- to {
- transform: translateX(-100%)
- }
- }
- @media screen and (min-width: 500px) and (max-width: 1400px) {
-
- }
- @media screen and (max-width: 500px) {
-
- }
- </style>
|