123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <template>
- <view>
- <view class="goods">
- <view class="goods-img">
- <image v-if="item.imgUrl" mode="aspectFit" class="wh-full" :src="item.imgUrl"></image>
- <view v-else class="pic"></view>
- </view>
- <view class="right-info">
- <view class="good-title">{{item.skuName}}</view>
- <view class="w-full flex-a">
- <view class="g-left">
- <view class="spec">{{item.skuProperties}}</view>
- <view class="price">{{item.price}}</view>
- </view>
- <view class="g-right">
- <slot></slot>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "my-goods",
- data() {
- return {
- show: false
- };
- },
- props: {
- item: {
- type: Object,
- required: true
- }
- },
- methods: {
- close() {
- this.show = false;
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .goods {
- width: 100%;
- display: flex;
- align-items: center;
- .goods-img {
- height: 200rpx;
- width: 200rpx;
- flex-shrink: 0;
- .pic {
- width: 200rpx;
- height: 200rpx;
- background-color: #EEE;
- // flex-shrink: 0;
- }
- }
- .right-info {
- width: calc(100% - 200rpx);
- box-sizing: border-box;
- padding-left: 10rpx;
- .good-title {
- width: 100%;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: $uni-font-size-base;
- overflow: hidden;
- padding-bottom: 10rpx;
- }
- .spec {
- height: 50rpx;
- display: flex;
- align-items: center;
- width: 200rpx;
- border-radius: 25px;
- background-color: #EFEFEF;
- font-size: $uni-font-size-sm;
- margin-bottom: 20rpx;
- box-sizing: border-box;
- padding: 0 20rpx;
- }
- }
- }
- .flex-a {
- display: flex;
- justify-content: space-between;
- }
- .my-popup {
- width: 100%;
- max-height: 800rpx;
- overflow: auto;
- padding-bottom: 130rpx;
- }
- </style>
|