first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
bcbad8aa-3710-4ae6-9a8a-d097bfeea542

View File

@@ -0,0 +1 @@
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/classNames"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}(0,_baseComponent.default)({relations:{"../sticky/index":{type:"parent"}},properties:{prefixCls:{type:String,value:"wux-sticky-item"},title:{type:String,value:""},content:{type:String,value:""}},data:{isFixed:!1,index:0,top:0,height:0},computed:{classes:["prefixCls, isFixed",function(e,t){return{wrap:(0,_classNames2.default)(e,_defineProperty({},"".concat(e,"--fixed"),t)),hd:"".concat(e,"__hd"),title:"".concat(e,"__title"),bd:"".concat(e,"__bd"),content:"".concat(e,"__content")}}]},methods:{onScroll:function(e){var t=this.getRelationNodes("../sticky/index")[0],i=this.data,n=i.top,a=i.height,r=i.index,s=n<=e&&e<n+a;this.data.isFixed!==s&&(this.setData({isFixed:s}),t&&t.triggerEvent(s?"stick":"unstick",{index:r}))},updated:function(t){var i=this,e=".".concat(this.data.prefixCls);wx.createSelectorQuery().in(this).select(e).boundingClientRect(function(e){e&&i.setData({top:e.top,height:e.height,index:t})}).exec()}}});

View File

@@ -0,0 +1,3 @@
{
"component": true
}

View File

@@ -0,0 +1,18 @@
<view class="wux-class {{ classes.wrap }}">
<view class="{{ classes.hd }}">
<view class="{{ classes.title }}" wx:if="{{ title }}">
{{ title }}
</view>
<view class="{{ classes.title }}" wx:else>
<slot name="title"></slot>
</view>
</view>
<view class="{{ classes.bd }}">
<view class="{{ classes.content }}" wx:if="{{ content }}">
{{ content }}
</view>
<view class="{{ classes.content }}" wx:else>
<slot name="content"></slot>
</view>
</view>
</view>

View File

@@ -0,0 +1 @@
.wux-sticky-item{position:relative;font-size:28rpx}.wux-sticky-item__hd{background:#d9d9d9;width:100%;height:64rpx;line-height:64rpx}.wux-sticky-item__title{width:100%;padding:0 30rpx;box-sizing:border-box;background:#d9d9d9}.wux-sticky-item--fixed .wux-sticky-item__title{position:fixed;left:0;top:0;z-index:2}