2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
@@ -0,0 +1 @@
"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);
@@ -0,0 +1,10 @@
{
"component": true,
"usingComponents": {
"tn-icon": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/icon/src/icon",
"tn-photo-album": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/photo-album/src/photo-album",
"tn-avatar": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar",
"tn-avatar-group": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/avatar/src/avatar-group",
"tn-lazy-load": "../../../node-modules/@tuniao/tnui-vue3-uniapp/components/lazy-load/src/lazy-load"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.tn-graphic-card.data-v-528e8e9f{position:relative;width:100%;padding:30rpx;background-color:transparent}.tn-graphic-card__brief-info.data-v-528e8e9f{display:flex;align-items:center}.tn-graphic-card__brief-info__content.data-v-528e8e9f{flex-grow:1;display:flex}.tn-graphic-card__brief-info__avatar.data-v-528e8e9f{flex-shrink:0;width:90rpx;height:90rpx;border-radius:50%;background-color:var(--tn-color-gray--disabled)}.tn-graphic-card__brief-info__avatar .image.data-v-528e8e9f{width:100%;height:100%;border-radius:inherit}.tn-graphic-card__brief-info__data.data-v-528e8e9f{flex-grow:1;margin-left:24rpx;color:var(--tn-text-color-primary);line-height:1;padding-top:6rpx}.tn-graphic-card__brief-info__data .title.data-v-528e8e9f{font-size:30rpx}.tn-graphic-card__brief-info__data .desc.data-v-528e8e9f{margin-top:16rpx;font-size:24rpx;color:var(--tn-color-gray)}.tn-graphic-card__brief-info__operation.data-v-528e8e9f{flex-grow:0}.tn-graphic-card__brief-info__operation--more.data-v-528e8e9f{font-size:40rpx;font-weight:700;color:var(--tn-color-gray-disabled);padding-left:20rpx}.tn-graphic-card__container.data-v-528e8e9f{margin-top:20rpx}.tn-graphic-card__content__tags.data-v-528e8e9f{display:flex;float:left;align-items:center;margin-top:4rpx}.tn-graphic-card__content__tags .tag-item.data-v-528e8e9f{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;padding:8rpx 16rpx;border-radius:6rpx;margin-right:16rpx;font-size:24rpx;line-height:1}.tn-graphic-card__content__data.data-v-528e8e9f{font-size:28rpx;line-height:1.8em;color:var(--tn-text-color-primary);text-align:justify}.tn-graphic-card__images.data-v-528e8e9f{width:100%;margin-top:20rpx}.tn-graphic-card__images--item.is-one.data-v-528e8e9f{width:70%;height:300rpx;border-radius:15rpx}.tn-graphic-card__images--item.is-two.data-v-528e8e9f{width:80%}.tn-graphic-card__images--item.is-three.data-v-528e8e9f{position:relative;width:100%;height:332rpx;display:flex;align-items:center}.tn-graphic-card__images--item.is-three .image-wrapper-left.data-v-528e8e9f{position:relative;width:50%;height:100%}.tn-graphic-card__images--item.is-three .image-wrapper-left .image-container.data-v-528e8e9f{width:100%;height:100%;border-radius:15rpx}.tn-graphic-card__images--item.is-three .image-wrapper-right.data-v-528e8e9f{position:relative;flex:1;height:100%;margin-left:28rpx;display:flex;flex-direction:column;align-items:center}.tn-graphic-card__images--item.is-three .image-wrapper-right .image-container.data-v-528e8e9f{flex:1;width:100%;border-radius:15rpx}.tn-graphic-card__images--item.is-three .image-wrapper-right .image-container+.image-container.data-v-528e8e9f{margin-top:28rpx}.tn-graphic-card__images--item.is-four.data-v-528e8e9f{width:80%}.tn-graphic-card__bottom-info.data-v-528e8e9f{display:flex;align-items:center;justify-content:space-between;margin-top:16rpx}.tn-graphic-card__bottom-info__left.data-v-528e8e9f{display:flex;align-items:center}.tn-graphic-card__bottom-info__left .count-item-data.data-v-528e8e9f{display:flex;align-items:center;margin-right:20rpx}.tn-graphic-card__bottom-info__left .count-item-data .count.data-v-528e8e9f{margin-left:6rpx}.tn-graphic-card__bottom-info__right.data-v-528e8e9f{display:flex;align-items:center}.tn-graphic-card__bottom-info.is-no-content.data-v-528e8e9f{margin-top:24rpx}.tn-graphic-card__view-user-count.data-v-528e8e9f{margin-left:8rpx;font-size:26rpx;color:var(--tn-color-gray)}
@@ -0,0 +1 @@
"use strict";const o=require("../../../../common/vendor.js");exports.useGraphicCardCustomStyle=e=>{const t=o.useNamespace("graphic-card"),[l,r]=o.useComponentColor(o.toRef(e,"tagBgColor"),"bg"),[a,u]=o.useComponentColor(o.toRef(e,"tagTextColor"),"text"),[n,c]=o.useComponentColor(o.toRef(e,"hotColor"),"text"),[v,s]=o.useComponentColor(o.toRef(e,"activeHotColor"),"text"),[m,C]=o.useComponentColor(o.toRef(e,"commentColor"),"text"),[p,i]=o.useComponentColor(o.toRef(e,"activeCommentColor"),"text"),[d,h]=o.useComponentColor(o.toRef(e,"likeColor"),"text"),[g,y]=o.useComponentColor(o.toRef(e,"activeLikeColor"),"text"),x=o.computed((()=>{const o=[];return l.value&&o.push(l.value),a.value&&o.push(a.value),o.join(" ")})),f=o.computed((()=>{const o={};return l.value||(o.backgroundColor=r.value||"var(--tn-color-gray-disabled)"),u.value?o.color=u.value:a.value||l.value||(o.color="var(--tn-text-color-primary)"),o})),k=o.computed((()=>{const o=[t.e("hot")];return e.activeHot?v.value&&o.push(v.value):n.value&&o.push(n.value),o.join(" ")})),R=o.computed((()=>{const o={};return e.activeHot?v.value||(o.color=s.value||"var(--tn-color-primary)"):n.value||(o.color=c.value||"var(--tn-color-gray)"),o})),j=o.computed((()=>{const o=[t.e("comment")];return e.activeComment?p.value&&o.push(p.value):m.value&&o.push(m.value),o.join(" ")})),S=o.computed((()=>{const o={};return e.activeComment?p.value||(o.color=i.value||"var(--tn-color-primary)"):m.value||(o.color=C.value||"var(--tn-color-gray)"),o})),b=o.computed((()=>{const o=[t.e("like")];return e.activeLike?g.value&&o.push(g.value):d.value&&o.push(d.value),o.join(" ")})),H=o.computed((()=>{const o={};return e.activeLike?g.value||(o.color=y.value||"var(--tn-color-red)"):d.value||(o.color=h.value||"var(--tn-color-gray)"),o}));return{ns:t,tagClass:x,tagStyle:f,hotClass:k,hotStyle:R,commentClass:j,commentStyle:S,likeClass:b,likeStyle:H}};
@@ -0,0 +1 @@
"use strict";require("../../../../common/vendor.js");
@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js");exports.useGraphicCard=(i,r)=>{const a=e.ref([]),l=e.ref(0);i.showViewUser&&(a.value=i.viewUserAvatars.slice(0,i.maxViewUserAvatarCount),l.value=i.viewUserAvatars.length);return{viewUserAvatars:a,viewUserCount:l,imageCount:e.computed((()=>{var r;return e.isEmptyVariableInDefault(null==(r=null==i?void 0:i.images)?void 0:r.length,0)})),previewImageHandle:r=>{e.index.previewImage({urls:i.images,current:r})},cardClickEvent:()=>{r("click")},handleAvatarClick:()=>{r("avatar-view-click")},handleMoreClick:()=>{r("more-click")},handleHotClick:()=>{r("hot-click")},handleCommentClick:()=>{r("comment-click")},handleLikeClick:()=>{r("like-click")}}};
@@ -0,0 +1 @@
"use strict";const e=require("../../../common/vendor.js"),t=e.buildProps({avatar:{type:String,required:!0},username:{type:String,required:!1},title:{type:String,required:!0},description:{type:String,required:!0},tags:{type:e.definePropType(Array),default:()=>[]},tagBgColor:String,tagTextColor:String,content:String,images:{type:e.definePropType(Array),default:()=>[]},showMore:{type:Boolean,default:!0},showHot:{type:Boolean,default:!0},activeHot:Boolean,hotCount:{type:Number,default:0},hotIcon:{type:String,default:"rocket"},activeHotIcon:{type:String,default:"rocket-fill"},hotColor:String,activeHotColor:String,showComment:{type:Boolean,default:!0},activeComment:Boolean,commentCount:{type:Number,default:0},commentIcon:{type:String,default:"message"},activeCommentIcon:{type:String,default:"message-fill"},commentColor:String,activeCommentColor:String,showLike:{type:Boolean,default:!0},activeLike:Boolean,likeCount:{type:Number,default:0},likeIcon:{type:String,default:"like-lack"},activeLikeIcon:{type:String,default:"like-fill"},likeColor:String,activeLikeColor:String,showViewUser:{type:Boolean,default:!0},viewCount:{type:Number,default:0},viewUserAvatars:{type:e.definePropType(Array),default:()=>[]},maxViewUserAvatarCount:{type:Number,default:4}});exports.graphicCardEmits={click:()=>!0,"avatar-view-click":()=>!0,"more-click":()=>!0,"hot-click":()=>!0,"comment-click":()=>!0,"like-click":()=>!0},exports.graphicCardProps=t;