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 @@
6daaa92e-779e-4c2b-bb9e-937601cda3f0

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,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(0,_baseComponent.default)({relations:{"../tabbar/index":{type:"parent"}},properties:{prefixCls:{type:String,value:"wux-tabbar-item"},key:{type:String,value:""},title:{type:String,value:""},disabled:{type:Boolean,value:!1}},data:{width:"100%",current:!1,index:"0"},computed:{classes:["prefixCls, theme, current, disabled",function(e,t,r,n){var a;return{wrap:(0,_classNames2.default)(e,(_defineProperty(a={},"".concat(e,"--").concat(t),t),_defineProperty(a,"".concat(e,"--current"),r),_defineProperty(a,"".concat(e,"--disabled"),n),a)),icon:"".concat(e,"__icon"),title:"".concat(e,"__title")}}]},methods:{changeCurrent:function(e,t,r,n){var a=100/n+"%";this.setData({width:a,current:e,theme:r,index:t})},onTap:function(){var e=this.data,t=e.index,r=e.disabled,n=this.getRelationNodes("../tabbar/index")[0];!r&&n&&(this.triggerEvent("click",{index:t}),n.setActiveKey(t))}}});

View File

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

View File

@@ -0,0 +1,16 @@
<view class="wux-class {{ classes.wrap }}" style="width: {{ width }}" bindtap="onTap">
<view class="{{ classes.icon }}">
<block wx:if="{{ current }}">
<slot name="icon-off"></slot>
</block>
<block wx:else>
<slot name="icon-on"></slot>
</block>
</view>
<view class="{{ classes.title }}">
<text wx:if="{{ title }}">{{ title }}</text>
<block wx:else>
<slot></slot>
</block>
</view>
</view>

View File

@@ -0,0 +1 @@
.wux-tabbar-item{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;text-align:center;width:100%;height:100%;color:#80848f;padding:6rpx 0 0;box-sizing:border-box;float:left}.wux-tabbar-item__icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.wux-tabbar-item__title{font-size:24rpx;margin:6rpx 0 0;line-height:1;text-align:center}.wux-tabbar-item--current{color:#33cd5f}.wux-tabbar-item--disabled{opacity:.3}.wux-tabbar-item--light.wux-tabbar-item--current{color:#ddd}.wux-tabbar-item--stable.wux-tabbar-item--current{color:#b2b2b2}.wux-tabbar-item--positive.wux-tabbar-item--current{color:#387ef5}.wux-tabbar-item--calm.wux-tabbar-item--current{color:#11c1f3}.wux-tabbar-item--assertive.wux-tabbar-item--current{color:#ef473a}.wux-tabbar-item--balanced.wux-tabbar-item--current{color:#33cd5f}.wux-tabbar-item--energized.wux-tabbar-item--current{color:#ffc900}.wux-tabbar-item--royal.wux-tabbar-item--current{color:#886aea}.wux-tabbar-item--dark.wux-tabbar-item--current{color:#444}