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 t=require("../../../common/vendor.js"),e={name:"fui-sticky",emits:["sticky"],options:{virtualHost:!0},props:{top:{type:[Number,String],default:0},range:{type:Boolean,default:!1},scrollTop:{type:Number,default:0},zIndex:{type:[Number,String],default:999},width:{type:[Number,String],default:750},param:{type:[Number,String],default:0}},computed:{getStyles(){let t="";return this.range||(t+=`top:${this.top}px;z-index:${this.zIndex};`),t},getStyle(){let t="";return this.range&&(t=`top:${this.top}px;z-index:${this.zIndex};`),t}},watch:{scrollTop(t){this.updateStickyChange()}},mounted(){this.$nextTick((()=>{setTimeout((()=>{this.init((()=>{this.updateStickyChange()}))}),50)}))},updated(t){this.$nextTick((()=>{this.init((()=>{this.updateStickyChange()}))}))},data:()=>({elId:`fui_${Math.ceil(1e6*Math.random()).toString(36)}`,timer:null,elTop:0,height:0,isFixed:!1}),methods:{updateStickyChange(){const t=this.elTop,e=this.height,i=this.scrollTop,s=this.top;this.range?this.isFixed=i+s>=t&&i+s<t+e:this.isFixed=i+s>=t,this.$emit("sticky",{isFixed:this.isFixed,param:this.param})},init(e){const i=`#${this.elId}`;t.index.createSelectorQuery().in(this).select(i).fields({size:!0,rect:!0},(t=>{t&&(this.elTop=t.top+(this.scrollTop||0),this.height=t.height,e&&e())})).exec()}}};const i=t._export_sfc(e,[["render",function(e,i,s,n,r,h){return{a:s.range?1:"",b:!s.range&&r.isFixed?1:"",c:t.s(h.getStyle),d:s.range?"":1,e:t.s(h.getStyles),f:r.elId}}],["__scopeId","data-v-02f29bc9"]]);wx.createComponent(i);
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['fui-sticky__wrap', 'data-v-02f29bc9', d && 'fui-sticky__fixed', virtualHostClass]}}" style="{{e + ';' + virtualHostStyle}}" id="{{f}}" ref="fui_sticky__el"><view class="{{['data-v-02f29bc9', a && 'fui-sticky__fixed', b && 'fui-sticky__fixed-mp']}}" style="{{c}}"><slot></slot></view><slot name="content"></slot></view>
@@ -0,0 +1 @@
.fui-sticky__wrap.data-v-02f29bc9{width:100%}.fui-sticky__fixed.data-v-02f29bc9{width:100%;position:sticky;top:0}