index-legacy.aa1e9cdc.js 5.6 KB

12
  1. !function(){function r(r,a){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var a=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==a)return;var e,t,i=[],c=!0,o=!1;try{for(a=a.call(r);!(c=(e=a.next()).done)&&(i.push(e.value),!n||i.length!==n);c=!0);}catch(l){o=!0,t=l}finally{try{c||null==a.return||a.return()}finally{if(o)throw t}}return i}(r,a)||function(r,a){if(!r)return;if("string"==typeof r)return n(r,a);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(r,a)}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,n){(null==n||n>r.length)&&(n=r.length);for(var a=0,e=new Array(n);a<n;a++)e[a]=r[a];return e}var a=document.createElement("style");a.innerHTML=":root{--van-card-padding: var(--van-padding-xs) var(--van-padding-md);--van-card-font-size: var(--van-font-size-sm);--van-card-text-color: var(--van-text-color);--van-card-background-color: var(--van-gray-1);--van-card-thumb-size: 2.34667rem;--van-card-thumb-border-radius: var(--van-border-radius-lg);--van-card-title-line-height: .42667rem;--van-card-desc-color: var(--van-gray-7);--van-card-desc-line-height: var(--van-line-height-md);--van-card-price-color: var(--van-gray-8);--van-card-origin-price-color: var(--van-text-color-2);--van-card-num-color: var(--van-text-color-2);--van-card-origin-price-font-size: var(--van-font-size-xs);--van-card-price-font-size: var(--van-font-size-sm);--van-card-price-integer-font-size: var(--van-font-size-lg);--van-card-price-font-family: var(--van-price-integer-font-family)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background:var(--van-card-background-color)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-border-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__title,.van-card__desc{word-wrap:break-word}.van-card__title{max-height:.85333rem;font-weight:var(--van-font-weight-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font-family)}.van-card__price-decimal{font-family:var(--van-card-price-font-family)}.van-card__origin-price{display:inline-block;margin-left:.13333rem;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:.05333rem;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:.13333rem}\n",document.head.appendChild(a),System.register(["./index-legacy.fba2875c.js","./index-legacy.78361179.js","./index-legacy.d92f7da7.js"],(function(n){"use strict";var a,e,t,i,c,o,l,d,v,s;return{setters:[function(r){a=r.A,e=r.E,t=r.$,i=r.d,c=r.L,o=r.j,l=r.z,d=r.N},function(r){v=r.T},function(r){s=r.I}],execute:function(){var u=r(a("card"),2),f=u[0],g=u[1],m={tag:String,num:e,desc:String,thumb:String,title:String,price:e,centered:Boolean,lazyLoad:Boolean,currency:t("¥"),thumbLink:String,originPrice:e},h=i({name:f,props:m,emits:["click-thumb"],setup:function(r,n){var a=n.slots,e=n.emit,t=function(){if(a.tag||r.tag)return o("div",{class:g("tag")},[a.tag?a.tag():o(v,{mark:!0,type:"danger"},{default:function(){return[r.tag]}})])},i=function(){if(a.thumb||r.thumb)return o("a",{href:r.thumbLink,class:g("thumb"),onClick:function(r){return e("click-thumb",r)}},[a.thumb?a.thumb():o(s,{src:r.thumb,fit:"cover",width:"100%",height:"100%",lazyLoad:r.lazyLoad},null),t()])};return function(){var n,e,t,d,v=a.num||c(r.num),s=a.price||c(r.price),u=a["origin-price"]||c(r.originPrice),f=v||s||u||a.bottom,m=s&&o("div",{class:g("price")},[a.price?a.price():(d=r.price.toString().split("."),o("div",null,[o("span",{class:g("price-currency")},[r.currency]),o("span",{class:g("price-integer")},[d[0]]),l("."),o("span",{class:g("price-decimal")},[d[1]])]))]),h=u&&o("div",{class:g("origin-price")},[a["origin-price"]?a["origin-price"]():"".concat(r.currency," ").concat(r.originPrice)]),p=v&&o("div",{class:g("num")},[a.num?a.num():"x".concat(r.num)]),b=a.footer&&o("div",{class:g("footer")},[a.footer()]),y=f&&o("div",{class:g("bottom")},[null==(n=a["price-top"])?void 0:n.call(a),m,h,p,null==(e=a.bottom)?void 0:e.call(a)]);return o("div",{class:g()},[o("div",{class:g("header")},[i(),o("div",{class:g("content",{centered:r.centered})},[o("div",null,[a.title?a.title():r.title?o("div",{class:[g("title"),"van-multi-ellipsis--l2"]},[r.title]):void 0,a.desc?a.desc():r.desc?o("div",{class:[g("desc"),"van-ellipsis"]},[r.desc]):void 0,null==(t=a.tags)?void 0:t.call(a)]),y])]),b])}}});n("C",d(h))}}}))}();