| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <div class="floor">
- <h3>F{{ floor.floorNumber }} {{ floor.name }}</h3>
- <ul class="list-unstyled clearfix" :style="{borderColor: floor.items[1].backGroundColor || '#d8d8d8'}">
- <li v-for="(item, index) in floor.items" :key="index" class="floor-item" :class="item.size"
- :style="{backgroundColor: item.backGroundColor || '#fff', borderColor: item.borderColor || floor.items[1].backGroundColor || '#d8d8d8'}">
- <a :href="item.hrefUrl" target="_blank">
- <img :src="item.pictureUrl" class="floor-item-img"/>
- <div class="floor-content">
- <p v-if="item.name" class="floor-item-name">{{ item.name }}</p>
- <p v-if="item.body" v-html="item.body" class="floor-item-body"></p>
- </div>
- </a>
- </li>
- </ul>
- </div>
- </template>
- <script>
- export default {
- name: 'floor',
- props: {
- floor: Object
- }
- }
- </script>
- <style lang="scss" scoped>
- .floor {
- ul {
- border-bottom: 1px solid #d8d8d8;
- }
- .floor-item {
- float: left;
- position: relative;
- overflow: hidden;
- a {
- display: block;
- text-align: center;
- }
- .floor-item-img:hover {
- transform: scale(1.1);
- }
- .floor-content {
- position: absolute;
- text-align: center;
- }
- &.medium,&.small {
- border-top: 1px solid #d8d8d8;
- border-right: 1px solid #d8d8d8;
- }
- &.large {
- width: 360px;
- height: 400px;
- img {
- width: 226px;
- height: 226px;
- margin-top: 40px;
- }
- }
- &.medium {
- width: 389px;
- height: 199px;
- img {
- position: absolute;
- bottom: 50px;
- right: 52px;
- width: 100px;
- height: 100px;
- }
- .floor-content {
- top: 0;
- left: 0;
- right: 0;
- padding: 30px;
- }
- .floor-item-name {
- color: #575757;
- font-size: 24px;
- margin-bottom: 30px;
- text-align: left;
- font-weight: 600;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- width: 300px;
- word-wrap: break-word;
- }
- .floor-item-body {
- margin-right: 150px;
- color: #575757;
- font-size: 14px;
- line-height: 20px;
- text-align: left;
- }
- }
- &.small {
- width: 219px;
- height: 199px;
- img {
- margin-top: 15px;
- width: 70px;
- height: 70px;
- }
- .floor-content {
- top: 100px;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 15px;
- }
- .floor-item-name {
- color: #575757;
- font-size: 16px;
- font-weight: 600;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- word-break: break-all;
- }
- .floor-item-body {
- color: #575757;
- font-size: 14px;
- line-height: 18px;
- }
- }
- &.tiny {
- display: none;
- }
- }
- }
- </style>
|