2 lines
4.6 KiB
JavaScript
2 lines
4.6 KiB
JavaScript
"use strict";const e=require("../../../common/vendor.js"),n=require("./types.js"),a=require("./composables/graphic-card-custom.js"),t=require("./composables/use-graphic-card.js");Math||(i+o+u+r+s)();const o=()=>"../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon.js",r=()=>"../../../node-modules/@tuniao/tnui-vue3-uniapp/components/photo-album/src/photo-album.js",i=()=>"../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar.js",s=()=>"../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar-group.js",u=()=>"../../../node-modules/@tuniao/tnui-vue3-uniapp/components/lazy-load/src/lazy-load.js",f=e.defineComponent({__name:"MyGraphicCard",props:n.graphicCardProps,emits:n.graphicCardEmits,setup(n,{emit:o}){const r=n,i=o,{viewUserAvatars:s,viewUserCount:u,imageCount:f,previewImageHandle:m,cardClickEvent:c,handleAvatarClick:p,handleMoreClick:l,handleCommentClick:d,handleHotClick:g,handleLikeClick:v}=t.useGraphicCard(r,i),{ns:h,tagClass:C,tagStyle:b,hotClass:w,hotStyle:_,commentClass:k,commentStyle:j,likeClass:y,likeStyle:I}=a.useGraphicCardCustomStyle(r);function H(e){if("string"!=typeof e)return 2;return/\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(e)?0:/\.(mp4|avi|mov|mkv|flv|wmv)$/i.test(e)?1:2}return(n,a)=>{var t;return e.e({a:n.avatar},n.avatar?{b:e.p({url:n.avatar})}:{c:e.t(null==(t=n.username)?void 0:t.slice(0,1)),d:e.p({size:80})},{e:e.n(e.unref(h).e("brief-info__avatar")),f:e.o(((...n)=>e.unref(p)&&e.unref(p)(...n))),g:e.t(n.title),h:n.description},n.description?{i:e.t(n.description)}:{},{j:e.n(e.unref(h).e("brief-info__data")),k:e.n(e.unref(h).e("brief-info__content")),l:n.showMore},n.showMore?{m:e.p({name:"more-vertical"}),n:e.n(e.unref(h).em("brief-info__operation","more")),o:e.o(((...n)=>e.unref(l)&&e.unref(l)(...n))),p:e.n(e.unref(h).e("brief-info__operation"))}:{},{q:e.n(e.unref(h).e("brief-info")),r:e.f(n.tags,((n,a,t)=>({a:"528e8e9f-3-"+t,b:e.t(n),c:a}))),s:e.p({name:"topics-fill"}),t:e.n(e.unref(C)),v:e.s(e.unref(b)),w:e.n(e.unref(h).e("content__tags")),x:e.t(n.content),y:e.n(e.unref(h).e("content__data")),z:e.n(e.unref(h).e("content")),A:0==H(n.images.slice(-1)[0])},0==H(n.images.slice(-1)[0])?e.e({B:!!e.unref(f)},e.unref(f)?e.e({C:1===e.unref(f)},1===e.unref(f)?{D:e.p({mode:"aspectFit",src:n.images[0]}),E:e.n(e.unref(h).em("images","item")),F:e.n(e.unref(h).is("one")),G:e.o((n=>e.unref(m)(0)))}:{},{H:2===e.unref(f)},2===e.unref(f)?{I:e.p({data:n.images,column:2}),J:e.n(e.unref(h).em("images","item")),K:e.n(e.unref(h).is("two"))}:{},{L:3===e.unref(f)},3===e.unref(f)?{M:e.p({mode:"aspectFit",src:n.images[0]}),N:e.o((n=>e.unref(m)(0))),O:e.p({src:n.images[1]}),P:e.o((n=>e.unref(m)(1))),Q:e.p({src:n.images[2]}),R:e.o((n=>e.unref(m)(2))),S:e.n(e.unref(h).em("images","item")),T:e.n(e.unref(h).is("three"))}:{},{U:4===e.unref(f)},4===e.unref(f)?{V:e.p({data:n.images,column:2}),W:e.n(e.unref(h).em("images","item")),X:e.n(e.unref(h).is("four"))}:{},{Y:e.unref(f)>=5},e.unref(f)>=5?{Z:e.p({data:n.images})}:{},{aa:e.n(e.unref(h).e("images"))}):{}):{},{ab:e.n(e.unref(h).e("container")),ac:1==H(n.images.slice(-1)[0])},1==H(n.images.slice(-1)[0])?e.e({ad:!!e.unref(f)},e.unref(f)?e.e({ae:1===e.unref(f)},1===e.unref(f)?{af:e.f(n.images,((e,a,t)=>({a:n.images[a],b:a}))),ag:e.n(e.unref(h).em("images","item")),ah:e.n(e.unref(h).is("one"))}:{ai:n.images.slice(-1)[0]},{aj:e.n(e.unref(h).e("images"))}):{}):{},{ak:n.showHot},n.showHot?{al:e.p({name:n.activeHot?n.activeHotIcon:n.hotIcon}),am:e.t(n.hotCount),an:e.n(e.unref(w)),ao:e.s(e.unref(_)),ap:e.o(((...n)=>e.unref(g)&&e.unref(g)(...n)))}:{},{aq:n.showComment},n.showComment?{ar:e.p({name:n.activeComment?n.activeCommentIcon:n.commentIcon}),as:e.t(n.commentCount),at:e.n(e.unref(k)),av:e.s(e.unref(j)),aw:e.o(((...n)=>e.unref(d)&&e.unref(d)(...n)))}:{},{ax:n.showLike},n.showLike?{ay:e.p({name:n.activeLike?n.activeLikeIcon:n.likeIcon}),az:e.t(n.likeCount),aA:e.n(e.unref(y)),aB:e.s(e.unref(I)),aC:e.o(((...n)=>e.unref(v)&&e.unref(v)(...n)))}:{},{aD:e.n(e.unref(h).e("bottom-info__left")),aE:n.showViewUser&&e.unref(s).length||n.$slots.bottomRight},n.showViewUser&&e.unref(s).length||n.$slots.bottomRight?{aF:e.f(e.unref(s),((n,a,t)=>({a:a,b:"528e8e9f-15-"+t+",528e8e9f-14",c:e.p({url:n})}))),aG:e.p({border:!0,size:"sm"}),aH:e.n(e.unref(h).e("view-user-list")),aI:e.t(void 0!==n.viewCount?n.viewCount:e.unref(u)),aJ:e.n(e.unref(h).e("view-user-count")),aK:e.n(e.unref(h).e("bottom-info__right"))}:{},{aL:e.n(e.unref(h).e("bottom-info")),aM:e.n(e.unref(h).is("no-content",!!n.$slots.bottomRight)),aN:e.n(e.unref(h).b()),aO:e.o(((...n)=>e.unref(c)&&e.unref(c)(...n)))})}}}),m=e._export_sfc(f,[["__scopeId","data-v-528e8e9f"]]);wx.createComponent(m);
|