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"),t={name:"fui-tabs",emits:["change"],options:{virtualHost:!0},props:{tabs:{type:Array,default:()=>[]},nameKey:{type:String,default:"name"},badgeKey:{type:String,default:"badge"},disabledKey:{type:String,default:"disabled"},current:{type:Number,default:0},scroll:{type:Boolean,default:!1},height:{type:[Number,String],default:96},background:{type:String,default:"#fff"},size:{type:[Number,String],default:28},color:{type:String,default:""},fontWeight:{type:[Number,String],default:"normal"},selectedSize:{type:[Number,String],default:32},selectedColor:{type:String,default:""},selectedFontWeight:{type:[Number,String],default:500},scale:{type:[Number,String],default:1.2},badgeColor:{type:String,default:"#fff"},badgeBackground:{type:String,default:""},isDot:{type:Boolean,default:!1},isSlider:{type:Boolean,default:!0},sliderHeight:{type:[Number,String],default:5},sliderBackground:{type:String,default:""},sliderRadius:{type:[Number,String],default:-1},padding:{type:[Number,String],default:0},bottom:{type:[Number,String],default:0},short:{type:Boolean,default:!0},center:{type:Boolean,default:!1},isFixed:{type:Boolean,default:!1},isSticky:{type:Boolean,default:!1},top:{type:[Number,String],default:0},alignLeft:{type:Boolean,default:!1},direction:{type:String,default:"row"},itemPadding:{type:[Number,String],default:32},zIndex:{type:[Number,String],default:996}},watch:{tabs(e){this.initData(e)},current(e,t){this.switchTab(e)}},created(){this.initData(this.tabs)},computed:{getSelectedColor(){return this.selectedColor},getSliderBgColor(){return this.sliderBackground},getBadgeBgColor(){return this.badgeBackground}},data:()=>({vals:[],scrollInto:"",tabIndex:0,isNvue:!1}),methods:{getId:()=>`fui_${Math.ceil(1e6*Math.random()).toString(36)}`,initData(e){e&&e.length>0&&("object"==typeof e[0]?e.map((e=>{const t=this.getId();e.fui_s_id=t})):e=e.map((e=>{const t=this.getId();return{[this.nameKey]:e,fui_s_id:t}})),this.vals=e,this.$nextTick((()=>{setTimeout((()=>{this.switchTab(this.current)}),50)})))},switchTab(e){const t={...this.vals[e]};if(this.tabIndex===e||t[this.disabledKey])return;this.tabIndex=e;let i=e-1<0?0:e-1;this.scrollInto=this.vals[i].fui_s_id,delete t.fui_s_id,this.$emit("change",{index:e,...t})}}};const i=e._export_sfc(t,[["render",function(t,i,d,a,r,l){return{a:e.f(r.vals,((t,i,a)=>e.e(d.isSlider?{a:d.short?1:"",b:d.short?"":1,c:l.getSliderBgColor?"":1,d:d.sliderHeight+"rpx",e:l.getSliderBgColor,f:-1==d.sliderRadius?d.sliderHeight+"rpx":d.sliderRadius+"rpx",g:`scale(${r.tabIndex===i?r.isNvue?1:d.scale:r.isNvue?1e-5:0})`,h:d.center?1:"",i:d.bottom+"rpx",j:`-${d.padding}rpx`,k:`-${d.padding}rpx`}:{},{l:t.icon},t.icon?{m:"column"===d.direction?1:"",n:r.tabIndex===i&&t.selectedIcon?t.selectedIcon:t.icon}:{},{o:e.t(t[d.nameKey]),p:t[d.badgeKey]},t[d.badgeKey]?{q:e.t(d.isDot?"":t[d.badgeKey]),r:l.getBadgeBgColor?"":1,s:d.isDot?1:"",t:d.isDot?"":1,v:d.badgeColor,w:l.getBadgeBgColor}:{},{x:l.getSelectedColor||r.tabIndex!==i?"":1,y:d.color||r.tabIndex===i?"":1,z:(r.tabIndex===i&&r.isNvue?d.selectedSize:d.size)+"rpx",A:r.tabIndex===i?l.getSelectedColor:d.color,B:r.tabIndex===i?d.selectedFontWeight:d.fontWeight,C:`scale(${r.tabIndex!==i||r.isNvue?1:d.scale})`,D:t[d.disabledKey]?1:"",E:"column"===d.direction&&t.icon?1:"",F:i,G:t.fui_s_id,H:e.o((e=>l.switchTab(i)),i)}))),b:d.isSlider,c:d.height+"rpx",d:d.alignLeft?"":1,e:d.itemPadding+"rpx",f:d.itemPadding+"rpx",g:d.alignLeft?"":1,h:d.isFixed&&!d.isSticky?1:"",i:d.isSticky?1:"",j:d.scroll,k:r.scrollInto,l:d.background,m:d.isFixed||d.isSticky?d.zIndex:1,n:d.isFixed||d.isSticky?d.top+"px":"auto"}}],["__scopeId","data-v-ec2f4767"]]);wx.createComponent(i);
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<scroll-view class="{{['fui-tabs__scrollbox', 'data-v-ec2f4767', h && 'fui-tabs__fixed', i && 'fui-tabs__sticky', virtualHostClass]}}" scroll-with-animation="{{true}}" scroll-x="{{j}}" show-scrollbar="{{false}}" scroll-into-view="{{k}}" style="{{'background:' + l + ';' + ('z-index:' + m) + ';' + ('top:' + n) + ';' + virtualHostStyle}}"><view class="{{['fui-scroll__view', 'data-v-ec2f4767', g && 'fui-tabs__full']}}"><view wx:for="{{a}}" wx:for-item="tab" wx:key="F" class="{{['fui-tabs__item', 'data-v-ec2f4767', d && 'fui-tabs__full']}}" style="{{'padding-left:' + e + ';' + ('padding-right:' + f)}}" id="{{tab.G}}" bindtap="{{tab.H}}"><view class="{{['fui-tabs__text-wrap', 'data-v-ec2f4767', tab.D && 'fui-tabs__wrap-disabled', tab.E && 'fui-tabs__item-column']}}" style="{{'height:' + c}}"><view wx:if="{{b}}" class="{{['fui-tabs__line-wrap', 'data-v-ec2f4767', tab.h && 'fui-tabs__line-center']}}" style="{{'bottom:' + tab.i + ';' + ('left:' + tab.j) + ';' + ('right:' + tab.k)}}"><view class="{{['fui-tabs__ac-line', 'data-v-ec2f4767', tab.a && 'fui-tabs__line-short', tab.b && 'fui-tabs__full', tab.c && 'fui-tabs__slider-color']}}" style="{{'height:' + tab.d + ';' + ('background:' + tab.e) + ';' + ('border-radius:' + tab.f) + ';' + ('transform:' + tab.g)}}"></view></view><image wx:if="{{tab.l}}" class="{{['fui-tabs__icon', 'data-v-ec2f4767', tab.m && 'fui-tabs__icon-column']}}" src="{{tab.n}}"></image><view class="{{['fui-tabs__text', 'data-v-ec2f4767', tab.x && 'fui-tabs__selected-color', tab.y && 'fui-tabs__text-color']}}" style="{{'font-size:' + tab.z + ';' + ('color:' + tab.A) + ';' + ('font-weight:' + tab.B) + ';' + ('transform:' + tab.C)}}">{{tab.o}}<text wx:if="{{tab.p}}" class="{{['data-v-ec2f4767', tab.r && 'fui-tabs__badge-color', tab.s && 'fui-tabs__badge-dot', tab.t && 'fui-tabs__badge']}}" style="{{'color:' + tab.v + ';' + ('background:' + tab.w)}}">{{tab.q}}</text></view></view></view></view></scroll-view>
@@ -0,0 +1 @@
.data-v-ec2f4767::-webkit-scrollbar{width:0!important;height:0!important;color:transparent!important;display:none}.fui-tabs__scrollbox.data-v-ec2f4767{width:100%;flex:1;flex-direction:row;overflow:hidden}.fui-tabs__fixed.data-v-ec2f4767{position:fixed;left:0;right:0}.fui-tabs__sticky.data-v-ec2f4767{position:sticky;left:0;right:0}.fui-scroll__view.data-v-ec2f4767{min-width:100%;white-space:nowrap;display:flex;flex-direction:row;align-items:center}.fui-tabs__item.data-v-ec2f4767{display:flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;position:relative}.fui-tabs__full.data-v-ec2f4767{flex:1}.fui-tabs__text-wrap.data-v-ec2f4767{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:center;z-index:3}.fui-tabs__wrap-disabled.data-v-ec2f4767{opacity:.5}.fui-tabs__icon.data-v-ec2f4767{width:40rpx;height:40rpx;margin-right:12rpx}.fui-tabs__item-column.data-v-ec2f4767{flex-direction:column!important}.fui-tabs__icon-column.data-v-ec2f4767{margin-right:0!important;margin-bottom:8rpx}.fui-tabs__text.data-v-ec2f4767{white-space:nowrap;display:block;transition:transform .2s linear;z-index:3;position:relative}.fui-tabs__badge.data-v-ec2f4767{height:36rpx;padding:0 12rpx;color:#fff;font-size:24rpx;line-height:36rpx;border-radius:100px;position:absolute;min-width:36rpx!important;display:flex;box-sizing:border-box;right:-32rpx;top:-18rpx;z-index:10;flex-direction:row;align-items:center;justify-content:center;transform:scale(.9)}.fui-tabs__badge-dot.data-v-ec2f4767{height:8px!important;width:8px!important;position:absolute;display:inline-block;right:-6px;top:-3px;border-radius:50%;z-index:10}.fui-tabs__line-wrap.data-v-ec2f4767{position:absolute;border-radius:2px;z-index:2;flex:1;display:flex;flex-direction:row}.fui-tabs__line-center.data-v-ec2f4767{justify-content:center;left:0}.fui-tabs__ac-line.data-v-ec2f4767{transition:transform .2s linear}.fui-tabs__line-short.data-v-ec2f4767{width:45rpx!important}.fui-tabs__selected-color.data-v-ec2f4767{color:var(--fui-color-primary, #465CFF)!important}.fui-tabs__text-color.data-v-ec2f4767{color:var(--fui-color-subtitle, #7F7F7F)!important}.fui-tabs__slider-color.data-v-ec2f4767{background:var(--fui-color-primary, #465CFF)!important}.fui-tabs__badge-color.data-v-ec2f4767{background:var(--fui-color-danger, #FF2B2B)!important}