acdr-ui/dist/build/mp-weixin/sheep/components/s-coupon-card/s-coupon-card.js

2 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";const e=require("../../../common/vendor.js"),t=require("../../index.js"),o={__name:"s-coupon-card",props:{list:{type:Array,default:()=>[{title:"已领取",value:"0",icon:"/static/img/shop/order/nouse_coupon.png",path:"/modules/mall/coupon/list",type:"geted"},{title:"已使用",value:"0",icon:"/static/img/shop/order/useend_coupon.png",path:"/modules/mall/coupon/list",type:"used"},{title:"已失效",value:"0",icon:"/static/img/shop/order/out_coupon.png",path:"/modules/mall/coupon/list",type:"expired"},{title:"领券中心",value:"0",icon:"/static/img/shop/order/all_coupon.png",path:"/modules/mall/coupon/list",type:"all"}]},data:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(o){const l=o,p=e.computed((()=>{const{bgType:e,bgImg:t,bgColor:o}=l.styles;return{background:"img"===e?`url(${t}) no-repeat top center / 100% 100%`:o}}));return(s,a)=>({a:e.f(l.list,((o,l,p)=>({a:e.unref(t.sheep).$url.static(o.icon),b:e.t(o.title),c:o.title,d:e.o((l=>e.unref(t.sheep).$router.go(o.path,{type:o.type})),o.title),e:e.n("all"===o.type?"menu-wallet":"ss-flex-1")}))),b:e.s(p.value),c:e.s({marginLeft:`${o.data.space}px`})})}},l=e._export_sfc(o,[["__scopeId","data-v-1b9dd274"]]);wx.createComponent(l);