acdr-ui/dist/build/mp-weixin/sheep/components/s-title-block/s-title-block.js

2 lines
1.3 KiB
JavaScript

"use strict";const t=require("../../../common/vendor.js"),e=require("../../index.js"),a={__name:"s-title-block",props:{data:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(a){const o=t.reactive({typeMap:{left:"ss-row-left",center:"ss-row-center"}}),r=a,d=t.computed((()=>{const{bgType:t,bgImg:e,bgColor:a}=r.styles;return{background:"img"===t?`url(${e}) no-repeat top center / 100% 100%`:a}})),i={color:r.data.titleColor,fontSize:`${r.data.titleSize}px`,textAlign:r.data.textAlign},n={color:r.data.descriptionColor,textAlign:r.data.textAlign,fontSize:`${r.data.descriptionSize}px`,fontWeight:`${r.data.descriptionWeight}px`};return(r,s)=>{var p,l;return t.e({a:a.data.title},a.data.title?{b:t.t(a.data.title),c:t.s(i)}:{},{d:a.data.description},a.data.description?{e:t.t(a.data.description),f:t.s(n)}:{},{g:null==(p=a.data.more)?void 0:p.show},(null==(l=a.data.more)?void 0:l.show)?t.e({h:"icon"!==a.data.more.type},"icon"!==a.data.more.type?{i:t.t(a.data.more.text)}:{},{j:"text"!==a.data.more.type},(a.data.more.type,{}),{k:t.o((o=>t.unref(e.sheep).$router.go(a.data.more.url))),l:a.data.descriptionColor}):{},{m:t.n(o.typeMap[a.data.textAlign]),n:t.s(d.value),o:t.s({marginLeft:`${a.data.space}px`})})}}},o=t._export_sfc(a,[["__scopeId","data-v-05e3aaa7"]]);wx.createComponent(o);