| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template id="goods-info-style2">
- <div class="goods-info-style2">
- <div class="goods-card">
- <div class="goods-price">
- ¥
- <span class="amount" v-if="goodsData.price == 1">88-100</span>
- <span class="amount" v-else>88</span>
- </div>
- <div class="goods-cont" flex="main:justify">
- <div class="goods-cont-left">
- <div class="goods-title">商品标题</div>
- <div class="goods-subtitle">商品副标题</div>
- </div>
- <div class="goods-cont-right" flex="main:center cross:center" v-if="goodsData.share == 1">
- <i class="iconfont icon-fenxiang"></i>
- </div>
- </div>
- <div class="goods-express" flex="main:justify">
- <div>
- 快递:¥
- <span v-if="goodsData.delivery == 1">10-22</span>
- <span v-else>10</span>
- </div>
- <div>销量:22</div>
- <div>库存:22</div>
- </div>
- <div class="goods-commison" v-if="goodsData.commission">
- <span>预计佣金</span>
- <span class="commison-money">¥12.4</span>
- </div>
- </div>
- </div>
- </template>
- <script>
- /**
- * @descriptions
- * 1. 组件名字必须对应模板形式 - 递归组件name
- * 2. 样式内容方法尽量内部维护 - 前端方便通用
- * 3. 父级组件会传预览数据 - activeItem
- */
- Vue.component('goods-info-style2', {
- name: "goods-info-style2",
- props: {
- activeItem: {
- type: Object,
- default () {
- return {}
- }
- },
- goodsData: {
- type: Object,
- default () {
- return {}
- }
- }
- },
- template: '#goods-info-style2',
- data() {
- return {
-
- }
- }
- });
- </script>
- <style>
- .goods-info-style2 .goods-card {
- position: relative;
- width: 355px;
- background-color: #fff;
- margin: auto;
- margin-top: -20px;
- border-radius: 5px;
- padding: 0 12px 5px;
- }
- .goods-info-style2 .goods-commison {
- position: absolute;
- top: 20px;
- right: 0;
- padding: 0 20px;
- height: 20px;
- font-size: 12px;
- background: #FFE7E7;
- border-radius: 20px 0 0 20px;
- line-height: 20px;
- }
- .goods-info-style2 .goods-commison .commison-money {
- color: #DB0505;
- }
- .goods-info-style2 .goods-card .goods-price {
- font-weight: 700;
- font-size: 17px;
- padding: 18px 0;
- color: #DB0505;
- }
- .goods-info-style2 .goods-price .amount {
- font-size: 28px;
- }
- .goods-info-style2 .goods-cont-left .goods-title {
- font-size: 16px;
- font-weight: 700;
- }
- .goods-info-style2 .goods-cont-left .goods-subtitle {
- font-size: 14px;
- color: #b0b3bf;
- padding: 10px 0 20px 0;
- }
- .goods-info-style2 .goods-cont-right {
- width: 32px;
- height: 32px;
- background: #F0F0F0;
- border-radius: 50%;
- font-size: 12px;
- color: #999;
- }
- .goods-info-style2 .goods-express {
- position: relative;
- line-height: 36px;
- color: #b0b3bf;
- font-size: 12px;
- }
- .goods-info-style2 .goods-express:before {
- position: absolute;
- content: "";
- left: -12px;
- right: -12px;
- top: 0;
- border-top: 1px dashed #ededed;
- }
- </style>
|