Commit 55020b93 by 严立

移除 lin-ui 版本

parent 7291410d
Showing with 454 additions and 4781 deletions
{
"pages": [
"pages/home/home/home",
"pages/home/guide/guide",
"pages/home/history/history",
......@@ -63,6 +65,7 @@
],
"usingComponents": {
"coupon-code": "/component/coupon-code/coupon-code",
"swiper-point": "./component/swiper-point/swiper-point",
"m-button-bottom": "./component/m-button-bottom/m-button-bottom",
"m-checkbox": "./component/m-checkbox/m-checkbox",
"m-dialog": "./component/m-dialog/m-dialog",
......@@ -73,12 +76,7 @@
"m-textarea": "./component/m-textarea/m-textarea",
"m-tab": "./component/m-tab/m-tab",
"m-segment": "./component/m-segment/m-segment",
"m-toast": "./component/m-toast/m-toast",
"swiper-point": "./component/swiper-point/swiper-point",
"l-icon": "./miniprogram_npm/lin-ui/icon/index",
"l-collapse": "./miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea": "./miniprogram_npm/lin-ui/textarea/index"
"m-toast": "./component/m-toast/m-toast"
},
"window": {
"navigationStyle": "custom",
......
......@@ -8,7 +8,8 @@ Component({
className: { type: String, value: '' },
placeholder: { type: String, value: '' },
value: { type: String, value: '' },
inputMax: { type: Number, value: 140 }
inputMax: { type: Number, value: 140 },
focus: { type: Boolean, value: false },
},
data: {
......@@ -19,6 +20,25 @@ Component({
winInput: false,
},
observers: {
'focus': function (value) {
console.log('observers focus', value)
if (value) {
this.setData({
inputFocus: false,
})
let funcTimer = setTimeout(() => {
this.setInputShow()
clearTimeout(funcTimer)
}, 500)
} else {
this.setData({
inputFocus: value
})
}
},
},
methods: {
/**
* 设置输入组件高度,避免默认初始高度产生的滚动效果。
......@@ -54,8 +74,9 @@ Component({
* @param
* @returns
*/
onInputFocus: function() {
onInputFocus: function(event) {
this.setTextareaCss()
this.eventFocus(event)
},
/**
......@@ -98,6 +119,7 @@ Component({
this.setData({
inputFocus: true,
})
clearTimeout(funcTimer)
}, 20)
},
......@@ -114,5 +136,11 @@ Component({
winInput: false,
})
},
eventFocus: function (event) {
console.log('[m-textarea] eventFocus')
console.log(event)
this.triggerEvent('focus', { height: event.detail.height, value: event.detail.value } )
},
}
})
\ No newline at end of file
......@@ -15,6 +15,7 @@
placeholder="{{placeholder}}"
placeholder-class="m_textarea_placeholder_color"
maxlength="{{inputMax}}"
auto-focus="{{inputFocus}}"
focus="{{inputFocus}}"
bindinput="onInput"
bindfocus="onInputFocus"
......
import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"} }
\ No newline at end of file
<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
<view class="l-action-sheet">
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
{{ title }}
</view>
<view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}">
<l-button bind:lintap="handleClickItem" data-index="{{ index }}" data-item="{{ item }}" open-type="{{ item.openType }}" icon="{{ item.icon }}" type="default" size="large" special="{{true}}" long>
<view style="{{ item.color ? 'color: ' + item.color : '' }}" class="l-item-button l-class-item l-item-class {{item.image || item.icon ? 'l-image-button':''}}">
<image wx:if="{{item.image}}" class="l-button-image" src="{{item.image}}" style="{{item.imageStyle}}"/>
<l-icon wx:elif="{{ item.icon }}" name="{{ item.icon }}" l-class="l-item-button" size="{{ item.iconSize }}" color="{{item.iconColor?item.iconColor:item.color}}"></l-icon>
<text class="l-button-text">{{ item.name }}</text>
</view>
</l-button>
</view>
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}">
<l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
<view class="l-item-button l-cancel-button">{{ cancelText }}</view>
</l-button>
</view>
</view>
</l-popup>
.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8}
\ No newline at end of file
Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"}},data:{newType:!0,shortSideValue:0,row:0,colum:0},lifetimes:{attached(){if(this.data.urls.length>9){const e=this.data.urls.slice(0,9);this.setData({urls:e}),console.warn("超过9张图片!")}this.preview()}},observers:{urls:function(){this.preview()}},methods:{judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,i=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:i*this.data.singleSize/t})}})},preview:function(){const e=this.judgeType();this.setData({newType:e});const t=this.data.urls,i=this.data.key;1===t.length&&this.horizontalOrVertical(e?t[0][i]:t[0])},onPreviewTap(e){const t=e.currentTarget.id,i=this.data.urls;let s="",a=[];const l=this.data.newType,r=this.data.key;if(l){s=i[t][r];for(let e=0;e<i.length;e++)a.push(i[e][r])}else s=i[t],a=i;let n={index:t,current:i[t],all:i};!0===this.data.preview&&wx.previewImage({current:s,urls:a}),this.triggerEvent("lintap",n,{})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<wxs src="index.wxs" module="album"></wxs>
<view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}">
<block wx:for="{{urls}}" wx:key="index">
<image id="{{index}}" bind:tap="onPreviewTap" class="{{album.blockClass(urls, horizontalScreen)}}" style="{{album.blockStyle(urls, horizontalScreen, shortSideValue, singleSize, multipleSize)}}" src="{{newType?item[key]:item}}" mode="{{urls.length === 1?singleMode:multipleMode}}"/>
</block>
</view>
var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;'
if (urls.length === 2 || urls.length === 4) {
return 'width:' + (2 * multipleSize + gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
} else {
return 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
}
}
var blockClass = function (urls, horizontalScreen) {
if (urls.length === 1) {
if (horizontalScreen) {
return 'l-single-image-class'
} else {
return 'vertical l-single-image-class'
}
} else {
return 'l-multi-image-class'
}
}
var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
if (urls.length === 1) {
if (horizontalScreen) {
return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
} else {
return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
}
} else {
return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
}
}
module.exports = {
containerStyle: containerStyle,
blockClass: blockClass,
blockStyle: blockStyle
}
.container{display:grid}.vertical{height:360rpx}
\ No newline at end of file
import validator from"../behaviors/validator";import zIndex from"../behaviors/zIndex";const detail=!0,option={bubbles:!0,composed:!0};Component({behaviors:[zIndex,validator],externalClasses:["l-class","l-panel-class","l-bg-class","l-header-class"],options:{multipleSlots:!0},properties:{show:{type:Boolean,value:!1},maxHeight:{type:Number,value:600},minHeight:{type:Number,value:200},arcRadius:{type:Number,value:18},transition:{type:Boolean,value:!0},locked:{type:Boolean,value:!1},opacity:{type:Number,value:.4},direction:{type:String,options:["top","bottom"],value:"bottom"},headerFixed:{type:Boolean,value:!0}},data:{_arcRadiusTop:12,_ardRadiusBottom:18,arcStyle:""},observers:{show:function(t){t?(this.triggerEvent("linshow",!0,option),this.getArcPopupStyle()):this.triggerEvent("linclose",!0,option)},arcRadius:function(t){"top"===this.properties.direction?this.data._arcRadiusTop=t:this.data._ardRadiusBottom=t,this.getArcPopupStyle()}},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showArcPopup=t=>{const{zIndex:o=99,tranistion:e=!0,direction:i="bottom",locked:a=!1}={...t};this.setData({zIndex:o,tranistion:e,direction:i,locked:a,show:!0})},wx.lin.hideArcPopup=()=>{this.setData({show:!1})}},getArcPopupStyle(){const t=this.properties.direction,o=this.data._arcRadiusTop,e=this.data._ardRadiusBottom,i=`\n border-bottom-left-radius:${"top"===t?o:0}rpx;\n border-bottom-right-radius:${"top"===t?o:0}rpx;\n border-top-left-radius:${"bottom"===t?e:0}rpx;\n border-top-right-radius:${"bottom"===t?e:0}rpx;\n max-height:${this.properties.maxHeight}rpx;\n min-height:${this.properties.minHeight}rpx;\n `;this.setData({arcStyle:i})},onArcPopupTap(){this.data.locked||this.properties.show&&this.setData({show:!1})}},ready(){this.getArcPopupStyle()}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-popup":"../popup/index"}}
\ No newline at end of file
<l-popup show="{{show}}" direction="{{direction}}" transition="{{transition}}" opacity="{{opacity}}" locked="{{locked}}" z-index="{{zIndex}}" l-class="l-class" l-bg-class="l-bg-class" bind:lintap="onArcPopupTap">
<scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
<view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
<slot name="header"/>
</view>
<view class="content-arc-popup">
<slot/>
</view>
</scroll-view>
</l-popup>
\ No newline at end of file
.container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff}
\ No newline at end of file
Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"} }
\ No newline at end of file
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar">
<view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx">
<open-data class="open-data" wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl"/>
<l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}"/>
<image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
</view>
<view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}">
<open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
<text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
</view>
</view>
.l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-badge" bindtap="handleTap">
<slot/>
<block wx:if="{{show}}">
<view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view>
<view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
</block>
</view>
\ No newline at end of file
.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}
\ No newline at end of file
export default Behavior({behaviors:[],properties:{},data:{distance:0},attached(){this.offsetMargin()},methods:{offsetMargin(){const{windowHeight:t,screenHeight:e}=wx.getSystemInfoSync();this.setData({distance:e-t})}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{time:{type:Date,value:(new Date).getTime()+864e5,observer:function(t,e){t&&!e&&this.getLatestTime()}},status:{type:Boolean,value:!0,observer:function(t){t?this.init():t||clearInterval(this.data.timer)}},timeType:{type:String,value:"datetime"},format:{type:String,value:"{%d}天{%h}时{%m}分{%s}秒"},isZeroPadd:{type:Boolean,value:!0},countdownType:{type:String,value:"normal"},isClearInterval:{type:Boolean,value:!0}},data:{initAddTime:0,timer:null,date:[]},ready:function(){this.getLatestTime()},detached:function(){this.data.isClearInterval&&clearInterval(this.data.timer)},pageLifetimes:{hide(){this.data.isClearInterval&&clearInterval(this.data.timer)},show(){this.data.isClearInterval&&this.getLatestTime()}},methods:{zeroPadding:t=>(t=t.toString())[1]?t:"0"+t,init(){clearInterval(this.data.timer);const t=setTimeout(()=>{this.getLatestTime.call(this)},1e3);this.setData({timer:t})},getLatestTime(){let{time:t,status:e,timeType:i,initAddTime:a,countdownType:n}=this.data,s=t;if("normal"===n){if("second"!==i&&(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil((new Date(s).getTime()-(new Date).getTime())/1e3)),s<0&&"second"!==i)return this._getTimeValue(0),void this.CountdownEnd();s-a>0?this.getLatestForCountDown(s):s-a<0?this.getLatestForAddTime(s):s-a==0&&(a<=0&&this._getTimeValue(s),this.CountdownEnd()),e&&s-a!=0&&this.init.call(this)}else"anniversary"===n?"second"===i?console.error(`countdownType为${n}类型时,不可设置timeType值为second`):(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil(((new Date).getTime()-new Date(s).getTime())/1e3),s>=0?(this.getLatestForCountDown(s),this.init.call(this)):console.error("time传值错误")):console.error("错误的countdownType类型")},getLatestForAddTime(t){let{initAddTime:e}=this.data;e!==Math.abs(t)&&(e++,this._getTimeValue(e),this.setData({initAddTime:e}))},getLatestForCountDown(t){this._getTimeValue(t),this.setData({time:"second"===this.data.timeType?--t:this.data.time})},_getTimeValue(t){const{format:e}=this.data,i=[],a=e.split(/(\{.*?\})/);let n=t;return[{key:"{%d}",type:"day",count:86400},{key:"{%h}",type:"hour",count:3600},{key:"{%m}",type:"minute",count:60},{key:"{%s}",type:"second",count:1}].forEach(t=>{const e=this._findTimeName(a,t.key);if(-1===e)return;const s=a[e],o={type:t.type,name:s,value:parseInt(n/t.count)};this.data.isZeroPadd&&(o.value=this.zeroPadding(o.value)),n%=t.count,i.push(o)}),this.setData({date:i}),i},_findTimeName(t,e){const i=t.indexOf(e);return-1===i?-1:i+1},CountdownEnd(){this.triggerEvent("linend",{})}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{isHover:{type:Boolean,value:!0}}});
\ No newline at end of file
import Schema from"../common/async-validator/index";import validator from"../behaviors/validator";export default Behavior({behaviors:[validator],properties:{rules:{type:[Object,Array],value:[]},tipType:{type:String,value:"toast",options:["toast","message","text"]}},data:{schema:"",tipFun:{message:"showMessage",toast:"showToast"},tipContent:{message:"content",toast:"title"},errorText:"",errors:[]},methods:{initRules(){const{rules:t}=this.data;t&&("[object Object]"===Object.prototype.toString.call(t)&&(this.data.rules=[t]),this.data.rules.forEach(t=>{t.trigger?"string"!=typeof t.trigger||(t.trigger=[t.trigger]):t.trigger=[]}))},getNeedValidateRule(t){const e=this.data.name,{rules:a}=this.data;if(!a)return;const r=t?a.filter(e=>e.trigger.indexOf(t)>-1):a,s=new Schema({[e]:r});return this.setData({schema:s}),r},validatorData(t,e){const{tipType:a,tipFun:r,tipContent:s}=this.data;this.getNeedValidateRule(e)&&(Object.getOwnPropertyNames(t).forEach(e=>{""===t[e]&&(t[e]=void 0)}),this.data.schema.validate(t,t=>{if(this.setData({errors:t||[]}),this.triggerEvent("linvalidate",{errors:t,isError:!!t}),t&&a){const e=r[a],i=s[a];return"text"===a?(this.setData({errorText:t[0].message}),t):wx.lin&&wx.lin[e]?(wx.lin[e]&&wx.lin[e]({[i]:t[0].message,duration:1500,mask:!1}),t):(wx.showToast({icon:"none",title:`请在页面内引入${a}组件`}),t)}!t&&a&&this.setData({errorText:""})}))}}});
\ No newline at end of file
export default Behavior({methods:{getRect(e,t=!1){return new Promise((r,o)=>{const s=wx.createSelectorQuery().in(this);(t?s.selectAll(e):s.select(e)).boundingClientRect(e=>{if(!e)return o("找不到元素");r(e)}).exec()})},queryScrollNode(e,t,r="width"){if(t<0)return;const o=e[t];this.getRect(".l-tabsscroll").then(s=>{if(!s)return console.error("找不到元素");const c=s[r];let n=e.slice(0,t).reduce((e,t)=>e+t[r],0);n+=(o[r]-c)/2,"width"===r?this.setData({transformX:n,transformY:0}):this.setData({transformX:0,transformY:n})}).catch(e=>{console.error(e)})},queryMultipleNodes(){const{placement:e,currentIndex:t}=this.data;this.getRect(".l-tabs-item",!0).then(r=>{-1!==["top","bottom"].indexOf(e)?this.queryScrollNode(r,t):this.queryScrollNode(r,t,"height")}).catch(e=>{console.error(e)})}}});
\ No newline at end of file
const isObj=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},getClassNames=e=>({enter:`l-${e}-enter l-${e}-enter-active l-enter-class l-enter-active-class`,"enter-to":`l-${e}-enter-to l-${e}-enter-active l-enter-to-class l-enter-active-class`,leave:`l-${e}-leave l-${e}-leave-active l-leave-class l-leave-active-class`,"leave-to":`l-${e}-leave-to l-${e}-leave-active l-leave-to-class l-leave-active-class`}),nextTick=()=>new Promise(e=>setTimeout(e,1e3/30));export default e=>Behavior({properties:{customStyle:String,show:{type:Boolean,value:e,observer:"observeShow"},duration:{type:null,value:300,observer:"observeDuration"},name:{type:String,value:"fade"}},data:{type:"",inited:!1,display:!1},attached(){this.data.show&&this.enter()},methods:{observeShow(e){e?this.enter():this.leave()},enter(){const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.enter:e;this.status="enter",this.triggerEvent("linbeforeenter"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("enter"),this.triggerEvent("linenter"),this.setData({inited:!0,display:!0,classes:s.enter,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("enter"),this.transitionEnded=!1,this.setData({classes:s["enter-to"]})}).catch(()=>{})},leave(){if(!this.data.display)return;const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.leave:e;this.status="leave",this.triggerEvent("linbeforeleave"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("leave"),this.triggerEvent("linleave"),this.setData({classes:s.leave,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("leave"),this.transitionEnded=!1,setTimeout(()=>this.onTransitionEnd(),a),this.setData({classes:s["leave-to"]})}).catch(()=>{})},checkStatus(e){if(e!==this.status)throw new Error("incongruent status: "+e)},onTransitionEnd(){if(this.transitionEnded)return;this.transitionEnded=!0,this.triggerEvent("linafter"+this.status);const{show:e,display:t}=this.data;!e&&t&&this.setData({display:!1})}}});
\ No newline at end of file
export default Behavior({definitionFilter(e){const{properties:o}=e;Object.keys(o).forEach(e=>{const{options:t}=o[e];t&&(o[e].observer=function(o){!t.includes(o)&&o&&console.error(`${e}: ${o} must be in the [${t}]`)})})}});
\ No newline at end of file
export default Behavior({observers:{show:function(t){t&&this.changeStatus(),t||this.setData({status:t})}},methods:{changeStatus(){this.setData({status:!0}),this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(()=>{this.setData({status:!1}),this.data.success&&this.data.success(),this.data.timer=null},this.properties.duration)}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{zIndex:{type:Number,value:777}}});
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<label for="{{name}}" bindtap="handleTap" class="l-label-class">
<block wx:if="{{special}}">
<view class="special-container l-class">
<slot/>
</view>
</block>
<block wx:else>
<view class="l-btn {{ 'l-btn-' + size }} {{ 'l-btn-' + type }} {{ 'l-btn-' + shape }} {{plain?'l-btn-plain':''}} {{ disabled ? 'l-btn-disabled' : ''}} l-class" hover-class="{{disabled?'':'btn-hover l-hover-class'}}" hover-stop-propagation="{{hoverStopPropagation}}" hover-start-time="{{hoverStartTime}}" hover-stay-time="{{hoverStayTime}}" style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0;':''}} {{'background-color:'+bgColor}}">
<view wx:if="{{loading}}" class="l-btn-loading {{'margin-' + size}} {{ plain ?'l-btn-loading-' + type : '' }}"></view>
<l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
<slot/>
</view>
</block>
</label>
<button style="position: absolute;top: -999px;left: -999px;" wx:if="{{openType}}" id="{{name}}" lang="{{lang}}" form-type="{{formType}}" open-type="{{openType}}" app-parameter="{{ appParameter }}" hover-stop-propagation="{{ hoverStopPropagation }}" hover-start-time="{{ hoverStartTime }}" hover-stay-time="{{ hoverStayTime }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" bindcontact="openTypeEvent" bindgetuserinfo="openTypeEvent" bindgetphonenumber="openTypeEvent" bindopensetting="openTypeEvent">
</button>
\ No newline at end of file
.btn-hover::before{opacity:.15;position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;transform:translate(-50%,-50%);content:' ';background-color:#333;border-color:#333}.special-container{display:flex}.l-btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:28rpx;position:relative;color:#fff;padding:0 12rpx;box-sizing:border-box}.l-btn-img-mini{width:30rpx;height:30rpx}.l-btn-img-medium{width:36rpx;height:36rpx}.l-btn-img-large{height:44rpx;width:44rpx}.l-btn-long{border-radius:0;height:88rpx;width:100%}.l-btn-medium{height:72rpx;min-width:180rpx}.l-btn-large{height:88rpx;min-width:710rpx}.l-btn-mini{height:60rpx;min-width:140rpx;font-size:24rpx}.l-btn-default{background-color:#85c5e1}.l-btn-success{background-color:#34bfa3}.l-btn-warning{background-color:#ffe57f;color:#333}.l-btn-error{background-color:#f4516c}.l-btn-square{border-radius:0}.l-btn-semicircle{border-radius:40rpx}.l-btn-large.l-btn-semicircle{border-radius:48rpx}.l-btn-mini.l-btn-semicircle{border-radius:30rpx}.l-btn-circle{border-radius:8rpx}.l-btn-large.l-btn-circle{border-radius:9.6rpx}.l-btn-mini.l-btn-circle{border-radius:6rpx}.l-btn-plain{background-color:#fff;color:#85c5e1;border:2rpx solid #85c5e1}.l-btn-success.l-btn-plain{background-color:#fff;color:#34bfa3;border:2rpx solid #34bfa3}.l-btn-error.l-btn-plain{background-color:#fff;color:#f4516c;border:2rpx solid #f4516c}.l-btn-warning.l-btn-plain{background-color:#fff;color:#ffe57f;border:2rpx solid #ffe57f}.l-btn-loading{opacity:.6;display:inline-block;vertical-align:middle;width:24rpx;height:24rpx;background:0 0;border-radius:50%;border:4rpx solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.l-btn-loading-default{border:4rpx solid #85c5e1;border-color:#85c5e1 #85c5e1 #85c5e1 transparent}.l-btn-loading-success{border:4rpx solid #34bfa3;border-color:#34bfa3 #34bfa3 #34bfa3 transparent}.l-btn-loading-error{border:4rpx solid #f4516c;border-color:#f4516c #f4516c #f4516c transparent}.l-btn-loading-warning{border:4rpx solid #ffe57f;border-color:#ffe57f #ffe57f #ffe57f transparent}.l-btn-disabled{opacity:.8}.icon{display:flex!important}.margin-mini{margin-right:10rpx}.margin-medium{margin-right:18rpx}.margin-large{margin-right:24rpx}.margin-long{margin-right:24rpx}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import deviceUtil from"../utils/device-util";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({behaviors:[validator],externalClasses:["l-title-class"],properties:{bgColor:{type:String,value:"white"},statusBarColor:{type:String,value:"transparent"},titleBarColor:{type:String,value:"transparent"},titleColor:{type:String,value:"black"},capsuleColor:{type:String,value:"black",options:["white","black"]},disableBack:{type:Boolean,value:!1},disableHome:{type:Boolean,value:!1},hiddenCapsule:{type:Boolean,value:!1},homePage:{type:String,value:""},title:{type:String,value:""},hasPadding:{type:Boolean,value:!0}},data:{titleBarHeight:deviceUtil.getTitleBarHeight(),statusBarHeight:deviceUtil.getStatusBarHeight(),capsuleButtonInfo:null},lifetimes:{ready:function(){this.setData({capsuleButtonInfo:this.getCapsuleButtonInfo()})}},methods:{getCapsuleButtonInfo(){const t=wx.getSystemInfoSync().screenWidth,e=wx.getMenuButtonBoundingClientRect();return e.left=t-e.right,e.right=e.left+e.width,e},onTapLeftButton(){eventUtil.emit(this,"linlefttap"),this.data.disableBack||wx.navigateBack()},onLongPressLeftButton(){eventUtil.emit(this,"linleftlongpress")},async onTapRightButton(){eventUtil.emit(this,"linrighttap");const t=this.data.homePage;this.data.disableHome||wx.switchTab({url:t,fail(){wx.navigateTo({url:t})}})},onLongPressRightButton(){eventUtil.emit(this,"linrightlongpress")}}});
\ No newline at end of file
{"component":true}
\ No newline at end of file
<view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx">
<cover-view class="capsule-bar" style="background-color: {{bgColor}};">
<cover-view class="status-bar" style="height: {{statusBarHeight+4}}rpx;background-color: {{statusBarColor}};"></cover-view>
<cover-view class="title-bar" style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};">
<cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
</cover-view>
<cover-view wx:if="{{!hiddenCapsule}}" class="capsule-button" style="border-color: rgba({{capsuleColor==='black'?'0,0,0,0.1':'255,255,255,0.25'}});background-color: rgba({{capsuleColor==='black'?'255,255,255,0.6':'0,0,0,0.15'}});width: {{capsuleButtonInfo.width}}px;height: {{capsuleButtonInfo.height}}px;left: {{capsuleButtonInfo.left}}px;top: {{capsuleButtonInfo.top}}px;">
<cover-view catch:tap="onTapLeftButton" catch:longpress="onLongPressLeftButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image class="icon-left" src="icons/capsule-left-{{capsuleColor}}.png"></cover-image>
</cover-view>
<cover-view class="line"></cover-view>
<cover-view catch:tap="onTapRightButton" catch:longpress="onLongPressRightButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image class="icon-right" src="icons/capsule-right-{{capsuleColor}}.png"></cover-image>
</cover-view>
</cover-view>
</cover-view>
<view class="content-container">
<slot></slot>
</view>
</view>
.container{position:relative}.container .capsule-bar{width:100%;position:fixed;display:flex;flex-direction:column;top:0;left:0;z-index:999}.container .capsule-bar .status-bar{width:100%}.container .capsule-bar .title-bar{width:100%;display:flex;align-items:center;justify-content:center;margin-top:-4rpx;padding-top:4rpx;box-sizing:border-box}.container .capsule-bar .title-bar .title{font-size:36rpx;font-weight:700}.container .capsule-bar .capsule-button{border-radius:99999px;display:flex;align-items:center;border:1px solid rgba(0,0,0,.1);position:fixed}.container .capsule-bar .capsule-button .icon-wrapper-hover-black{background-color:rgba(0,0,0,.36)}.container .capsule-bar .capsule-button .icon-wrapper-hover-white{background-color:rgba(255,255,255,.339)}.container .capsule-bar .capsule-button .icon-wrapper{display:flex;justify-content:center;align-items:center}.container .capsule-bar .capsule-button .icon-wrapper .icon-left{display:block;width:20rpx;height:34rpx}.container .capsule-bar .capsule-button .icon-wrapper .icon-right{display:block;width:38rpx;height:34rpx}.container .capsule-bar .capsule-button .line{height:18px;width:1px;line-height:1;background-color:rgba(255,255,255,.25)}.container .content-container{width:100%;position:absolute;left:0}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-img-class","l-title-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{image:String,title:String,describe:String,plaintext:Boolean,full:Boolean,position:{type:String,value:"left",options:["left","right"]},type:{type:String,value:"primary",options:["primary","avatar","cover"]},imageMode:{type:String,value:"scaleToFill"}},data:{},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}">
<block wx:if="{{type ==='primary' || type ==='cover'}}">
<image wx:if="{{!plaintext}}" class="l-img-class {{full?'cover-img-full':'cover-img-unfull'}} {{ 'card-img-' + type }} {{ 'card-img-' + type + '-' + position }}" mode="{{imageMode}}" lazy-load src="{{image}}"></image>
<view class="card-content">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<slot/>
</view>
</block>
<block wx:if="{{type ==='avatar'}}">
<view class="card-avatar-top">
<view class="card-avatar-left">
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
<view class="card-avatar">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<text class="describe">{{describe}}</text>
</view>
</view>
<slot name="more"/>
</view>
<slot/>
</block>
</view>
\ No newline at end of file
.card-container{margin:0 auto;padding:30rpx;box-sizing:border-box;background:#fff;display:flex}.card-container-full{width:100%}.card-container-unfull{width:92%;box-shadow:0 4rpx 20rpx 0 rgba(212,217,223,.5);border-radius:4px}.card-container-primary-left{flex-direction:row}.card-container-primary-right{flex-direction:row-reverse}.card-container-avatar{flex-direction:column}.card-container-cover{flex-direction:column}.cover-img-full{width:100%;height:260rpx}.cover-img-unfull{width:100%;height:260rpx}.card-img-primary{height:240rpx;width:240rpx;overflow:hidden}.card-img-primary-left{margin-right:40rpx}.card-img-primary-right{margin-left:40rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-content{position:relative;display:flex;flex-direction:column;flex:1}.card-title{overflow:hidden;text-overflow:ellipsis;color:#333}.card-title-primary{font-size:32rpx;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.card-title-avatar{font-size:28rpx}.card-title-cover{font-size:30rpx;margin-top:10rpx}.card-title-avatar{font-size:28rpx}.card-avatar-top{display:flex;flex-direction:row;height:100rpx;align-items:center;justify-content:space-between}.card-avatar-left{display:flex;flex-direction:row;align-items:center}.card-avatar{display:flex;flex-direction:column}.describe{color:#666;font-size:24rpx}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class"],relations:{"../checkbox/index":{type:"child",linked(e){this.init(e)},linkChanged(){},unlinked(){}}},properties:{placement:{type:String,value:"column"},maxSelected:{type:[Number,null],value:null},minSelected:{type:[Number,null],value:null}},data:{},attached(){let{minSelected:e,maxSelected:t}=this.properties;this.checkMax(e,t)},methods:{init(e){void 0===this._keys&&(this._keys={}),void 0===this._selected&&(this._selected={}),this.checkDefaultItem(e),this.checkedKeyRepeat(e)},checkedKeyRepeat(e){let{key:t}=e.properties;if(this._keys[t])throw new Error("keys有重复元素, checkbox的key属性不能重复:"+t);this._keys[t]=!0},checkDefaultItem(e){const{key:t,checked:l,cell:s}=e.properties;l&&(this._selected[t]={...s,checked:!0,value:t})},checkMax(e,t){if(null!==e&&e<0)throw new Error("最小选择个数必须大于等于0");if(null!==t&&t<0)throw new Error("最多选择个数必须大于0");if(null!==t&&null!==e&&e>=t)throw new Error("最多选择个数必须大于最小选择个数")},onEmitEventHandle(e){e.checked?this.addSelect(e):this.removeSelect(e.key),this.validatorData({[this.data.name]:Object.values(this._selected)}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},onEmitOverflowHandle(e){this.triggerEvent("linout",e,{bubbles:!0,composed:!0})},removeSelect(e){delete this._selected[e]},addSelect(e){let{key:t,...l}=e;this._selected[t]={...l,value:t}},getValues(){return Object.values(this._selected)},reset(){this._selected={};return this.getRelationNodes("../checkbox/index").forEach(e=>e.setData({checked:!1}))}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-checkbox":"../checkbox/index"}}
\ No newline at end of file
<view class="l-class checkbox-group checkbox-group-{{placement}}">
<slot></slot>
</view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.checkbox-group{flex-wrap:wrap}.checkbox-group-row{display:flex;flex-direction:row}.checkbox-group-column{display:flex;flex-direction:column}
\ No newline at end of file
Component({behaviors:["wx://form-field"],externalClasses:["l-class","l-disabled-class"],relations:{"../checkbox-group/index":{type:"parent"}},options:{multipleSlots:!0},properties:{placement:{type:String,value:"left"},custom:{type:Boolean,value:!1},key:{type:String,value:""},cell:{type:Object,value:{}},size:{type:String,value:"38rpx"},disabled:{type:Boolean,value:!1},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},color:{type:String,value:"#ccc"},checked:{type:Boolean,value:!1}},data:{parentPlacement:""},ready(){const e=this.getRelationNodes("../checkbox-group/index")[0];let{placement:t}=e.properties;this.setData({parentPlacement:t})},methods:{onCheckboxChangeTap(){if(this.properties.disabled||this.data.parentDisabled)return;const e=this.getRelationNodes("../checkbox-group/index")[0];if(this.properties.checked){if(this.isOverflow("minSelected"))return}else if(this.isOverflow("maxSelected"))return;const t={checked:!this.properties.checked,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(t)},isOverflow(e){const t=this.getRelationNodes("../checkbox-group/index")[0],l=t.properties[e];if(!l)return!1;const i=Object.values(t._selected).length;let o="minSelected"===e?i<=l:i>=l;if(o){let i="minSelected"===e?"min_selected":"max_selected";t.onEmitOverflowHandle&&t.onEmitOverflowHandle({key:this.properties.key,limitNumber:l,type:"overflow_"+i})}return o}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-button":"../button/index"}}
\ No newline at end of file
<view bind:tap="onCheckboxChangeTap" class="label label-{{placement}} label-placement-{{parentPlacement}} {{disabled ? 'label-disabled l-disabled-class' : 'l-class'}}">
<view class="checkbox" style="color:{{checked ? selectColor : (disabled ? disabledColor : color)}};font-size: {{size}}">
<slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view>
</view>
<slot/>
</view>
.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%;box-sizing:border-box}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.label-placement-row{padding-right:30rpx}.checkbox{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABxgAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBeIFdATYCJAMMCwgABCAFhG0HQBstBlGUzMkA2c8E020e0uBCKA1ReoTOr2jhX60Fez8evvb7nbu7X40GSTTS8S6aRBOpkCB1plMyIWkJb/+nLTemUXn+tjy1proDbGd+u9OXhuW20ygDQoJwOPhjfw50kxP0dlsW4tKSEtLyKhWqIpT/3MKy5KTZgMvpr8TnWZbTWts2jgmYYEBjDHuKrEQCzjUF2R2BWvJ9Am0LeioHm9MVtBXOskC8RIED7VJMUaRiU6i37C3iHV4zvaZPKG/x5+OfLdoktcxZe/S89mH27bv8VD0phAT5ch5Ih8jYBApx3eq7Uktzm2rahqZu1oO6IqSlklVFLDMN9YP+8RJR55R2wSrNJ775IoLvWEgggzoKDoFYipp4U38JhsVnsZqMDSLDTR9O5v6lxM+emWKnJ0j1WkJfv81PpvtdvqfbrTPuXw1+/Yswbx81bvFu4GNdLq7/WnYQrkR7OT7DTrwSHIOw0QhHGI+BEQb/TCiV/n/7MQFAQ9mO3iwSi9Gz9MCEpIu0tWgZiFkilLN8tRFgA1SnfMgz8o0Kgo9Q+Gcx3f/tTgFfe45JtDoVFO7QvAt/8FflYE8xlY49F13my+xAtjTRk6ASOahCOaGxn+mGGVxKaJrlSBrmkTUtkoWziZqOLdQ1baNtw/Zwx4SoidLCuneCMPSBpO8T2dAXWTjfqJnzi7ph1NB2EdwzO5Yj6oaEHCUf3UeMPM6N59RuUn6m4DZ1pKiMuTckZZTE8WBULW4pJ1liQ3kXTFQNGuEMN+QxSlPGQjgmTwehajEdDk3biwYeZ9C1TxCHIj7keoQiHpYz4XDVrb3/jARupRzS09AQv0FEKRodjQ2MAHKry6GGR2FTuhOYUMpAhmAZtCEekro5hor2WTHiUQPhhExhasgGGVQ32N6Q/UCp1ILzXI4UOYrOQ0he4vKDxXk7twIAAAAA') format('woff2')}.icon-unselect:before{content:"\e727"}.icon-select:before{content:"\e725"}
\ No newline at end of file
Component({externalClasses:["l-value-class"],properties:{percent:{type:Number,value:0},outerDiameter:{type:Number,value:220},innerDiameter:{type:Number,value:170},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},innerColor:{type:String,value:"#FFFFFF"},active:{type:Boolean,value:!1},duration:{type:Number,value:30},showValue:{type:Boolean,value:!1},valueColor:{type:String},valueSize:{type:Number,value:25}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{displayPercent:0},observers:{percent:async function(e){if(e>100)this.setData({percent:100});else if(e<0)this.setData({percent:0});else if(this.data.active){let t=this.data.displayPercent;if(t<e)for(;t<e;)await this.sleep(this.data.duration),t+=1,this.setData({displayPercent:t});else if(t>e)for(;t>e;)await this.sleep(this.data.duration),t-=1,this.setData({displayPercent:t})}else this.setData({displayPercent:e})},outerDiameter:function(e){e<this.data.innerDiameter&&(e=this.data.innerDiameter,this.setData({outerDiameter:e}))},innerDiameter:function(e){e<0&&this.setData({innerDiameter:0})}},methods:{sleep:e=>new Promise(t=>{setTimeout(t,e)})}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="sector {{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ? 'sector1' : 'sector2'}}" style="height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?activeColor?'background:'+activeColor:'':'background:'+backgroundColor}}">
<view wx:if="{{displayPercent !== 0 && displayPercent !== 100}}" class="sx1" style="height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;clip: rect(0rpx, {{outerDiameter/2}}rpx, {{outerDiameter}}rpx, 0rpx);background:{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?backgroundColor:activeColor?activeColor:''}}"></view>
<view wx:if="{{displayPercent !== 50 && displayPercent !== 0 && displayPercent !== 100}}" class="sx2" style="transform: rotate({{displayPercent < 50 ? ((360 * displayPercent / 100) - 180):(360 * (displayPercent - 100) / 100)}}deg);height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;clip: rect(0rpx, {{outerDiameter/2}}rpx, {{outerDiameter}}rpx, 0rpx);background:{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?backgroundColor:activeColor}}"></view>
<view class="sx_t" style="width:{{innerDiameter}}rpx;height:{{innerDiameter}}rpx;background:{{innerColor}}">
<view wx:if="{{showValue}}" class="l-value-class" style="color:{{valueColor?valueColor:''}};font-size:{{valueSize}}rpx">
{{displayPercent}}%
</view>
<slot></slot>
</view>
</view>
.sector{position:relative;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.sx1,.sx2{position:absolute;top:0;left:0}.sx1{z-index:1}.sx2{z-index:2}.sx_t{border-radius:50%;z-index:3;display:flex;flex-direction:row;justify-content:center;align-items:center}.sector1{background:#85c5e1}.sector2 .sx1,.sector2 .sx2{background:#85c5e1;transform:rotate(180deg)}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-title-class","l-body-class"],relations:{"../collapse/index":{type:"parent"}},options:{multipleSlots:!0,pureDataPattern:/^_/},properties:{itemId:{type:String,value:"default"},title:{type:String,value:"默认标题"},customTitle:{type:Boolean,value:!1},disable:{type:Boolean,value:!1},animationTime:{type:String,value:"0.3"}},data:{bodyHeight:"0",isExpandContent:!1,_idDefault:-1},methods:{async onTapTitle(){if(this.data.disable)return;let t=this.getRelationNodes("../collapse/index");await t[0].onTapCollapseItem(this)},async foldContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.data.isExpandContent?(this.setData({bodyHeight:t.height+"px"}),setTimeout(()=>{this.setData({isExpandContent:!1,bodyHeight:"0px"})},20)):this.setData({isExpandContent:!1,bodyHeight:"0px"})},async expandContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.setData({isExpandContent:!0,bodyHeight:t.height+"px"})},onTransitionend(){this.data.isExpandContent&&this.setData({bodyHeight:"auto"})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-list":"../list/index","l-icon":"../icon/index"}}
\ No newline at end of file
<view class="container l-class">
<view bind:tap="onTapTitle" class="container-title l-title-class">
<view style="{{disable?'color:#DEE2E6':''}}" wx:if="{{!customTitle}}">{{title}}</view>
<l-icon class="container-title-icon" wx:if="{{!customTitle}}" style="{{isExpandContent?'transform:rotate(-180deg);':''}}" name="down" size="28" color="{{disable?'#DEE2E6':'#333'}}"></l-icon>
<slot name="title"></slot>
</view>
<view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s">
<view class="container-body-wrapper l-body-class">
<slot></slot>
</view>
</view>
</view>
.container{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.container-title{display:flex;justify-content:space-between;padding:10rpx;align-items:center;font-size:32rpx;color:#333}.container-title-l-icon{transition:.3s}.container-body{width:100%;color:#888;box-sizing:border-box;font-size:28rpx;transition:height .3s ease-in-out;overflow:hidden}.container-body-wrapper{position:relative;padding:10rpx}
\ No newline at end of file
Component({options:{pureDataPattern:/^_/},relations:{"../collapse-item/index":{type:"child",linked:function(){this._setAllItemId()},linkChanged:function(){this._setAllItemId()},unlinked:function(){this._setAllItemId()}}},lifetimes:{ready:function(){this.updateView()}},properties:{type:{type:String,value:"normal"},expandItemId:{type:Array,value:[]}},data:{_expandItems:[]},observers:{expandItemId:function(){this.updateView()}},methods:{async updateView(){let t;t="accordion"===this.data.type?this.data.expandItemId.slice(0,1):this.data.expandItemId;let e=this.getRelationNodes("../collapse-item/index");for(let a=0;a<e.length;a++){let d=e[a],i="default"===d.data.itemId?a:d.data.itemId;t.indexOf(i)>-1&&!d.isExpandContent?await this.setCollapseItemStatus(d,!0):(d.isExpandContent||"accordion"===this.data.type)&&await this.setCollapseItemStatus(d,!1)}},async onTapCollapseItem(t){"accordion"===this.data.type&&await this.foldAllExpandItem(t),this.setCollapseItemStatus(t,!t.data.isExpandContent),t.data.isExpandContent?this.triggerEvent("linfold",{id:t.data.itemId?t.data.itemId:t.data._idDefault}):this.triggerEvent("linexpand",{id:t.data.itemId?t.data.itemId:t.data._idDefault})},async setCollapseItemStatus(t,e){if(e)t.expandContent(),this.data._expandItems.push(t);else{await t.foldContent();for(let e=0;e<this.data._expandItems.length;e++)this.data._expandItems[e]===t&&this.data._expandItems.splice(e,1)}},foldAllExpandItem(t){for(let e=0;e<this.data._expandItems.length;e++)t!==this.data._expandItems[e]&&this.data._expandItems[e].foldContent();this.data._expandItems=[]},_setAllItemId(){this.getRelationNodes("../collapse-item/index").forEach((t,e)=>{t.data._idDefault=e})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container">
<slot></slot>
</view>
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class-header","l-class-active","l-class-inactive","l-class-line","l-class-tabimage","l-header-class","l-active-class","l-inactive-class","l-line-class","l-tabimage-class","l-content-class"],relations:{"../tabpanel/index":{type:"child"},linked(){this.initTabs()}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},aminmated:Boolean,scrollable:Boolean,swipeable:{type:Boolean,value:!0},hasLine:{type:Boolean,value:!0},activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"}},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},ready(){this.initTabs()},methods:{initTabs(){this.initTabList(),this.initActiveIndex()},initActiveIndex(t=this.data.activeKey){let e=t,a=this.data.currentIndex;this.data.tabList.forEach((s,i)=>{e=t||0!==i?e:s.key,a=s.key===e?i:a}),this.setData({activeKey:e,currentIndex:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})},initTabList(){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){const e=[];t.forEach(t=>{const a=e.findIndex(e=>e.tab===t.data.tab);let s={};-1===a&&(s={tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconStyle:t.data.iconStyle,image:t.data.image,subTabs:[]},e.push(s));const i=-1===a?s:e[a];if(t.data.subTab){i.subTabs=i.subTabs||[];const e={tab:t.data.subTab,key:t.data.subKey};i.subTabs.push(e),i.activeSubKey=this.data.subActiveKey||i.subTabs[0].key,i.subCurrentIndex=0}}),this.setData({tabList:e})}},swiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const t=a,e=this.data.tabList[a].key,s=this.data.tabList[t].subCurrentIndex,i=this.data.tabList[t].activeSubKey;this._setChangeData({activeKey:e,currentIndex:t,subCurrentIndex:s,activeSubKey:i})}},subSwiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const{currentIndex:t,activeKey:e}=this.data,s=a,i=this.data.tabList[t].subTabs[s].key,n=this.data.tabList[t];n.activeSubKey=i,n.subCurrentIndex=s,this.setData({[`tabList[${t}]`]:n}),this._setChangeData({activeKey:e,currentIndex:t,activeSubKey:i,subCurrentIndex:s})}},handleChange(t){const e="subTab"===t.currentTarget.dataset.headerType,{currentIndex:a,activeKey:s}=this.data,i=t.currentTarget.dataset.index,n=e?i:this.data.tabList[i].subCurrentIndex,r=e?this.data.tabList[a].subTabs[n].key:this.data.tabList[i].activeSubKey;if(e){const t=this.data.tabList[a];t.activeSubKey=r,t.subCurrentIndex=n,this.setData({[`tabList[${a}]`]:t}),this._setChangeData({activeKey:s,currentIndex:a,activeSubKey:r,subCurrentIndex:n})}else{const e=t.currentTarget.dataset.key;this._setChangeData({activeKey:e,currentIndex:i,subCurrentIndex:n,activeSubKey:r})}},_setChangeData({activeKey:t,currentIndex:e,activeSubKey:a="",subCurrentIndex:s=null}){this.setData({activeKey:t,currentIndex:e},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:t,currentIndex:e,activeSubKey:a,subCurrentIndex:s})},async queryMultipleNodes(){const{placement:t,activeKey:e,tabList:a}=this.data,s=await nodeUtil.getNodeRectFromComponent(this,"#"+e);if(-1!==["top","bottom"].indexOf(t))this.setData({transformX:s.left-a.length/2*s.width,transformY:0});else{const t=await nodeUtil.getNodeRectFromComponent(this,".l-tabs-header"),e=s.top-t.top-t.height/2;this.setData({transformX:0,transformY:e})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index"}}
\ No newline at end of file
<view class="l-tabs l-placement-top l-tabs-horizontal {{aminmated ? 'l-aminmated' :''}} {{scrollable ? 'l-tabs-scroll':''}}">
<template is="tab-header" data="{{tab:tabList,placemanet,scrollable,transformY,transformX,activeKey,hasLine,activeColor,inactiveColor,headerType:'tab'}}"></template>
<view class="l-tabs l-sub-placement-left l-tabs-vertical {{aminmated ? 'l-aminmated' :''}} {{scrollable ? 'l-tabs-scroll':''}}">
<template is="tab-header" wx:if="{{tabList[currentIndex].subTabs.length}}" data="{{tab:tabList[currentIndex].subTabs,placemanet,scrollable,transformY,transformX,activeKey:tabList[currentIndex].activeSubKey,hasLine,activeColor,inactiveColor,headerType:'subTab'}}"></template>
<view class="l-tabs-main">
<view wx:if="{{!swipeable}}" class="l-tabpanel-content l-content-class">
<view class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':'l-tabpanel-inactive'}}" wx:for="{{tabList}}" wx:key="key" style="{{placement=='left'||placement=='right' ? 'position:absolute;width:100%;height:100%;transform:translate(0,'+ 100 * index +'%) translateZ(0px);':''}}">
<view class="l-subpanel-content" wx:if="{{item.subTabs.length>0}}" style="{{'transform:translate(0,'+ -100 * item.subCurrentIndex +'%) translateZ(0px);'}}">
<view class="l-subpanel" wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot>
</view>
</view>
<slot name="{{item.key}}" wx:else></slot>
</view>
</view>
<swiper wx:else class="l-tabpanel-content l-content-class" bindchange="swiperChange" current="{{currentIndex}}">
<swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<view wx:if="{{item.subTabs.length>0}}">
<swiper class="" vertical bindchange="subSwiperChange" current="{{item.subCurrentIndex}}">
<swiper-item wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot>
</swiper-item>
</swiper>
</view>
<slot name="{{item.key}}" wx:else></slot>
</swiper-item>
</swiper>
</view>
</view>
</view>
<template name="tab-header">
<scroll-view scroll-x="{{headerType==='tab' && scrollable}}" scroll-y="{{headerType==='subTab' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll">
<view class="l-tabs-header l-class-header l-header-class {{hasLine?'l-tabs-header-line':''}}">
<view id="{{item.key}}" class="l-tabs-item {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.image.placement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" wx:for="{{tab}}" wx:key="key" data-key="{{item.key}}" data-index="{{index}}" data-header-type="{{headerType}}" bind:tap="handleChange">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tabimage-class"/>
<l-icon wx:if="{{item.icon}}" l-class="{{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" size="28" color="{{item.key===activeKey?activeColor:inactiveColor}}"/>
{{item.tab}}
<view class="l-tab-line l-class-line l-line-class" wx:if="{{hasLine && item.key===activeKey}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</view>
</scroll-view>
</template>
.l-tabs{display:flex;border-radius:8rpx;box-sizing:border-box;overflow:hidden;flex-direction:column;background:#fff;height:100%}.l-tabs .l-tabs-header{display:flex;width:100%;flex-direction:row;background:#fff;align-items:center}.l-tabs .l-tabs-header .l-tabs-item{flex:1;font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs .l-tabs-header .l-icon-active,.l-tabs .l-tabs-header .l-tabs-active{color:#333;font-size:28rpx}.l-tabs .l-tabs-header .l-icon-inactive,.l-tabs .l-tabs-header .l-tabs-inactive{font-size:28rpx;color:#bbb}.l-tabs .l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs .l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-top .l-tabs-header{height:80rpx}.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-sub-placement-left{flex-direction:row}.l-sub-placement-left .l-tabs-header{flex-direction:column;width:160rpx}.l-sub-placement-left .l-tabs-header>.l-tabs-item{width:100%;height:80rpx;background:#f6f8fa}.l-sub-placement-left .l-tabs-header>.l-tabs-active{background:#fff}.l-sub-placement-left .l-tabs-main .l-tabpanel-content{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;position:relative;will-change:transform;transition:transform .3s cubic-bezier(.645,.045,.355,1)}.l-placement-top .l-tabpanel-content{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.l-subpanel-content{width:100%;height:100%}.l-tabpanel{width:100%;height:100%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:opacity .45s;transition:opacity .45s;opacity:1;text-overflow:ellipsis}.l-tabpanel-inactive{opacity:0;height:0;padding:0!important;pointer-events:none}.l-subpanel{height:100%}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible;min-width:160rpx}.l-tabs-scroll.l-tabs-horizontal .l-tabpanel-content{height:150px}.l-tabs-vertical .l-tabsscroll{width:160rpx}.l-tabs-vertical .l-tabs-header{height:100%;min-height:80rpx;-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;min-height:80rpx}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;right:0;width:0;background:#000}.l-tabs-horizontal .l-tab-line{height:4rpx;margin:0 auto}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-tabs-vertical .l-tabs-active .l-tab-line{width:6rpx!important;height:40rpx!important;border-radius:0 6rpx 6rpx 0;top:0;left:0;margin:auto 0;transition-delay:.1s}.l-sub-placement-left .l-tab-line{left:0;right:auto}.l-sub-placement-left .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-left{flex-direction:row}.l-tabs-main{flex:1}.l-combined-tabs-main{display:flex}
\ No newline at end of file
import{format,complementError,asyncMap,warning,deepMerge}from"./util.js";import validators from"./validator/index.js";import{messages as defaultMessages,newMessages}from"./messages.js";function Schema(e){this.rules=null,this._messages=defaultMessages,this.define(e)}Schema.prototype={messages(e){return e&&(this._messages=deepMerge(newMessages(),e)),this._messages},define(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");let t,s;for(t in this.rules={},e)e.hasOwnProperty(t)&&(s=e[t],this.rules[t]=Array.isArray(s)?s:[s])},validate(e,t={},s){let r,a,o=e,i=t,n=s;if("function"==typeof i&&(n=i,i={}),!this.rules||0===Object.keys(this.rules).length)return void(n&&n());if(i.messages){let e=this.messages();e===defaultMessages&&(e=newMessages()),deepMerge(e,i.messages),i.messages=e}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(t=>{r=this.rules[t],a=o[t],r.forEach(s=>{let r=s;"function"==typeof r.transform&&(o===e&&(o={...o}),a=o[t]=r.transform(a)),r="function"==typeof r?{validator:r}:{...r},r.validator=this.getValidationMethod(r),r.field=t,r.fullField=r.fullField||t,r.type=this.getType(r),r.validator&&(l[t]=l[t]||[],l[t].push({rule:r,value:a,source:o,field:t}))})});const f={};asyncMap(l,i,(e,t)=>{const s=e.rule;let r=!("object"!==s.type&&"array"!==s.type||"object"!=typeof s.fields&&"object"!=typeof s.defaultField);function a(e,t){return{...t,fullField:`${s.fullField}.${e}`}}function o(o=[]){let n=o;if(Array.isArray(n)||(n=[n]),n.length&&warning("async-validator:",n),n.length&&s.message&&(n=[].concat(s.message)),n=n.map(complementError(s)),i.first&&n.length)return f[s.field]=1,t(n);if(r){if(s.required&&!e.value)return n=s.message?[].concat(s.message).map(complementError(s)):i.error?[i.error(s,format(i.messages.required,s.field))]:[],t(n);let r={};if(s.defaultField)for(const t in e.value)e.value.hasOwnProperty(t)&&(r[t]=s.defaultField);r={...r,...e.rule.fields};for(const e in r)if(r.hasOwnProperty(e)){const t=Array.isArray(r[e])?r[e]:[r[e]];r[e]=t.map(a.bind(null,e))}const o=new Schema(r);o.messages(i.messages),e.rule.options&&(e.rule.options.messages=i.messages,e.rule.options.error=i.error),o.validate(e.value,e.rule.options||i,e=>{t(e&&e.length?n.concat(e):e)})}else t(n)}r=r&&(s.required||!s.required&&e.value),s.field=e.field;const n=s.validator(s,e.value,o,e.source,i);n&&n.then&&n.then(()=>o(),e=>o(e))},e=>{!function(e){let t,s,r=[],a={};for(t=0;t<e.length;t++)o=e[t],Array.isArray(o)?r=r.concat.apply(r,o):r.push(o);var o;if(r.length)for(t=0;t<r.length;t++)s=r[t].field,a[s]=a[s]||[],a[s].push(r[t]);else r=null,a=null;n(r,a)}(e)})},getType(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!validators.hasOwnProperty(e.type))throw new Error(format("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod(e){if("function"==typeof e.validator)return e.validator;const t=Object.keys(e),s=t.indexOf("message");return-1!==s&&t.splice(s,1),1===t.length&&"required"===t[0]?validators.required:validators[this.getType(e)]||!1}},Schema.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");validators[e]=t},Schema.messages=defaultMessages;export default Schema;
\ No newline at end of file
export function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const s=JSON.parse(JSON.stringify(this));return s.clone=this.clone,s}}}export const messages=newMessages();
\ No newline at end of file
import*as util from"../util";const ENUM="enum";function enumerable(e,u,n,m,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(u)&&m.push(util.format(r.messages.enum,e.fullField,e.enum.join(", ")))}export default enumerable;
\ No newline at end of file
import required from"./required.js";import whitespace from"./whitespace.js";import type from"./type.js";import range from"./range.js";import enumRule from"./enum.js";import pattern from"./pattern.js";export default{required:required,whitespace:whitespace,type:type,range:range,enum:enumRule,pattern:pattern};
\ No newline at end of file
import*as util from"../util";function pattern(t,e,a,p,n){if(t.pattern)if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern));else if("string"==typeof t.pattern){new RegExp(t.pattern.replace(/^\/|\/$/g,"")).test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern))}}export default pattern;
\ No newline at end of file
import*as util from"../util";function range(e,l,n,m,t){const u="number"==typeof e.len,r="number"==typeof e.min,a="number"==typeof e.max,i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let s=l,f=null;const o="number"==typeof l,g="string"==typeof l,p=Array.isArray(l);if(o?f="number":g?f="string":p&&(f="array"),!f)return!1;p&&(s=l.length),g&&(s=l.replace(i,"_").length),u?s!==e.len&&m.push(util.format(t.messages[f].len,e.fullField,e.len)):r&&!a&&s<e.min?m.push(util.format(t.messages[f].min,e.fullField,e.min)):a&&!r&&s>e.max?m.push(util.format(t.messages[f].max,e.fullField,e.max)):r&&a&&(s<e.min||s>e.max)&&m.push(util.format(t.messages[f].range,e.fullField,e.min,e.max))}export default range;
\ No newline at end of file
import*as util from"../util";function required(e,r,i,u,t,l){!e.required||i.hasOwnProperty(e.field)&&!util.isEmptyValue(r,l||e.type)||u.push(util.format(t.messages.required,e.fullField))}export default required;
\ No newline at end of file
import*as util from"../util";import required from"./required";const pattern={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:e=>types.number(e)&&parseInt(e,10)===e,float:e=>types.number(e)&&!types.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear,number:e=>!isNaN(e)&&""!==e,object:e=>"object"==typeof e&&!types.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&!!e.match(pattern.email)&&e.length<255,url:e=>"string"==typeof e&&!!e.match(pattern.url),hex:e=>"string"==typeof e&&!!e.match(pattern.hex)};function type(e,t,r,a,f){if(e.required&&void 0===t)return void required(e,t,r,a,f);const p=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(p)>-1?types[p](t)||a.push(util.format(f.messages.types[p],e.fullField,e.type)):p&&typeof t!==e.type&&a.push(util.format(f.messages.types[p],e.fullField,e.type))}export default type;
\ No newline at end of file
import*as util from"../util";function whitespace(t,e,s,i,a){(/^\s+$/.test(e)||""===e)&&i.push(util.format(a.messages.whitespace,t.fullField))}export default whitespace;
\ No newline at end of file
const formatRegExp=/%[sdj%]/g;export let warning=()=>{};export function format(...t){let e=1;const r=t[0],n=t.length;if("function"==typeof r)return r.apply(null,t.slice(1));if("string"==typeof r){let i=String(r).replace(formatRegExp,r=>{if("%%"===r)return"%";if(e>=n)return r;switch(r){case"%s":return String(t[e++]);case"%d":return Number(t[e++]);case"%j":try{return JSON.stringify(t[e++])}catch(t){return"[Circular]"}default:return r}});for(let r=t[e];e<n;r=t[++e])i+=" "+r;return i}return r}function isNativeStringType(t){return"string"===t||"url"===t||"hex"===t||"email"===t||"pattern"===t}export function isEmptyValue(t,e){return null==t||(!("array"!==e||!Array.isArray(t)||t.length)||!(!isNativeStringType(e)||"string"!=typeof t||t))}export function isEmptyObject(t){return 0===Object.keys(t).length}function asyncParallelArray(t,e,r){const n=[];let i=0;const l=t.length;function a(t){n.push.apply(n,t),i++,i===l&&r(n)}t.forEach(t=>{e(t,a)})}function asyncSerialArray(t,e,r){let n=0;const i=t.length;!function l(a){if(a&&a.length)return void r(a);const c=n;n+=1,c<i?e(t[c],l):r([])}([])}function flattenObjArr(t){const e=[];return Object.keys(t).forEach(r=>{e.push.apply(e,t[r])}),e}export function asyncMap(t,e,r,n){if(e.first){return asyncSerialArray(flattenObjArr(t),r,n)}let i=e.firstFields||[];!0===i&&(i=Object.keys(t));const l=Object.keys(t),a=l.length;let c=0;const o=[],s=t=>{o.push.apply(o,t),c++,c===a&&n(o)};l.forEach(e=>{const n=t[e];-1!==i.indexOf(e)?asyncSerialArray(n,r,s):asyncParallelArray(n,r,s)})}export function complementError(t){return e=>e&&e.message?(e.field=e.field||t.fullField,e):{message:e,field:e.field||t.fullField}}export function deepMerge(t,e){if(e)for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];"object"==typeof n&&"object"==typeof t[r]?t[r]={...t[r],...n}:t[r]=n}return t}
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function array(r,e,a,u,i){const t=[];if(r.required||!r.required&&u.hasOwnProperty(r.field)){if(isEmptyValue(e,"array")&&!r.required)return a();rules.required(r,e,u,t,i,"array"),isEmptyValue(e,"array")||(rules.type(r,e,u,t,i),rules.range(r,e,u,t,i))}a(t)}export default array;
\ No newline at end of file
import{isEmptyValue}from"../util";import rules from"../rule/index.js";function boolean(e,r,i,u,o){const t=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,t,o),void 0!==r&&rules.type(e,r,u,t,o)}i(t)}export default boolean;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function date(e,r,t,i,u){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return t();if(rules.required(e,r,i,l,u),!isEmptyValue(r)){let t;t="number"==typeof r?new Date(r):r,rules.type(e,t,i,l,u),t&&rules.range(e,t.getTime(),i,l,u)}}t(l)}export default date;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";const ENUM="enum";function enumerable(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),r&&rules.enum(e,r,i,l,t)}u(l)}export default enumerable;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function floatFn(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default floatFn;
\ No newline at end of file
import string from"./string";import method from"./method";import number from"./number";import boolean from"./boolean";import regexp from"./regexp";import integer from"./integer";import float from"./float";import array from"./array";import object from"./object";import enumValidator from"./enum";import pattern from"./pattern";import date from"./date";import required from"./required";import type from"./type";export default{string:string,method:method,number:number,boolean:boolean,regexp:regexp,integer:integer,float:float,array:array,object:object,enum:enumValidator,pattern:pattern,date:date,url:type,hex:type,email:type,required:required};
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function integer(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default integer;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function method(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default method;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function number(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),void 0!==r&&(rules.type(e,r,i,l,t),rules.range(e,r,i,l,t))}u(l)}export default number;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function object(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default object;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function pattern(r,e,t,i,u){const n=[];if(r.required||!r.required&&i.hasOwnProperty(r.field)){if(isEmptyValue(e,"string")&&!r.required)return t();rules.required(r,e,i,n,u),isEmptyValue(e,"string")||rules.pattern(r,e,i,n,u)}t(n)}export default pattern;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function regexp(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),isEmptyValue(r)||rules.type(e,r,u,l,t)}i(l)}export default regexp;
\ No newline at end of file
import rules from"../rule/index.js";function required(r,e,u,i,o){const t=[],a=Array.isArray(e)?"array":typeof e;rules.required(r,e,i,t,o,a),u(t)}export default required;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function string(e,r,i,t,s){const u=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r,"string")&&!e.required)return i();rules.required(e,r,t,u,s,"string"),isEmptyValue(r,"string")||(rules.type(e,r,t,u,s),rules.range(e,r,t,u,s),rules.pattern(e,r,t,u,s),!0===e.whitespace&&rules.whitespace(e,r,t,u,s))}i(u)}export default string;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function type(e,r,t,i,u){const p=e.type,l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r,p)&&!e.required)return t();rules.required(e,r,i,l,u,p),isEmptyValue(r,p)||rules.type(e,r,i,l,u)}t(l)}export default type;
\ No newline at end of file
class DataUtil{setDiffData(t,a){const e={};Object.keys(a).forEach(s=>{t.data[s]!==a[s]&&(e[s]=a[s])}),Object.keys(e).length&&t.setData(e)}}const dataUtil=new DataUtil;export default dataUtil;
\ No newline at end of file
function EventBusClass(){this.msgQueues={}}EventBusClass.prototype={on:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)?"function"==typeof this.msgQueues[s]?this.msgQueues[s]=[this.msgQueues[s],e]:this.msgQueues[s]=[...this.msgQueues[s],e]:this.msgQueues[s]=e},one:function(s,e){this.msgQueues[s]=e},emit:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&("function"==typeof this.msgQueues[s]?this.msgQueues[s](e):this.msgQueues[s].map(s=>{s(e)}))},off:function(s){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&delete this.msgQueues[s]}};const EventBus=new EventBusClass;export default EventBus;
\ No newline at end of file
class EventUtil{emit(e,t,l){e.triggerEvent(t,l,{bubbles:!0,composed:!0,capturePhase:!0})}}const eventUtil=new EventUtil;export default eventUtil;
\ No newline at end of file
class NodeUtil{async getNodeRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().select(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodesRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().selectAll(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodeFieldsFromComponent(e,t,o){return await new Promise(n=>{e.createSelectorQuery().select(t).fields(o,e=>{n(e)}).exec()})}}const nodeUtil=new NodeUtil;export default nodeUtil;
\ No newline at end of file
class PixelUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.screenWidth*t}rpx2px(t){return t/750*this.systemInfo.screenWidth}}const pixelUtil=new PixelUtil(wx.getSystemInfoSync());export default pixelUtil;
\ No newline at end of file
Component({externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1,result:1},observers:{"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;this.triggerEvent("linout",{type:e,way:"icon"},{bubbles:!0,composed:!0})},onCount(){this.setData({focus:!0})},onBlur(t){this.setData({focus:!1});let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{this.data.count=this.data.result,this.triggerEvent("lintap",{count:this.data.result,type:"blur"},{bubbles:!0,composed:!0})})},50)},blurCount(t,e){t?this.valueRange(t):this.setData({result:this.properties.count}),e&&e()},valueRange(t,e="input"){t>this.properties.max?this.setData({result:this.properties.max},()=>{this.triggerEvent("linout",{type:"overflow_max",way:e},{bubbles:!0,composed:!0})}):t<this.properties.min?this.setData({result:this.properties.min},()=>{this.triggerEvent("linout",{type:"overflow_min",way:e},{bubbles:!0,composed:!0})}):this.setData({result:t})},reduceTap(){this.data.count-this.properties.step<=this.properties.min?this.data.count=this.properties.min:this.data.count-=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"reduce"},{bubbles:!0,composed:!0})},addTap(){this.data.count+this.properties.step>=this.properties.max?this.data.count=this.properties.max:this.data.count+=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"add"},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-class container-count">
<view class="symbol {{result<=min|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result<=min|| disabled?'doNothing':'reduceTap'}}" data-type="overflow_min" hover-class="count-hover">
<view class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/>
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}" data-type="overflow_max" hover-class="count-hover">
<view class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
</view>
\ No newline at end of file
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8}
\ No newline at end of file
import countDownBehaviors from"../behaviors/countdown";Component({externalClasses:["l-class","l-class-time","l-time-class"],behaviors:[countDownBehaviors],properties:{doneText:{type:String,value:"已结束"}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-countdown l-class">
<view class="l-countdown-item" wx:for="{{date}}" wx:key="index"><text class="l-class-time l-time-class l-countdown-time">{{item.value}}</text>{{item.name}}</view>
</view>
\ No newline at end of file
.l-countdown{font-size:28rpx;line-height:40px}.l-countdown-item{display:inline-block;color:inherit}.l-countdown-time{display:inline-flex;width:56rpx;height:56rpx;background:#45526b;border-radius:4rpx;color:#fff;align-items:center;justify-content:center;margin:0 16rpx}
\ No newline at end of file
import hover from"../behaviors/hover";Component({behaviors:[hover],externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1,result:1},observers:{"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;this.triggerEvent("linout",{type:e,way:"icon"},{bubbles:!0,composed:!0})},onCount(){this.setData({focus:!0})},onBlur(t){this.setData({focus:!1});let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{this.data.count=this.data.result,this.triggerEvent("lintap",{count:this.data.result,type:"blur"},{bubbles:!0,composed:!0})})},50)},blurCount(t,e){t?this.valueRange(t):this.setData({result:this.properties.count}),e&&e()},valueRange(t,e="input"){t>this.properties.max?this.setData({result:this.properties.max},()=>{this.triggerEvent("linout",{type:"overflow_max",way:e},{bubbles:!0,composed:!0})}):t<this.properties.min?this.setData({result:this.properties.min},()=>{this.triggerEvent("linout",{type:"overflow_min",way:e},{bubbles:!0,composed:!0})}):this.setData({result:t})},reduceTap(){this.data.count-this.properties.step<=this.properties.min?this.data.count=this.properties.min:this.data.count-=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"reduce"},{bubbles:!0,composed:!0})},addTap(){this.data.count+this.properties.step>=this.properties.max?this.data.count=this.properties.max:this.data.count+=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"add"},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-class container-count">
<view class="symbol {{result<=min|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result<=min|| disabled?'doNothing':'reduceTap'}}" data-type="overflow_min" hover-class="{{isHover?'count-hover':''}}">
<view class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/>
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}" data-type="overflow_max" hover-class="{{isHover?'count-hover':''}}">
<view class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
</view>
\ No newline at end of file
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8}
\ No newline at end of file
Component({properties:{position:{type:String,value:"bottom"},show:{type:Boolean,value:!0},selected:{type:Number,value:0},color:{type:String,value:"#707070"},selectedColor:{type:String,value:"3963BC"},borderStyle:{type:String,value:"#f6f6f6"},backgroundColor:{type:String,value:"#fff"},backgroundImg:{type:String,value:""},fontSize:{type:Number,value:24},isRedirectToTab:{type:Boolean,value:!0},isNav:{type:Boolean,value:!0},list:{type:Array,value:[]}},data:{},attached(){},methods:{switchTab(t){const e=t.currentTarget.dataset,a=e.path;this.data.isNav&&(this.data.isRedirectToTab,wx.switchTab({url:a})),this.showItem(e.index)},show(){this.setData({show:!0})},hide(){this.setData({show:!1})},showItem(t){this.setData({selected:t});let e={idx:t,path:this.route};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})},showRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!0})},hideRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!1})},setTabBarBadge(t,e){const a=`list[${t}].badge`;this.setData({[a]:e})},removeTabBarBadge(t){const e=`list[${t}].badge`;this.setData({[e]:""})}}});
\ No newline at end of file
{"component":true}
\ No newline at end of file
<view wx:if="{{show}}" class="tab-bar tab-bar-{{position}}" style='background: {{backgroundImg? "url("+ backgroundImg+ ")" : backgroundColor}}'>
<view class="tab-bar-border" style="background: {{borderStyle}}"></view>
<view wx:for="{{list}}" wx:for-index="idx" wx:key="index" class="tab-bar-item {{item.style === 'circle' ? 'circle': ''}}" data-path="{{item.pagePath}}" data-index="{{idx}}" bindtap="switchTab">
<view wx:if="{{item.style === 'circle'}}" class="item-circle"></view>
<image class="tab-bar-item-image" wx:if="{{item.style !== 'circle'}}" style="height: {{item.iconSize}}rpx; width: {{item.iconSize}}rpx" src="{{selected === idx ? item.selectedIconPath : item.iconPath}}"></image>
<image wx:else class="tab-bar-item-image"></image>
<image class="center-circle" wx:if="{{item.style === 'circle'}}" src="{{selected === idx ? item.selectedIconPath : item.iconPath}}"></image>
<view style="font-size: {{fontSize}}rpx ;color: {{selected === idx ? selectedColor : color}}">{{item.text}}</view>
<view wx:if="{{item.redDot}}" class="reddot"></view>
<view wx:if="{{item.badge}}" class="badge">{{item.badge}}</view>
</view>
</view>
.tab-bar{position:relative;height:110rpx;width:750rpx;background:#fff;display:flex;flex-direction:row;background-position:center center;background-size:100% 100%;padding-bottom:env(safe-area-inset-bottom)}.tab-bar-bottom{position:fixed!important;bottom:0;left:0;right:0}.tab-bar-border{position:absolute;left:0;top:0;width:100%;display:flex;flex-direction:row;height:1rpx;background:#f6f6f6;box-shadow:0 -1px 3px 1px #f6f6f6}.tab-bar-item{position:relative;flex:1;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column}.item-circle{width:120rpx;height:60rpx;background-color:#fff;border-radius:200rpx 200rpx 0 0;border-bottom:none;background:#fff;position:absolute;top:-40rpx;box-shadow:0 -1px 1px 0 #f6f6f6}.tab-bar-item-image{width:64rpx;height:64rpx}.tab-bar-item view{font-size:24rpx}.reddot{height:20rpx;width:20rpx;background:red;border-radius:50%;position:absolute;top:15rpx;margin-left:25rpx}.badge{height:32rpx;line-height:32rpx;padding:0rpx 6rpx;background:red;border-radius:16rpx;position:absolute;font-size:18rpx;color:#fff;top:10rpx;margin-left:25rpx;box-sizing:border-box}.center-circle{height:100rpx;width:100rpx;border-radius:50%;position:absolute;top:-30rpx}
\ No newline at end of file
import computeOffset from"../behaviors/computeOffset";import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,zIndex,hover,validator],externalClasses:["l-class","l-title-class","l-content-class","l-confirm-class","l-cancel-class","l-bg-class"],properties:{show:{type:Boolean,value:!1},type:{type:String,value:"alert",options:["alert","confirm"]},title:{type:String,value:"提示"},showTitle:{type:Boolean,value:!0},content:{type:String,value:""},locked:{type:Boolean,value:!0},confirmText:{type:String,value:"确定"},confirmColor:{type:String,value:"#3683d6"},cancelText:{type:String,value:"取消"},cancelColor:{type:String,value:"#45526b"},titleColor:String,contentColor:{type:String,value:"rgba(89,108,142,1)"},openApi:{type:Boolean,value:!0}},data:{success:null,fail:null},attached(){this.data.openApi&&this.initDialog()},pageLifetimes:{show(){this.data.openApi&&this.initDialog()}},methods:{initDialog(){wx.lin=wx.lin||{},wx.lin.showDialog=t=>{const{type:e="alert",title:o="提示",showTitle:l=!0,content:s="",locked:a=!0,confirmText:i="确定",contentColor:n="rgba(89,108,142,1)",cancelColor:c="#45526b",cancelText:r="取消",confirmColor:h="#3683d6",success:p=null,fail:m=null}=t;return this.setData({type:e,title:o,showTitle:l,content:s,locked:a,confirmText:i,cancelColor:c,cancelText:r,confirmColor:h,contentColor:n,show:!0,fail:m,success:p}),this}},onConfirmTap(){const{success:t}=this.data;t&&t({confirm:!0,cancel:!1,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("linconfirm","confirm",{bubbles:!0,composed:!0})},onCancelTap(){const{success:t}=this.data;t&&t({confirm:!1,cancel:!0,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("lincancel","cancel",{bubbles:!0,composed:!0})},onDialogTap(){!0!==this.data.locked&&this.setData({show:!this.data.show}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-popup":"../popup/index"}}
\ No newline at end of file
<l-popup show="{{show}}" animation="show" contentAlign="center" locked="{{true}}" bind:lintap="onDialogTap" l-bg-class="l-bg-class" z-index="{{zIndex}}">
<view class="dialog-container l-class" style="margin-bottom:{{distance}}px">
<view class="dialog-title l-title-class" style="color:{{titleColor}}" wx:if="{{showTitle}}">{{title}}</view>
<view class="dialog-content l-content-class" style="color:{{contentColor}}">
<slot/>
{{content}}
</view>
<view class="dialog-btn-group">
<view class="dialog-btn-cancel l-cancel-class" style="color: {{cancelColor}}" catchtap="onCancelTap" hover-class="{{isHover?'group-hover':''}}" wx:if="{{type==='confirm'}}">{{cancelText}}</view>
<view class="dialog-btn-confirm l-confirm-class" style="color: {{confirmColor}}" hover-class="{{isHover?'group-hover':''}}" catchtap="onConfirmTap">{{confirmText}}</view>
</view>
</view>
</l-popup>
.dialog-container{display:flex;flex-direction:column;align-items:center;width:520rpx;background:#fff;border-radius:12rpx}.dialog-title{font-size:32rpx;font-family:PingFangSC-Regular;color:#45526b;line-height:44rpx;margin-top:30rpx;padding:0 25rpx;text-align:center}.dialog-content{font-size:28rpx;font-family:PingFangSC-Regular;line-height:40rpx;margin-top:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center;padding:0 25rpx}.dialog-btn-group{width:100%;height:80rpx;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.dialog-btn-cancel{font-size:28rpx;height:80rpx;width:259rpx;border-right:2rpx solid #f3f3f3;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.dialog-btn-confirm{font-size:28rpx;flex:1;color:#85c5e1;height:80rpx;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.active{color:#3683d6}.leave{color:#45526b}.group-hover{opacity:.8}
\ No newline at end of file
Component({externalClasses:["l-error-text","l-error-text-class"],properties:{errorText:String},data:{},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="error-text l-error-text l-error-text-class" wx:if="{{errorText}}">{{errorText}}</view>
\ No newline at end of file
.error-text{font-size:22rpx;color:#f4516c;margin-right:20rpx;line-height:2}
\ No newline at end of file
var is = require("./is.wxs");
function _isArray(targetArray, funName) {
if (!is.isArray(targetArray)) {
console.log('[WXS:Array]' + funName + ',targetArray must be array');
return false;
}
return true;
}
/**
* concat 合并数组
* @param {Array} targetArray 目标数组
*/
function concat() {
var length = arguments.length;
var result = [];
var validatorArray = _isArray(arguments[0], 'concat');
if (validatorArray) {
for (var i = 1; i < length; i++) {
result = arguments[0].concat(arguments[i])
}
return result
}
}
/**
* join 数组转成字符串
* @param {Array} targetArray 目标数组
* @param {String} spearator 连接符
*/
function join(targetArray, spearator) {
var validatorArray = _isArray(arguments[0], 'concat');
if (validatorArray) return targetArray.join(spearator);
}
/**
* pop 移除最后一个数组元素,并返回移除后的数组和溢出的值
* @param {Array} targetArray 目标数组
*/
function pop(targetArray) {
var validatorArray = _isArray(arguments[0], 'pop');
if (validatorArray) {
var result = targetArray.pop();
return {
newArray: targetArray,
item: result
}
}
}
/**
* shift 移除第一个数组元素,并返回移除后的数组和溢出的值
* @param {Array} targetArray 目标数组
*/
function shift(targetArray) {
var validatorArray = _isArray(arguments[0], 'shift');
if (validatorArray) {
var result = targetArray.shift();
return {
newArray: targetArray,
item: result
}
}
}
/**
* push 从后追加数组元素,并返回新的数组
* @param {Array} targetArray 目标数组
*/
function push() {
var length = arguments.length;
var validatorArray = _isArray(arguments[0], 'push');
if (validatorArray) {
for (var i = 1; i < length; i++) {
arguments[0].push(arguments[i])
}
return arguments[0]
}
}
/**
* unshift 从前追加数组元素,并返回新的数组
* @param {Array} targetArray 目标数组
*/
function unshift(targetArray) {
var length = arguments.length;
var validatorArray = _isArray(arguments[0], 'unshift');
if (validatorArray) {
for (var i = length - 1; i > 0; i--) {
arguments[0].unshift(arguments[i])
}
return arguments[0]
}
}
/**
* reverse 倒序
* @param {Array} targetArray 目标数组
*/
function reverse(targetArray) {
var validatorArray = _isArray(targetArray, 'reverse');
if (validatorArray) return targetArray.reverse();
}
/**
* slice 截取数组
* @param {Array} targetArray 目标数组
* @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取目标数组中的元素
* @param {Number} endSlice 在该索引(以 0 为基数)处结束提取数组元素
*/
function slice(targetArray, beginSlice, endSlice) {
var validatorArray = _isArray(targetArray, 'slice');
if (validatorArray) return targetArray.slice(beginSlice, endSlice);
}
/**
* splice 截取数组
* @param {Array} targetArray 目标数组
* @param {Number} start
* @param {Number} deleteCount
*/
function splice(targetArray, start, deleteCount) {
var validatorArray = _isArray(targetArray, 'splice');
if (validatorArray) {
if (arguments.length < 4) {
targetArray.splice(start, deleteCount);
} else {
targetArray.splice(start, deleteCount, arguments[3]);
var length = arguments.length;
for (var i = 4; i < length; i++) {
arguments[i] && targetArray.splice(++start, 0, arguments[i])
}
}
return targetArray
}
}
/**
* indexOf 查找数组
* @param {Array} targetArray 目标数组
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置
*
*/
function indexOf(targetArray, searchValue, fromIndex = 0) {
var validatorArray = _isArray(targetArray, 'indexOf');
if (validatorArray) return targetArray.indexOf(searchValue, fromIndex);
}
/**
* lastIndexOf 查找字符串最后出现的位置
* @param {Array} targetArray 目标数组
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置,str.length
*
*/
function lastIndexOf(targetArray, searchValue, fromIndex = 0) {
var validatorArray = _isArray(targetArray, 'lastIndexOf');
if (validatorArray) return targetArray.lastIndexOf(searchValue, fromIndex || targetArray.length);
}
module.exports = {
concat: concat,
join: join,
pop: pop,
shift: shift,
push: push,
unshift: unshift,
reverse: reverse,
slice: slice,
splice: splice,
indexOf:indexOf,
lastIndexOf:lastIndexOf
}
var is = require('./is.wxs');
var object = require('./object.wxs');
function apply(fun, args) {
return args.map(function (item) {
return fun(item)
})
}
function classnames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
if (is.isString(arg) || is.isNumber(arg)) {
classes.push(arg);
} else if (is.isArray(arg) && arg.length) {
var inner = apply(classnames, arg);
if (inner) {
classes.push(inner);
}
} else if (is.isObject(arg)) {
object.keys(arg).forEach(function (key) {
if (arg[key]) {
classes.push(key);
}
})
}
}
return classes.join(' ');
}
module.exports = classnames;
var TYPE = {
NULL: 'null',
UNDEFINED: 'undefined',
NUMBER: 'Number',
STRING: 'String',
BOOLEAN: 'Boolean',
OBJECT: 'Object',
FUNCTION: 'Function',
ARRAY: 'Array',
DATE: 'Date',
REGEXP: 'RegExp'
}
function isUndefined(val) {
return TYPE.UNDEFINED === typeof val;
}
function isNull(val) {
return val === TYPE.NULL;
}
function _jadgeFun(val, type) {
if (isUndefined(val) || isNull(val)) return false;
return TYPE[type] === val.constructor;
}
function isNumber(val) {
return _jadgeFun(val, 'NUMBER');
}
function isString(val) {
return _jadgeFun(val, 'STRING');
}
function isBoolean(val) {
return _jadgeFun(val, 'BOOLEAN');
}
function isObject(val) {
return _jadgeFun(val, 'OBJECT');
}
function isFunction(val) {
return _jadgeFun(val, 'FUNCTION');
}
function isArray(val) {
return _jadgeFun(val, 'ARRAY');
}
function isDate(val) {
return _jadgeFun(val, 'DATE');
}
function isRegExp(val) {
return _jadgeFun(val, 'REGEXP');
}
module.exports = {
isNull: isNull,
isUndefined: isUndefined,
isNumber: isNumber,
isString: isString,
isBoolean: isBoolean,
isObject: isObject,
isFunction: isFunction,
isArray: isArray,
isDate: isDate,
isRegExp: isRegExp
}
var REGEXP = getRegExp('{|}|"', 'g');
function keys(obj) {
return JSON.stringify(obj)
.replace(REGEXP, '')
.split(',')
.map(function(item) {
return item.split(':')[0];
});
}
module.exports.keys = keys;
\ No newline at end of file
var is = require("./is.wxs");
function _isString(targetString, funName) {
if (!is.isString(targetString)) {
console.log('[WXS:String]' + funName + ',targetString must be string');
return false;
}
return true;
}
/**
* toString 返回指定对象的字符串形式
* @param {String} targetString 目标字符串
*/
function toString(targetString) {
return targetString && targetString.toString();
}
/**
* valueOf 返回指定对象的value
* @param {String} targetString 目标字符串
*/
function valueOf(targetString) {
return targetString && targetString.valueOf();
}
/**
* charAt 一个字符串中返回指定的字符。
* @param {String} targetString 目标字符串
* @param {Number} index 返回指定字符的位置
*
*/
function charAt(targetString, index = 0) {
var validatorString = _isString(targetString, 'charAt');
if (validatorString) return targetString.charAt(index);
}
/**
* charCodeAt 返回0到65535之间的整数,表示给定索引处的UTF-16代码单元
* @param {String} targetString 目标字符串
* @param {Number} index 返回指定字符的位置
*
*/
function charCodeAt(targetString, index = 0) {
var validatorString = _isString(targetString, 'charCodeAt');
if (validatorString) return targetString.charCodeAt(index);
}
/**
* indexOf 查找字符串
* @param {String} targetString 目标字符串
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置
*
*/
function indexOf(targetString, searchValue, fromIndex = 0) {
var validatorString = _isString(targetString, 'indexOf');
if (validatorString) return targetString.indexOf(searchValue, fromIndex);
}
/**
* lastIndexOf 查找字符串最后出现的位置
* @param {String} targetString 目标字符串
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置,str.length
*
*/
function lastIndexOf(targetString, searchValue, fromIndex = 0) {
var validatorString = _isString(targetString, 'lastIndexOf');
if (validatorString) return targetString.lastIndexOf(searchValue, fromIndex || targetString.length);
}
/**
* slice 取一个字符串的一部分,并返回一新的字符串
* @param {String} targetString 目标字符串
* @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取原字符串中的字符
* @param {Number} endSlice 在该索引(以 0 为基数)处结束提取字符
*
*/
function slice(targetString, beginSlice, endSlice) {
var validatorString = _isString(targetString, 'slice');
if (validatorString) return targetString.slice(beginSlice, endSlice || targetString.length);
}
/**
* split 分割字符串
* @param {String} targetString 目标字符串
* @param {String} separator 从该索引(以 0 为基数)处开始提取原字符串中的字符
* @param {Number} limit
*
*/
function split(targetString, separator, limit) {
var validatorString = _isString(targetString, 'split');
if (validatorString) return targetString.split(separator, limit);
}
/**
* substring 取一个字符串的一部分,并返回一新的字符串
* @param {String} targetString 目标字符串
* @param {Number} indexStart 需要截取的第一个字符的索引,该字符作为返回的字符串的首字母。
* @param {Number} indexEnd 一个 0 到字符串长度之间的整数,以该数字为索引的字符不包含在截取的字符串内。
*
*/
function substring(targetString, indexStart, indexEnd) {
var validatorString = _isString(targetString, 'substring');
if (validatorString) return targetString.substring(indexStart, indexEnd);
}
/**
* toLowerCase 字符串值转为小写形式
* @param {String} targetString 目标字符串
*
*/
function toLowerCase(targetString) {
var validatorString = _isString(targetString, 'toLowerCase');
if (validatorString) return targetString.toLowerCase();
}
/**
* toLocaleLowerCase 字符串值转为小写形式
* @param {String} targetString 目标字符串
*
*/
function toLocaleLowerCase(targetString) {
var validatorString = _isString(targetString, 'toLocaleLowerCase');
if (validatorString) return targetString.toLocaleLowerCase();
}
/**
* toUpperCase 字符串值转为大写形式
* @param {String} targetString 目标字符串
*
*/
function toUpperCase(targetString) {
var validatorString = _isString(targetString, 'toUpperCase');
if (validatorString) return targetString.toUpperCase();
}
/**
* toLocaleUpperCase 根据任何特定于语言环境的案例映射,返回调用字符串值转换为大写的值。
* @param {String} targetString 目标字符串
*
*/
function toLocaleUpperCase(targetString) {
var validatorString = _isString(targetString, 'toLocaleUpperCase');
if (validatorString) return targetString.toLocaleUpperCase();
}
/**
* trim 从一个字符串的两端删除空白字符
* @param {String} targetString 目标字符串
*
*/
function trim(targetString) {
var validatorString = _isString(targetString, 'trim');
if (validatorString) return targetString.trim();
}
module.exports = {
indexOf: indexOf,
charAt: charAt,
charCodeAt: charCodeAt,
toString: toString,
valueOf: valueOf,
lastIndexOf: lastIndexOf,
slice: slice,
split: split,
substring: substring,
toLowerCase: toLowerCase,
toLocaleLowerCase: toLocaleLowerCase,
toUpperCase: toUpperCase,
toLocaleUpperCase: toLocaleUpperCase,
trim: trim
}
function zeroPadding(num, length = 2) {
if((num + "").length >= length) {
return num;
}
return zeroPadding("0" + num, length)
}
module.exports = zeroPadding;
\ No newline at end of file
import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},externalClasses:["l-form-item-class","l-form-label-class","l-form-content-class","l-error-text-class"],behaviors:[rules],relations:{"../form/index":{type:"parent",linked:function(){},linkChanged:function(){},unlinked:function(){}}},properties:{label:String,labelPlacement:{type:String,value:"row"},alignItems:{type:String,value:"start"},labelWidth:{type:String,value:"200rpx"},labelSlot:{type:Boolean,value:!1},name:{type:String,value:""}},data:{isRequired:!1},attached(){this.initRules(),this.isRequired()},methods:{isRequired(){this.data.rules.forEach(e=>{e.required&&this.setData({isRequired:!0})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<view class="l-form-item-class form-item-container {{'label-' + labelPlacement}} {{tipType === 'text' ? 'textHeight': ''}}">
<view class="l-form-label-class label-text {{isRequired ? 'label-text-required': ''}} {{'label-text-' + labelPlacement+ '-' + alignItems}}" style="min-width: {{labelPlacement==='row' ? labelWidth : '100%'}};max-width: {{labelPlacement==='row' ? labelWidth : '100%'}}">
<view wx:if="{{labelSlot}}">
<slot name="label"/>
</view>
<view wx:else>
{{label}}
</view>
</view>
<view class="label-content l-form-content-class">
<slot/>
</view>
<l-error-tip class="error-text" l-error-text-class="l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</view>
.form-item-container{display:flex;align-items:center;border-bottom:1px solid #eee;color:#777;padding:0 20rpx;position:relative}.form-item-container.textHeight{margin-bottom:44rpx}.form-item-container.label-column{flex-direction:column}.form-item-container.label-column .label-text{line-height:44rpx}.form-item-container.label-row{flex-direction:row}.form-item-container.label-row .label-text{line-height:88rpx}.form-item-container .label-text{display:flex;line-height:88rpx}.form-item-container .label-text-column-start{justify-content:flex-start}.form-item-container .label-text-column-end{justify-content:flex-end}.form-item-container .label-text-column-center{justify-content:center}.form-item-container .label-text-row-start{justify-content:flex-start}.form-item-container .label-text-row-end{justify-content:flex-end}.form-item-container .label-text-row-center{justify-content:center}.form-item-container .label-content{flex:1}.form-item-container .label-text-required::before{display:inline-block;margin-right:4px;color:#f5222d;font-family:SimSun,sans-serif;content:'*'}.error-text{text-align:right;line-height:44rpx;color:#f56c6c;font-size:12px;position:absolute;top:100%;left:0;padding-left:24rpx}.row{display:none!important}
\ No newline at end of file
import eventBus from"../core/utils/event-bus.js";import eventUtil from"../core/utils/event-util";Component({externalClasses:["l-form-container-class","l-form-submit-class","l-form-reset-class","l-form-btn-class"],options:{multipleSlots:!0},relations:{"../form-item/index":{type:"child",linked:function(t){this._initItem(t)},linkChanged:function(){},unlinked:function(){}}},properties:{name:{type:String,value:""},isSubmitValidate:{type:Boolean,value:!0}},attached(){this._init()},detached(){for(let t in this._keys)Object.prototype.hasOwnProperty.call(this._keys,t)&&(eventBus.off("lin-form-blur-"+t),eventBus.off("lin-form-change-"+t))},data:{_this:null},methods:{_init(){wx.lin=wx.lin||{},wx.lin.forms=wx.lin.forms||{},wx.lin.forms[this.properties.name]=this,wx.lin.initValidateForm=t=>{wx.lin._instantiation=t},wx.lin.submitForm=function(t){wx.lin.forms[t].submit()},wx.lin.resetForm=function(t){wx.lin.forms[t].reset()}},_initItem(t){this._keys=this._keys||{},this._errors=this._errors||{};const e=t.properties.name;if(eventBus.on("lin-form-blur-"+e,t=>{this._validateItem(t,"blur")}),eventBus.on("lin-form-change-"+e,t=>{clearTimeout(this.change_time),this.change_time=setTimeout(()=>{this._validateItem(t,"change")},200)}),this._keys[e])throw new Error("表单项存在重复的name:"+e);this._keys[e]="",this._errors[e]=[]},_validateItem(t,e){let i=wx.lin._instantiation,s=this._getValues();const r=this.getRelationNodes("../form-item/index").find(e=>e.properties.name===t);if(!i.selectComponent("#"+t))throw new Error("表单项不存在name:"+t);return r.validatorData(s,e),this._errors[t]=r.data.errors,r.data.errors},_forEachNodes(t,e){let i=this.getRelationNodes("../form-item/index");e&&i.reverse(),i.forEach((e,i)=>{t(e,i)})},_validateForm(){let t=wx.lin._instantiation,e=[],i=this._getValues();return this._forEachNodes(s=>{const r=s.properties.name;if(!t.selectComponent("#"+r))throw new Error("表单项不存在name:"+r);s.validatorData(i),this._errors[r]=s.data.errors,e=e.concat(s.data.errors)},!0),e},_getValues(){let t={},e=wx.lin._instantiation;return this._forEachNodes(i=>{const s=i.properties.name,r=e.selectComponent("#"+s);r&&(t[s]=r.getValues())}),t},submit(){let t=this.data.isSubmitValidate?this._validateForm():[];this.triggerEvent("linsubmit",{values:this._getValues(),errors:this.data.isSubmitValidate?this._errors:{},isValidate:0===t.length})},reset(){let t=wx.lin._instantiation;this._forEachNodes(e=>{e.setData({errorText:""});const i=e.properties.name,s=t.selectComponent("#"+i);s&&s.reset()}),eventUtil.emit(this,"linreset")}}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-form-container-class">
<slot/>
</view>
<view class="l-form-btn-class">
<view class="l-form-submit-class" bind:tap="submit">
<slot name="submit"/>
</view>
<view class="l-form-reset-class" bind:tap="reset">
<slot name="reset"/>
</view>
</view>
Component({relations:{"../grid/index":{type:"parent"}},externalClasses:["l-grid-item","l-grid-item-class"],properties:{key:String,cell:{type:Object,value:{}}},data:{index:0},attached(){},observers:{key:function(){const e=this.getRelationNodes("../grid/index")[0];e&&(e.setData({gridItems:[],childNum:0}),e.initGrids())}},lifetimes:{show(){}},methods:{tapGridItem(){this.triggerEvent("linitemtap",{...this.data},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-grid-item l-grid-item-class grid-item" bindtap="tapGridItem">
<slot></slot>
</view>
\ No newline at end of file
.grid-item{max-width:initial;max-height:initial;display:flex;justify-content:center;align-items:center;flex-direction:column}
\ No newline at end of file
import hover from"../behaviors/hover";Component({options:{multipleSlots:!0},behaviors:[hover],relations:{"../grid-item/index":{type:"child",linked(){this.initGrids()},unlinked(){this.initGrids()}}},externalClasses:["l-class","l-class-grid","l-grid-class"],properties:{rowNum:{type:String,value:3},showBorder:Boolean,showColBorder:Boolean,showRowBorder:Boolean},data:{gridItems:[],childNum:0,currentIndex:-1,currentCell:-1},ready(){this.initGrids()},lifetimes:{show(){}},methods:{initGrids(){let e=this.getRelationNodes("../grid-item/index");if(this.data.childNum===e.length)return;const t=e.map((e,t)=>(e.setData({index:t}),{index:t,key:e.data.key,cell:e.data.cell}));this.setData({gridItems:t,childNum:e.length})},tapGridItem(e){const{gridIndex:t}=e.target.dataset;this.setData({currentIndex:t,currentCell:this.data.gridItems[t].cell})},tapGrid(){this.triggerEvent("lintap",{index:this.data.currentIndex,cell:this.data.currentCell},{bubbles:!0,composed:!0}),this.setData({currentIndex:-1,currentCell:-1})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-grid-item":"../grid-item/index"} }
\ No newline at end of file
<view class="l-grid l-class" bindtap="tapGrid">
<view bindtap="tapGridItem" hover-class="{{isHover?'l-gird-hover':''}}" hover-start-time="20" hover-stay-time="50" data-grid-index="{{item.index}}" class="l-grid-item l-class-grid l-grid-class {{index%rowNum !== rowNum-1 &&(showBorder||showColBorder) ? 'side-grid':''}} {{(index<gridItems.length-(gridItems.length%rowNum||rowNum)) &&(showBorder||showRowBorder)? 'center-grid':''}}" wx:for="{{gridItems}}" wx:key="key" style="min-width:{{100/rowNum}}%;">
<slot name="{{item.key}}"></slot>
</view>
</view>
\ No newline at end of file
.l-grid{display:flex;width:inherit;flex-wrap:wrap}.l-grid .l-grid-item{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;border-style:solid;border-color:#ededed;border-width:0}.l-grid .center-grid{border-bottom-width:2rpx}.l-grid .side-grid{border-right-width:2rpx}.l-gird-hover{opacity:.8}
\ No newline at end of file
Component({
externalClasses: ["l-class"],
options: {
addGlobalClass: !0
},
properties: {
name: String,
color: {
type: String,
value: "#3963bc"
},
size: {
type: String,
value: "40"
}
},
ready: function() {
this.properties.name || console.error("请传入Icon组件的name属性")
},
methods: {}
});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-class l-icon {{ name === '' ? '' : 'l-icon-' + name }}" style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color ? 'color:' + color+';' : '' }}"/>
.l-icon {
font-family: l-iconfont;
font-size: 40rpx;
color: #85c5e1;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@font-face {
font-family: l-iconfont;
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABlQAAsAAAAALjQAABkCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHfArGDLcsATYCJAOBQAtiAAQgBYRtB4NEG6olZYaYxwFwTfuLqNbE2f9/Sm6MARWY/pOTwg2KLc2GRcKNTOMuNh68NAtDV/m4j5u9WOw1c5P3lMV4fyxtacPmwbwqcERQJeJjvoUr/xOfFoM7qlAqxxySVJo8fE1/f+7uJi8klO5A1epL0yhUtW08QjUFSqNwGP2F6frrN3hzD+Td7hfLPPBAE40owAJriOas2d0ggZANVohsEpKaBJIa0GLBg7URoFALFlwDdeSRUkmQ1g+CSrg7agGq9MoDFWh6QjmhpXdeIQkgwxMAfk21T8jShR+KkqJxLG96X/9jjeEh9oxYZlnksVU6nTO/vAIkM9dp24ARt12bWGaplkImiSTy8J/buqlbgiU4WwVtqL3df8dGUQYwn1t+TOQEou8h32yT80qtaJGIOg3TzrSC5Tssu/BNhIWT/iLg/9f5ulrhkQtbSCUcZhy3d5+k//XuuzYHZIXkoOyA9RndtDzldAKcO0ySHALZ//NkKE89HTO2wzx1GOcibJPh8Qgd0REhHqHOJVmJe0uBTueWyw37zc9Yha5cm4wwQCRl+3p3ixNozZrAkzOBEBgqEkOfx7voI8DwyirNjtAk6uK+RXyoNOktPcT7/vfjn8KQpMpySedR7hHAeaFaGJH3wyWi8Dxn4XoQGWuAQnyV9mc+Yu2WbSXLj6h7WEg/W1i3SU4bs2u3RLX/17yerDGg1Rk0ZNiIURTDCZKiGZbjBVEilckVSpVao9XpDUaT2WJFJKKWvQchncTFTeDneL1E8HOCXppCaAYh5iUyPznU0RxCgBAPIQFCIoQkCMkQUiCkQkiDkA4hA0ImhCwI2RByIORCyIOQD6EAQiGEIgjFEEoglEIog1AOoQJCJYQqCNUQaiDUQqiDUA+hBYSWEFpBaA2hjZco/Lx1lcBbQEljq7xo/zB8INodT2TSZZFmIsXx6lWJCWdeYmW9QJ/LDlCWwAplJguMzBt+o1JWA+bSVyRJHY48AnvD3K9YVGigb5Pyk/wEfGCA0fM6wCxG/YN5jAosh8wAjintnQO6lgcv+INFgedRSFCQmEWdUvoGANDV6b6G3PppWlsoxAgbWLIytrUVCKk/5gbezKowzaLKBmgo4ARAGZzalxVJ/osqWZgiZjwqbaGuBCqS5CWKIVHVGSpZkqYSq4wVQ6MXEyjrhg0HkTzCYIKl4VUbly1xiZh1qQmrKhLV5y6pzgg/kvLrHsFCjuee9Q9lg8YbOCJH3XCyMNuHnqwCTYBg++KoDeOiODRSz9PDQ8R5enSY4uaOLD529tXM44Exr1Qk+KZ1A92Ct8c7WDFwJK3BEO6uWyhWbv8nyRATv4OluVtpGPkykzOorYDGLCjNQu/e1vM8jwKxzTlZaI5Omw0eqRIUQ2WhWafiTtR1ArGJxTBZRSUORrhWWRI4qvcmChDsgJjnAYs70ibEOIqGiS/fA8K/JhOizIcFjiu9lHE+JdmQXngjf1r2rPg74VwkdX1+aTZl9dQRAsFC/cW3GNh8wyNcekdnm1yL4wS+upOVMZBPY5cYozHE/PDoPbVhU7FGmTY0WSCO8ap9lCqRMlpDCN+EGPgQ2kJzlByKW5ouvKHpH3y73fTye4Ye9EYPtqR66aTIChCDNg77L792lT+VUGqRtN2RfpQOptLBn4njhsL8DrZXDMQzqZfvy96pFqZ30s9LFcXK6qFmosLVzchrMhlkVYzKyzkcRyvuvoCmOSRCphk/vDwvjRUkIazIoxvWzUKUcDAM2GCDs0ooBqDP5PRZcqlgE5W4nNKBumK8rbYmeAF4UY8YgvxYNUvhwb9K45GdbGJ5M5pxAuMZGin+dXz1pIAV25dPZaVTm2td810KXCIcAJBHqzSM4cHqdVyRr9cIQRduch6em020Uq4iWZUigR7XGqJXq5wnJjo5ABOYVDQKAZkZXMBkcSPcJn4zOPTuaMUm2L7H5IHitW06Y4iIqnPlQF+wKWnlo1vaiCuFrYOlCy6KfcbhbKPYuJxvk2gnK9tFainFRLpgSa2FfbZ1eMc/7+zIxQTKi02dwCEuZqTmplxctJXTQPs420KBfxvf3OqIJBXSZyf34KBbgwqRYiss7tGLt2ol0tQZJOCY+PBtnQ6Y9f4Xp8261i0PBofa5nInl9F7gKNbPqkXYG+DQKaBYGYedN3msLpyxvfkDU2yTv80WB8H/rFLMsKE0ygsyXB7H7rZt76atmIgpnxnDQ1T1h7PktDYBb2/g96GwKGRd3H/XWMPFNhpEEm2lcc8vIaN8DyULSk/uG5QbNgMKDR6ToD2mBwd52A5ND/3i5LDE+HNrZd4dMC/vV7XEi4atilEVoan5ODZUxAw5YLMNTBFNkoNX6B19as99C64LoCvVHFVqnmlVZwAIJMCxJoKC1VWSlTA27U5KG8PyRWwsmBbydWHpCovsai7N8yQSEjXRgHI+lgg/g5/7i/b02do4KL+WvQaD40wiq4IAk7MG1B79Tp2cTZx2jbAIPgmgkIYIWLnler+jZhKKk+gs4NU+ypkR/Vx9AphNu+QqTtd9kxsq5WF4lE11S1EiFLdXEXEFPGrxpClJRDNHYnVPqqrCfi55KH8KpKYDI1cusGT/eekPJr1ssrr+nvvFDRC4p65VnyyiGUpkGyVqApKbxxVarSO3ZvnL93aVXv49nf1F2/urNm88XWvcY5fmyFkIXYZyy/h2/CWjfAMXEPf9wWUXCz0X8U/ERyoBqhloHowwr8ahedAtTenJrDOijadax7f7OWDDW+34pWyYYYucG4Oc67wDegaALaUW2tsNOO9WTwhhDd3Dh+IuzY0clhJdaPHzTQeIuwgJtfWpYmj5Ok0wrPVMO6gRndp2VHOwIARhLHDlOnwPBKjxJDxTRcEF1eUJHfr1pBrl96bp3DFm6Loya8wctSZLuK0TZ78iVeqnEKRuKgLSn4dTSuuYpssESXPvO7hkWLU6Iznq+m3W/hAKE4Kgmbec56J2sa5L2M/dSXlp9dSiRtGCs97DCEpiVUGFxrURa9m8Thv3LkaWpO8O2DWdhg/0qVBfhrfFiKyZTqeVK7JuwUs09xXTKx6UCoLSl4kMMtrUIENjdgnhLrRkjV9RrUWXRiGDaUFmDkc+t1xZ7MkJN3Xxy+Q0q5M1W/jX0a/mCrKmVD0sv+LJOiTavZk0DuzZDOzCLGSU9ndO7KA91z0CYEKMkRCXXOco3cntPf88zvXMvUvMEPKW26IIx94Xbnn9IZ3rQUEV7aMOdbJq0KjbQ9pIEyZpNK6W+jlyhG3nTY1DQkMD4oqkTS31KIzaXbi7Yat+KnDrfr7KIaPvU97SyDHR2Hjk7aPHMfDbCfN3H1BaJiJpcqSGAee/Lu+6SrlJqdpPeUq5+b6pmuUG5z9lles3TcMoJYqHKH3JhDxJugxFLgyH+ultUtnplnanYdr50tvYn4Cqb2nTy8Fjpin0agz79aAM+YWSwK/+XUj65c2bly9em7DyLp5T885sOUH5xExnJ4OS7Rk+owYfhnAazUOCLg8cjmPGGtvjXt+uzNpgNYwQ9QSZypoY53J/Rqapv+Bcr49EQLgA5yS9WtVmLBTZWyWN9OEmGrN2qdMSRBizevWbder6HxMtX4DwGmSvb0NDCKenJR2qsnALl71Tw+rWAVNX5eGZ737K+HFWcWdhRZWi+zPcLQcKR0cKoUbq+hIqY9rnrwqv789P7+ykO1q5QfDcZWVcTAYWP419INbTHzDfriZ0m4+YkTZVc0qduHEcVzAbtsdF6lc6plXr5qpPIryrGfc9LSC6kZpQkmZ7KNGl0cmWTQ2AA+JT+rubUUGf7m379IwtK9n2Y3JJ/V0o3wUntVjMvVmQbD9jZ38utvHttR9tKsQ4Ib+/nsIJs7A1x7Xd0jCsJmxX+LGrxxj88GZs/IC623OwAfyB4LV+abuNiKmKLJoQXq7qQ9JkF552ED+q8ZJFsYiNjpb6L82sHAed8YZzMGe7m5Tb8IPLNzBJ2FzEF8c6gLGWS4JhfivITf5g/IdanDaZiQy/oHNqXa7BjV4MNjVNfSAeQqMdA0+7XvIPGOjtv+hYcQG7DXrnLqhXGE/evTbGtXaR8vvo/65zJx7/AEzUBlS8cdV4anMZn0Fk7qsQ6lE3fKp1RHPEv8Gs12GwiCPiZ6Xu46AWusclBmbnBoWKAoSrsvt1M1/V917zyCMBb1WKKXs69wdnCdbg0yj7VKNjA6Ci4n0EMeBpjw/JMCX40rc6PNrcMzWzHoQjqv6b1SNjCDF9urg7P7e89h3P/km3upgT83A1XqtjAWAF8/NXaRdTKEcxHTzvUg0X/3B3pTbqBPE6NPXDsDOyo/ehwSaH8V5uDtzAnFhjS74ak7q+Ck5VASNHeckp+CdPTwQaWbTOEbFm6RN8ni0/lszLMsha9T5B/lVy++fU68j/qa2VeFHLR9uemh5dFVoy1KlT5pfC+C6xqFc1NtAl9yTrDPwRrn0dZmep2dgT2AKvW15LSoj2mF2pqDd7hNlRBZ956Wzgi9e09pVFdc+iGYnpmq+ir8u3iIWW+ClmtL47R4bRWzy9vhS4HhHsK9s3/37CpMJIos4YaIw0C+lsKmKL1+UylujqMTZKUQnEKSmKigSvcjSMwqqQio93ejZCAqOEFVLSypMhF3qOL1ZhRocPdtFQEhuDC6p9e3b/LqVr0udtW4MPuqM8hluIOG3ySUicenpm/NdttaailkiViQrypZzXpvyvtGyMfZy1FSKuhlGXPoWaOeIxLk3b0KozPPBjwacbF9E2gW9rMYzU8MuJK14fbT46KXf40JYKp7J1czd+cZUu5trRj6SYWSdM9GfPX6hz7Fp7eNc64C5moq71rUutlaBQ0FDBq62xz9rrqmYsw7IXfskzaHvwniOpiNUijc6+Wk118xbawoStjcNe0Hx6pVClXfWesZX41IvkkhR3FSjqq89v8SbNuYlmw0FArk80NCvnYRn8Vh4XF6ab6ZeBJHH5KOIwD4swRJoXFMA5xuZCSoiLM/gGAy92RD76zvd6r5L21z30bZcgAz+/fcgblDBs8jgwxdxSMS2aDQf88eulCA9o1fdnIEPgwGqC7GgoKdPI44lF17tASpXj7U8152ntjaZMmPVJnW+d/LZMunKRzWpHv+rRln36716o3hkKNnJVUHjUZUeXpMFhQhQ12BLsHbSX2uI0L/99WqbcoznrJYIJwinAlwjjQhvLLJsU5yXKfMJeF5pRiyCm5vhNItGqgjxzkfK5LBeVwQdhg4VyQ8zY5v1UlER54qZcRtEMmaGm/xG4t+HhDCzwbsik2YlMxXJFSytvBf5KCk84GD3NkgwxWxVlQIy3WaicaK8sbykpLikvrF+6KUBQvGFQIFf0BQHKBTNlCalUnDCwB4goO07dVQCMHGLqsWWj3oIaLQQb+zsLcJrOKGmJgFOhMuCEzLLbscjZkKHDykDN1JogQFdt6JNBDR0XcIVED0u3sKOc3b1nSdhpHlf15n/RiMJso1Y78Z9RtdktOFFahgIqNzNNSCKHWVaY+qd6g9MNRtRMkEq4Z1xNeQlPeIDrbq8Ysw2NpkAUGPC5CsTtsnc5KoEuKYSiqs2edWPV5Kq502VZmXmzypEs7JMJyL6aUKuFxgWEu3Qah1HVjiQHB0vqzif51UwGjGWhje7vGg/IJs9rynw0sTGXTY3PIZj552vkMV7FVw2w6eNrT/rVHSGW//5n2WadLd0PLMjXvbLtIKm4B0wIHJpXKKBb62h5nwcJV7Wn443v0wJk908u5/TL4uHNIVwYxfPu/WQNtfFKZodcR08kf5EFjHD7AjueS/b7jCnpkBjE2sw+QGey4quAAqQyQLShDpDTxvUjc4l2jB+Y0K1Aid5lOGQYVTxyeLEj2htNHf55OU54yHjWO9J43n8X0GPlrl0HukRyqNzQdXxYUyl1aroqtfaIZsiNJGrpGctzWpDBjejQOAkGTLl//nO4F9/Dfms4MQOKNM9HJLotJmBj3EzNSUs/qzOVdObYTAAr4SkZyqID+SvQbnMlhAsupf5qB/JjeGGro9p3e/uFHoFS/H8u8TBGbpnUja6F6dX4brhuFotyufNx0g3pMgrDZgpO6oPODzYc8AHOLFODjOG1WoydclkqKen1SdPCwOQiohSflRJUQJ+CFyqUnNPI+pR+GDvqIv2RYL9eRGi/vjfMKJGCkJ43F6N83G3+mmite7ZNad6ZHISgVlvuQYkCAR+9mfS37lZkTP/fm9p/QlgE7sgxgUSiyEXDZlsF+iRDR39iKNTg+g4MYkvyqazURdIIgYuGmNmq86ef8fzgJ4QIesR/2E86JFNpqmIJWbZ29sCh5KLUU8jJZGRT6kW7y0pihYlifrxxEz8x/7pH0/6cnyFY/f2aw4MlvKFXvu+x8UQINfgEDfgCioDuT4U17pDQpZdkRXPFS+dpw6Ebkb5qNwmdnQEtTVhI12BQlRO4m+vtmftUP1DWBaWZNWNbsu7VwV4dWZ1ZsCqbpS3a9PoaCgAGsrkoXJGgLBr1CINTcjpIfEYPFJPZQfs6bqB4E6GkPeRI95Qu0G2fjvkffQu4aZdF4mBy8rgmHY9VmC7Dybb4b9YRNENJN2tq1PRIzGVrLsor+LvtajHAvb7LomltvsCYZy+y3U7VuuD/j61zWnmyNTUMICA+tqd7Ump0n1uXBtHDOn78KEP6UVKIAE87oNzTGVuW/yHlvTzvVNrvYRV4Mx3bhZn/WsFfpurwHapRdYwI5o5HFV5obT6Il9NCL3Cmx3jmzZl5rUQVUWFhIM/Qg+5tWDRzAlRUoYdx/5axGlb9xbGSW3L+y/Nt682ETuP2Js6lwtHgIjUsVdiOvHP4yYiPq22i3DQ5DZgIoUzYn+nGT2nbCx+rOzXgem30eTtzmbLX8y54wkSWHv43Z9o8cf2BYM+NsyZ4mUu6gANq+ubTEjBW5rbazaiXGnvdv2HW15tmdvyCOiOXcb8XXxjM+wN643JNaGP19deMdAzIys2/Ayurf/9hNP00EPldMqOE0/gQrhn+VM3PhRc3iPPd7scAjc9e3/DyigSv6h/C0QXLX7/7QTr8m3q31bIPVnAMOAey0n9gdiQ6t3SpmAq1q4Vdpfe/HaxY2z18tCOxcVm+ndIEeCb5ua/3N47r7hwZdbdtZ8N4EpyDM5UVysoiprqHOoZ3vXiiIjbid9XRLJZ0qOfYsifY+R75gzFjqLIDg358aAODD7Zp8lsal9txclUGPlHc9L3wjz9r0Es2hngWLVz6/FY4WD3uk1DoZ7rkhuj2eWs6EbroKvXvloNVxFy4WXCuSP36tXt8LWrTQCBgmLntSd45detAzoqo9tIFaS26MoBN/hAbl4YdADKy/P+uLC83ANwGJybC1YKd5EWO7CORdRAx3m/rZKGGPaIDoPDkdcu3unZHBNp1bYcaRNFaiPtBA1jHKgoqDvQqHa2cNaMgoozUxRTrEYEbO5QUhYKP6ys4V55PNij3rbxC3vK6oeshYU4ajXF/tSxTT3Y8/gKd2XNh8KUherVoFAXBYH9tFwcFVEALzQE/gaAjdqGOG+fNhJe3F/iS6To6WC4u3qxVxA5ADsehBR4O3RIYanNFcQXZBeAa+TbPFvun6C2PJBcPOldJCv0QO90n1cA271It4Ig3OIYjrj8VZlUfpA0f4cZUly6H4RsDzdO50sca1t6Lb4UvW68ObjYL0ihbmW/wna3BABcaVMHDob4vyDSnwZb7v22iTofZWEuqM3wystEcyJDcG9ciZfk/ei44UgOzd1AHfw7TjnVtn0PgpDdl554D9n8PwHXAz98Jbn7Q6jj/6b714FzP/7dp2TicMSbP/aOBX/3p3FwSax3bjsisbWzFPkIJ3N5fF8E6f5nP77y+IgrsLMun2WgUXNgy9W5CW18jj6ITo77aI5PAfOzaF70mZr0zKhZY04pm9fUSmdPrTX21daq/cGdCQdARBnAitNTw6hbTYZ9q9moRymbX7Uy7Vdro4GorQvIPGJnIXak16/AKYK93C15LpGH9fXa9xfmnp08dyR7/0EanbPHrZz3y58oEBx3aOt8Uo02Ci/27C0NObOtwl/wukuq9WO/LSpvDTvPy8PrV+AUwV7u5zeT5xK/WF9T//wvzD07KZly8+Z/kEY/3R53BwDlUxagKdsyuK3zSQMr2uNo4cWeAws5LrGt+dW+4HWXINz6sQ+uFkHlrv74onJS+KaN/lPgtwENaURjmtCUZsSIozmBeBJIJElWVE03TMt2XM8PwihO0iwvyqpu2q5fLFeCratIEZZN6JQcDysFsIks19GFIGhtujh/vTkJz281Ge9EB5+5YfQJ/oowcrNVC4qawLfyU9qb8gLZpkFW8tgEZCgMAulU6mZ2YRKCQKqN2hDdyjKS4sgDTUKuz7hjTIRh3XI3GVFNpiveCytF8k6Jy8ASICOWwVTmqbrWbu/1mIUFYyWvXfBSe85bYuWD0Jx0wp0bnPg01MQFY4Pqh4NN864MLbmF07r3tEYwjXswSguelepGecvA+tSr+U9nMr3VCg2V5cOiOnkA') format('woff2');
}
.l-icon-error:before {
content: "\e605";
}
.l-icon-duihao:before {
content: "\e63c";
}
.l-icon-video:before {
content: "\e609";
}
.l-icon-fork:before {
content: "\e632";
}
.l-icon-address:before {
content: "\e606";
}
.l-icon-backward:before {
content: "\e607";
}
.l-icon-add:before {
content: "\e608";
}
.l-icon-cart:before {
content: "\e60a";
}
.l-icon-close:before {
content: "\e60b";
}
.l-icon-checked:before {
content: "\e60c";
}
.l-icon-comment:before {
content: "\e60d";
}
.l-icon-down:before {
content: "\e60e";
}
.l-icon-customer-service:before {
content: "\e60f";
}
.l-icon-delete:before {
content: "\e610";
}
.l-icon-edit:before {
content: "\e611";
}
.l-icon-download:before {
content: "\e612";
}
.l-icon-ellipsis:before {
content: "\e613";
}
.l-icon-favor:before {
content: "\e614";
}
.l-icon-favor-fill:before {
content: "\e631";
}
.l-icon-forward:before {
content: "\e615";
}
.l-icon-help:before {
content: "\e616";
}
.l-icon-eye:before {
content: "\e617";
}
.l-icon-history:before {
content: "\e618";
}
.l-icon-left:before {
content: "\e619";
}
.l-icon-like:before {
content: "\e61a";
}
.l-icon-notification:before {
content: "\e61b";
}
.l-icon-order:before {
content: "\e61c";
}
.l-icon-loading:before {
content: "\e61d";
}
.l-icon-password:before {
content: "\e61e";
}
.l-icon-more:before {
content: "\e61f";
}
.l-icon-picture:before {
content: "\e620";
}
.l-icon-pull-down:before {
content: "\e621";
}
.l-icon-right:before {
content: "\e622";
}
.l-icon-research:before {
content: "\e623";
}
.l-icon-phone:before {
content: "\e624";
}
.l-icon-setting:before {
content: "\e625";
}
.l-icon-scan:before {
content: "\e626";
}
.l-icon-share:before {
content: "\e627";
}
.l-icon-success:before {
content: "\e628";
}
.l-icon-soud:before {
content: "\e629";
}
.l-icon-time:before {
content: "\e62a";
}
.l-icon-warning:before {
content: "\e62b";
}
.l-icon-to-top:before {
content: "\e62c";
}
.l-icon-up:before {
content: "\e62d";
}
.l-icon-WiFi:before {
content: "\e62e";
}
.l-icon-user:before {
content: "\e62f";
}
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-item-class"],behaviors:["wx://form-field",validator],properties:{urls:{type:Array,value:[]},count:{type:[String,Number],value:9},clear:{type:Boolean,value:!1,observer:function(e){e&&this.handleClear()}},size:{type:[String,Number],value:3,options:[3,4,"3","4"]},sizeType:{type:String,value:"original",options:["original","compressed"]},mode:{type:String,value:"aspectFit",options:["scaleToFill","aspectFit","aspectFill","widthFix","top","bottom","center","left","right","top left","top right","bottom left","bottom right"]},custom:{type:Boolean,value:!1},preview:{type:Boolean,value:!0},maxImageSize:{type:Number,value:1e7},cells:{type:Array,value:null}},data:{showBtn:!0,tempFilePath:""},lifetimes:{attached:function(){let e=this.judgeNewOrOld();null!==this.data.cells?(e="new",this.setData({newOrOld:e,urls:this.data.cells})):this.setData({newOrOld:e})}},methods:{handleClear(){let e=this.data.urls;this.setData({urls:[],clear:!1,showBtn:!0});let t={all:e,current:e};this.triggerEvent("linclear",t,{})},onPreviewTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls;let a="",s=[];const i=this.data.newOrOld;if(void 0!==this.data.cells){const e=this.data.cells;a=e[t].url;for(let t=0;t<e.length;t++)s.push(e[t].url)}else if("old"===i)a=this.data.urls[t],s=this.data.urls;else{a=this.data.urls[t].url;for(let e=0;e<l.length;e++)s.push(l[e].url)}let r={index:t,current:l[t],all:l};!0===this.data.preview&&wx.previewImage({current:a,urls:s}),this.triggerEvent("linpreview",r,{})},onAddTap(){const e=this,t=this.data.count-this.data.urls.length;if(0===t)return;const l=this.data.newOrOld;wx.chooseImage({count:t,sizeType:this.data.sizeType,sourceType:["album","camera"],success(t){let a=[];if("old"===l)a=t.tempFilePaths;else for(let l=0;l<t.tempFilePaths.length;l++)a.push({url:t.tempFilePaths[l],imageSize:t.tempFiles[l].size}),a[l].overSize=t.tempFiles[l].size>e.data.maxImageSize;const s=e.data.urls.concat(a);s.length===parseInt(e.data.count)&&e.setData({showBtn:!1}),e.setData({urls:s,value:s,tempFilePath:a});let i={current:a,all:s},r={};e.triggerEvent("linchange",i,r),e.triggerEvent("linpush",i,r);let n=[];for(let e=0;e<s.length;e++)s[e].overSize&&n.push(s[e]);if(n.length>0){let t={current:a,all:s,overSizeList:n};e.triggerEvent("linoversize",t,r)}}})},onDelTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls,a=l[t],s=this.handleSplice(l,a);s.length<parseInt(this.data.count)&&this.setData({showBtn:!0}),this.setData({tempFilePath:a,urls:s,value:s});let i={index:t,current:a,all:s};this.triggerEvent("linremove",i,{})},handleSplice:(e,t)=>e.filter(e=>e!==t),judgeNewOrOld:function(){const e=this.data.urls;return 0!==e.length&&"object"!=typeof e[0]?"old":"new"}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-grid-item":"../grid-item/index","l-grid":"../grid/index"}}
\ No newline at end of file
<l-grid row-num="{{ size }}" l-class="l-class">
<l-grid-item wx:for="{{ urls }}" wx:key="index" key="{{ index }}" slot="{{ index }}">
<view class="item l-item-class" catchtap="onPreviewTap" data-index="{{ index }}">
<view class="close" data-index="{{ index }}" catchtap="onDelTap">
<l-icon name="close" color="#fff" size="22" l-class="close-icon"/>
</view>
<image class="{{size === 3? 'img': 'min-img'}}" mode="{{ mode }}" src="{{newOrOld==='old'? item:item.url }}"/>
</view>
</l-grid-item>
<l-grid-item wx:if="{{ showBtn }}">
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:if="{{ custom }}">
<slot></slot>
</view>
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:else>
<image class="add-icon" src="./image/add.png"/>
</view>
</l-grid-item>
</l-grid>
.item{position:relative}.close{position:absolute;right:10rpx;top:10rpx;height:40rpx;width:40rpx;border-radius:50%;background:rgba(0,0,0,.4);display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;z-index:99}.add{height:220rpx;width:220rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.add-icon{height:100rpx;width:100rpx}.img{height:220rpx;width:220rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.min-img{height:160rpx;width:160rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.flex{border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-anchor-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../index-list/index":{type:"parent"}},data:{anchorSlot:{height:-1},anchor:{height:0},anchorText:"",anchorStyle:"",anchorWrapperStyle:""},lifetimes:{attached(){this.parseAnchorSlotRect()}},methods:{async parseAnchorSlotRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor-slot");t?this.setData({"anchorSlot.height":t.height}):this.setData({"anchorSlot.height":0})},async parseAnchorRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor");t&&this.setData({"anchor.height":t.height})},setFixed(t,e){const a=`\n position:fixed;\n top:${t}rpx;\n `,o=`height:${e}px;`;this.setData({anchorStyle:a,anchorWrapperStyle:o})},setRelative(t){const e=`\n position:relative;\n transform: translate3d(0, ${t}px, 0);\n `;this.setData({anchorStyle:e})},clearStyle(){this.setData({anchorStyle:"",anchorWrapperStyle:""})},isRelative(){return this.data.anchorStyle.indexOf("relative")>0},isFixed(){return this.data.anchorStyle.indexOf("fixed")>0}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-index-list":"../index-list/index"}}
\ No newline at end of file
<view class="anchor-wrapper" style="{{anchorWrapperStyle}}">
<view class="anchor" style="{{anchorStyle}}">
<view wx:if="{{anchorSlot.height!==0}}" class="anchor-slot">
<slot></slot>
</view>
<view wx:if="{{anchorSlot.height===0}}" class="anchor-default l-anchor-class">
{{anchorText}}
</view>
</view>
</view>
.anchor-wrapper{width:100%}.anchor-wrapper .anchor{width:100%}.anchor-wrapper .anchor-default{width:100%;background-color:#f7f8fa;display:flex;align-items:center;padding:8rpx 0 8rpx 30rpx;font-size:26rpx;font-weight:700;color:#323132;box-sizing:border-box}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";import dataUtil from"../core/utils/data-util";import eventUtil from"../core/utils/event-util";import pixelUtil from"../core/utils/pixel-util";const defaultSidebarData=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];Component({externalClasses:["l-tip-class","l-tip-text-class","l-sidebar-class","l-selected-class","l-unselected-class","l-sidebar-item-class"],relations:{"../index-anchor/index":{type:"child"}},options:{multipleSlots:!0,pureDataPattern:/^_/},lifetimes:{attached(){this.init()}},properties:{isStick:{type:Boolean,value:!1},scrollTop:{type:Number,value:0},sidebarData:{type:Array,value:defaultSidebarData},showSidebar:{type:Boolean,value:!0},stickOffsetTop:{type:Number,value:0}},data:{_sidebar:{top:0,height:0,sidebarItemCenterPoints:[],isMoving:!1,sidebarItemRect:{}},_anchor:{anchorTopLocations:[],indexAnchorComponents:[],currentStickAnchorIndex:-1,anchorItemsHeight:[]},_stickOffsetTopPx:0,activeSidebarItem:0,tipTop:0,showTip:!1,tipHeight:0},observers:{scrollTop:function(t){this.setIndexListStyle(t)},stickOffsetTop:function(t){this.setData({_stickOffsetTopPx:pixelUtil.rpx2px(t)})}},methods:{async init(){await this.parseSidebarRect(),await this.parseSidebarItemRect(),await this.parseIndexAnchors(),this.parseAnchorRect(),wx.lin=wx.lin||{},wx.lin.setScrollTop=t=>{dataUtil.setDiffData(this,{scrollTop:t})}},async parseSidebarRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".sidebar");this.setData({"_sidebar.height":t.height,"_sidebar.top":t.top})},async parseSidebarItemRect(){const t=this.data.sidebarData.length,e=await nodeUtil.getNodeRectFromComponent(this,".sidebar-item"),i=this.data._sidebar.height/t,a=e.height,s=await nodeUtil.getNodeFieldsFromComponent(this,".sidebar-item",{computedStyle:["margin-top"]}),o=await nodeUtil.getNodeFieldsFromComponent(this,".tip",{computedStyle:["height"]}),n=[],r=s["margin-top"].replace("px","");for(let e=1;e<=t;e++)n.push((2*e-1)*a/2+e*parseInt(r));const h=parseInt(o.height.replace("px",""));this.setData({tipHeight:h,tipHeightOverflow:.205*h,"_sidebar.sidebarItemRect":e,"_sidebar.sidebarItemHeight":i,"_sidebar.sidebarItemRealHeight":a,"_sidebar.sidebarItemCenterPoints":n})},parseIndexAnchors(){const t=this.getRelationNodes("../index-anchor/index");if(t){this.setData({"_anchor.indexAnchorComponents":t});for(let e=0;e<t.length;e++)t[e].setData({anchorText:this.data.sidebarData[e]})}else console.error("获取 index-anchor 节点实例失败,请参考文档检查您的代码是否书写正确")},async parseAnchorRect(){const t=[],e=[],i=this.data._anchor.indexAnchorComponents;for(const a of i){const i=await nodeUtil.getNodeRectFromComponent(a,".anchor");null!==i&&(t.push(i.top),e.push(i.height))}this.setData({"_anchor.anchorTopLocations":t,"_anchor.anchorItemsHeight":e})},switchTipShow(t){dataUtil.setDiffData(this,{showTip:t})},switchSidebarIndex(t){dataUtil.setDiffData(this,{activeSidebarItem:t})},switchIsMovingSidebar(t){dataUtil.setDiffData(this,{"_sidebar.isMoving":t})},setIndexListStyle(t){const e=this.countCurrentActiveIndex(t);void 0!==e&&(this.data.isStick&&this.setAnchorStyle(t),this.data.showSidebar&&!this.data._sidebar.isMoving&&this.switchSidebarIndex(e))},setAnchorStyle(t){const{anchorTopLocations:e,anchorItemsHeight:i,indexAnchorComponents:a}=this.data._anchor,s=this.countCurrentActiveIndex(t),o=a[s],n=e[s],r=i[s],h=e[s+1],c=this.data._stickOffsetTopPx;if(t+c>=n&&t+c<=h-r&&!o.isFixed()){o.setFixed(this.data.stickOffsetTop,r);for(let t=0;t<a.length;t++)t!==s&&a[t].clearStyle()}else if(t+c>h-r&&t+c<h&&!o.isRelative()){o.setRelative(h-n-r);for(let t=0;t<a.length;t++)t!==s&&a[t].clearStyle()}else if(t+c<n)for(let t=0;t<a.length;t++)a[t].clearStyle()},countCurrentActiveIndex(t){let e=0;const{anchorTopLocations:i}=this.data._anchor;for(let a=0;a<i.length;a++)if(t+this.data._stickOffsetTopPx<i[a]){e=a-1;break}return e<0&&(e=0),e},onTouchMove(t){this.switchTipShow(!0),this.switchIsMovingSidebar(!0);const{top:e,sidebarItemHeight:i}=this.data._sidebar,a=this.data.sidebarData.length,s=t.touches[0].clientY;let o=Math.floor((s-e)/i);o<0?o=0:o>a-1&&(o=a-1);const n=this.data.sidebarData[o];dataUtil.setDiffData(this,{tipText:n,activeSidebarItem:o,tipTop:this.data._sidebar.sidebarItemCenterPoints[o]});let r=this.data._anchor.anchorTopLocations[o]-this.data._stickOffsetTopPx;wx.pageScrollTo({duration:0,scrollTop:r}),eventUtil.emit(this,"linselected",{index:o,tipText:n})},onTouchend(){setTimeout(()=>{this.switchTipShow(!1)},500),this.switchIsMovingSidebar(!1)},onTapSidebar(t){this.onTouchMove(t)}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="index-list">
<view wx:if="{{showSidebar}}" class="sidebar l-sidebar-class" catch:tap="onTapSidebar" catch:touchmove="onTouchMove" catch:touchend="onTouchend">
<block wx:for="{{sidebarData}}" wx:for-item="sidebarItem" wx:key="index">
<view class="sidebar-item l-sidebar-item-class {{activeSidebarItem===index?'sidebar-item-active l-selected-class':'l-unselected-class'}}">{{sidebarItem}}</view>
</block>
<view class="tip l-tip-class" style="top:{{tipTop}}px;{{showTip?'':'opacity:0;'}}transform: rotate(-45deg) translateY({{-tipHeight/2-tipHeightOverflow}}px);">
<view class="tip-text l-tip-text-class">{{tipText}}</view>
</view>
</view>
<slot></slot>
</view>
.index-list .sidebar{font-size:24rpx;position:fixed;right:30rpx;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center}.index-list .sidebar-item{width:40rpx;height:40rpx;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-top:8rpx}.index-list .sidebar-item-active{color:#fff;background-color:#85c5e1}.index-list .tip{width:90rpx;height:90rpx;background-color:#d8d8d8;border-radius:90px 90px 0;display:flex;justify-content:center;align-items:center;position:absolute;left:-160rpx;transform:rotate(-45deg) translateY(-35%)}.index-list .tip-text{font-size:30rpx;transform:rotate(45deg)}
\ No newline at end of file
import eventBus from"../core/utils/event-bus.js";import validator from"../behaviors/validator";import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},behaviors:["wx://form-field",validator,rules],externalClasses:["l-class","l-label-class","l-error-text","l-error-text-class","l-input-class"],properties:{label:String,hideLabel:Boolean,labelCustom:Boolean,showRow:{type:Boolean,value:!0},required:Boolean,placeholder:String,type:{type:String,value:"text",options:["text","idcard","digit","password","number"]},value:String,colon:Boolean,focus:Boolean,clear:Boolean,maxlength:{type:Number,value:140},width:{type:Number,value:null},labelWidth:{type:Number,value:200},labelLayout:{type:String,value:"left",options:["left","right"]},disabled:Boolean,placeholderStyle:String,showEye:{type:Boolean,value:!1}},data:{},attached(){},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),this.triggerEvent("linconfirm",e.detail)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail)},getValues(){return this.data.value},reset(){this.setData({value:""})},onTapEyeIcon(){const e=this.data.type;"text"===e?this.setData({type:"password"}):"password"===e&&this.setData({type:"text"})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<label class='form-item {{disabled? "disabled": ""}} l-class form-item-{{labelLayout}}' style="width:{{width===null?'auto':width+'rpx'}}">
<view class="mask" wx:if="{{disabled}}"></view>
<view class="row" hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width}}rpx;"></view>
<view wx:if="{{label && !labelCustom}}" hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout=== "top" ? labelWidth + "rpx" : "" }}'>
<text><text class="text-require" wx:if="{{required}}">* </text>{{label}}<text wx:if="{{colon}}">:</text>
</text>
</view>
<view wx:else hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout=== "top" ? labelWidth + "rpx" : "" }}'>
<slot name="left"/>
</view>
<input class="input {{hideLabel?'hideLabel':''}} l-input-class" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<l-icon wx:if="{{showEye&&value}}" name="eye" catch:tap="onTapEyeIcon" size="40" l-class="l-eye l-eye-{{type}}"/>
<view class="close" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close-icon">
<l-icon name="close" color="#fff" size="16"/>
</view>
</view>
<slot name="right"/>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</label>
.form-item{position:relative;font-size:28rpx;color:#333;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}.hideLabel{padding-left:25rpx}.l-eye{padding:10rpx}.l-eye-text{color:#85c5e1!important}.l-eye-password{color:rgba(133,197,225,.6)!important}
\ No newline at end of file
import hover from"../behaviors/hover";Component({behaviors:[hover],relations:{"../list/index":{type:"parent",linked(){},linkChanged(){},unlinked(){}}},options:{multipleSlots:!0},externalClasses:["l-class","l-class-icon","l-icon-class","l-class-image","l-image-class","l-class-right","l-right-class","l-class-content","l-content-class","l-class-desc","l-desc-class","l-link-icon-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},image:String,title:String,desc:String,tagPosition:{type:String,value:"left"},tagContent:String,tagShape:{type:String,value:"square"},tagColor:String,tagPlain:Boolean,badgePosition:{type:String,value:"left"},dotBadge:Boolean,badgeCount:Number,badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"},rightDesc:String,gap:Number,leftGap:Number,rightGap:Number,isLink:{type:Boolean,value:!0},linkType:{type:String,value:"navigateTo"},url:String},methods:{tapcell:function(e){const{linkType:t,url:l}=e.currentTarget.dataset;l&&wx[t]({url:l}),this.triggerEvent("lintap",{e:e},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tag":"../tag/index"} }
\ No newline at end of file
<view class="l-list l-class" hover-class="{{isHover?'l-list-hover':''}}" hover-start-time="20" hover-stay-time="50" style="{{gap?'padding:0 '+gap+'rpx;':''}} {{leftGap?'padding-left:'+leftGap+'rpx':''}} {{rightGap?'padding-right:'+rightGap+'rpx':''}}" bind:tap="tapcell" data-url="{{url}}" data-link-type="{{linkType}}">
<l-badge wx:if="{{(badgeCount > 0 || dotBadge ) && badgePosition ==='left'}}" value="{{badgeCount}}" dot="{{dotBadge}}" max-count="{{badgeMaxCount}}" number-type="{{badgeCountType}}">
<template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}"/>
</l-badge>
<template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}" wx:else/>
<l-badge l-class="badge-right" wx:if="{{(badgeCount > 0 || dotBadge ) && badgePosition ==='right'}}" value="{{badgeCount}}" dot="{{dotBadge}}" max-count="{{badgeMaxCount}}" number-type="{{badgeCountType}}">
<template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}"/>
</l-badge>
<template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}" wx:else/>
</view>
<template name="cell-left-main">
<view class="left-section">
<image wx:if="{{image}}" class="l-image l-class-image l-image-class" src="{{image}}" mode="aspectFit|aspectFill|widthFix"/>
<l-icon wx:elif="{{icon}}" l-class="l-icon l-class-icon l-icon-class" name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}"/>
<view class="l-text">
<view class="l-class-content l-content-class">{{title}}</view>
<view class="l-desc l-class-desc l-desc-class" wx:if="{{desc}}">{{desc}}</view>
</view>
<l-tag size="mini" shape="{{tagShape}}" bg-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='left' && !tagPlain}}">{{tagContent}}</l-tag>
<l-tag size="mini" shape="{{tagShape}}" plain="{{tagPlain}}" font-color="{{tagColor}}" l-class="cell-tag" wx:elif="{{tagContent && tagPosition ==='left' && tagPlain}}">{{tagContent}}</l-tag>
<slot name="left-section"></slot>
</view>
</template>
<template name="cell-right-main">
<view class="right-section l-class-right l-right-class">
<slot name="right-section"></slot>
<l-tag size="mini" shape="{{tagShape}}" bg-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='right' && !tagPlain }}">{{tagContent}}</l-tag>
<l-tag size="mini" shape="{{tagShape}}" plain="{{tagPlain}}" font-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='right' && tagPlain }}">{{tagContent}}</l-tag>
<view class="l-text" wx:if="{{rightDesc}}">{{rightDesc}}</view>
<l-icon l-class="l-link-icon-class" size="26" color="#8c98ae" name="right" wx:if="{{isLink}}"/>
</view>
</template>
.l-list{width:100%;min-height:88rpx;display:flex;justify-content:space-between;align-items:center;color:#333;font-size:28rpx;border-bottom:1px solid #f3f3f3;box-sizing:border-box}.l-list-hover{opacity:.8}.l-list .left-section{display:flex;justify-content:space-between;align-items:center}.l-list .left-section .l-icon{margin-right:20rpx}.l-list .left-section .l-desc{color:#d1d3d7;font-size:24rpx}.l-list .left-section .cell-tag{margin-left:20rpx}.l-list .left-section .l-image{width:44rpx;height:44rpx;margin-right:20rpx}.l-list .right-section{display:flex;justify-content:space-between;align-items:center;line-height:1.2}.l-list .right-section .l-text{margin-right:20rpx}.l-list .right-section .cell-tag{margin-right:20rpx}.l-list .badge-right{border-radius:28rpx;min-width:28rpx;left:-20rpx;right:auto;top:0;bottom:0;transform:translate(-100%,2rpx)}
\ No newline at end of file
import computeOffset from"../behaviors/computeOffset";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,validator],externalClasses:["l-container-class","l-class"],properties:{show:{type:Boolean,value:!1},opacity:{type:String,value:"1"},bgColor:String,zIndex:{type:String,value:"776"},type:{type:String,value:"rotate",options:["flash","flip","change","rotate","circle"]},color:{type:String,value:""},size:{type:String,value:"medium"},custom:Boolean,fullScreen:Boolean},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoading=e=>{const{custom:t=!1,fullScreen:o=!1,color:i="",type:a="rotate",size:s="medium",opacity:l="1"}={...e};this.setData({custom:t,fullScreen:o,color:i,type:a,size:s,opacity:l,show:!0})},wx.lin.hideLoading=()=>{this.setData({show:!1})}},doNothingMove(){}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container-loading l-container-class {{fullScreen ? 'content': ''}}" wx:if="{{show && fullScreen}}" style="background:{{bgColor}};opacity:{{opacity}};z-index:{{zIndex}}" catchtouchmove="doNothingMove">
<view wx:if="{{show}}" class="l-class {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}" style="margin-bottom:{{distance}}px">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view wx:if="{{type==='flash' || type==='change' || type==='flip'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
<view class="spinner-circle {{'spinner-circle-' + size}}" wx:if="{{ type === 'circle'}}">
<view class="spinner-container container1">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container2">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container3">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
</view>
<view wx:if="{{ type === 'rotate'}}">
<view class="rotate rotate-{{size}}" style="border-color: {{color}};"></view>
</view>
</block>
</view>
</view>
<view wx:if="{{!fullScreen}}" class="l-container-class" style="position: relative">
<slot name="content"/>
<view wx:if="{{show}}" class="inner-loading-container" style="background:{{bgColor}};opacity:{{opacity}};z-index:{{zIndex}}"></view>
<view wx:if="{{show}}" class="l-class loading-icon-container" style="z-index:{{zIndex + 1}}">
<view class="{{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view wx:if="{{type==='flash' || type==='change' || type==='flip'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{ type === 'circle'}}" class="spinner-circle {{'spinner-circle-' + size}}">
<view class="spinner-container container1">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container2">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container3">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
</view>
<view wx:if="{{ type === 'rotate'}}">
<view class="rotate rotate-{{size}}" style="border-color: {{color}};"></view>
</view>
</block>
</view>
</view>
</view>
.container-loading{position:fixed;height:100%;width:100%;top:0;left:0}.content{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;height:100%}.spinner-flash-medium{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-medium{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-medium{width:30rpx;height:30rpx}.spinner-change-mini{width:20rpx;height:20rpx}.spinner-change-large{width:50rpx;height:50rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#85c5e1;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#85c5e1;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.spinner-circle{position:relative}.spinner-circle-mini{width:40rpx;height:40rpx}.spinner-circle-medium{width:60rpx;height:60rpx}.spinner-circle-large{width:70rpx;height:70rpx}.container1>.container-view,.container2>.container-view,.container3>.container-view{border-radius:50%;position:absolute;background-color:#85c5e1;-webkit-animation:bouncedelay4 1.2s infinite ease-in-out;animation:bouncedelay4 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.circle-mini{width:12rpx;height:12rpx}.circle-medium{width:15rpx;height:15rpx}.circle-large{width:20rpx;height:20rpx}.spinner-circle .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay4{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay4{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.rotate{border-radius:50%;animation:rotate .7s linear infinite}.rotate-mini{height:40rpx;width:40rpx;border-top:6rpx solid #85c5e1;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #85c5e1;border-left:6rpx solid #85c5e1}.rotate-medium{height:50rpx;width:50rpx;border-top:6rpx solid #85c5e1;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #85c5e1;border-left:6rpx solid #85c5e1}.rotate-large{height:70rpx;width:70rpx;border-top:8rpx solid #85c5e1;border-right:8rpx solid transparent!important;border-bottom:8rpx solid #85c5e1;border-left:8rpx solid #85c5e1}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-loading-class","l-end-class","l-line-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{show:Boolean,custom:Boolean,line:Boolean,color:String,size:{type:String,value:"28"},type:{type:String,value:"loading",options:["loading","end"]},endText:{type:String,value:"我是有底线的~"},loadingText:{type:String,value:"加载中..."}},data:{},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoadmore=e=>{const{custom:o=!1,line:t=!1,color:i="",size:l="28",type:a="loading",endText:n="我是有底线的",loadingText:s="加载中..."}={...e};this.setData({custom:o,line:t,color:i,size:l,type:a,endText:n,loadingText:s,show:!0})},wx.lin.hideLoadmore=()=>{this.setData({show:!1})}},onLoadmore(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-loading":"../loading/index"}}
\ No newline at end of file
<slot name="content"/>
<view bindtap="onLoadmore" wx:if="{{show}}">
<view wx:if="{{custom && type==='end'}}">
<slot name="end"/>
</view>
<view wx:elif="{{custom && type==='loading'}}">
<slot name="loading"/>
</view>
<view class="loading l-class" wx:else>
<view class="line loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view>
<view class="rotate loading-view" style="border-color: {{color}};width:{{size}}rpx;height:{{size}}rpx" wx:if="{{type=='loading'}}"></view>
<view class="loading-text l-loading-class loading-view" style="color:{{color}};font-size:{{size}}rpx" wx:if="{{type=='loading'}}">{{loadingText}}</view>
<view class="loading-text l-end-class loading-view" style="{{'color:'+color}};font-size:{{size}}rpx" wx:if="{{type=='end'}}">{{endText}}</view>
<view class="line l-line-class loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view>
</view>
</view>
.loadmore-container{display:flex;flex-direction:column;background-color:transparent}.loading{display:flex;flex-direction:row;width:100%;height:72rpx;align-items:center;justify-content:center;background-color:transparent}.loading .loading-view:nth-child(2){margin-left:36rpx}.loading-text{color:#bbb;font-size:28rpx;margin:0 12rpx}.line{width:80rpx;height:2rpx;background-color:#d1d3d7}.rotate{border-radius:50%;animation:rotate .7s linear infinite;height:28rpx;width:28rpx;border-top:4rpx solid #bbb;border-right:4rpx solid transparent!important;border-bottom:4rpx solid #bbb;border-left:4rpx solid #bbb;margin-left:12rpx}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";Component({behaviors:[zIndex],externalClasses:["l-class","l-mask-class"],properties:{show:{type:Boolean,value:!1},opacity:{type:[String,Number],value:.4},zIndex:{type:Number,value:99},center:{type:Boolean,value:!1},locked:{type:Boolean,value:!0},fullScreen:{type:String,value:""},NavColor:{type:String,value:""}},data:{},methods:{doNothingMove(){},onMaskTap(){!0!==this.data.locked&&this.setData({show:!1}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}},attached:function(){}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container-mask {{center? 'center' : ''}} l-class" hidden="{{ show? '' : 'hidden'}}" catchtouchmove="doNothingMove" catchtap="onMaskTap" style="z-index:{{zIndex}}; {{show? 'background: rgba(0,0,0,' + opacity+ ')' : ''}}">
<view class="mask-content l-mask-class">
<slot></slot>
</view>
</view>
\ No newline at end of file
.container-mask{position:fixed;top:0;left:0;width:100%;height:100%;transition:all .3s}.mask-bg{height:100%;width:100%;background:#fff;z-index:99}.mask-content{display:inline-block;z-index:101;overflow:hidden}.center{display:flex;flex-direction:row;align-items:center;justify-content:center}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";import watchShow from"../behaviors/watchShow";import validator from"../behaviors/validator";Component({behaviors:[zIndex,watchShow,validator],externalClasses:["l-class","l-image-class"],properties:{show:Boolean,icon:String,iconColor:{type:String,value:"#fff"},iconSize:{type:String,value:"28"},image:String,content:String,type:{type:String,value:"primary",options:["primary","warning","success","error"]},duration:{type:Number,value:1500},openApi:{type:Boolean,value:!0},top:{type:Number,value:0}},data:{status:!1},observers:{icon:function(){}},attached(){this.initMessage()},pageLifetimes:{show(){this.initMessage()}},methods:{initMessage(){wx.lin=wx.lin||{},wx.lin.showMessage=(t={})=>{const{content:e="",icon:i="",image:a="",type:s="primary",duration:o=1500,success:n=null,top:r=0}=t;return this.data.success=n,this.setData({content:e,icon:i,image:a,duration:o,type:s,top:r}),this.changeStatus(),this},wx.lin.hideMessage=()=>{this.setData({status:!1})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-message l-class {{'l-message-'+type}} {{status?'l-message-show':''}}" style="z-index:{{zIndex}};top:{{top}}rpx">
<block wx:if="{{status}}">
<view style="margin-right:15rpx">
<l-icon name="{{icon?icon:type}}" size="{{iconSize}}" color="{{type==='warning'?'#333':iconColor}}"/>
</view>
<image wx:if="{{image}}" src="{{image}}" class="l-message-image l-class-image"/>
{{content}}
<slot/>
</block>
</view>
.l-message{width:750rpx;height:72rpx;border-radius:0rpx 0rpx 16rpx 16rpx;display:flex;justify-content:center;align-items:center;position:fixed;left:50%;font-size:28rpx;color:#fff;opacity:0;box-shadow:0rpx 6rpx 16rpx 0rpx rgba(217,212,191,.5);transform:translateX(-50%) translateZ(0) translateY(-100%);transition:all .4s ease-in-out}.l-message-success{background-color:#34bfa3}.l-message-error{background-color:#f4516c}.l-message-warning{background-color:#ffe57f;color:#333}.l-message-primary{background-color:#85c5e1}.l-message-show{transform:translateX(-50%) translateZ(0) translateY(0);opacity:1}.l-message-image{width:30rpx;height:30rpx;margin-right:15rpx}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-icon-class"],properties:{type:{type:String,value:"still"},swipArr:Array,frontIconName:{type:String,value:""},frontIconSize:{type:Number,value:28},frontIconColor:{type:String,value:"#3683D6"},endIconName:{type:String,value:""},endIconSize:{type:Number,value:28},endIconColor:{type:String,value:"#3683D6"},backgroundcolor:{type:String,value:"#DFEDFF"},color:{type:String,value:"#3683D6"},speed:{type:Number,value:1500},show:{type:Boolean,value:!0},close:{type:Boolean,value:!1}},data:{wrapWidth:0,width:0,duration:0,animation:null,timer:null},detached(){this.destroyTimer()},ready(){"roll"===this.properties.type&&this.properties.show&&this.initAnimation()},methods:{async initAnimation(){const t=await nodeUtil.getNodeRectFromComponent(this,".l-noticebar-content"),i=await nodeUtil.getNodeRectFromComponent(this,".l-noticebar-content-wrap"),a=t.width/40*this.data.speed,e=wx.createAnimation({duration:a,timingFunction:"linear"});this.setData({wrapWidth:i.width,width:t.width,duration:a,animation:e},()=>{this.startAnimation()})},startAnimation(){if(0!==this.data.animation.option.transition.duration){this.data.animation.option.transition.duration=0;const t=this.data.animation.translateX(this.data.wrapWidth).step();this.setData({animationData:t.export()})}this.data.animation.option.transition.duration=this.data.duration;const t=this.data.animation.translateX(-this.data.width).step();setTimeout(()=>{this.setData({animationData:t.export()})},100);const i=setTimeout(()=>{this.startAnimation()},this.data.duration);this.setData({timer:i})},destroyTimer(){this.data.timer&&clearTimeout(this.data.timer)},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0}),this.setData({timer:null})},onSwip(t){this.triggerEvent("lintap",{...t.currentTarget.dataset},{bubbles:!0,composed:!0})},onIconTap(){this.triggerEvent("linicontap",{},{bubbles:!0,composed:!0}),this.setData({timer:null})},onClose(){this.setData({timer:null,show:!1})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view wx:if="{{ show }}" class="l-class l-noticebar" style="color: {{ color }}; background-color: {{ backgroundcolor }}">
<l-icon wx:if="{{ frontIconName }}" size="{{frontIconSize}}" color="{{frontIconColor}}" name="{{ frontIconName }}" class="l-noticebar-icon" l-class="l-icon-class"/>
<swiper autoplay vertical interval="{{4*speed}}" class="l-noticebar-content-wrap" wx:if="{{type=='swip'}}">
<block wx:for="{{swipArr}}" wx:key="swip">
<swiper-item data-index="{{index}}" bindtap="onSwip">
{{item}}
</swiper-item>
</block>
</swiper>
<view class="l-noticebar-content-wrap l-noticebar-content-wrap-view" wx:else>
<view class="l-noticebar-content" bindtap="handleTap" animation="{{ animationData }}">
<slot></slot>
</view>
</view>
<l-icon wx:if="{{ endIconName && !close }}" size="{{endIconSize}}" color="{{endIconColor}}" class="l-noticebar-operation" name="{{ endIconName }}" bindtap="onIconTap"/>
<l-icon wx:if="{{close}}" class="l-noticebar-operation" name="close" size="{{endIconSize}}" color="{{endIconColor}}" bindtap="onClose"/>
</view>
.l-noticebar{display:flex;height:72rpx;width:750rpx;line-height:72rpx;font-size:28rpx;color:#85c5e1;background-color:#dfedff;overflow:hidden;box-shadow:0 2px 5px 0 rgba(218,224,233,.4);border-radius:0 0 8px 8px}.l-noticebar-icon{display:flex;margin-left:20rpx;margin-right:18rpx;align-items:center}.l-noticebar-icon+.l-noticebar-content-wrap-view{margin-left:5rpx}.l-noticebar-operation{display:flex;margin-right:16rpx;margin-left:8rpx;align-items:center}.l-noticebar-content-wrap{display:flex;margin-left:5rpx;flex:1;height:72rpx;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.l-noticebar-content-wrap .l-noticebar-content{position:absolute;transition-duration:20s}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({behaviors:[zIndex,validator],externalClasses:["l-bg-class","l-panel-class","l-class"],properties:{show:{type:Boolean,value:!1},animation:{type:Boolean,value:!0},transition:{type:Boolean,value:null},contentAlign:{type:String,value:"center",options:["top","right","left","bottom","center"]},direction:{type:String,value:null,options:["top","right","left","bottom","center"]},locked:{type:Boolean,value:!1}},attached(){this._init()},pageLifetimes:{show(){this._init()}},data:{status:"show"},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showPopup=t=>{const{zIndex:e=99,animation:o=!0,contentAlign:i="center",locked:a=!1}={...t};this.setData({zIndex:e,animation:o,contentAlign:i,locked:a,show:!0})},wx.lin.hidePopup=()=>{this.setData({status:"hide"}),setTimeout(()=>{this.setData({show:!1})},300)}},doNothingMove(){},doNothingTap(){},onPopupTap(){!0!==this.data.locked&&(this.data.show?(this.setData({status:"hide"}),setTimeout(()=>{this.setData({show:!1,status:"show"})},300)):this.setData({show:!0,status:"show"})),eventUtil.emit(this,"lintap",!0)}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class='container-popup {{ show ? "popup-show" : "" }} {{ "l-popup-" + direction===null?contentAlign:direction }} l-class' style="z-index:{{zIndex}};" catchtouchmove="doNothingMove">
<view class="container-bg l-bg-class"></view>
<view wx:if="{{show}}" class="popup-content {{ show ? ((direction===null)?contentAlign:direction) : ''}} popup-fade-{{direction===null?contentAlign:direction}}-active-{{(transition===null?animation:transition) ? status:''}} l-panel-class" catchtap="onPopupTap">
<view catchtap="doNothingTap">
<slot></slot>
</view>
</view>
</view>
.popup-fade-center-active-show{animation:popup-center-fadein .3s forwards}.popup-fade-center-active-hide{animation:popup-center-fadeout .3s forwards}.popup-fade-top-active-show{animation:popup-top-fadein .3s forwards}.popup-fade-top-active-hide{animation:popup-top-fadeout .3s forwards}.popup-fade-left-active-show{animation:popup-left-fadein .3s forwards}.popup-fade-left-active-hide{animation:popup-left-fadeout .3s forwards}.popup-fade-right-active-show{animation:popup-right-fadein .3s forwards}.popup-fade-right-active-hide{animation:popup-right-fadeout .3s forwards}.popup-fade-bottom-active-show{animation:popup-bottom-fadein .3s forwards}.popup-fade-bottom-active-hide{animation:popup-bottom-fadeout .3s forwards}@keyframes popup-top-fadein{0%{transform:translate3d(0,-100%,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-top-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(0,-100%,0);opacity:.1}}@keyframes popup-left-fadein{0%{transform:translate3d(-100%,0,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-left-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(-100%,0,0);opacity:.1}}@keyframes popup-right-fadein{0%{transform:translate3d(100%,0,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-right-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(100%,0,0);opacity:.1}}@keyframes popup-bottom-fadein{0%{transform:translate3d(0,100%,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-bottom-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(0,100%,0);opacity:.1}}@keyframes popup-center-fadein{0%{transform:scale(.8);opacity:0}50%{transform:scale(1.1)}100%{transform:scale(1);opacity:1}}@keyframes popup-center-fadeout{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1)}100%{transform:scale(.8);opacity:0}}.container-popup{visibility:hidden;position:fixed;top:0;left:0;right:0;bottom:0}.popup-show{visibility:visible}.popup-show .container-bg{display:block;opacity:1}.container-bg{opacity:0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:6;background:rgba(0,0,0,.4);transition:all .3s ease-in-out}.popup-bg{height:100%;width:100%;position:absolute;z-index:90}.popup-content{position:absolute;z-index:100;width:100%;max-width:100%;height:100%}.center{display:flex;height:100%;width:100%;flex-direction:row;align-items:center;justify-content:center}.left{display:flex;flex-direction:row;height:100%}.right{display:flex;flex-direction:row;justify-content:flex-end;height:100%}.bottom{display:flex;flex-direction:column-reverse;width:100%}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-deleted-class","l-unit-class","l-value-class","l-class","l-decimal-class","l-dot-class"],behaviors:[validator],properties:{unit:{type:String,value:"¥"},size:{type:String,value:"28"},color:{type:String,value:"#3963BC"},bold:{type:String,value:"500"},unitColor:String,unitSize:String,unitBold:String,value:{type:String,value:"0.00"},mode:{type:String,value:"number",options:["number","text"]},valueColor:String,valueSize:String,valueBold:String,deleted:Boolean,delColor:String,reserveDigit:{type:Number,value:2},autofix:Boolean},data:{priceInteger:{type:String,value:"0"},priceDecimal:{type:String,value:"00"}},observers:{value:function(){this.reserveNumber()}},methods:{reserveNumber(){this.setData({priceInteger:null,priceDecimal:null});const e=Number(this.data.value);if(!(isNaN(Number(e))||"text"===this.data.mode)&&this.data.autofix){const t=e.toFixed(this.data.reserveDigit).toString().split(".");this._setPrice(t)}else{const e=this.data.value.split(".");this._setPrice(e)}},_setPrice(e){if(1===e.length)this.setData({priceInteger:e[0]});else{if(2!==e.length)throw"price 格式有误,请仔细检查!";this.setData({priceInteger:e[0],priceDecimal:e[1]})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class='price-container l-class {{deleted ? "price-del l-deleted-class" : ""}}' style="color: {{delColor?delColor:color}}">
<text class="l-unit-class" style="color: {{unitColor?unitColor:color}}; font-size: {{unitSize?unitSize:size}}rpx; font-weight: {{unitBold?unitBold:bold}}">{{unit}}</text>
<text class="l-value-class" style="color: {{valueColor?valueColor:color}}; font-size: {{valueSize?valueSize:size}}rpx; font-weight: {{valueBold?valueBold:bold}}">{{priceInteger}}<text class="l-dot-class">{{priceDecimal?'.':''}}</text><text class="l-decimal-class">{{priceDecimal?priceDecimal:''}}</text></text>
</view>
.price-del{text-decoration:line-through!important}.price-container{display:inline-block;text-align:center;color:#85c5e1;font-size:28rpx}
\ No newline at end of file
import{px2rpx}from"../utils/util.js";import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-text-class","l-active-class","l-background-class"],behaviors:[validator],properties:{percent:{type:Number,value:0},strokeWidth:{type:Number,value:12},borderRadius:{type:Number,value:6},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},showInfo:{type:Boolean,value:!1},textPosition:{type:String,value:"right",options:["left","right"]},textColor:{type:String},interval:{type:Number,value:20},active:{type:Boolean,value:!1},duration:{type:Number,value:30}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{_slotWidth:0,_slotHeight:0,_progressWidth:0,_progressHeight:0,_marginBottom:0,marginLeft:0,marginTop:0,_useSlot:!1},observers:{"_slotWidth, _slotHeight, _progressWidth, _progressHeight, percent,_useSlot":function(t,e,r,i,s,a){if(a){const a=-(e-i)/2,o=(r-t)*s/100;this.setData({marginTop:a,marginLeft:o})}}},lifetimes:{attached(){this.data.percent>100&&this.setData({percent:100});wx.createSelectorQuery().in(this).select(".slot").boundingClientRect(t=>{let e=this.data._useSlot;t.width&&(e=!0),this.setData({_useSlot:e,_slotWidth:px2rpx(t.width),_slotHeight:px2rpx(t.height)})}).exec();wx.createSelectorQuery().in(this).select(".progress").boundingClientRect(t=>{this.setData({_progressHeight:px2rpx(t.height),_progressWidth:px2rpx(t.width)})}).exec();const t=this.data.percent;let e=0;this.data.active&&setInterval(()=>{e<t&&(e+=1,this.setData({percent:e}))},this.data.duration)}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container l-class">
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='left'}}" style="color:{{textColor?textColor:''}};margin-right:{{interval}}rpx">
{{percent}}%
</view>
<view class="progress short" style="height:{{strokeWidth}}rpx;">
<view class="slot" style="margin-left:{{marginLeft}}rpx;margin-top:{{marginTop}}rpx;">
<slot name="header"></slot>
</view>
<view class="percent {{activeColor?'':'active'}} l-active-class" style="width:{{percent}}%;height:{{strokeWidth}}rpx;border-radius:{{borderRadius}}rpx;{{activeColor?'background-color:'+activeColor+';':''}}"></view>
<view class="background l-background-class" style="height:{{strokeWidth}}rpx;border-radius:{{borderRadius}}rpx;background-color:{{backgroundColor}};"></view>
</view>
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='right'}}" style="color:{{textColor?textColor:''}};margin-left:{{interval}}rpx">
{{percent}}%
</view>
</view>
\ No newline at end of file
.container{display:flex;flex-direction:row;align-items:center}.progress{position:relative;width:100%;transition:all .25s ease-in-out}.percent{position:absolute;z-index:1}.active{background-color:#85c5e1}.text{color:#85c5e1;font-size:30rpx}.background{position:absolute;width:100%}.header{position:absolute!important;z-index:2}.slot{position:absolute;z-index:2}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({externalClasses:["l-class","l-error-text","l-error-text-class"],behaviors:["wx://form-field",rules],relations:{"../radio/index":{type:"child",linked(){this.init()},linkChanged(){},unlinked(){this.init()}}},properties:{current:{type:String},noneChecked:{type:Boolean,value:!0},placement:{type:String,value:"column"}},data:{currentLength:0},methods:{checkedKeyRepeat(e){let t=e.map(e=>e.data.key);const r=this.isRepeat(t);if(!1!==r)throw new Error("keys有重复元素, radio的key属性不能重复:"+r)},isRepeat(e){let t={};for(let r in e){if(t[e[r]])return e[r];t[e[r]]=!0}return!1},init(){const e=this.getRelationNodes("../radio/index");this.checkedKeyRepeat(e),this.onChangeHandle(e)},onChangeHandle(e){e.forEach(e=>{let t=this.properties.current===e.data.key;e.setChecked(t,e.data.key)})},onEmitEventHandle(e,t){this.properties.current=t?e.key:null;const r=this.getRelationNodes("../radio/index");this.onChangeHandle(r),Object.assign(e,{currentKey:this.properties.current}),this.validatorData({[this.data.name]:this.data.current}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.current},reset(){this.data.current=""}},observers:{current:function(){this.init()}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-radio":"../radio/index"}}
\ No newline at end of file
<view class="l-class radio-group radio-group-{{placement}}">
<slot></slot>
</view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.radio-group{width:100%}.radio-group-row{display:flex;flex-direction:row}.radio-group-column{display:flex;flex-direction:column}
\ No newline at end of file
Component({externalClasses:["l-class","l-disabled-class"],behaviors:["wx://form-field"],relations:{"../radio-group/index":{type:"parent"}},properties:{key:String,cell:Object,size:{type:String,value:"38rpx"},disabled:{type:Boolean},custom:Boolean,color:{type:String,value:"#ccc"},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},placement:{type:String,value:"left"},transition:{type:Boolean,value:!0}},data:{checked:!1},methods:{setChecked(e){this.setData({checked:e})},onRadioChangeTap(){if(this.properties.disabled)return;const e=this.getRelationNodes("../radio-group/index")[0],t=e.properties.noneChecked;let r=!0;if(this.isCurrentSelectedKey(e)&&(r=!1,!t))return;const i=!this.data.checked;this.data.checked=i;const s={checked:i,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(s,r)},isCurrentSelectedKey(e){return e.properties.current===this.properties.key}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view bind:tap="onRadioChangeTap" class="label label-{{placement}} {{disabled?'label-disabled l-disabled-class':'l-class'}}">
<view class="radio" style="color:{{checked?selectColor:(disabled?disabledColor:color)}};font-size:{{size}}">
<slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked?'icon-select':'icon-unselect'}}"></view>
</view>
<slot/>
</view>
\ No newline at end of file
.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.radio{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABwQAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBaIFyATYCJAMMCwgABCAFhG0HOxs9BsgekiQlqiBBkCKqgBDbFA9f+72eu7sf0SUKUEYCjq8CJBWhqlrpakx5POtO5RtaczeTEm4dEZ0nl3vZ/P4QsbZQwBuhkJZZe0ElkSkAzf+5nN4oP2/Mb1kucw086gUYBxToHtgmK5FAPIXhtYt1GOcJtC1qIDsxOz1Aq6DTAvGYpZNAm4sqilRoCvWatUW8V9NMb9Mt4F34/firLbQktYzOPXN3MgNGfhz/9uXVatVlHyGbzw1pExlbgEJcrfWep4izWxTahlppdgJ1RUhzJaqKUGrq6zv94yWijtZ3wRo06aZkroDgZ58ENGRb3WvkdwEvYZyONecufVjvlP/yCN9e6dcv/syKok+S/ILg5fk4v+4VjvzShk88ZPlDX7WRthx5hXV881Hg5krDX9Z84j7MqK4cjZR1JuLFnjJtMX7ePssP3xVQnfFiKPkScCUeVTcdonq0qYhT/P/M8y4Q5ZkuBeY3m1/gqWk5FFo2LcA/s72GnXZzDSQAVPNPvhv+Qobg0R/V/2uDnX/NTgHftl/fyIRqAfkuAJr34wv+r6xnVzEV1JaLLnWltj9bvld3AmI5oEKDYy/j9bPeaUIzJ5MgaViArGkJLdQtqOnYhrqmfWjbZNncMYEpRGlhwxaBMHQNSd8HyIbqaKE+Q83cH9QNQwFtZ2OyZ8dKsPpjjJIEZWBqDrLpUpFyHEQfNboQPZVP4qwiZPsQ5tgEbG1qKRYsqIjwHAu4abqNEApSuFSAZnIZyudLsIxLWZQmTQwh5b7mZqruTU3pUgHoHcOQJALJgFLmQKy0kiLK70/oS593QWhT8pJwC6kh7INgHHZ4qFWTlh6oRVvsRbqXazjTaG0IggJRsJICyExGIXl5JVC5flQWkkY0YUaky/o0s15UX23T+vrC9x2ANrogR4ocRfNNkUP5u9SpAwsAAAAA') format('woff2')}.icon-unselect:before{content:"\e6a1"}.icon-select:before{content:"\e73a"}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";Component({externalClasses:["l-class","l-class-icon","l-class-image","l-icon-class","l-image-class"],options:{multipleSlots:!0},properties:{count:{type:Number,value:5},score:{type:Number,value:0},size:{type:String,value:"36"},disabled:Boolean,activeColor:{type:String,value:"#FF5252"},inActiveColor:{type:String,value:"#FFE5E5"},name:{type:String,value:"favor-fill"},activeImage:String,inActiveImage:String},data:{},methods:{handleClick(e){if(this.data.disabled)return;const{index:t}=e.currentTarget.dataset;this.setData({score:t+1}),this.triggerEvent("linchange",{score:t+1}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.score},reset(){this.setData({score:0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"} }
\ No newline at end of file
<view class="l-rate l-class">
<view wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" bindtap="handleClick">
<view class="icon-checked" wx:if="{{score > index}}" hover-class="none" hover-stop-propagation="false" data-rate="{{score-index}}" style="width:{{score-index<1?(score-index)*100:100}}%">
<image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{activeImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{activeColor}}"/>
</view>
<image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{inActiveImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{inActiveColor}}"></l-icon>
</view>
</view>
\ No newline at end of file
.l-rate,.l-rate-star{display:inline-flex}.l-rate-star{position:relative}.l-rate-star~.l-rate-star{margin-left:10rpx}.icon-checked{position:absolute;overflow:hidden}.image-item{width:80rpx;height:80rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-container-class","l-placeholder-class","l-icon-class","l-input-class","l-cancel-class"],behaviors:[validator],options:{multipleSlots:!0},properties:{confirmType:{type:String,value:"search"},placeholder:String,cancelText:{type:String,value:"取消"},frontText:String,custom:Boolean,value:String,type:String,icon:{type:String,value:"research"},iconColor:{type:String,value:"#bdbdbd"},iconSize:{type:String,value:"28"},bgColor:{type:String,value:"#f3f3f3"},showCancel:{type:Boolean,value:!0},shape:{type:String,value:"primary",options:["circle","primary"]},textAlign:{type:String,value:"left",options:["left","right"]},focus:Boolean,clear:{type:Boolean,value:!0},maxlength:{type:Number,value:140},disabled:Boolean,placeholderStyle:String},data:{},methods:{onCancel(){this.triggerEvent("lincancel",{},{bubbles:!0,composed:!0})},handleInputChange(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linchange",t)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linconfirm",t)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail,{bubbles:!0,composed:!0})},handleTapFrontText(e){this.triggerEvent("linfronttap",e.detail)}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-input":"../input/index","l-icon":"../icon/index"}}
\ No newline at end of file
<view class="search-bar l-container-class">
<slot name="before"/>
<view wx:if="{{frontText}}" class="icon-container" bind:tap="handleTapFrontText">
<text class="city">{{frontText}}</text>
<l-icon name="down" color="#333" size="22"/>
</view>
<view class="search-input l-class {{'search-input-'+ shape}}" style="{{'background-color:'+bgColor}}">
<slot wx:if="{{custom}}" name="icon"/>
<l-icon wx:else name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}" l-class="l-icon-class"/>
<input confirm-type="{{confirmType}}" class="input l-input-class {{'input'+ TextAlign}}" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class l-placeholder-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<view class="close-wrap" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close">
<l-icon name="close" color="#fff" size="15"/>
</view>
</view>
</view>
<view wx:if="{{showCancel}}" class="cancel l-cancel-class" bindtap="onCancel">
{{cancelText}}
</view>
<slot name="after"/>
</view>
.search-bar{display:flex;flex-direction:row;align-items:center;padding:0 20rpx;box-sizing:border-box;width:100%}.search-input{height:60rpx;background-color:#f3f3f3;display:flex;flex-direction:row;flex:1;align-items:center;padding-left:30rpx;box-sizing:border-box}.search-input-primary{border-radius:8rpx}.search-input-circle{border-radius:30rpx}.cancel{font-size:28rpx;color:#666;display:flex;align-items:center;width:60rpx;justify-content:center;height:60rpx;margin-left:15rpx}.input{height:40rpx;line-height:40rpx;flex:1;margin-left:15rpx;font-size:28rpx;color:#666}.input-center{text-align:center}.input-left{text-align:left}.close-wrap{padding:10rpx}.close{height:30rpx;width:30rpx;background:#ddd;display:flex;align-items:center;justify-content:center;border-radius:50%;padding-top:3rpx;box-sizing:border-box;margin-right:15rpx}.pls-class{color:#bdbdbd;font-size:28rpx}.icon-container{display:flex;flex-direction:row;align-items:center;margin-right:15rpx}.city{font-size:28rpx;color:#333;margin-right:10rpx}
\ No newline at end of file
Component({options:{multipleSlots:!0},relations:{"../segment/index":{type:"parent",linked(){},unlinked(){}}},properties:{tab:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"},dotBadge:Boolean,badgeCount:{type:Number},badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"}},observers:{"**":function(e){this.updateData(e)}},data:{},methods:{updateData(e){let t=this.getRelationNodes("../segment/index")[0];if(!t)return;const a=t.data.tabList;if(!(a&&a.length>0))return;const n=a.findIndex(e=>e.key===this.data.key);a[n]=e,t.setData({tabList:a},()=>{t.data.scrollable&&t.queryMultipleNodes()})}}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<slot></slot>
\ No newline at end of file
import scrollCenter from"../behaviors/scrollCenter";Component({behaviors:[scrollCenter],externalClasses:["l-class","l-header-class","l-class-active","l-active-class","l-class-inactive","l-inactive-class","l-class-tabimage","l-tab-image-class","l-class-header-line","l-header-line-class","l-class-line","l-line-class","l-class-icon","l-icon-class","l-class-badge","l-badge-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../segment-item/index":{type:"child",linked(e){this.initTabs(e)}}},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},scrollable:Boolean,hasLine:{type:Boolean,value:!0},animatedForLine:Boolean,activeColor:{type:String},inactiveColor:{type:String},equalWidth:{type:Boolean,value:!0},even:{type:Boolean,value:!0},width:Number,height:Number,itemHeight:Number,itemWidth:Number},observers:{activeKey:function(e){if(!e)return;const t=this.data.tabList.findIndex(t=>t.key===e);this.setData({currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},data:{_cells:[],tabList:[],currentIndex:0,_segmentItemInstances:[]},methods:{initTabs(e){const t=this.data.activeKey;let a=this.getRelationNodes("../segment-item/index");if(a.length>0){if(a.length===this.data.tabList.length&&this.data._segmentItemInstances.indexOf(e)>0)return;let s=t,l=this.data.currentIndex,i=[];const n=a.map((e,a)=>(s=t||0!==a?s:e.data.key,l=e.data.key===s?a:l,i[a]=e.dataset.cell,{...e.data}));this.setData({_cells:i,activeKey:s,tabList:n,currentIndex:l,_segmentItemInstances:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},handleChange(e){const t=e.currentTarget.dataset.key,a=e.currentTarget.dataset.index;this._setChangeData({activeKey:t,currentIndex:a})},_setChangeData({activeKey:e,currentIndex:t}){this.setData({activeKey:e,currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:e,currentIndex:t,cell:this.data._cells[t]})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-segment-item":"../segment-item/index"}}
\ No newline at end of file
<view class="l-tabs l-class {{'l-placement-'+placement}} {{placement==='left'||placement==='right'?'l-tabs-vertical':'l-tabs-horizontal'}} {{scrollable ? 'l-tabs-scroll':''}}" style="{{width?'width:'+ width +'rpx;':'' }}{{height?'height:'+height+'rpx':''}}">
<scroll-view scroll-x="{{placement==='top'||placement==='bottom' && scrollable}}" scroll-y="{{placement==='left'||placement==='right' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll l-header-class {{hasLine?'l-tabs-header-line l-class-header-line l-header-line-class':''}}" style="{{width?'width:'+ width +'rpx;':'' }} {{height?'height:'+height+'rpx':''}}">
<view class="l-tabs-header {{( even && equalWidth)?'l-tabs-equal-header':'l-tabs-unequal-header'}}">
<block wx:for="{{tabList}}" wx:key="key">
<view wx:if="{{item.tab}}" class="l-tabs-item {{( even && equalWidth)?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}};{{itemWidth?'width:'+ itemWidth +'rpx':'' }};{{itemHeight?'height:'+itemHeight+'rpx':''}}" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<l-badge l-self-class="badge-view" l-class="l-class-badge l-badge-class" wx:if="{{(item.badgeCount > 0 || item.dotBadge )}}" value="{{item.badgeCount}}" dot="{{item.dotBadge}}" max-count="{{item.badgeMaxCount}}" number-type="{{item.badgeCountType}}">
<template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}"/>
</l-badge>
<template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}" wx:else/>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
<view wx:else class="l-tabs-item {{(even && equalWidth)?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<slot name="{{item.key}}"></slot>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</block>
</view>
</scroll-view>
</view>
<template name="tab-item">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tab-image-class"/>
<l-icon wx:if="{{item.icon}}" l-class="l-class-icon l-icon-class {{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" color="{{item.key===activeKey?activeColor:inactiveColor}}" size="{{item.iconSize}}"/>
{{item.tab}}
</template>
.l-tabs{overflow:auto;width:100%}.l-tabs-header{display:flex;width:100%;flex-direction:row;align-items:center}.l-tabs-header .l-tabs-item{font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs-header .l-icon-active,.l-tabs-header .l-tabs-active{color:#333}.l-tabs-header .l-icon-active,.l-tabs-header .l-icon-inactive{font-size:28rpx}.l-tabs-header .l-icon-inactive,.l-tabs-header .l-tabs-inactive{color:#bbb}.l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-bottom,.l-placement-top{height:80rpx}.l-placement-bottom .l-tabs-header,.l-placement-top .l-tabs-header{height:100%}.l-placement-bottom .l-tabs-header .l-tabs-item,.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-placement-right{flex-direction:row-reverse}.l-placement-bottom{flex-direction:column-reverse}.l-tabs-vertical .l-tabpanel-swiper{height:initial}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible}.l-tabs-vertical{width:160rpx}.l-tabs-vertical .l-tabsscroll{width:160rpx;box-sizing:border-box}.l-tabs-vertical .l-tabs-equal-header{height:100%}.l-tabs-vertical .l-tabs-header{width:100%;flex-direction:column;-webkit-overflow-scrolling:touch;white-space:nowrap;overflow-x:hidden}.l-tabs-vertical .l-tabs-header .l-tabs-item.l-tabs-active{background:#fff}.l-tabs-vertical .l-tabs-header .l-tabs-unequal-width{height:80rpx}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;background:#f6f8fa;width:100%}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;background:#000}.l-tabs-horizontal .l-tabs-equal-width{flex:1}.l-tabs-horizontal .l-tabs-unequal-width{padding:0 20rpx}.l-tabs-horizontal .l-tabsscroll{height:100%;box-sizing:border-box}.l-tabs-horizontal .l-tab-line{height:4rpx;width:0;left:100%;right:0;margin:0 auto}.l-tabs-horizontal .l-line-aminmated{transition:.2s all linear}.l-tabs-horizontal .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{left:0}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;left:0}.l-tabs-horizontal .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0;transform:translateY(-100%)}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-placement-bottom .l-tab-line{top:0}.l-placement-bottom .l-tabs-header-line{border-top:1px solid #f3f3f3}.l-tabs-vertical .l-tab-line{width:6rpx;height:0;border-radius:0 6rpx 6rpx 0;top:0;margin:auto 0}.l-tabs-vertical .l-line-aminmated{transition:.2s all linear}.l-tabs-vertical .l-tabs-active .l-tab-line{height:40rpx}.l-tabs-vertical .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-tabs-vertical .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{height:0;top:0}.l-placement-left .l-tab-line{right:auto}.l-placement-left .l-tabs-header-line{border-left:1px solid #f3f3f3}.l-placement-right .l-tab-line{right:0;left:auto}.l-placement-right .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-bottom{flex-direction:column-reverse}.l-tab-image-placement-left{flex-direction:row}.l-tab-image-placement-right{flex-direction:row-reverse}.l-tabs-header .badge-view{top:-20rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-title-class","l-avatar-class","l-row-class"],behaviors:[validator],properties:{loading:{type:Boolean,value:!0},title:{type:Boolean,value:!0},paragraph:{type:Boolean,value:!0},active:{type:Boolean,value:!0},avatar:Boolean,titleWidth:String,avatarSize:String,avatarShape:{type:String,value:"circle",options:["circle","square"]},rowsWidth:{type:Array,optionalTypes:[Array,String],value:"60%"},rowsHeight:{type:Array,optionalTypes:[Array,String],value:"34rpx"},rows:Number},observers:{"rows,rowsWidth,rowsHeight":function(t,a,e){this._getResult(t,a,"rowsW","100%"),this._getResult(t,e,"rowsH","34rpx"),this._toRows(t)}},data:{},methods:{_arrRepeat(t,a){const e=[];for(let r=0;r<a-1;r++)e.push(t);return e},_getResult(t,a,e,r){if(Array.isArray(a))this.data[e]=a;else{const s=this._arrRepeat(r,t);s.push(a),this.data[e]=s}},_toRows(t){let a=[];for(let e=0;e<t;e++)a.push({width:this.data.rowsW[e],height:this.data.rowsH[e]});this.setData({r:a})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view wx:if="{{loading}}" class="l-skeleton-container l-class">
<view wx:if="{{avatar}}" class="l-avatar-class l-skeleton-avatar bg {{active?'active':''}} l-skeleton-avatar-{{avatarShape}}" style="width:{{avatarSize}};height:{{avatarSize}}"></view>
<view class="l-skeleton-right">
<view wx:if="{{title}}" class="l-skeleton-title-container" style="height:{{avatarSize}}">
<view class="l-skeleton-title bg {{active?'active':''}}" style="height:{{titleHeight}}"></view>
</view>
<view wx:if="{{paragraph}}" wx:for="{{r}}" wx:key="index" class="l-row-class l-skeleton-rows bg {{active?'active':''}}" style="height:{{item.height}};width:{{item.width}}"></view>
</view>
</view>
<slot wx:else/>
\ No newline at end of file
.l-skeleton-container{width:100%;display:flex;flex-direction:row;box-sizing:border-box}.l-skeleton-avatar{height:72rpx;width:72rpx;margin-right:20rpx}.l-skeleton-avatar-circle{border-radius:50%}.l-skeleton-right{display:flex;flex-direction:column;flex:1}.l-skeleton-title{width:100%;height:34rpx}.l-skeleton-title-container{height:72rpx;width:50%;display:flex;align-items:center}.l-skeleton-rows{margin-top:20rpx}.bg{background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%}.active{animation:loading 1.4s ease infinite}@keyframes loading{0%{background-position:100% 50%}100%{background-position:0 50%}}
\ No newline at end of file
const _windowWidth=wx.getSystemInfoSync().windowWidth;Component({options:{multipleSlots:!0},properties:{width:{type:Number,value:_windowWidth},height:{type:Number,value:100},slideWidth:{type:Number,value:0},threshold:{type:Number,value:0},disabled:{type:Boolean,value:!1},autoClose:{type:Boolean,value:!1},close:{type:Boolean,value:!1,observer:function(t){t&&(this.setData({popup:!1,x:0}),this.onCloseTap())}}},data:{viewWidth:_windowWidth,x:0,out:!1},ready(){this.updateRight()},methods:{updateRight(){const t=this;wx.createSelectorQuery().in(this).select(".right").boundingClientRect((function(e){t._slideWidth=e.width;let i=e.width<=50?e.width:50;t._threshold=t.properties.threshold?t.properties.threshold:i,t._viewWidth=t.data.width+e.width*(750/_windowWidth),t.setData({viewWidth:t._viewWidth})})).exec()},onTouchStart(t){this._startX=t.changedTouches[0].pageX},onTouchEnd(t){if(this.properties.disabled)return;this._endX=t.changedTouches[0].pageX,this._length=this._endX-this._startX;const{_endX:e,_startX:i,_threshold:s}=this;this._length>s&&(this.setData({popup:!1,x:0}),this.onCloseTap()),e>i&&!1===this.data.out||(i-e>=s?(this.setData({x:-this._slideWidth,popup:!0,close:!1}),this.onOpenTap()):i-e<s&&i-e>0&&!0!==this.data.popup||e-i>=s?(this.setData({x:0}),this.onCloseTap()):e-i<s&&e-i>0&&(this.setData({x:-this._slideWidth,close:!1}),this.onOpenTap()))},onChange(t){!this.data.out&&t.detail.x<-this._threshold?this.setData({out:!0}):this.data.out&&t.detail.x>=-this._threshold&&this.setData({out:!1})},onRightTap(){this.properties.autoClose&&(this.setData({popup:!1,x:0}),this.onCloseTap()),this.triggerEvent("lintap","click right",{bubbles:!0,composed:!0})},onOpenTap(){this.triggerEvent("slideopen",!0,{bubbles:!0,composed:!0})},onCloseTap(){this.triggerEvent("slideclose",!1,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<movable-area class="container" style="width: {{width}}rpx; height: {{height}}rpx;">
<movable-view direction="horizontal" class="movable-content" out-of-bounds="{{out}}" damping="20" disabled="{{disabled}}" x="{{x}}" style="width: {{width + slideWidth}}rpx; height: {{height}}rpx;" inertia bindtouchend="onTouchEnd" bindtouchstart="onTouchStart" bindchange="onChange">
<view class="left" style="width: {{width}}rpx; height: {{height}}rpx;">
<slot name="left"></slot>
</view>
<view class="right" bindtap="onRightTap" style="width: {{slideWidth}}rpx; height: {{height}}rpx;">
<slot name="right"></slot>
</view>
</movable-view>
</movable-area>
\ No newline at end of file
.movable-content{display:flex;direction:row;overflow:hidden}.container{overflow:hidden}
\ No newline at end of file
Component({externalClasses:["l-class"],properties:{color:String,show:Boolean,type:{type:String,value:"flash"},custom:Boolean,size:{type:String,value:"default"}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view wx:if="{{show}}" class="{{type==='flash'?'l-class':''}} {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
</block>
</view>
.spinner-flash-default{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-default{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-default{width:50rpx;height:50rpx}.spinner-change-mini{width:30rpx;height:30rpx}.spinner-change-large{width:70rpx;height:70rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#85c5e1;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#85c5e1;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#85c5e1;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}
\ No newline at end of file
Component({externalClasses:["l-class","l-image-class","l-button-class","l-describe-class"],properties:{show:Boolean,type:{type:String,value:"success",observer:"_changeStatus"},image:String,describe:String,buttonText:String,bgColor:{type:String,value:"#fff"},fullScreen:{type:Boolean,value:!0},openApi:{type:Boolean,value:!0},custom:{type:Boolean,value:!1}},data:{},attached(){this._changeStatus(),this.data.openApi&&this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showStatusShow=e=>{const{type:t="success",image:a="",describe:s="",buttonText:i="",bgColor:r="#fff",fullScreen:o=!0}={...e};this.setData({show:!0,type:t,image:a,describe:s,buttonText:i,bgColor:r,fullScreen:o})},wx.lin.hideStatusShow=()=>{this.setData({show:!1})}},_changeStatus(){switch(this.properties.type){case"success":this.setData({typeImage:"image/success.png",typeText:"操作成功~"});break;case"error":this.setData({typeImage:"image/error.png",typeText:"操作失败~"});break;case"cart":this.setData({typeImage:"image/cart.png",typeText:"购物车空空如也,去逛逛吧~"});break;case"order":this.setData({typeImage:"image/order.png",typeText:"您暂时还没有订单哦~"});break;case"network":this.setData({typeImage:"image/network.png",typeText:"糟糕!网络错误~"});break;case"address":this.setData({typeImage:"image/address.png",typeText:"您暂时还没有地址哦~"});break;case"product":this.setData({typeImage:"image/product.png",typeText:"暂时还没有商品哦~~"});break;case"data":this.setData({typeImage:"image/data.png",typeText:"暂时还没有相关数据哦~~"});break;default:console.warn(this.data.type+" is not a valid value")}},tapStatusShow(){this.triggerEvent("lincorvertap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-button":"../button/index"}}
\ No newline at end of file
<view wx:if="{{show}}" class="l-status-container l-class {{fullScreen ? 'content': ''}}" style="{{'background:'+bgColor}};{{fullScreen ?'align-items:center;':''}}" bind:tap="tapStatusShow">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<image wx:if="{{image}}" class="left-img l-image-class {{fullScreen ? 'image_margin_top': ''}}" src="{{image}}"></image>
<image wx:else class="{{type=='success'||type=='error'?'left-img':'top-img'}} {{type=='address'?'ad-img':''}} l-image-class {{fullScreen ? 'image_margin_top': ''}}" src="{{typeImage}}"></image>
<text wx:if="{{describe}}" class="status-text l-describe-class">{{describe}}</text>
<text wx:else class="status-text l-describe-class">{{typeText}}</text>
<l-button l-class="l-button-class button_margin_top" wx:if="{{buttonText}}">
<view>{{buttonText}}</view>
</l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='network'}}">
<view>重新加载</view>
</l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='cart'}}">
<view>去逛逛</view>
</l-button>
</block>
</view>
\ No newline at end of file
.l-status-container{background-color:#fff;flex-direction:column;display:flex;justify-content:center}.content{position:fixed;top:0;left:0;background:#fff;height:100%;width:100%}.ad-img{width:198rpx!important;height:204rpx!important}.top-img{width:264rpx;height:204rpx}.left-img{width:120rpx;height:184rpx}.image_margin_top{margin-top:-250rpx}.status-text{font-size:30rpx;color:#45526b;margin-top:40rpx}.button_margin_top{margin-top:80rpx}
\ No newline at end of file
Component({externalClasses:["l-class","l-step-class","l-title-class","l-describe-class","l-line-class"],options:{multipleSlots:!0},relations:{"../steps/index":{type:"parent"}},properties:{icon:String,title:String,describe:String,iconSize:{type:Number,value:24},iconColor:String,custom:Boolean},data:{},methods:{updateDataChange(e){this.setData({...e})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="step {{'step-'+direction}} l-class" style="{{direction==='row'?'width:'+(1/length)*stepsWidth+'px':'min-height:'+stepMinHeight+'rpx'}}">
<view class="step-container l-step-class {{'step-container-'+direction}}">
<view wx:if="{{custom}}" class="step-custom">
<slot name="dot"/>
</view>
<view wx:else class="l-step-class {{dot && !icon?'step-dot-'+currentStatus.setStatus(activeIndex,index,status)+' step-dot':'step-'+currentStatus.setStatus(activeIndex,index,status)+' step-icon'}}" style="{{dot?currentStatus.dotStyle(activeIndex,index,color):currentStatus.statusStyle(activeIndex,index,color,status)}}">
<l-icon wx:if="{{icon}}" name="{{icon}}" size="{{iconSize}}" color="{{(currentStatus.setStatus(activeIndex,index,status))==='process'?'#3963BC':iconColor}}"/>
<block wx:if="{{!dot && !icon}}">
<view wx:if="{{currentStatus.setStatus(activeIndex,index,status)==='error' || currentStatus.setStatus(activeIndex,index,status)==='finish'}}" class="iconfont icon-{{currentStatus.setStatus(activeIndex,index,status)}}"></view>
<block wx:else>{{index+1}}</block>
</block>
</view>
</view>
<view class="step-content {{'step-content-'+direction}}">
<view class="l-title-class {{activeIndex===index?'step-title-process':'step-title'}}">
{{title}}
</view>
<view class="l-describe-class step-describe">
{{describe}}
<slot name="describe"/>
</view>
</view>
<view class="step-line l-line-class {{'step-line-'+ direction}} {{activeIndex>index?'step-line-finish':'step-line-wait'}}" style="{{activeIndex>index?('background-color:'+color):''}}" wx:if="{{length !== index+1}}">
</view>
</view>
<wxs module="currentStatus">
var setStatus = function(activeIndex,index,status){
if(activeIndex===index){
return status || 'process'
} else if(activeIndex>index){
return 'finish'
}else{
return 'wait'
}
}
var statusStyle = function(activeIndex,index,color,status){
if(activeIndex===index){
return status==='error'?'':('background-color:' + color)
} else if(activeIndex>index){
return ('border-color:' + color + ';color:' + color)
}else{
return ''
}
}
var dotStyle = function(activeIndex,index,color){
if(activeIndex>=index){
return ('background-color:' + color)
} else{
return ''
}
}
module.exports = {
setStatus:setStatus,
statusStyle:statusStyle,
dotStyle:dotStyle
}
</wxs>
\ No newline at end of file
.step{display:flex;position:relative}.step-custom{z-index:2}.step-row{flex-direction:column;align-items:center}.step-column{flex-direction:row;padding-left:30rpx;box-sizing:border-box}.step-container{display:flex;justify-content:center;z-index:2;align-items:center;background-color:#fff}.step-container-row{width:70rpx;height:40rpx}.step-container-column{height:60rpx;width:40rpx}.step-icon{width:40rpx;height:40rpx;display:flex;align-items:center;justify-content:center;font-size:22rpx;transition:.5s;box-sizing:border-box}.step-process{color:#fff;background-color:#85c5e1;border-radius:50%}.step-error{background-color:#fff;border:1px solid #f4516c;color:#f4516c;border-radius:50%}.step-finish{background-color:#fff;color:#85c5e1;border:1px solid #85c5e1;border-radius:50%}.step-wait{background-color:#fff;color:#c4c9d2;border:1px solid #c4c9d2;border-radius:50%}.step-dot{width:24rpx;height:24rpx;border-radius:50%;transition:.5s}.step-dot-process{background-color:#85c5e1}.step-dot-wait{background-color:#c4c9d2}.step-dot-error{background-color:#f4516c}.step-dot-finish{background-color:#85c5e1}.step-line{background:#c4c9d2;transition:.5s;position:absolute;z-index:0}.step-line-row{height:2rpx;width:100%;left:50%;top:18rpx}.step-line-column{width:2rpx;height:100%;top:20rpx;left:48rpx}.step-line-wait{background-color:#e8e8e8}.step-line-finish{background-color:#85c5e1}.step-content{display:flex;flex-direction:column}.step-content-row{align-items:center;width:100%}.step-content-column{margin-left:15rpx}.step-title{color:#595959;font-size:26rpx;line-height:40rpx;margin:10rpx 0}.step-title-process{color:#333;font-size:28rpx;line-height:40rpx;margin:10rpx 0}.step-describe{color:#8c98ae;font-size:22rpx}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABpQAAAJvAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgp8gQsBNgIkAwwLCAAEIAWEbQc2G9EFyK4wbuGJaCgrSmkBCSe/ZeUtviBzEXztx/bd3f+oNEiuzaerJhKN6WQSJFqlZELxTOZqTS9l0hsflgVC/bD3z/dzv8lMXAksyeryeByfVkhgV93EvwdIwC+b/hetH5jPyAA+z+X0JtCBXONbltMcw496AcYBBbYnRoEEXEQBcAqyOwK15PsEmg2KiewMTy6yCoWzLBD3lqGwilJKUaRqo1C37C3iRaUxPaUnPMffj18LUUFSZc7a3bshnfV++DD/2GVISBPo4QoZU5hCXLeWThULiSvWbCrpb64VIS2VhYlVpqU+6B8vETWnsxWM0XLiI19G8OGABDKoy5VBzDRje98gRHertt+2fLx2cdC6ZJwcnK226Ifh0uzy4vzK8sLSytxprqHAHexGbz8/6za6C3ePjwW29viP3ailnm7Zz+SntAd5IV0IBHuvvy3Xd/41thTw/osdBRahcefh4Gepwb5iah13LrrKV9mRrBsIJKhCjvrnxLq9Trf0wb2ERn0TIg0GcmSNhsjCTqHSYgm1RutoNmnkcIseUrEoTZiwRRA63SBp94as0zNZ2BdU+v2h1hnFaHYczWe2GAmrakCiQqiDmgdLEz73vFSVdM+jkXUVWdTG/DLK0MpCOpGqVkfQR7nEhjBnZIg4cCk8GCaPoesKCKSwUaOESRS0J5O87UUJTXisyjYJKQjSAVUesGgEHw+Hk6ra5+chQ5ZLIXsEDfllSApZ44O0hBRAjph8SPAoz4RyDBmEcICTBA8YJrOQyyWAoH2WDWlIgjmhEGiXdAdx1JTY3uL93xFo5kzMkSJHUT+g+5BNxVpWMAYAAA==') format('woff2')}.iconfont{font-family:iconfont!important;font-size:24rpx;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-finish:before{content:"\e600"}.icon-error:before{content:"\e6cf"}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],options:{multipleSlots:!0},relations:{"../step/index":{type:"child",linked(){this._initSteps()},unlinked(){this._initSteps()}}},properties:{direction:{type:String,value:"row",options:["row","column"]},activeIndex:{type:Number,value:0},color:String,stepMinHeight:{type:String,value:"120"},status:{type:String,value:"process",options:["process","error"]},dot:Boolean},observers:{activeIndex:function(){this._initSteps()}},data:{},methods:{_initSteps(){wx.createSelectorQuery().in(this).select(".steps-container").boundingClientRect().exec(t=>{let e=this.getRelationNodes("../step/index");this.data.length=e.length,this.data.length>0&&e.forEach((e,i)=>{e.updateDataChange({index:i,...this.data,stepsWidth:t[0].width})})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-step":"../step/index"}}
\ No newline at end of file
<view class="l-class steps-container {{'steps-container-'+direction}}">
<slot/>
</view>
\ No newline at end of file
.steps-container{display:flex;width:100%}.steps-container-row{flex-direction:row}.steps-container-column{flex-direction:column}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-header-wrapper-class","l-header-class","l-header-sticky-class","l-body-class"],options:{multipleSlots:!0},relations:{"../sticky/index":{type:"parent"}},properties:{top:{type:Number,value:0}},data:{mode:void 0,index:void 0,isFixedTop:!1,stickyItemTop:0,stickyItemHeight:0,stickyItemWrapperHeight:void 0},lifetimes:{ready:function(){const t=this.getParentComponent().data.mode;this.setData({mode:t})}},methods:{updateStickyItemPosition(t){const e=this.getParentComponent(),{index:i,stickyItemTop:s,stickyItemHeight:o,top:a}=this.data,n=t>s-a&&t<o+s-a;this.data.isFixedTop!==n&&(n?e.triggerEvent("linsticky",{index:i}):e.triggerEvent("linunsticky",{index:i}),this.setData({isFixedTop:n}))},async updateStickyItemBaseData(t){this.setData({index:t});const e=this.getParentComponent().data.scrollTop,i=await nodeUtil.getNodeRectFromComponent(this,".l-sticky-item");this.setData({stickyItemTop:i.top+e,stickyItemHeight:i.height});const s=await nodeUtil.getNodeRectFromComponent(this,".l-sticky-item-header");this.setData({stickyItemWrapperHeight:s.height})},getParentComponent(){const t=this.getRelationNodes("../sticky/index");if(0!==t.length)return t[0]}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-sticky-item l-class">
<view class="l-sticky-item-header-wrapper l-header-wrapper-class" style="height:{{isFixedTop&&stickyItemWrapperHeight?stickyItemWrapperHeight+'px':'auto'}}"></view>
<view style="{{mode==='js'?(isFixedTop?'position:fixed;':''):''}} top:{{top}}rpx" class="l-sticky-item-header l-sticky-item-header{{mode==='js'?(isFixedTop?'-fixed l-header-sticky-class':''):(mode==='css'?'-sticky l-header-sticky-class':'')}} l-header-class">
<slot name="header"></slot>
</view>
<view class="l-sticky-item-body l-body-class">
<slot name="body"></slot>
</view>
</view>
.l-sticky-item{display:flex;flex-direction:column}.l-sticky-wrapper{overflow:visible}.l-sticky-item-header{width:100%}.l-sticky-item-header-fixed{position:fixed;top:0}@supports (position:sticky){.l-sticky-item-header-sticky{position:sticky}}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],relations:{"../sticky-item/index":{type:"child",linked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},linkChanged(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},unlinked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})}}},properties:{mode:{type:String,value:"js",options:["js","css"]},scrollTop:Number},observers:{scrollTop:function(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},lifetimes:{attached(){this.checkSupportCssSticky().then(t=>{t||this.initSticky()}).catch(t=>{console.error(t)})}},methods:{initSticky(){wx.lin=wx.lin||{},wx.lin.flushSticky=()=>{this.updateStickyItemsSizeData()},wx.lin.setScrollTop=t=>{this.data.scrollTop=t,this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},updateStickyItemsPosition(){const t=this.getStickyItemNodes();for(let e of t)e.updateStickyItemPosition(this.data.scrollTop)},updateStickyItemsSizeData(){this.getStickyItemNodes().forEach((t,e)=>{t.updateStickyItemBaseData(e)})},getStickyItemNodes(){return this.getRelationNodes("../sticky-item/index")},checkSupportCssSticky(){return new Promise(t=>{const e=this.getStickyItemNodes();0===e.length&&t(!1),wx.createSelectorQuery().in(e[0]).select(".l-sticky-item-header").fields({computedStyle:["position"]}).exec(e=>{null===e[0]?t(!1):t("sticky"===e[0].position)})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-sticky l-class">
<slot></slot>
</view>
\ No newline at end of file
Component({relations:{"../tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}},"../combined-tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}}},properties:{tab:String,subTab:String,subKey:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"}},observers:{"**":function(t){this.updateData(t)}},data:{isCurrent:!1,index:0,parent:null},methods:{updateData(){let t=this.data.parent;t&&t.initTabs()}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-tabpanel-content">
<slot></slot>
</view>
\ No newline at end of file
.l-tabpanel-content{width:100%;height:100%}
\ No newline at end of file
import scrollCenter from"../behaviors/scrollCenter";Component({behaviors:[scrollCenter],externalClasses:["l-class-tabs","l-class-header","l-class-active","l-class-content","l-class-inactive","l-class-line","l-class-tabimage","l-class-header-line","l-class-icon","l-tabs-class","l-header-class","l-active-class","l-content-class","l-inactive-class","l-line-class","l-tabimage-class","l-header-line-class","l-icon-class"],relations:{"../tabpanel/index":{type:"child",linked(){this.initTabs()}}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:""},placement:{type:String,value:"top"},animated:Boolean,swipeable:Boolean,scrollable:Boolean,hasLine:{type:Boolean,value:!0},animatedForLine:Boolean,activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"},equalWidth:{type:Boolean,value:!0},contentHeight:Number},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},observers:{activeKey:function(e){if(!e)return;const t=this.data.tabList.findIndex(t=>t.key===e);this.setData({currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},ready(){this.initTabs()},methods:{initTabs(e=this.data.activeKey){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){let a=e,s=this.data.currentIndex;const i=t.map((t,i)=>(a=e||0!==i?a:t.data.key,s=t.data.key===a?i:s,{tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconSize:t.data.iconSize,image:t.data.image,picPlacement:t.data.picPlacement}));this.setData({tabList:i,activeKey:a,currentIndex:s},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},swiperChange(e){const{source:t,current:a}=e.detail;if("touch"===t){const e=a,t=this.data.tabList[a].key;this._setChangeData({activeKey:t,currentIndex:e})}},handleChange(e){const t=e.currentTarget.dataset.key,a=e.currentTarget.dataset.index;this._setChangeData({activeKey:t,currentIndex:a})},_setChangeData({activeKey:e,currentIndex:t}){this.setData({activeKey:e,currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:e,currentIndex:t})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tabpanel":"../tabpanel/index"}}
\ No newline at end of file
<view class="l-tabs l-class-tabs l-tabs-class {{'l-placement-'+placement}} {{animated ? 'l-aminmated' :''}} {{placement==='left'||placement==='right'?'l-tabs-vertical':'l-tabs-horizontal'}} {{scrollable ? 'l-tabs-scroll':''}}">
<scroll-view scroll-x="{{placement==='top'||placement==='bottom' && scrollable}}" scroll-y="{{placement==='left'||placement==='right' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll l-class-header l-header-class {{hasLine?'l-tabs-header-line l-class-header-line l-header-line-class':''}}">
<view class="l-tabs-header">
<view class="l-tabs-item {{equalWidth?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" wx:for="{{tabList}}" wx:key="key" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tabimage-class"/>
<l-icon wx:if="{{item.icon}}" l-class="l-class-icon l-icon-class {{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" color="{{item.key===activeKey?activeColor:inactiveColor}}" size="{{item.iconSize}}"/>
{{item.tab}}
<slot wx:if="{{!item.tab}}" name="{{item.key+'.tab'}}"></slot>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</view>
</scroll-view>
<view wx:if="{{!swipeable}}" class="l-tabpanel-content l-class-content l-content-class" style="{{contentHeight?'height:'+contentHeight+'rpx;':''}}{{placement==='top'||placement==='bottom' ? 'margin-left:'+ -100 *currentIndex +'%;':'transform:translate(0,'+ -100 * currentIndex +'%) translateZ(0px);'}}">
<view class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':'l-tabpanel-inactive'}}" wx:for="{{tabList}}" wx:key="key" style="{{placement==='left'||placement==='right' ? 'position:absolute;width:100%;height:100%;transform:translate(0,'+ 100 * index +'%) translateZ(0px);':''}}">
<slot name="{{item.key}}"></slot>
</view>
</view>
<swiper wx:else class="l-tabpanel-content l-tabpanel-swiper l-class-content l-content-class" bindchange="swiperChange" style="{{contentHeight?'height:'+contentHeight+'rpx;':''}}" current="{{currentIndex}}" vertical="{{placement==='left'||placement==='right'}}">
<swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<slot name="{{item.key}}"></slot>
</swiper-item>
</swiper>
</view>
.l-tabs{display:flex;border-radius:8rpx;box-sizing:border-box;overflow:hidden;flex-direction:column;height:100%}.l-tabs .l-tabs-header{display:flex;width:100%;flex-direction:row;background:#fff;align-items:center}.l-tabs .l-tabs-header .l-tabs-item{font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs .l-tabs-header .l-tabs-equal-width{flex:1}.l-tabs .l-tabs-header .l-tabs-unequal-width{padding:0 20rpx}.l-tabs .l-tabs-header .l-icon-active,.l-tabs .l-tabs-header .l-tabs-active{color:#333;font-size:28rpx}.l-tabs .l-tabs-header .l-icon-inactive,.l-tabs .l-tabs-header .l-tabs-inactive{font-size:28rpx;color:#bbb}.l-tabs .l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs .l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-bottom .l-tabs-header,.l-placement-top .l-tabs-header{height:80rpx}.l-placement-bottom .l-tabs-header .l-tabs-item,.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-placement-left,.l-placement-right{flex-direction:row}.l-placement-left .l-tabs-header,.l-placement-right .l-tabs-header{flex-direction:column;width:160rpx}.l-placement-left .l-tabs-header>.l-tabs-item,.l-placement-right .l-tabs-header>.l-tabs-item{width:100%;height:80rpx;background:#f6f8fa}.l-placement-left .l-tabs-header>.l-tabs-active,.l-placement-right .l-tabs-header>.l-tabs-active{background:#fff}.l-placement-right{flex-direction:row-reverse}.l-placement-bottom{flex-direction:column-reverse}.l-tabpanel-content{display:flex}.l-placement-left .l-tabpanel-content,.l-placement-right .l-tabpanel-content{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;position:relative;will-change:transform;transition:transform .3s cubic-bezier(.645,.045,.355,1)}.l-tabs-vertical .l-tabpanel-swiper{height:initial}.l-placement-bottom .l-tabpanel-content,.l-placement-top .l-tabpanel-content{width:100%;min-height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.l-aminmated.l-placement-bottom .l-tabpanel-content,.l-aminmated.l-placement-top .l-tabpanel-content{will-change:margin-left;-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.l-tabpanel{width:100%;height:100%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;opacity:1;text-overflow:ellipsis}.l-tabpanel-inactive{opacity:0;height:0;padding:0!important;pointer-events:none}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible}.l-tabs-vertical .l-tabsscroll{width:160rpx}.l-tabs-vertical .l-tabs-header{height:100%;min-height:80rpx;-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;min-height:80rpx}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;background:#000}.l-tabs-horizontal .l-tab-line{height:4rpx;width:0;left:100%;right:0;margin:0 auto}.l-tabs-horizontal .l-line-aminmated{transition:.2s all linear}.l-tabs-horizontal .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{left:0}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;left:0}.l-tabs-horizontal .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-placement-bottom .l-tab-line{top:0}.l-placement-bottom .l-tabs-header-line{border-top:1px solid #f3f3f3}.l-tabs-vertical .l-tab-line{width:6rpx;height:0;border-radius:0 6rpx 6rpx 0;top:0;margin:auto 0}.l-tabs-vertical .l-line-aminmated{transition:.2s all linear}.l-tabs-vertical .l-tabs-active .l-tab-line{height:40rpx}.l-tabs-vertical .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-tabs-vertical .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{height:0;top:0}.l-placement-left .l-tab-line{right:auto}.l-placement-left .l-tabs-header-line{border-left:1px solid #f3f3f3}.l-placement-right .l-tab-line{right:0;left:auto}.l-placement-right .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-bottom{flex-direction:column-reverse}.l-tab-image-placement-left{flex-direction:row}.l-tab-image-placement-right{flex-direction:row-reverse}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-select-class","l-image-class"],behaviors:[validator],properties:{name:String,cell:Object,type:{type:String,value:"touch",options:["reading","touch"]},bgColor:String,fontColor:String,disable:Boolean,shape:{type:String,value:"square",options:["square","circle"]},select:Boolean,plain:Boolean,size:{type:String,value:"medium",options:["large","medium","mini","super-mini"]},location:{type:String,value:"left",options:["left","right"]},icon:String,iconSize:{type:String,value:"20"},iconColor:{type:String,value:"#3683D6"},image:String,iconStyle:{type:String,value:"size:20;color:#3683D6"},height:Number},methods:{handleTap(){if(this.data.disable)return;let e={name:this.data.name,cell:this.data.cell,select:this.data.select};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view style="display:flex">
<view class="l-tag {{type==='touch'?'l-tag-touch':''}} {{plain?'l-tag-plain-'+ size:'l-tag-'+size}} {{disable?'l-tag-disable':''}} {{select?'select l-select-class':'l-class'}} {{plain?'l-tag-plain':''}} {{'l-tag-'+size+'-'+ shape}}" style="{{height?'line-height:'+height+'rpx;height:'+height+'rpx;':''}}{{plain?'color:'+fontColor+';border-color:'+fontColor:'background-color:'+bgColor+';color:'+fontColor}}" bindtap="handleTap">
<view class="{{location==='left'?'content':'content-l'}}" style="{{iconName?'line-height:0':''}}">
<l-icon wx:if="{{icon}}" style="{{location==='left'?'margin-right:5rpx':'margin-left:5rpx'}}" name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}"/>
<image style="{{location==='left'?'margin-right:5rpx':'margin-left:5rpx'}}" wx:if="{{image}}" src="{{image}}" class="{{'tag-image-'+size}} l-image-class"></image>
<slot/>
</view>
</view>
</view>
.l-tag{display:inline-flex;justify-content:center;align-items:center;color:#fff;background-color:#85c5e1}.l-tag-touch{min-width:80rpx}.l-tag-super-mini{height:32rpx;font-size:20rpx}.l-tag-mini{height:42rpx;font-size:20rpx}.l-tag-medium{height:50rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-large{height:60rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-super-mini-square{border-radius:2rpx;padding:0 6rpx}.l-tag-mini-square{border-radius:2rpx;padding:0 12rpx}.l-tag-medium-square{border-radius:2rpx;padding:0 16rpx}.l-tag-large-square{border-radius:2rpx;padding:0 18rpx}.l-tag-super-mini-circle{border-radius:16rpx;padding:0 12rpx}.l-tag-mini-circle{border-radius:21rpx;padding:0 16rpx}.l-tag-medium-circle{border-radius:25rpx;padding:0 20rpx}.l-tag-large-circle{border-radius:30rpx;padding:0 24rpx}.l-tag-plain{background-color:#fff;color:#85c5e1;border:2rpx solid #85c5e1}.l-tag-plain-super-mini{height:28rpx;font-size:20rpx}.l-tag-plain-mini{height:38rpx;font-size:20rpx}.l-tag-plain-medium{height:46rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-plain-large{height:56rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-disable{background-color:#dee2e6;color:#fff;border-color:#dee2e6}.select{background-color:#85c5e1;color:#fff}.content{display:inline-flex;align-items:center;justify-content:center}.content-l{display:inline-flex;flex-direction:row-reverse;align-items:center;justify-content:center}.tag-image-mini{width:20rpx;height:20rpx}.tag-image-large{width:24rpx;height:24rpx}
\ No newline at end of file
import rules from"../behaviors/rules";import eventBus from"../core/utils/event-bus";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class","l-inner-class"],properties:{placeholder:{type:String,value:""},value:{type:String,value:""},focus:{type:Boolean,value:!1},maxlength:{type:Number,value:140},indicator:{type:Boolean,value:!0},autoHeight:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},border:{type:Boolean,value:!0},rules:{type:Object},placeholderStyle:{type:String,value:""},cursorSpacing:{type:Number,value:0}},data:{},attached(){this.initRules()},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){this.triggerEvent("linconfirm",e.detail)},getValues(){return this.data.value},reset(){this.data.value=""}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<label class='form-item {{disabled? "disabled": ""}}'>
<view class='default-border {{border? "border": ""}} l-class'>
<view class="mask" wx:if="{{disabled}}"></view>
<textarea class="{{autoHeight ? 'textarea-auto-height': 'textarea'}} l-inner-class" type="{{type}}" value="{{ value }}" adjust-position="{{false}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" auto-height="{{autoHeight}}" cursor-spacing="{{cursorSpacing}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<view class="indicator" wx:if="{{indicator}}">{{value.length + '/' + maxlength}}</view>
</view>
</label>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.form-item{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.textarea{width:100%;box-sizing:border-box;font-size:28rpx;color:#333;height:200rpx;line-height:40rpx;flex:1;min-height:88rpx}.textarea-auto-height{width:100%;box-sizing:border-box;font-size:28rpx;color:#333}.default-border{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:25rpx}.border{border-radius:4rpx;border:1rpx solid #d8dee5}.pls-class{color:#9a9a9a}.indicator{width:95%;text-align:right;margin-bottom:15rpx;color:#9a9a9a}
\ No newline at end of file
import computeOffset from "../behaviors/computeOffset";
import zIndex from "../behaviors/zIndex";
import watchShow from "../behaviors/watchShow";
Component({
behaviors: [computeOffset, zIndex, watchShow],
externalClasses: ["l-bg-class", "l-icon-class", "l-class", "l-image-class", "l-title-class "],
properties: {
show: {
type: Boolean,
value: !1
},
title: String,
icon: String,
iconSize: String,
iconColor: String,
image: String,
placement: {
type: String,
value: "bottom"
},
duration: {
type: Number,
value: 1500
},
zIndex: {
type: Number,
value: 777
},
center: {
type: Boolean,
value: !0
},
mask: {
type: Boolean,
value: !1
},
openApi: {
type: Boolean,
value: !0
},
offsetX: Number,
offsetY: Number
},
data: {
status: !1,
success: "",
fail: "",
complete: ""
},
observers: {
icon: function() {}
},
attached() {
this.data.openApi && this.initToast()
},
pageLifetimes: {
show() {
this.data.openApi && this.initToast(), this.offsetMargin()
}
},
methods: {
initToast() {
wx.lin = wx.lin || {}, wx.lin.showToast = (e = {}) => {
const {
title: t = "",
icon: o = "",
image: s = "",
placement: i = "bottom",
duration: a = 1500,
center: n = !0,
mask: l = !1,
success: r = null,
complete: c = null,
offsetX: h = 0,
offsetY: f = 0,
iconSize: m = "60",
iconColor: p = ""
} = e;
console.log(e)
return this.setData({
title: t,
icon: o,
image: s,
placement: i,
duration: a,
center: n,
mask: l,
success: r,
complete: c,
offsetY: f,
offsetX: h,
iconSize: m,
iconColor: p
}), this.changeStatus(), this
}, wx.lin.hideToast = () => {
this.setData({
status: !1
})
}
},
strlen(e) {
for (var t = 0, o = 0; o < e.length; o++) {
var s = e.charCodeAt(o);
s >= "0x0001" && s <= "0x007e" || "0xff60" <= s && s <= "0xff9f" ? t++ : t += 2
}
return t
},
doNothingMove() {},
onMaskTap() {
!0 !== this.data.locked && this.setData({
fullScreen: "hide",
status: "hide"
}), this.triggerEvent("lintap", !0, {
bubbles: !0,
composed: !0
})
}
}
});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
\ No newline at end of file
<view class="container {{mask?'containerShowMask':'containerNoMask'}}" hidden="{{!status}}" style="z-index:{{zIndex}}">
<view class="l-bg-class toast-bg" wx:if="{{mask}}"></view>
<view class="l-class toast toast-{{placement || 'bottom'}}" style="padding-top:{{(placement || 'bottom')=== 'bottom' ? image || icon ? '25rpx': '': ''}};position:relative;left:{{offsetX}}rpx;top:{{offsetY}}rpx;margin-bottom:{{distance}}px">
<image class="l-image-class toast-icon" wx:if="{{image}}" src="{{image}}"/>
<l-icon class="l-icon-class toast-icon toast-icon-{{icon === 'loading'?'loading':''}}" wx:elif="{{icon && !image}}" size="{{iconSize? iconSize : 60}}" color="{{iconColor? iconColor: icon === 'success'? '#00C292' : icon === 'error' ? '#F4516C' : '#ffffff'}}" name="{{icon}}"/>
<slot wx:else/>
<text class="toast-text l-title-class toast-text-{{placement}}" style="{{placement || 'bottom' === 'bottom' ? icon || image? 'margin-top:10rpx' : '': '' }}">{{ title }}</text>
</view>
</view>
\ No newline at end of file
.container {
position: fixed;
}
.containerNoMask {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.containerShowMask {
height: 100%;
width: 100%;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 999;
}
.container .toast-bg {
height: 100%;
width: 100%;
background: rgba(255, 255, 255, 0.5);
position: absolute;
top: 0;
left: 0;
}
.container .toast-top {
flex-direction: column-reverse;
}
.container .toast-right {
flex-direction: row;
}
.container .toast-bottom {
flex-direction: column;
}
.container .toast-left {
flex-direction: row-reverse;
}
.container .toast {
display: flex;
align-items: center;
justify-content: center;
max-width: 400rpx;
min-width: 280rpx;
min-height: 88rpx;
background: rgba(0, 0, 0, 0.7);
border-radius: 12rpx;
color: #fff;
font-size: 28rpx;
line-height: 40rpx;
box-sizing: border-box;
padding: 30rpx 50rpx;
z-index: 999;
}
.container .toast .toast-icon {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.container .toast .toast-icon-loading {
animation: loading-fadein 1.5s linear 0s infinite;
}
.container .toast .toast-text {
display: inline-block;
text-align: center;
}
.container .toast .toast-text-right {
display: inline-block;
text-align: center;
margin-left: 20rpx;
}
.container .toast .toast-text-left {
display: inline-block;
text-align: center;
margin-right: 20rpx;
}
.container .toast .toast-text-top {
margin-bottom: 10rpx;
}
@keyframes loading-fadein {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
import transition from"../behaviors/transition";Component({behaviors:[transition(!0)],externalClasses:["l-class","l-enter-class","l-enter-active-class","l-enter-to-class","l-leave-class","l-leave-active-class","l-leave-to-class"],methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
\ No newline at end of file
<view wx:if="{{ inited }}" class="l-transition l-class {{ classes }}" style="-webkit-transition-duration:{{ currentDuration }}ms; transition-duration:{{ currentDuration }}ms; {{ display ? '' : 'display: none;' }} {{ customStyle }}" bind:transitionend="onTransitionEnd">
<slot/>
</view>
.l-transition{transition-timing-function:ease}.l-fade-enter-active,.l-fade-leave-active{transition-property:opacity}.l-fade-enter,.l-fade-leave-to{opacity:0}.l-fade-down-enter-active,.l-fade-down-leave-active,.l-fade-left-enter-active,.l-fade-left-leave-active,.l-fade-right-enter-active,.l-fade-right-leave-active,.l-fade-up-enter-active,.l-fade-up-leave-active{transition-property:opacity,transform}.l-fade-up-enter,.l-fade-up-leave-to{transform:translate3d(0,100%,0);opacity:0}.l-fade-down-enter,.l-fade-down-leave-to{transform:translate3d(0,-100%,0);opacity:0}.l-fade-left-enter,.l-fade-left-leave-to{transform:translate3d(-100%,0,0);opacity:0}.l-fade-right-enter,.l-fade-right-leave-to{transform:translate3d(100%,0,0);opacity:0}.l-slide-down-enter-active,.l-slide-down-leave-active,.l-slide-left-enter-active,.l-slide-left-leave-active,.l-slide-right-enter-active,.l-slide-right-leave-active,.l-slide-up-enter-active,.l-slide-up-leave-active{transition-property:transform}.l-slide-up-enter,.l-slide-up-leave-to{transform:translate3d(0,100%,0)}.l-slide-down-enter,.l-slide-down-leave-to{transform:translate3d(0,-100%,0)}.l-slide-left-enter,.l-slide-left-leave-to{transform:translate3d(-100%,0,0)}.l-slide-right-enter,.l-slide-right-leave-to{transform:translate3d(100%,0,0)}
\ No newline at end of file
class DeviceUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.windowWidth*t}rpx2px(t){return this.systemInfo.windowWidth/750*t}getNavigationBarHeight(){return this.getTitleBarHeight()+this.getStatusBarHeight()}getStatusBarHeight(){return this.px2rpx(this.systemInfo.statusBarHeight)}getTitleBarHeight(){const t=this.systemInfo.statusBarHeight,e=wx.getMenuButtonBoundingClientRect(),i=e.top-t;return this.px2rpx(2*i+e.height)}}const deviceUtil=new DeviceUtil(wx.getSystemInfoSync());export default deviceUtil;
\ No newline at end of file
const promisic=function(n){return function(t={}){return new Promise((c,r)=>{const s=Object.assign(t,{success:n=>{c(n)},fail:n=>{r(n)}});n(s)})}},px2rpx=function(n){const{screenWidth:t}=wx.getSystemInfoSync();return 750/t*n};export{promisic,px2rpx};
\ No newline at end of file
import eventUtil from"../core/utils/event-util";Component({properties:{columnGap:{type:String,value:"20rpx"}},data:{data:[],leftData:[],rightData:[]},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.renderWaterFlow=(t=[],e=!1,a)=>{if("[object Array]"!==Object.prototype.toString.call(t))return console.error("[data]参数类型错误,渲染失败"),!1;this.setData({data:t}),e&&(this.data.leftData=[],this.data.rightData=[]),this._select(t,e).then(()=>{a&&a()}).catch(t=>{console.error(t)})}},_select(t,e){const a=wx.createSelectorQuery().in(this);return this.columnNodes=a.selectAll("#left, #right"),new Promise(a=>{this._render(t,0,e,()=>{a()})})},_render(t,e,a,i){(t.length>e||a)&&0!==this.data.data.length?this.columnNodes.boundingClientRect().exec(h=>{const r=h[0];this.data.leftHeight=r[0].height,this.data.rightHeight=r[1].height,this.data.leftHeight<=this.data.rightHeight||a?this.data.leftData.push(t[e]):this.data.rightData.push(t[e]),this.setData({leftData:this.data.leftData,rightData:this.data.rightData},()=>{this._render(t,++e,!1,i)})}):i&&i()},onTapItem(t){eventUtil.emit(this,"linitemtap",{item:t.currentTarget.dataset.item})}}});
\ No newline at end of file
{"component":true,"usingComponents":{},"componentGenerics":{"l-water-flow-item":true} }
\ No newline at end of file
<view class="l-class water-flow-container" wx:if="{{data.length!==0}}">
<view class="water-column" style="margin-right:{{columnGap}}">
<view id="left">
<block wx:for="{{leftData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block>
</view>
</view>
<view class="water-column">
<view id="right">
<block wx:for="{{rightData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block>
</view>
</view>
</view>
.water-flow-container{display:flex;width:100%;box-sizing:border-box;background:0 0}.water-column{flex:1}
\ No newline at end of file
MIT License
Copyright (c) 2020 TaleLin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<p align="center">
<!-- <a href="http://doc.mini.7yue.pro/"> -->
<img
class="QR-img" src="https://doc.mini.talelin.com/screenshots/readme/lin-ui小程序.jpg">
<!-- </a> -->
</p>
<div align="center"> <span class="logo" > Lin UI </span> </div>
<div class="row" />
<div align="center">
<span class="desc" >Fantastic native based Mini-Programe components</span>
</div>
<div align="center">
![](https://img.shields.io/badge/build-passing-00d508.svg)
![](https://img.shields.io/npm/v/lin-ui.svg)
![](https://img.shields.io/npm/dt/lin-ui.svg)
![](https://img.shields.io/badge/license-MIT-3963bc.svg)
</div>
<div align="center">
⚡️ 文档网站: http://doc.mini.talelin.com
<br/>
🔥 教程地址: [https://talelin.com](https://talelin.com/#course)
</div>
# 简介
Lin UI 是基于 **微信小程序原生语法** 实现的组件库。遵循简洁,易用的设计规范。
## 讨论交流
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<img class="QR-img" style="height: 60px; width:60px" src="https://doc.mini.talelin.com/screenshots/readme/qq新群.png">
<p style="font-size:12px;">QQ群号:643205479</p>
</td>
<td align="center" valign="middle">
<img class="QR-img" style="height: 60px; width:60px" src="https://doc.mini.talelin.com/screenshots/readme/公众号.jpg">
<p style="font-size:12px;">微信公众号:林间有风</p>
</td>
</tr>
</tbody>
</table>
## Lin UI商业案例
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<img class="QR-img" style="height: 60px; width:60px" src="https://doc.mini.talelin.com/screenshots/readme/风袖.jpg" alt="风袖">
<p style="font-size:12px;">风袖</p>
</td>
</tr>
</tbody>
</table>
## 快速上手
Lin UI 致力于给小程序开发者提供愉悦的开发体验。
> 在开始之前,推荐先学习微信官方的[小程序开发文档](https://developers.weixin.qq.com/miniprogram/dev/index.html?t=18101612),并正确安装和配置了 Node.js v12或以上。 同时,我们假设你已了解关于 HTML、CSS 和 JavaScript 的初级知识,并且已经熟悉并阅读了[小程序自定义组件](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。
## 安装
Lin UI提供两种安装方法,满足不同开发者的需求。如果您需要使用`npm`安装,请确保您已经在本机安装了`npm`
### 方式一: 使用npm安装 (推荐)
打开小程序的项目根目录,执行下面的命令。
```sh
npm install lin-ui --production
```
执行成功后,会在根目录里生成项目依赖文件夹 `node_modules/lin-ui` (小程序IDE的目录结构里不会显示此文件夹)。
<br/>
然后用小程序官方IDE打开我们的小程序项目,找到 `工具` 选项,点击下拉选中 `构建npm` ,等待构建完成即可。
出现上图所示的结果后,可以看到小程序IDE工具的目录结构里多出了一个文件夹 `miniprogram_npm`(之后所有通过 `npm ` 引入的组件和 `js` 库都会出现在这里),打开后可以看到 `lin-ui` 文件夹,也就是我们所需要的组件。
### 方式二:下载代码
直接通过git下载 `Lin UI` 源代码,并将 `dist` 目录(Lin UI 组件库)拷贝到自己的项目中。
```sh
git clone https://github.com/TaleLin/lin-ui.git
```
## 使用组件
> 下文会简单介绍一个`Lin UI` 组件的引入和使用。
使用前,确保该组件已经在你的项目目录结构里。
<br />
以icon组件为例,只需要在使用页面的json文件中引入icon对应的自定义组件即可。
<br />
组件路径:`path/to/${组件名称}/index`
```json
{
"usingComponents": {
"l-icon": "path/to/icon/index"
}
}
```
然后在wxml中直接使用该组件。
```html
<l-icon name="add"> </l-icon>
```
## 自定义配置
> 考虑到开发者在面临不同到项目时,需求和行业的不同。Lin UI 设计规范上支持一定程度上的样式定制,以满足业务和品牌上多样化的视觉需求。
同时,可以通过对 `components.json` 进行配置,来编译生成相对应的组件。
<br />
为满足自定义的需求,首先我们要去下载 `Lin UI` 源码。
```sh
git clone https://github.com/TaleLin/lin-ui.git
```
安装相关依赖
```sh
npm install
```
完成以上两步是对 `Lin UI` 进行自定义配置的基础要求。
### 全局样式更改
> Lin UI 的样式使用了 Less 作为开发语言,并定义了一系列全局/组件的样式变量,你可以根据需求进行相应调整。
以下是一些最常用的通用变量,所有样式变量可以在这里找到。
- 组件样式变量
找到根目录,打开`config/style/_base.less`文件,进行修改即可。
- 主题色更改
同样打开根目录,打开`config/style/_theme.less`文件,看到文件中定义了一个变量 `@theme-color` ,如果有主题色修改的需求,更改它即可。
```less
// 主题色
@theme-color: #2c61b4;
```
其他
更改完成后,在 `Lin UI` 下的根目录里打开终端执行如下所示命令
```sh
npm run build
```
根目录下的 `dist` 文件夹即是编译后的自定义组件。
import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"} }
\ No newline at end of file
<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
<view class="l-action-sheet">
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
{{ title }}
</view>
<view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}">
<l-button bind:lintap="handleClickItem" data-index="{{ index }}" data-item="{{ item }}" open-type="{{ item.openType }}" icon="{{ item.icon }}" type="default" size="large" special="{{true}}" long>
<view style="{{ item.color ? 'color: ' + item.color : '' }}" class="l-item-button l-class-item l-item-class {{item.image || item.icon ? 'l-image-button':''}}">
<image wx:if="{{item.image}}" class="l-button-image" src="{{item.image}}" style="{{item.imageStyle}}"/>
<l-icon wx:elif="{{ item.icon }}" name="{{ item.icon }}" l-class="l-item-button" size="{{ item.iconSize }}" color="{{item.iconColor?item.iconColor:item.color}}"></l-icon>
<text class="l-button-text">{{ item.name }}</text>
</view>
</l-button>
</view>
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}">
<l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
<view class="l-item-button l-cancel-button">{{ cancelText }}</view>
</l-button>
</view>
</view>
</l-popup>
.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8}
\ No newline at end of file
Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"}},data:{newType:!0,shortSideValue:0,row:0,colum:0},lifetimes:{attached(){if(this.data.urls.length>9){const e=this.data.urls.slice(0,9);this.setData({urls:e}),console.warn("超过9张图片!")}this.preview()}},observers:{urls:function(){this.preview()}},methods:{judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,i=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:i*this.data.singleSize/t})}})},preview:function(){const e=this.judgeType();this.setData({newType:e});const t=this.data.urls,i=this.data.key;1===t.length&&this.horizontalOrVertical(e?t[0][i]:t[0])},onPreviewTap(e){const t=e.currentTarget.id,i=this.data.urls;let s="",a=[];const l=this.data.newType,r=this.data.key;if(l){s=i[t][r];for(let e=0;e<i.length;e++)a.push(i[e][r])}else s=i[t],a=i;let n={index:t,current:i[t],all:i};!0===this.data.preview&&wx.previewImage({current:s,urls:a}),this.triggerEvent("lintap",n,{})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<wxs src="index.wxs" module="album"></wxs>
<view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}">
<block wx:for="{{urls}}" wx:key="index">
<image id="{{index}}" bind:tap="onPreviewTap" class="{{album.blockClass(urls, horizontalScreen)}}" style="{{album.blockStyle(urls, horizontalScreen, shortSideValue, singleSize, multipleSize)}}" src="{{newType?item[key]:item}}" mode="{{urls.length === 1?singleMode:multipleMode}}"/>
</block>
</view>
var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;'
if (urls.length === 2 || urls.length === 4) {
return 'width:' + (2 * multipleSize + gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
} else {
return 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
}
}
var blockClass = function (urls, horizontalScreen) {
if (urls.length === 1) {
if (horizontalScreen) {
return 'l-single-image-class'
} else {
return 'vertical l-single-image-class'
}
} else {
return 'l-multi-image-class'
}
}
var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
if (urls.length === 1) {
if (horizontalScreen) {
return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
} else {
return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
}
} else {
return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
}
}
module.exports = {
containerStyle: containerStyle,
blockClass: blockClass,
blockStyle: blockStyle
}
.container{display:grid}.vertical{height:360rpx}
\ No newline at end of file
import validator from"../behaviors/validator";import zIndex from"../behaviors/zIndex";const detail=!0,option={bubbles:!0,composed:!0};Component({behaviors:[zIndex,validator],externalClasses:["l-class","l-panel-class","l-bg-class","l-header-class"],options:{multipleSlots:!0},properties:{show:{type:Boolean,value:!1},maxHeight:{type:Number,value:600},minHeight:{type:Number,value:200},arcRadius:{type:Number,value:18},transition:{type:Boolean,value:!0},locked:{type:Boolean,value:!1},opacity:{type:Number,value:.4},direction:{type:String,options:["top","bottom"],value:"bottom"},headerFixed:{type:Boolean,value:!0}},data:{_arcRadiusTop:12,_ardRadiusBottom:18,arcStyle:""},observers:{show:function(t){t?(this.triggerEvent("linshow",!0,option),this.getArcPopupStyle()):this.triggerEvent("linclose",!0,option)},arcRadius:function(t){"top"===this.properties.direction?this.data._arcRadiusTop=t:this.data._ardRadiusBottom=t,this.getArcPopupStyle()}},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showArcPopup=t=>{const{zIndex:o=99,tranistion:e=!0,direction:i="bottom",locked:a=!1}={...t};this.setData({zIndex:o,tranistion:e,direction:i,locked:a,show:!0})},wx.lin.hideArcPopup=()=>{this.setData({show:!1})}},getArcPopupStyle(){const t=this.properties.direction,o=this.data._arcRadiusTop,e=this.data._ardRadiusBottom,i=`\n border-bottom-left-radius:${"top"===t?o:0}rpx;\n border-bottom-right-radius:${"top"===t?o:0}rpx;\n border-top-left-radius:${"bottom"===t?e:0}rpx;\n border-top-right-radius:${"bottom"===t?e:0}rpx;\n max-height:${this.properties.maxHeight}rpx;\n min-height:${this.properties.minHeight}rpx;\n `;this.setData({arcStyle:i})},onArcPopupTap(){this.data.locked||this.properties.show&&this.setData({show:!1})}},ready(){this.getArcPopupStyle()}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-popup":"../popup/index"}}
\ No newline at end of file
<l-popup show="{{show}}" direction="{{direction}}" transition="{{transition}}" opacity="{{opacity}}" locked="{{locked}}" z-index="{{zIndex}}" l-class="l-class" l-bg-class="l-bg-class" bind:lintap="onArcPopupTap">
<scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
<view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
<slot name="header"/>
</view>
<view class="content-arc-popup">
<slot/>
</view>
</scroll-view>
</l-popup>
\ No newline at end of file
.container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff}
\ No newline at end of file
Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"} }
\ No newline at end of file
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar">
<view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx">
<open-data class="open-data" wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl"/>
<l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}"/>
<image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
</view>
<view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}">
<open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
<text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
</view>
</view>
.l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-badge" bindtap="handleTap">
<slot/>
<block wx:if="{{show}}">
<view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view>
<view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
</block>
</view>
\ No newline at end of file
.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}
\ No newline at end of file
export default Behavior({behaviors:[],properties:{},data:{distance:0},attached(){this.offsetMargin()},methods:{offsetMargin(){const{windowHeight:t,screenHeight:e}=wx.getSystemInfoSync();this.setData({distance:e-t})}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{time:{type:Date,value:(new Date).getTime()+864e5,observer:function(t,e){t&&!e&&this.getLatestTime()}},status:{type:Boolean,value:!0,observer:function(t){t?this.init():t||clearInterval(this.data.timer)}},timeType:{type:String,value:"datetime"},format:{type:String,value:"{%d}天{%h}时{%m}分{%s}秒"},isZeroPadd:{type:Boolean,value:!0},countdownType:{type:String,value:"normal"},isClearInterval:{type:Boolean,value:!0}},data:{initAddTime:0,timer:null,date:[]},ready:function(){this.getLatestTime()},detached:function(){this.data.isClearInterval&&clearInterval(this.data.timer)},pageLifetimes:{hide(){this.data.isClearInterval&&clearInterval(this.data.timer)},show(){this.data.isClearInterval&&this.getLatestTime()}},methods:{zeroPadding:t=>(t=t.toString())[1]?t:"0"+t,init(){clearInterval(this.data.timer);const t=setTimeout(()=>{this.getLatestTime.call(this)},1e3);this.setData({timer:t})},getLatestTime(){let{time:t,status:e,timeType:i,initAddTime:a,countdownType:n}=this.data,s=t;if("normal"===n){if("second"!==i&&(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil((new Date(s).getTime()-(new Date).getTime())/1e3)),s<0&&"second"!==i)return this._getTimeValue(0),void this.CountdownEnd();s-a>0?this.getLatestForCountDown(s):s-a<0?this.getLatestForAddTime(s):s-a==0&&(a<=0&&this._getTimeValue(s),this.CountdownEnd()),e&&s-a!=0&&this.init.call(this)}else"anniversary"===n?"second"===i?console.error(`countdownType为${n}类型时,不可设置timeType值为second`):(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil(((new Date).getTime()-new Date(s).getTime())/1e3),s>=0?(this.getLatestForCountDown(s),this.init.call(this)):console.error("time传值错误")):console.error("错误的countdownType类型")},getLatestForAddTime(t){let{initAddTime:e}=this.data;e!==Math.abs(t)&&(e++,this._getTimeValue(e),this.setData({initAddTime:e}))},getLatestForCountDown(t){this._getTimeValue(t),this.setData({time:"second"===this.data.timeType?--t:this.data.time})},_getTimeValue(t){const{format:e}=this.data,i=[],a=e.split(/(\{.*?\})/);let n=t;return[{key:"{%d}",type:"day",count:86400},{key:"{%h}",type:"hour",count:3600},{key:"{%m}",type:"minute",count:60},{key:"{%s}",type:"second",count:1}].forEach(t=>{const e=this._findTimeName(a,t.key);if(-1===e)return;const s=a[e],o={type:t.type,name:s,value:parseInt(n/t.count)};this.data.isZeroPadd&&(o.value=this.zeroPadding(o.value)),n%=t.count,i.push(o)}),this.setData({date:i}),i},_findTimeName(t,e){const i=t.indexOf(e);return-1===i?-1:i+1},CountdownEnd(){this.triggerEvent("linend",{})}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{isHover:{type:Boolean,value:!0}}});
\ No newline at end of file
import Schema from"../common/async-validator/index";import validator from"../behaviors/validator";export default Behavior({behaviors:[validator],properties:{rules:{type:[Object,Array],value:[]},tipType:{type:String,value:"toast",options:["toast","message","text"]}},data:{schema:"",tipFun:{message:"showMessage",toast:"showToast"},tipContent:{message:"content",toast:"title"},errorText:"",errors:[]},methods:{initRules(){const{rules:t}=this.data;t&&("[object Object]"===Object.prototype.toString.call(t)&&(this.data.rules=[t]),this.data.rules.forEach(t=>{t.trigger?"string"!=typeof t.trigger||(t.trigger=[t.trigger]):t.trigger=[]}))},getNeedValidateRule(t){const e=this.data.name,{rules:a}=this.data;if(!a)return;const r=t?a.filter(e=>e.trigger.indexOf(t)>-1):a,s=new Schema({[e]:r});return this.setData({schema:s}),r},validatorData(t,e){const{tipType:a,tipFun:r,tipContent:s}=this.data;this.getNeedValidateRule(e)&&(Object.getOwnPropertyNames(t).forEach(e=>{""===t[e]&&(t[e]=void 0)}),this.data.schema.validate(t,t=>{if(this.setData({errors:t||[]}),this.triggerEvent("linvalidate",{errors:t,isError:!!t}),t&&a){const e=r[a],i=s[a];return"text"===a?(this.setData({errorText:t[0].message}),t):wx.lin&&wx.lin[e]?(wx.lin[e]&&wx.lin[e]({[i]:t[0].message,duration:1500,mask:!1}),t):(wx.showToast({icon:"none",title:`请在页面内引入${a}组件`}),t)}!t&&a&&this.setData({errorText:""})}))}}});
\ No newline at end of file
export default Behavior({methods:{getRect(e,t=!1){return new Promise((r,o)=>{const s=wx.createSelectorQuery().in(this);(t?s.selectAll(e):s.select(e)).boundingClientRect(e=>{if(!e)return o("找不到元素");r(e)}).exec()})},queryScrollNode(e,t,r="width"){if(t<0)return;const o=e[t];this.getRect(".l-tabsscroll").then(s=>{if(!s)return console.error("找不到元素");const c=s[r];let n=e.slice(0,t).reduce((e,t)=>e+t[r],0);n+=(o[r]-c)/2,"width"===r?this.setData({transformX:n,transformY:0}):this.setData({transformX:0,transformY:n})}).catch(e=>{console.error(e)})},queryMultipleNodes(){const{placement:e,currentIndex:t}=this.data;this.getRect(".l-tabs-item",!0).then(r=>{-1!==["top","bottom"].indexOf(e)?this.queryScrollNode(r,t):this.queryScrollNode(r,t,"height")}).catch(e=>{console.error(e)})}}});
\ No newline at end of file
const isObj=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},getClassNames=e=>({enter:`l-${e}-enter l-${e}-enter-active l-enter-class l-enter-active-class`,"enter-to":`l-${e}-enter-to l-${e}-enter-active l-enter-to-class l-enter-active-class`,leave:`l-${e}-leave l-${e}-leave-active l-leave-class l-leave-active-class`,"leave-to":`l-${e}-leave-to l-${e}-leave-active l-leave-to-class l-leave-active-class`}),nextTick=()=>new Promise(e=>setTimeout(e,1e3/30));export default e=>Behavior({properties:{customStyle:String,show:{type:Boolean,value:e,observer:"observeShow"},duration:{type:null,value:300,observer:"observeDuration"},name:{type:String,value:"fade"}},data:{type:"",inited:!1,display:!1},attached(){this.data.show&&this.enter()},methods:{observeShow(e){e?this.enter():this.leave()},enter(){const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.enter:e;this.status="enter",this.triggerEvent("linbeforeenter"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("enter"),this.triggerEvent("linenter"),this.setData({inited:!0,display:!0,classes:s.enter,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("enter"),this.transitionEnded=!1,this.setData({classes:s["enter-to"]})}).catch(()=>{})},leave(){if(!this.data.display)return;const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.leave:e;this.status="leave",this.triggerEvent("linbeforeleave"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("leave"),this.triggerEvent("linleave"),this.setData({classes:s.leave,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("leave"),this.transitionEnded=!1,setTimeout(()=>this.onTransitionEnd(),a),this.setData({classes:s["leave-to"]})}).catch(()=>{})},checkStatus(e){if(e!==this.status)throw new Error("incongruent status: "+e)},onTransitionEnd(){if(this.transitionEnded)return;this.transitionEnded=!0,this.triggerEvent("linafter"+this.status);const{show:e,display:t}=this.data;!e&&t&&this.setData({display:!1})}}});
\ No newline at end of file
export default Behavior({definitionFilter(e){const{properties:o}=e;Object.keys(o).forEach(e=>{const{options:t}=o[e];t&&(o[e].observer=function(o){!t.includes(o)&&o&&console.error(`${e}: ${o} must be in the [${t}]`)})})}});
\ No newline at end of file
export default Behavior({observers:{show:function(t){t&&this.changeStatus(),t||this.setData({status:t})}},methods:{changeStatus(){this.setData({status:!0}),this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(()=>{this.setData({status:!1}),this.data.success&&this.data.success(),this.data.timer=null},this.properties.duration)}}});
\ No newline at end of file
export default Behavior({behaviors:[],properties:{zIndex:{type:Number,value:777}}});
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<label for="{{name}}" bindtap="handleTap" class="l-label-class">
<block wx:if="{{special}}">
<view class="special-container l-class">
<slot/>
</view>
</block>
<block wx:else>
<view class="l-btn {{ 'l-btn-' + size }} {{ 'l-btn-' + type }} {{ 'l-btn-' + shape }} {{plain?'l-btn-plain':''}} {{ disabled ? 'l-btn-disabled' : ''}} l-class" hover-class="{{disabled?'':'btn-hover l-hover-class'}}" hover-stop-propagation="{{hoverStopPropagation}}" hover-start-time="{{hoverStartTime}}" hover-stay-time="{{hoverStayTime}}" style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0;':''}} {{'background-color:'+bgColor}}">
<view wx:if="{{loading}}" class="l-btn-loading {{'margin-' + size}} {{ plain ?'l-btn-loading-' + type : '' }}"></view>
<l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
<slot/>
</view>
</block>
</label>
<button style="position: absolute;top: -999px;left: -999px;" wx:if="{{openType}}" id="{{name}}" lang="{{lang}}" form-type="{{formType}}" open-type="{{openType}}" app-parameter="{{ appParameter }}" hover-stop-propagation="{{ hoverStopPropagation }}" hover-start-time="{{ hoverStartTime }}" hover-stay-time="{{ hoverStayTime }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" bindcontact="openTypeEvent" bindgetuserinfo="openTypeEvent" bindgetphonenumber="openTypeEvent" bindopensetting="openTypeEvent">
</button>
\ No newline at end of file
.btn-hover::before{opacity:.15;position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;transform:translate(-50%,-50%);content:' ';background-color:#333;border-color:#333}.special-container{display:flex}.l-btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:28rpx;position:relative;color:#fff;padding:0 12rpx;box-sizing:border-box}.l-btn-img-mini{width:30rpx;height:30rpx}.l-btn-img-medium{width:36rpx;height:36rpx}.l-btn-img-large{height:44rpx;width:44rpx}.l-btn-long{border-radius:0;height:88rpx;width:100%}.l-btn-medium{height:72rpx;min-width:180rpx}.l-btn-large{height:88rpx;min-width:710rpx}.l-btn-mini{height:60rpx;min-width:140rpx;font-size:24rpx}.l-btn-default{background-color:#3963bc}.l-btn-success{background-color:#34bfa3}.l-btn-warning{background-color:#ffe57f;color:#333}.l-btn-error{background-color:#f4516c}.l-btn-square{border-radius:0}.l-btn-semicircle{border-radius:40rpx}.l-btn-large.l-btn-semicircle{border-radius:48rpx}.l-btn-mini.l-btn-semicircle{border-radius:30rpx}.l-btn-circle{border-radius:8rpx}.l-btn-large.l-btn-circle{border-radius:9.6rpx}.l-btn-mini.l-btn-circle{border-radius:6rpx}.l-btn-plain{background-color:#fff;color:#3963bc;border:2rpx solid #3963bc}.l-btn-success.l-btn-plain{background-color:#fff;color:#34bfa3;border:2rpx solid #34bfa3}.l-btn-error.l-btn-plain{background-color:#fff;color:#f4516c;border:2rpx solid #f4516c}.l-btn-warning.l-btn-plain{background-color:#fff;color:#ffe57f;border:2rpx solid #ffe57f}.l-btn-loading{opacity:.6;display:inline-block;vertical-align:middle;width:24rpx;height:24rpx;background:0 0;border-radius:50%;border:4rpx solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.l-btn-loading-default{border:4rpx solid #3963bc;border-color:#3963bc #3963bc #3963bc transparent}.l-btn-loading-success{border:4rpx solid #34bfa3;border-color:#34bfa3 #34bfa3 #34bfa3 transparent}.l-btn-loading-error{border:4rpx solid #f4516c;border-color:#f4516c #f4516c #f4516c transparent}.l-btn-loading-warning{border:4rpx solid #ffe57f;border-color:#ffe57f #ffe57f #ffe57f transparent}.l-btn-disabled{opacity:.8}.icon{display:flex!important}.margin-mini{margin-right:10rpx}.margin-medium{margin-right:18rpx}.margin-large{margin-right:24rpx}.margin-long{margin-right:24rpx}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import deviceUtil from"../utils/device-util";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({behaviors:[validator],externalClasses:["l-title-class"],properties:{bgColor:{type:String,value:"white"},statusBarColor:{type:String,value:"transparent"},titleBarColor:{type:String,value:"transparent"},titleColor:{type:String,value:"black"},capsuleColor:{type:String,value:"black",options:["white","black"]},disableBack:{type:Boolean,value:!1},disableHome:{type:Boolean,value:!1},hiddenCapsule:{type:Boolean,value:!1},homePage:{type:String,value:""},title:{type:String,value:""},hasPadding:{type:Boolean,value:!0}},data:{titleBarHeight:deviceUtil.getTitleBarHeight(),statusBarHeight:deviceUtil.getStatusBarHeight(),capsuleButtonInfo:null},lifetimes:{ready:function(){this.setData({capsuleButtonInfo:this.getCapsuleButtonInfo()})}},methods:{getCapsuleButtonInfo(){const t=wx.getSystemInfoSync().screenWidth,e=wx.getMenuButtonBoundingClientRect();return e.left=t-e.right,e.right=e.left+e.width,e},onTapLeftButton(){eventUtil.emit(this,"linlefttap"),this.data.disableBack||wx.navigateBack()},onLongPressLeftButton(){eventUtil.emit(this,"linleftlongpress")},async onTapRightButton(){eventUtil.emit(this,"linrighttap");const t=this.data.homePage;this.data.disableHome||wx.switchTab({url:t,fail(){wx.navigateTo({url:t})}})},onLongPressRightButton(){eventUtil.emit(this,"linrightlongpress")}}});
\ No newline at end of file
{"component":true}
\ No newline at end of file
<view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx">
<cover-view class="capsule-bar" style="background-color: {{bgColor}};">
<cover-view class="status-bar" style="height: {{statusBarHeight+4}}rpx;background-color: {{statusBarColor}};"></cover-view>
<cover-view class="title-bar" style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};">
<cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
</cover-view>
<cover-view wx:if="{{!hiddenCapsule}}" class="capsule-button" style="border-color: rgba({{capsuleColor==='black'?'0,0,0,0.1':'255,255,255,0.25'}});background-color: rgba({{capsuleColor==='black'?'255,255,255,0.6':'0,0,0,0.15'}});width: {{capsuleButtonInfo.width}}px;height: {{capsuleButtonInfo.height}}px;left: {{capsuleButtonInfo.left}}px;top: {{capsuleButtonInfo.top}}px;">
<cover-view catch:tap="onTapLeftButton" catch:longpress="onLongPressLeftButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image class="icon-left" src="icons/capsule-left-{{capsuleColor}}.png"></cover-image>
</cover-view>
<cover-view class="line"></cover-view>
<cover-view catch:tap="onTapRightButton" catch:longpress="onLongPressRightButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
<cover-image class="icon-right" src="icons/capsule-right-{{capsuleColor}}.png"></cover-image>
</cover-view>
</cover-view>
</cover-view>
<view class="content-container">
<slot></slot>
</view>
</view>
.container{position:relative}.container .capsule-bar{width:100%;position:fixed;display:flex;flex-direction:column;top:0;left:0;z-index:999}.container .capsule-bar .status-bar{width:100%}.container .capsule-bar .title-bar{width:100%;display:flex;align-items:center;justify-content:center;margin-top:-4rpx;padding-top:4rpx;box-sizing:border-box}.container .capsule-bar .title-bar .title{font-size:36rpx;font-weight:700}.container .capsule-bar .capsule-button{border-radius:99999px;display:flex;align-items:center;border:1px solid rgba(0,0,0,.1);position:fixed}.container .capsule-bar .capsule-button .icon-wrapper-hover-black{background-color:rgba(0,0,0,.36)}.container .capsule-bar .capsule-button .icon-wrapper-hover-white{background-color:rgba(255,255,255,.339)}.container .capsule-bar .capsule-button .icon-wrapper{display:flex;justify-content:center;align-items:center}.container .capsule-bar .capsule-button .icon-wrapper .icon-left{display:block;width:20rpx;height:34rpx}.container .capsule-bar .capsule-button .icon-wrapper .icon-right{display:block;width:38rpx;height:34rpx}.container .capsule-bar .capsule-button .line{height:18px;width:1px;line-height:1;background-color:rgba(255,255,255,.25)}.container .content-container{width:100%;position:absolute;left:0}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-img-class","l-title-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{image:String,title:String,describe:String,plaintext:Boolean,full:Boolean,position:{type:String,value:"left",options:["left","right"]},type:{type:String,value:"primary",options:["primary","avatar","cover"]},imageMode:{type:String,value:"scaleToFill"}},data:{},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}">
<block wx:if="{{type ==='primary' || type ==='cover'}}">
<image wx:if="{{!plaintext}}" class="l-img-class {{full?'cover-img-full':'cover-img-unfull'}} {{ 'card-img-' + type }} {{ 'card-img-' + type + '-' + position }}" mode="{{imageMode}}" lazy-load src="{{image}}"></image>
<view class="card-content">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<slot/>
</view>
</block>
<block wx:if="{{type ==='avatar'}}">
<view class="card-avatar-top">
<view class="card-avatar-left">
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
<view class="card-avatar">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<text class="describe">{{describe}}</text>
</view>
</view>
<slot name="more"/>
</view>
<slot/>
</block>
</view>
\ No newline at end of file
.card-container{margin:0 auto;padding:30rpx;box-sizing:border-box;background:#fff;display:flex}.card-container-full{width:100%}.card-container-unfull{width:92%;box-shadow:0 4rpx 20rpx 0 rgba(212,217,223,.5);border-radius:4px}.card-container-primary-left{flex-direction:row}.card-container-primary-right{flex-direction:row-reverse}.card-container-avatar{flex-direction:column}.card-container-cover{flex-direction:column}.cover-img-full{width:100%;height:260rpx}.cover-img-unfull{width:100%;height:260rpx}.card-img-primary{height:240rpx;width:240rpx;overflow:hidden}.card-img-primary-left{margin-right:40rpx}.card-img-primary-right{margin-left:40rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-content{position:relative;display:flex;flex-direction:column;flex:1}.card-title{overflow:hidden;text-overflow:ellipsis;color:#333}.card-title-primary{font-size:32rpx;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.card-title-avatar{font-size:28rpx}.card-title-cover{font-size:30rpx;margin-top:10rpx}.card-title-avatar{font-size:28rpx}.card-avatar-top{display:flex;flex-direction:row;height:100rpx;align-items:center;justify-content:space-between}.card-avatar-left{display:flex;flex-direction:row;align-items:center}.card-avatar{display:flex;flex-direction:column}.describe{color:#666;font-size:24rpx}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class"],relations:{"../checkbox/index":{type:"child",linked(e){this.init(e)},linkChanged(){},unlinked(){}}},properties:{placement:{type:String,value:"column"},maxSelected:{type:[Number,null],value:null},minSelected:{type:[Number,null],value:null}},data:{},attached(){let{minSelected:e,maxSelected:t}=this.properties;this.checkMax(e,t)},methods:{init(e){void 0===this._keys&&(this._keys={}),void 0===this._selected&&(this._selected={}),this.checkDefaultItem(e),this.checkedKeyRepeat(e)},checkedKeyRepeat(e){let{key:t}=e.properties;if(this._keys[t])throw new Error("keys有重复元素, checkbox的key属性不能重复:"+t);this._keys[t]=!0},checkDefaultItem(e){const{key:t,checked:l,cell:s}=e.properties;l&&(this._selected[t]={...s,checked:!0,value:t})},checkMax(e,t){if(null!==e&&e<0)throw new Error("最小选择个数必须大于等于0");if(null!==t&&t<0)throw new Error("最多选择个数必须大于0");if(null!==t&&null!==e&&e>=t)throw new Error("最多选择个数必须大于最小选择个数")},onEmitEventHandle(e){e.checked?this.addSelect(e):this.removeSelect(e.key),this.validatorData({[this.data.name]:Object.values(this._selected)}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},onEmitOverflowHandle(e){this.triggerEvent("linout",e,{bubbles:!0,composed:!0})},removeSelect(e){delete this._selected[e]},addSelect(e){let{key:t,...l}=e;this._selected[t]={...l,value:t}},getValues(){return Object.values(this._selected)},reset(){this._selected={};return this.getRelationNodes("../checkbox/index").forEach(e=>e.setData({checked:!1}))}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-checkbox":"../checkbox/index"}}
\ No newline at end of file
<view class="l-class checkbox-group checkbox-group-{{placement}}">
<slot></slot>
</view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.checkbox-group{flex-wrap:wrap}.checkbox-group-row{display:flex;flex-direction:row}.checkbox-group-column{display:flex;flex-direction:column}
\ No newline at end of file
Component({behaviors:["wx://form-field"],externalClasses:["l-class","l-disabled-class"],relations:{"../checkbox-group/index":{type:"parent"}},options:{multipleSlots:!0},properties:{placement:{type:String,value:"left"},custom:{type:Boolean,value:!1},key:{type:String,value:""},cell:{type:Object,value:{}},size:{type:String,value:"38rpx"},disabled:{type:Boolean,value:!1},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},color:{type:String,value:"#ccc"},checked:{type:Boolean,value:!1}},data:{parentPlacement:""},ready(){const e=this.getRelationNodes("../checkbox-group/index")[0];let{placement:t}=e.properties;this.setData({parentPlacement:t})},methods:{onCheckboxChangeTap(){if(this.properties.disabled||this.data.parentDisabled)return;const e=this.getRelationNodes("../checkbox-group/index")[0];if(this.properties.checked){if(this.isOverflow("minSelected"))return}else if(this.isOverflow("maxSelected"))return;const t={checked:!this.properties.checked,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(t)},isOverflow(e){const t=this.getRelationNodes("../checkbox-group/index")[0],l=t.properties[e];if(!l)return!1;const i=Object.values(t._selected).length;let o="minSelected"===e?i<=l:i>=l;if(o){let i="minSelected"===e?"min_selected":"max_selected";t.onEmitOverflowHandle&&t.onEmitOverflowHandle({key:this.properties.key,limitNumber:l,type:"overflow_"+i})}return o}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-button":"../button/index"}}
\ No newline at end of file
<view bind:tap="onCheckboxChangeTap" class="label label-{{placement}} label-placement-{{parentPlacement}} {{disabled ? 'label-disabled l-disabled-class' : 'l-class'}}">
<view class="checkbox" style="color:{{checked ? selectColor : (disabled ? disabledColor : color)}};font-size: {{size}}">
<slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view>
</view>
<slot/>
</view>
.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%;box-sizing:border-box}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.label-placement-row{padding-right:30rpx}.checkbox{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABxgAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBeIFdATYCJAMMCwgABCAFhG0HQBstBlGUzMkA2c8E020e0uBCKA1ReoTOr2jhX60Fez8evvb7nbu7X40GSTTS8S6aRBOpkCB1plMyIWkJb/+nLTemUXn+tjy1proDbGd+u9OXhuW20ygDQoJwOPhjfw50kxP0dlsW4tKSEtLyKhWqIpT/3MKy5KTZgMvpr8TnWZbTWts2jgmYYEBjDHuKrEQCzjUF2R2BWvJ9Am0LeioHm9MVtBXOskC8RIED7VJMUaRiU6i37C3iHV4zvaZPKG/x5+OfLdoktcxZe/S89mH27bv8VD0phAT5ch5Ih8jYBApx3eq7Uktzm2rahqZu1oO6IqSlklVFLDMN9YP+8RJR55R2wSrNJ775IoLvWEgggzoKDoFYipp4U38JhsVnsZqMDSLDTR9O5v6lxM+emWKnJ0j1WkJfv81PpvtdvqfbrTPuXw1+/Yswbx81bvFu4GNdLq7/WnYQrkR7OT7DTrwSHIOw0QhHGI+BEQb/TCiV/n/7MQFAQ9mO3iwSi9Gz9MCEpIu0tWgZiFkilLN8tRFgA1SnfMgz8o0Kgo9Q+Gcx3f/tTgFfe45JtDoVFO7QvAt/8FflYE8xlY49F13my+xAtjTRk6ASOahCOaGxn+mGGVxKaJrlSBrmkTUtkoWziZqOLdQ1baNtw/Zwx4SoidLCuneCMPSBpO8T2dAXWTjfqJnzi7ph1NB2EdwzO5Yj6oaEHCUf3UeMPM6N59RuUn6m4DZ1pKiMuTckZZTE8WBULW4pJ1liQ3kXTFQNGuEMN+QxSlPGQjgmTwehajEdDk3biwYeZ9C1TxCHIj7keoQiHpYz4XDVrb3/jARupRzS09AQv0FEKRodjQ2MAHKry6GGR2FTuhOYUMpAhmAZtCEekro5hor2WTHiUQPhhExhasgGGVQ32N6Q/UCp1ILzXI4UOYrOQ0he4vKDxXk7twIAAAAA') format('woff2')}.icon-unselect:before{content:"\e727"}.icon-select:before{content:"\e725"}
\ No newline at end of file
Component({externalClasses:["l-value-class"],properties:{percent:{type:Number,value:0},outerDiameter:{type:Number,value:220},innerDiameter:{type:Number,value:170},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},innerColor:{type:String,value:"#FFFFFF"},active:{type:Boolean,value:!1},duration:{type:Number,value:30},showValue:{type:Boolean,value:!1},valueColor:{type:String},valueSize:{type:Number,value:25}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{displayPercent:0},observers:{percent:async function(e){if(e>100)this.setData({percent:100});else if(e<0)this.setData({percent:0});else if(this.data.active){let t=this.data.displayPercent;if(t<e)for(;t<e;)await this.sleep(this.data.duration),t+=1,this.setData({displayPercent:t});else if(t>e)for(;t>e;)await this.sleep(this.data.duration),t-=1,this.setData({displayPercent:t})}else this.setData({displayPercent:e})},outerDiameter:function(e){e<this.data.innerDiameter&&(e=this.data.innerDiameter,this.setData({outerDiameter:e}))},innerDiameter:function(e){e<0&&this.setData({innerDiameter:0})}},methods:{sleep:e=>new Promise(t=>{setTimeout(t,e)})}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="sector {{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ? 'sector1' : 'sector2'}}" style="height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?activeColor?'background:'+activeColor:'':'background:'+backgroundColor}}">
<view wx:if="{{displayPercent !== 0 && displayPercent !== 100}}" class="sx1" style="height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;clip: rect(0rpx, {{outerDiameter/2}}rpx, {{outerDiameter}}rpx, 0rpx);background:{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?backgroundColor:activeColor?activeColor:''}}"></view>
<view wx:if="{{displayPercent !== 50 && displayPercent !== 0 && displayPercent !== 100}}" class="sx2" style="transform: rotate({{displayPercent < 50 ? ((360 * displayPercent / 100) - 180):(360 * (displayPercent - 100) / 100)}}deg);height:{{outerDiameter}}rpx;width:{{outerDiameter}}rpx;clip: rect(0rpx, {{outerDiameter/2}}rpx, {{outerDiameter}}rpx, 0rpx);background:{{((displayPercent < 50 && displayPercent !== 0) || displayPercent === 100) ?backgroundColor:activeColor}}"></view>
<view class="sx_t" style="width:{{innerDiameter}}rpx;height:{{innerDiameter}}rpx;background:{{innerColor}}">
<view wx:if="{{showValue}}" class="l-value-class" style="color:{{valueColor?valueColor:''}};font-size:{{valueSize}}rpx">
{{displayPercent}}%
</view>
<slot></slot>
</view>
</view>
.sector{position:relative;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.sx1,.sx2{position:absolute;top:0;left:0}.sx1{z-index:1}.sx2{z-index:2}.sx_t{border-radius:50%;z-index:3;display:flex;flex-direction:row;justify-content:center;align-items:center}.sector1{background:#3963bc}.sector2 .sx1,.sector2 .sx2{background:#3963bc;transform:rotate(180deg)}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-title-class","l-body-class"],relations:{"../collapse/index":{type:"parent"}},options:{multipleSlots:!0,pureDataPattern:/^_/},properties:{itemId:{type:String,value:"default"},title:{type:String,value:"默认标题"},customTitle:{type:Boolean,value:!1},disable:{type:Boolean,value:!1},animationTime:{type:String,value:"0.3"}},data:{bodyHeight:"0",isExpandContent:!1,_idDefault:-1},methods:{async onTapTitle(){if(this.data.disable)return;let t=this.getRelationNodes("../collapse/index");await t[0].onTapCollapseItem(this)},async foldContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.data.isExpandContent?(this.setData({bodyHeight:t.height+"px"}),setTimeout(()=>{this.setData({isExpandContent:!1,bodyHeight:"0px"})},20)):this.setData({isExpandContent:!1,bodyHeight:"0px"})},async expandContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.setData({isExpandContent:!0,bodyHeight:t.height+"px"})},onTransitionend(){this.data.isExpandContent&&this.setData({bodyHeight:"auto"})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-list":"../list/index","l-icon":"../icon/index"}}
\ No newline at end of file
<view class="container l-class">
<view bind:tap="onTapTitle" class="container-title l-title-class">
<view style="{{disable?'color:#DEE2E6':''}}" wx:if="{{!customTitle}}">{{title}}</view>
<l-icon class="container-title-icon" wx:if="{{!customTitle}}" style="{{isExpandContent?'transform:rotate(-180deg);':''}}" name="down" size="28" color="{{disable?'#DEE2E6':'#333'}}"></l-icon>
<slot name="title"></slot>
</view>
<view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s">
<view class="container-body-wrapper l-body-class">
<slot></slot>
</view>
</view>
</view>
.container{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.container-title{display:flex;justify-content:space-between;padding:10rpx;align-items:center;font-size:32rpx;color:#333}.container-title-l-icon{transition:.3s}.container-body{width:100%;color:#888;box-sizing:border-box;font-size:28rpx;transition:height .3s ease-in-out;overflow:hidden}.container-body-wrapper{position:relative;padding:10rpx}
\ No newline at end of file
Component({options:{pureDataPattern:/^_/},relations:{"../collapse-item/index":{type:"child",linked:function(){this._setAllItemId()},linkChanged:function(){this._setAllItemId()},unlinked:function(){this._setAllItemId()}}},lifetimes:{ready:function(){this.updateView()}},properties:{type:{type:String,value:"normal"},expandItemId:{type:Array,value:[]}},data:{_expandItems:[]},observers:{expandItemId:function(){this.updateView()}},methods:{async updateView(){let t;t="accordion"===this.data.type?this.data.expandItemId.slice(0,1):this.data.expandItemId;let e=this.getRelationNodes("../collapse-item/index");for(let a=0;a<e.length;a++){let d=e[a],i="default"===d.data.itemId?a:d.data.itemId;t.indexOf(i)>-1&&!d.isExpandContent?await this.setCollapseItemStatus(d,!0):(d.isExpandContent||"accordion"===this.data.type)&&await this.setCollapseItemStatus(d,!1)}},async onTapCollapseItem(t){"accordion"===this.data.type&&await this.foldAllExpandItem(t),this.setCollapseItemStatus(t,!t.data.isExpandContent),t.data.isExpandContent?this.triggerEvent("linfold",{id:t.data.itemId?t.data.itemId:t.data._idDefault}):this.triggerEvent("linexpand",{id:t.data.itemId?t.data.itemId:t.data._idDefault})},async setCollapseItemStatus(t,e){if(e)t.expandContent(),this.data._expandItems.push(t);else{await t.foldContent();for(let e=0;e<this.data._expandItems.length;e++)this.data._expandItems[e]===t&&this.data._expandItems.splice(e,1)}},foldAllExpandItem(t){for(let e=0;e<this.data._expandItems.length;e++)t!==this.data._expandItems[e]&&this.data._expandItems[e].foldContent();this.data._expandItems=[]},_setAllItemId(){this.getRelationNodes("../collapse-item/index").forEach((t,e)=>{t.data._idDefault=e})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container">
<slot></slot>
</view>
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class-header","l-class-active","l-class-inactive","l-class-line","l-class-tabimage","l-header-class","l-active-class","l-inactive-class","l-line-class","l-tabimage-class","l-content-class"],relations:{"../tabpanel/index":{type:"child"},linked(){this.initTabs()}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},aminmated:Boolean,scrollable:Boolean,swipeable:{type:Boolean,value:!0},hasLine:{type:Boolean,value:!0},activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"}},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},ready(){this.initTabs()},methods:{initTabs(){this.initTabList(),this.initActiveIndex()},initActiveIndex(t=this.data.activeKey){let e=t,a=this.data.currentIndex;this.data.tabList.forEach((s,i)=>{e=t||0!==i?e:s.key,a=s.key===e?i:a}),this.setData({activeKey:e,currentIndex:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})},initTabList(){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){const e=[];t.forEach(t=>{const a=e.findIndex(e=>e.tab===t.data.tab);let s={};-1===a&&(s={tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconStyle:t.data.iconStyle,image:t.data.image,subTabs:[]},e.push(s));const i=-1===a?s:e[a];if(t.data.subTab){i.subTabs=i.subTabs||[];const e={tab:t.data.subTab,key:t.data.subKey};i.subTabs.push(e),i.activeSubKey=this.data.subActiveKey||i.subTabs[0].key,i.subCurrentIndex=0}}),this.setData({tabList:e})}},swiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const t=a,e=this.data.tabList[a].key,s=this.data.tabList[t].subCurrentIndex,i=this.data.tabList[t].activeSubKey;this._setChangeData({activeKey:e,currentIndex:t,subCurrentIndex:s,activeSubKey:i})}},subSwiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const{currentIndex:t,activeKey:e}=this.data,s=a,i=this.data.tabList[t].subTabs[s].key,n=this.data.tabList[t];n.activeSubKey=i,n.subCurrentIndex=s,this.setData({[`tabList[${t}]`]:n}),this._setChangeData({activeKey:e,currentIndex:t,activeSubKey:i,subCurrentIndex:s})}},handleChange(t){const e="subTab"===t.currentTarget.dataset.headerType,{currentIndex:a,activeKey:s}=this.data,i=t.currentTarget.dataset.index,n=e?i:this.data.tabList[i].subCurrentIndex,r=e?this.data.tabList[a].subTabs[n].key:this.data.tabList[i].activeSubKey;if(e){const t=this.data.tabList[a];t.activeSubKey=r,t.subCurrentIndex=n,this.setData({[`tabList[${a}]`]:t}),this._setChangeData({activeKey:s,currentIndex:a,activeSubKey:r,subCurrentIndex:n})}else{const e=t.currentTarget.dataset.key;this._setChangeData({activeKey:e,currentIndex:i,subCurrentIndex:n,activeSubKey:r})}},_setChangeData({activeKey:t,currentIndex:e,activeSubKey:a="",subCurrentIndex:s=null}){this.setData({activeKey:t,currentIndex:e},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:t,currentIndex:e,activeSubKey:a,subCurrentIndex:s})},async queryMultipleNodes(){const{placement:t,activeKey:e,tabList:a}=this.data,s=await nodeUtil.getNodeRectFromComponent(this,"#"+e);if(-1!==["top","bottom"].indexOf(t))this.setData({transformX:s.left-a.length/2*s.width,transformY:0});else{const t=await nodeUtil.getNodeRectFromComponent(this,".l-tabs-header"),e=s.top-t.top-t.height/2;this.setData({transformX:0,transformY:e})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index"}}
\ No newline at end of file
<view class="l-tabs l-placement-top l-tabs-horizontal {{aminmated ? 'l-aminmated' :''}} {{scrollable ? 'l-tabs-scroll':''}}">
<template is="tab-header" data="{{tab:tabList,placemanet,scrollable,transformY,transformX,activeKey,hasLine,activeColor,inactiveColor,headerType:'tab'}}"></template>
<view class="l-tabs l-sub-placement-left l-tabs-vertical {{aminmated ? 'l-aminmated' :''}} {{scrollable ? 'l-tabs-scroll':''}}">
<template is="tab-header" wx:if="{{tabList[currentIndex].subTabs.length}}" data="{{tab:tabList[currentIndex].subTabs,placemanet,scrollable,transformY,transformX,activeKey:tabList[currentIndex].activeSubKey,hasLine,activeColor,inactiveColor,headerType:'subTab'}}"></template>
<view class="l-tabs-main">
<view wx:if="{{!swipeable}}" class="l-tabpanel-content l-content-class">
<view class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':'l-tabpanel-inactive'}}" wx:for="{{tabList}}" wx:key="key" style="{{placement=='left'||placement=='right' ? 'position:absolute;width:100%;height:100%;transform:translate(0,'+ 100 * index +'%) translateZ(0px);':''}}">
<view class="l-subpanel-content" wx:if="{{item.subTabs.length>0}}" style="{{'transform:translate(0,'+ -100 * item.subCurrentIndex +'%) translateZ(0px);'}}">
<view class="l-subpanel" wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot>
</view>
</view>
<slot name="{{item.key}}" wx:else></slot>
</view>
</view>
<swiper wx:else class="l-tabpanel-content l-content-class" bindchange="swiperChange" current="{{currentIndex}}">
<swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<view wx:if="{{item.subTabs.length>0}}">
<swiper class="" vertical bindchange="subSwiperChange" current="{{item.subCurrentIndex}}">
<swiper-item wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot>
</swiper-item>
</swiper>
</view>
<slot name="{{item.key}}" wx:else></slot>
</swiper-item>
</swiper>
</view>
</view>
</view>
<template name="tab-header">
<scroll-view scroll-x="{{headerType==='tab' && scrollable}}" scroll-y="{{headerType==='subTab' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll">
<view class="l-tabs-header l-class-header l-header-class {{hasLine?'l-tabs-header-line':''}}">
<view id="{{item.key}}" class="l-tabs-item {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.image.placement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" wx:for="{{tab}}" wx:key="key" data-key="{{item.key}}" data-index="{{index}}" data-header-type="{{headerType}}" bind:tap="handleChange">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tabimage-class"/>
<l-icon wx:if="{{item.icon}}" l-class="{{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" size="28" color="{{item.key===activeKey?activeColor:inactiveColor}}"/>
{{item.tab}}
<view class="l-tab-line l-class-line l-line-class" wx:if="{{hasLine && item.key===activeKey}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</view>
</scroll-view>
</template>
.l-tabs{display:flex;border-radius:8rpx;box-sizing:border-box;overflow:hidden;flex-direction:column;background:#fff;height:100%}.l-tabs .l-tabs-header{display:flex;width:100%;flex-direction:row;background:#fff;align-items:center}.l-tabs .l-tabs-header .l-tabs-item{flex:1;font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs .l-tabs-header .l-icon-active,.l-tabs .l-tabs-header .l-tabs-active{color:#333;font-size:28rpx}.l-tabs .l-tabs-header .l-icon-inactive,.l-tabs .l-tabs-header .l-tabs-inactive{font-size:28rpx;color:#bbb}.l-tabs .l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs .l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-top .l-tabs-header{height:80rpx}.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-sub-placement-left{flex-direction:row}.l-sub-placement-left .l-tabs-header{flex-direction:column;width:160rpx}.l-sub-placement-left .l-tabs-header>.l-tabs-item{width:100%;height:80rpx;background:#f6f8fa}.l-sub-placement-left .l-tabs-header>.l-tabs-active{background:#fff}.l-sub-placement-left .l-tabs-main .l-tabpanel-content{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;position:relative;will-change:transform;transition:transform .3s cubic-bezier(.645,.045,.355,1)}.l-placement-top .l-tabpanel-content{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.l-subpanel-content{width:100%;height:100%}.l-tabpanel{width:100%;height:100%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:opacity .45s;transition:opacity .45s;opacity:1;text-overflow:ellipsis}.l-tabpanel-inactive{opacity:0;height:0;padding:0!important;pointer-events:none}.l-subpanel{height:100%}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible;min-width:160rpx}.l-tabs-scroll.l-tabs-horizontal .l-tabpanel-content{height:150px}.l-tabs-vertical .l-tabsscroll{width:160rpx}.l-tabs-vertical .l-tabs-header{height:100%;min-height:80rpx;-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;min-height:80rpx}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;right:0;width:0;background:#000}.l-tabs-horizontal .l-tab-line{height:4rpx;margin:0 auto}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-tabs-vertical .l-tabs-active .l-tab-line{width:6rpx!important;height:40rpx!important;border-radius:0 6rpx 6rpx 0;top:0;left:0;margin:auto 0;transition-delay:.1s}.l-sub-placement-left .l-tab-line{left:0;right:auto}.l-sub-placement-left .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-left{flex-direction:row}.l-tabs-main{flex:1}.l-combined-tabs-main{display:flex}
\ No newline at end of file
import{format,complementError,asyncMap,warning,deepMerge}from"./util.js";import validators from"./validator/index.js";import{messages as defaultMessages,newMessages}from"./messages.js";function Schema(e){this.rules=null,this._messages=defaultMessages,this.define(e)}Schema.prototype={messages(e){return e&&(this._messages=deepMerge(newMessages(),e)),this._messages},define(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");let t,s;for(t in this.rules={},e)e.hasOwnProperty(t)&&(s=e[t],this.rules[t]=Array.isArray(s)?s:[s])},validate(e,t={},s){let r,a,o=e,i=t,n=s;if("function"==typeof i&&(n=i,i={}),!this.rules||0===Object.keys(this.rules).length)return void(n&&n());if(i.messages){let e=this.messages();e===defaultMessages&&(e=newMessages()),deepMerge(e,i.messages),i.messages=e}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(t=>{r=this.rules[t],a=o[t],r.forEach(s=>{let r=s;"function"==typeof r.transform&&(o===e&&(o={...o}),a=o[t]=r.transform(a)),r="function"==typeof r?{validator:r}:{...r},r.validator=this.getValidationMethod(r),r.field=t,r.fullField=r.fullField||t,r.type=this.getType(r),r.validator&&(l[t]=l[t]||[],l[t].push({rule:r,value:a,source:o,field:t}))})});const f={};asyncMap(l,i,(e,t)=>{const s=e.rule;let r=!("object"!==s.type&&"array"!==s.type||"object"!=typeof s.fields&&"object"!=typeof s.defaultField);function a(e,t){return{...t,fullField:`${s.fullField}.${e}`}}function o(o=[]){let n=o;if(Array.isArray(n)||(n=[n]),n.length&&warning("async-validator:",n),n.length&&s.message&&(n=[].concat(s.message)),n=n.map(complementError(s)),i.first&&n.length)return f[s.field]=1,t(n);if(r){if(s.required&&!e.value)return n=s.message?[].concat(s.message).map(complementError(s)):i.error?[i.error(s,format(i.messages.required,s.field))]:[],t(n);let r={};if(s.defaultField)for(const t in e.value)e.value.hasOwnProperty(t)&&(r[t]=s.defaultField);r={...r,...e.rule.fields};for(const e in r)if(r.hasOwnProperty(e)){const t=Array.isArray(r[e])?r[e]:[r[e]];r[e]=t.map(a.bind(null,e))}const o=new Schema(r);o.messages(i.messages),e.rule.options&&(e.rule.options.messages=i.messages,e.rule.options.error=i.error),o.validate(e.value,e.rule.options||i,e=>{t(e&&e.length?n.concat(e):e)})}else t(n)}r=r&&(s.required||!s.required&&e.value),s.field=e.field;const n=s.validator(s,e.value,o,e.source,i);n&&n.then&&n.then(()=>o(),e=>o(e))},e=>{!function(e){let t,s,r=[],a={};for(t=0;t<e.length;t++)o=e[t],Array.isArray(o)?r=r.concat.apply(r,o):r.push(o);var o;if(r.length)for(t=0;t<r.length;t++)s=r[t].field,a[s]=a[s]||[],a[s].push(r[t]);else r=null,a=null;n(r,a)}(e)})},getType(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!validators.hasOwnProperty(e.type))throw new Error(format("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod(e){if("function"==typeof e.validator)return e.validator;const t=Object.keys(e),s=t.indexOf("message");return-1!==s&&t.splice(s,1),1===t.length&&"required"===t[0]?validators.required:validators[this.getType(e)]||!1}},Schema.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");validators[e]=t},Schema.messages=defaultMessages;export default Schema;
\ No newline at end of file
export function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const s=JSON.parse(JSON.stringify(this));return s.clone=this.clone,s}}}export const messages=newMessages();
\ No newline at end of file
import*as util from"../util";const ENUM="enum";function enumerable(e,u,n,m,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(u)&&m.push(util.format(r.messages.enum,e.fullField,e.enum.join(", ")))}export default enumerable;
\ No newline at end of file
import required from"./required.js";import whitespace from"./whitespace.js";import type from"./type.js";import range from"./range.js";import enumRule from"./enum.js";import pattern from"./pattern.js";export default{required:required,whitespace:whitespace,type:type,range:range,enum:enumRule,pattern:pattern};
\ No newline at end of file
import*as util from"../util";function pattern(t,e,a,p,n){if(t.pattern)if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern));else if("string"==typeof t.pattern){new RegExp(t.pattern.replace(/^\/|\/$/g,"")).test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern))}}export default pattern;
\ No newline at end of file
import*as util from"../util";function range(e,l,n,m,t){const u="number"==typeof e.len,r="number"==typeof e.min,a="number"==typeof e.max,i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let s=l,f=null;const o="number"==typeof l,g="string"==typeof l,p=Array.isArray(l);if(o?f="number":g?f="string":p&&(f="array"),!f)return!1;p&&(s=l.length),g&&(s=l.replace(i,"_").length),u?s!==e.len&&m.push(util.format(t.messages[f].len,e.fullField,e.len)):r&&!a&&s<e.min?m.push(util.format(t.messages[f].min,e.fullField,e.min)):a&&!r&&s>e.max?m.push(util.format(t.messages[f].max,e.fullField,e.max)):r&&a&&(s<e.min||s>e.max)&&m.push(util.format(t.messages[f].range,e.fullField,e.min,e.max))}export default range;
\ No newline at end of file
import*as util from"../util";function required(e,r,i,u,t,l){!e.required||i.hasOwnProperty(e.field)&&!util.isEmptyValue(r,l||e.type)||u.push(util.format(t.messages.required,e.fullField))}export default required;
\ No newline at end of file
import*as util from"../util";import required from"./required";const pattern={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:e=>types.number(e)&&parseInt(e,10)===e,float:e=>types.number(e)&&!types.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear,number:e=>!isNaN(e)&&""!==e,object:e=>"object"==typeof e&&!types.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&!!e.match(pattern.email)&&e.length<255,url:e=>"string"==typeof e&&!!e.match(pattern.url),hex:e=>"string"==typeof e&&!!e.match(pattern.hex)};function type(e,t,r,a,f){if(e.required&&void 0===t)return void required(e,t,r,a,f);const p=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(p)>-1?types[p](t)||a.push(util.format(f.messages.types[p],e.fullField,e.type)):p&&typeof t!==e.type&&a.push(util.format(f.messages.types[p],e.fullField,e.type))}export default type;
\ No newline at end of file
import*as util from"../util";function whitespace(t,e,s,i,a){(/^\s+$/.test(e)||""===e)&&i.push(util.format(a.messages.whitespace,t.fullField))}export default whitespace;
\ No newline at end of file
const formatRegExp=/%[sdj%]/g;export let warning=()=>{};export function format(...t){let e=1;const r=t[0],n=t.length;if("function"==typeof r)return r.apply(null,t.slice(1));if("string"==typeof r){let i=String(r).replace(formatRegExp,r=>{if("%%"===r)return"%";if(e>=n)return r;switch(r){case"%s":return String(t[e++]);case"%d":return Number(t[e++]);case"%j":try{return JSON.stringify(t[e++])}catch(t){return"[Circular]"}default:return r}});for(let r=t[e];e<n;r=t[++e])i+=" "+r;return i}return r}function isNativeStringType(t){return"string"===t||"url"===t||"hex"===t||"email"===t||"pattern"===t}export function isEmptyValue(t,e){return null==t||(!("array"!==e||!Array.isArray(t)||t.length)||!(!isNativeStringType(e)||"string"!=typeof t||t))}export function isEmptyObject(t){return 0===Object.keys(t).length}function asyncParallelArray(t,e,r){const n=[];let i=0;const l=t.length;function a(t){n.push.apply(n,t),i++,i===l&&r(n)}t.forEach(t=>{e(t,a)})}function asyncSerialArray(t,e,r){let n=0;const i=t.length;!function l(a){if(a&&a.length)return void r(a);const c=n;n+=1,c<i?e(t[c],l):r([])}([])}function flattenObjArr(t){const e=[];return Object.keys(t).forEach(r=>{e.push.apply(e,t[r])}),e}export function asyncMap(t,e,r,n){if(e.first){return asyncSerialArray(flattenObjArr(t),r,n)}let i=e.firstFields||[];!0===i&&(i=Object.keys(t));const l=Object.keys(t),a=l.length;let c=0;const o=[],s=t=>{o.push.apply(o,t),c++,c===a&&n(o)};l.forEach(e=>{const n=t[e];-1!==i.indexOf(e)?asyncSerialArray(n,r,s):asyncParallelArray(n,r,s)})}export function complementError(t){return e=>e&&e.message?(e.field=e.field||t.fullField,e):{message:e,field:e.field||t.fullField}}export function deepMerge(t,e){if(e)for(const r in e)if(e.hasOwnProperty(r)){const n=e[r];"object"==typeof n&&"object"==typeof t[r]?t[r]={...t[r],...n}:t[r]=n}return t}
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function array(r,e,a,u,i){const t=[];if(r.required||!r.required&&u.hasOwnProperty(r.field)){if(isEmptyValue(e,"array")&&!r.required)return a();rules.required(r,e,u,t,i,"array"),isEmptyValue(e,"array")||(rules.type(r,e,u,t,i),rules.range(r,e,u,t,i))}a(t)}export default array;
\ No newline at end of file
import{isEmptyValue}from"../util";import rules from"../rule/index.js";function boolean(e,r,i,u,o){const t=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,t,o),void 0!==r&&rules.type(e,r,u,t,o)}i(t)}export default boolean;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function date(e,r,t,i,u){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return t();if(rules.required(e,r,i,l,u),!isEmptyValue(r)){let t;t="number"==typeof r?new Date(r):r,rules.type(e,t,i,l,u),t&&rules.range(e,t.getTime(),i,l,u)}}t(l)}export default date;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";const ENUM="enum";function enumerable(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),r&&rules.enum(e,r,i,l,t)}u(l)}export default enumerable;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function floatFn(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default floatFn;
\ No newline at end of file
import string from"./string";import method from"./method";import number from"./number";import boolean from"./boolean";import regexp from"./regexp";import integer from"./integer";import float from"./float";import array from"./array";import object from"./object";import enumValidator from"./enum";import pattern from"./pattern";import date from"./date";import required from"./required";import type from"./type";export default{string:string,method:method,number:number,boolean:boolean,regexp:regexp,integer:integer,float:float,array:array,object:object,enum:enumValidator,pattern:pattern,date:date,url:type,hex:type,email:type,required:required};
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function integer(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default integer;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function method(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default method;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function number(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),void 0!==r&&(rules.type(e,r,i,l,t),rules.range(e,r,i,l,t))}u(l)}export default number;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function object(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default object;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function pattern(r,e,t,i,u){const n=[];if(r.required||!r.required&&i.hasOwnProperty(r.field)){if(isEmptyValue(e,"string")&&!r.required)return t();rules.required(r,e,i,n,u),isEmptyValue(e,"string")||rules.pattern(r,e,i,n,u)}t(n)}export default pattern;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function regexp(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),isEmptyValue(r)||rules.type(e,r,u,l,t)}i(l)}export default regexp;
\ No newline at end of file
import rules from"../rule/index.js";function required(r,e,u,i,o){const t=[],a=Array.isArray(e)?"array":typeof e;rules.required(r,e,i,t,o,a),u(t)}export default required;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function string(e,r,i,t,s){const u=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r,"string")&&!e.required)return i();rules.required(e,r,t,u,s,"string"),isEmptyValue(r,"string")||(rules.type(e,r,t,u,s),rules.range(e,r,t,u,s),rules.pattern(e,r,t,u,s),!0===e.whitespace&&rules.whitespace(e,r,t,u,s))}i(u)}export default string;
\ No newline at end of file
import rules from"../rule/index.js";import{isEmptyValue}from"../util";function type(e,r,t,i,u){const p=e.type,l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r,p)&&!e.required)return t();rules.required(e,r,i,l,u,p),isEmptyValue(r,p)||rules.type(e,r,i,l,u)}t(l)}export default type;
\ No newline at end of file
class DataUtil{setDiffData(t,a){const e={};Object.keys(a).forEach(s=>{t.data[s]!==a[s]&&(e[s]=a[s])}),Object.keys(e).length&&t.setData(e)}}const dataUtil=new DataUtil;export default dataUtil;
\ No newline at end of file
function EventBusClass(){this.msgQueues={}}EventBusClass.prototype={on:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)?"function"==typeof this.msgQueues[s]?this.msgQueues[s]=[this.msgQueues[s],e]:this.msgQueues[s]=[...this.msgQueues[s],e]:this.msgQueues[s]=e},one:function(s,e){this.msgQueues[s]=e},emit:function(s,e){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&("function"==typeof this.msgQueues[s]?this.msgQueues[s](e):this.msgQueues[s].map(s=>{s(e)}))},off:function(s){Object.prototype.hasOwnProperty.call(this.msgQueues,s)&&delete this.msgQueues[s]}};const EventBus=new EventBusClass;export default EventBus;
\ No newline at end of file
class EventUtil{emit(e,t,l){e.triggerEvent(t,l,{bubbles:!0,composed:!0,capturePhase:!0})}}const eventUtil=new EventUtil;export default eventUtil;
\ No newline at end of file
class NodeUtil{async getNodeRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().select(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodesRectFromComponent(e,t){return await new Promise(o=>{e.createSelectorQuery().selectAll(t).boundingClientRect(e=>{o(e)}).exec()})}async getNodeFieldsFromComponent(e,t,o){return await new Promise(n=>{e.createSelectorQuery().select(t).fields(o,e=>{n(e)}).exec()})}}const nodeUtil=new NodeUtil;export default nodeUtil;
\ No newline at end of file
class PixelUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.screenWidth*t}rpx2px(t){return t/750*this.systemInfo.screenWidth}}const pixelUtil=new PixelUtil(wx.getSystemInfoSync());export default pixelUtil;
\ No newline at end of file
Component({externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1,result:1},observers:{"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;this.triggerEvent("linout",{type:e,way:"icon"},{bubbles:!0,composed:!0})},onCount(){this.setData({focus:!0})},onBlur(t){this.setData({focus:!1});let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{this.data.count=this.data.result,this.triggerEvent("lintap",{count:this.data.result,type:"blur"},{bubbles:!0,composed:!0})})},50)},blurCount(t,e){t?this.valueRange(t):this.setData({result:this.properties.count}),e&&e()},valueRange(t,e="input"){t>this.properties.max?this.setData({result:this.properties.max},()=>{this.triggerEvent("linout",{type:"overflow_max",way:e},{bubbles:!0,composed:!0})}):t<this.properties.min?this.setData({result:this.properties.min},()=>{this.triggerEvent("linout",{type:"overflow_min",way:e},{bubbles:!0,composed:!0})}):this.setData({result:t})},reduceTap(){this.data.count-this.properties.step<=this.properties.min?this.data.count=this.properties.min:this.data.count-=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"reduce"},{bubbles:!0,composed:!0})},addTap(){this.data.count+this.properties.step>=this.properties.max?this.data.count=this.properties.max:this.data.count+=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"add"},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-class container-count">
<view class="symbol {{result<=min|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result<=min|| disabled?'doNothing':'reduceTap'}}" data-type="overflow_min" hover-class="count-hover">
<view class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/>
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}" data-type="overflow_max" hover-class="count-hover">
<view class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
</view>
\ No newline at end of file
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8}
\ No newline at end of file
import countDownBehaviors from"../behaviors/countdown";Component({externalClasses:["l-class","l-class-time","l-time-class"],behaviors:[countDownBehaviors],properties:{doneText:{type:String,value:"已结束"}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-countdown l-class">
<view class="l-countdown-item" wx:for="{{date}}" wx:key="index"><text class="l-class-time l-time-class l-countdown-time">{{item.value}}</text>{{item.name}}</view>
</view>
\ No newline at end of file
.l-countdown{font-size:28rpx;line-height:40px}.l-countdown-item{display:inline-block;color:inherit}.l-countdown-time{display:inline-flex;width:56rpx;height:56rpx;background:#45526b;border-radius:4rpx;color:#fff;align-items:center;justify-content:center;margin:0 16rpx}
\ No newline at end of file
import hover from"../behaviors/hover";Component({behaviors:[hover],externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1,result:1},observers:{"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;this.triggerEvent("linout",{type:e,way:"icon"},{bubbles:!0,composed:!0})},onCount(){this.setData({focus:!0})},onBlur(t){this.setData({focus:!1});let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{this.data.count=this.data.result,this.triggerEvent("lintap",{count:this.data.result,type:"blur"},{bubbles:!0,composed:!0})})},50)},blurCount(t,e){t?this.valueRange(t):this.setData({result:this.properties.count}),e&&e()},valueRange(t,e="input"){t>this.properties.max?this.setData({result:this.properties.max},()=>{this.triggerEvent("linout",{type:"overflow_max",way:e},{bubbles:!0,composed:!0})}):t<this.properties.min?this.setData({result:this.properties.min},()=>{this.triggerEvent("linout",{type:"overflow_min",way:e},{bubbles:!0,composed:!0})}):this.setData({result:t})},reduceTap(){this.data.count-this.properties.step<=this.properties.min?this.data.count=this.properties.min:this.data.count-=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"reduce"},{bubbles:!0,composed:!0})},addTap(){this.data.count+this.properties.step>=this.properties.max?this.data.count=this.properties.max:this.data.count+=this.properties.step,this.setData({result:this.data.count}),this.triggerEvent("lintap",{count:this.data.result,type:"add"},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-class container-count">
<view class="symbol {{result<=min|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result<=min|| disabled?'doNothing':'reduceTap'}}" data-type="overflow_min" hover-class="{{isHover?'count-hover':''}}">
<view class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/>
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}" catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}" data-type="overflow_max" hover-class="{{isHover?'count-hover':''}}">
<view class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view>
</view>
\ No newline at end of file
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8}
\ No newline at end of file
Component({properties:{position:{type:String,value:"bottom"},show:{type:Boolean,value:!0},selected:{type:Number,value:0},color:{type:String,value:"#707070"},selectedColor:{type:String,value:"3963BC"},borderStyle:{type:String,value:"#f6f6f6"},backgroundColor:{type:String,value:"#fff"},backgroundImg:{type:String,value:""},fontSize:{type:Number,value:24},isRedirectToTab:{type:Boolean,value:!0},isNav:{type:Boolean,value:!0},list:{type:Array,value:[]}},data:{},attached(){},methods:{switchTab(t){const e=t.currentTarget.dataset,a=e.path;this.data.isNav&&(this.data.isRedirectToTab,wx.switchTab({url:a})),this.showItem(e.index)},show(){this.setData({show:!0})},hide(){this.setData({show:!1})},showItem(t){this.setData({selected:t});let e={idx:t,path:this.route};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})},showRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!0})},hideRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!1})},setTabBarBadge(t,e){const a=`list[${t}].badge`;this.setData({[a]:e})},removeTabBarBadge(t){const e=`list[${t}].badge`;this.setData({[e]:""})}}});
\ No newline at end of file
{"component":true}
\ No newline at end of file
<view wx:if="{{show}}" class="tab-bar tab-bar-{{position}}" style='background: {{backgroundImg? "url("+ backgroundImg+ ")" : backgroundColor}}'>
<view class="tab-bar-border" style="background: {{borderStyle}}"></view>
<view wx:for="{{list}}" wx:for-index="idx" wx:key="index" class="tab-bar-item {{item.style === 'circle' ? 'circle': ''}}" data-path="{{item.pagePath}}" data-index="{{idx}}" bindtap="switchTab">
<view wx:if="{{item.style === 'circle'}}" class="item-circle"></view>
<image class="tab-bar-item-image" wx:if="{{item.style !== 'circle'}}" style="height: {{item.iconSize}}rpx; width: {{item.iconSize}}rpx" src="{{selected === idx ? item.selectedIconPath : item.iconPath}}"></image>
<image wx:else class="tab-bar-item-image"></image>
<image class="center-circle" wx:if="{{item.style === 'circle'}}" src="{{selected === idx ? item.selectedIconPath : item.iconPath}}"></image>
<view style="font-size: {{fontSize}}rpx ;color: {{selected === idx ? selectedColor : color}}">{{item.text}}</view>
<view wx:if="{{item.redDot}}" class="reddot"></view>
<view wx:if="{{item.badge}}" class="badge">{{item.badge}}</view>
</view>
</view>
.tab-bar{position:relative;height:110rpx;width:750rpx;background:#fff;display:flex;flex-direction:row;background-position:center center;background-size:100% 100%;padding-bottom:env(safe-area-inset-bottom)}.tab-bar-bottom{position:fixed!important;bottom:0;left:0;right:0}.tab-bar-border{position:absolute;left:0;top:0;width:100%;display:flex;flex-direction:row;height:1rpx;background:#f6f6f6;box-shadow:0 -1px 3px 1px #f6f6f6}.tab-bar-item{position:relative;flex:1;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column}.item-circle{width:120rpx;height:60rpx;background-color:#fff;border-radius:200rpx 200rpx 0 0;border-bottom:none;background:#fff;position:absolute;top:-40rpx;box-shadow:0 -1px 1px 0 #f6f6f6}.tab-bar-item-image{width:64rpx;height:64rpx}.tab-bar-item view{font-size:24rpx}.reddot{height:20rpx;width:20rpx;background:red;border-radius:50%;position:absolute;top:15rpx;margin-left:25rpx}.badge{height:32rpx;line-height:32rpx;padding:0rpx 6rpx;background:red;border-radius:16rpx;position:absolute;font-size:18rpx;color:#fff;top:10rpx;margin-left:25rpx;box-sizing:border-box}.center-circle{height:100rpx;width:100rpx;border-radius:50%;position:absolute;top:-30rpx}
\ No newline at end of file
import computeOffset from"../behaviors/computeOffset";import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,zIndex,hover,validator],externalClasses:["l-class","l-title-class","l-content-class","l-confirm-class","l-cancel-class","l-bg-class"],properties:{show:{type:Boolean,value:!1},type:{type:String,value:"alert",options:["alert","confirm"]},title:{type:String,value:"提示"},showTitle:{type:Boolean,value:!0},content:{type:String,value:""},locked:{type:Boolean,value:!0},confirmText:{type:String,value:"确定"},confirmColor:{type:String,value:"#3683d6"},cancelText:{type:String,value:"取消"},cancelColor:{type:String,value:"#45526b"},titleColor:String,contentColor:{type:String,value:"rgba(89,108,142,1)"},openApi:{type:Boolean,value:!0}},data:{success:null,fail:null},attached(){this.data.openApi&&this.initDialog()},pageLifetimes:{show(){this.data.openApi&&this.initDialog()}},methods:{initDialog(){wx.lin=wx.lin||{},wx.lin.showDialog=t=>{const{type:e="alert",title:o="提示",showTitle:l=!0,content:s="",locked:a=!0,confirmText:i="确定",contentColor:n="rgba(89,108,142,1)",cancelColor:c="#45526b",cancelText:r="取消",confirmColor:h="#3683d6",success:p=null,fail:m=null}=t;return this.setData({type:e,title:o,showTitle:l,content:s,locked:a,confirmText:i,cancelColor:c,cancelText:r,confirmColor:h,contentColor:n,show:!0,fail:m,success:p}),this}},onConfirmTap(){const{success:t}=this.data;t&&t({confirm:!0,cancel:!1,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("linconfirm","confirm",{bubbles:!0,composed:!0})},onCancelTap(){const{success:t}=this.data;t&&t({confirm:!1,cancel:!0,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("lincancel","cancel",{bubbles:!0,composed:!0})},onDialogTap(){!0!==this.data.locked&&this.setData({show:!this.data.show}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-popup":"../popup/index"}}
\ No newline at end of file
<l-popup show="{{show}}" animation="show" contentAlign="center" locked="{{true}}" bind:lintap="onDialogTap" l-bg-class="l-bg-class" z-index="{{zIndex}}">
<view class="dialog-container l-class" style="margin-bottom:{{distance}}px">
<view class="dialog-title l-title-class" style="color:{{titleColor}}" wx:if="{{showTitle}}">{{title}}</view>
<view class="dialog-content l-content-class" style="color:{{contentColor}}">
<slot/>
{{content}}
</view>
<view class="dialog-btn-group">
<view class="dialog-btn-cancel l-cancel-class" style="color: {{cancelColor}}" catchtap="onCancelTap" hover-class="{{isHover?'group-hover':''}}" wx:if="{{type==='confirm'}}">{{cancelText}}</view>
<view class="dialog-btn-confirm l-confirm-class" style="color: {{confirmColor}}" hover-class="{{isHover?'group-hover':''}}" catchtap="onConfirmTap">{{confirmText}}</view>
</view>
</view>
</l-popup>
.dialog-container{display:flex;flex-direction:column;align-items:center;width:520rpx;background:#fff;border-radius:12rpx}.dialog-title{font-size:32rpx;font-family:PingFangSC-Regular;color:#45526b;line-height:44rpx;margin-top:30rpx;padding:0 25rpx;text-align:center}.dialog-content{font-size:28rpx;font-family:PingFangSC-Regular;line-height:40rpx;margin-top:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center;padding:0 25rpx}.dialog-btn-group{width:100%;height:80rpx;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.dialog-btn-cancel{font-size:28rpx;height:80rpx;width:259rpx;border-right:2rpx solid #f3f3f3;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.dialog-btn-confirm{font-size:28rpx;flex:1;color:#3963bc;height:80rpx;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.active{color:#3683d6}.leave{color:#45526b}.group-hover{opacity:.8}
\ No newline at end of file
Component({externalClasses:["l-error-text","l-error-text-class"],properties:{errorText:String},data:{},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="error-text l-error-text l-error-text-class" wx:if="{{errorText}}">{{errorText}}</view>
\ No newline at end of file
.error-text{font-size:22rpx;color:#f4516c;margin-right:20rpx;line-height:2}
\ No newline at end of file
var is = require("./is.wxs");
function _isArray(targetArray, funName) {
if (!is.isArray(targetArray)) {
console.log('[WXS:Array]' + funName + ',targetArray must be array');
return false;
}
return true;
}
/**
* concat 合并数组
* @param {Array} targetArray 目标数组
*/
function concat() {
var length = arguments.length;
var result = [];
var validatorArray = _isArray(arguments[0], 'concat');
if (validatorArray) {
for (var i = 1; i < length; i++) {
result = arguments[0].concat(arguments[i])
}
return result
}
}
/**
* join 数组转成字符串
* @param {Array} targetArray 目标数组
* @param {String} spearator 连接符
*/
function join(targetArray, spearator) {
var validatorArray = _isArray(arguments[0], 'concat');
if (validatorArray) return targetArray.join(spearator);
}
/**
* pop 移除最后一个数组元素,并返回移除后的数组和溢出的值
* @param {Array} targetArray 目标数组
*/
function pop(targetArray) {
var validatorArray = _isArray(arguments[0], 'pop');
if (validatorArray) {
var result = targetArray.pop();
return {
newArray: targetArray,
item: result
}
}
}
/**
* shift 移除第一个数组元素,并返回移除后的数组和溢出的值
* @param {Array} targetArray 目标数组
*/
function shift(targetArray) {
var validatorArray = _isArray(arguments[0], 'shift');
if (validatorArray) {
var result = targetArray.shift();
return {
newArray: targetArray,
item: result
}
}
}
/**
* push 从后追加数组元素,并返回新的数组
* @param {Array} targetArray 目标数组
*/
function push() {
var length = arguments.length;
var validatorArray = _isArray(arguments[0], 'push');
if (validatorArray) {
for (var i = 1; i < length; i++) {
arguments[0].push(arguments[i])
}
return arguments[0]
}
}
/**
* unshift 从前追加数组元素,并返回新的数组
* @param {Array} targetArray 目标数组
*/
function unshift(targetArray) {
var length = arguments.length;
var validatorArray = _isArray(arguments[0], 'unshift');
if (validatorArray) {
for (var i = length - 1; i > 0; i--) {
arguments[0].unshift(arguments[i])
}
return arguments[0]
}
}
/**
* reverse 倒序
* @param {Array} targetArray 目标数组
*/
function reverse(targetArray) {
var validatorArray = _isArray(targetArray, 'reverse');
if (validatorArray) return targetArray.reverse();
}
/**
* slice 截取数组
* @param {Array} targetArray 目标数组
* @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取目标数组中的元素
* @param {Number} endSlice 在该索引(以 0 为基数)处结束提取数组元素
*/
function slice(targetArray, beginSlice, endSlice) {
var validatorArray = _isArray(targetArray, 'slice');
if (validatorArray) return targetArray.slice(beginSlice, endSlice);
}
/**
* splice 截取数组
* @param {Array} targetArray 目标数组
* @param {Number} start
* @param {Number} deleteCount
*/
function splice(targetArray, start, deleteCount) {
var validatorArray = _isArray(targetArray, 'splice');
if (validatorArray) {
if (arguments.length < 4) {
targetArray.splice(start, deleteCount);
} else {
targetArray.splice(start, deleteCount, arguments[3]);
var length = arguments.length;
for (var i = 4; i < length; i++) {
arguments[i] && targetArray.splice(++start, 0, arguments[i])
}
}
return targetArray
}
}
/**
* indexOf 查找数组
* @param {Array} targetArray 目标数组
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置
*
*/
function indexOf(targetArray, searchValue, fromIndex = 0) {
var validatorArray = _isArray(targetArray, 'indexOf');
if (validatorArray) return targetArray.indexOf(searchValue, fromIndex);
}
/**
* lastIndexOf 查找字符串最后出现的位置
* @param {Array} targetArray 目标数组
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置,str.length
*
*/
function lastIndexOf(targetArray, searchValue, fromIndex = 0) {
var validatorArray = _isArray(targetArray, 'lastIndexOf');
if (validatorArray) return targetArray.lastIndexOf(searchValue, fromIndex || targetArray.length);
}
module.exports = {
concat: concat,
join: join,
pop: pop,
shift: shift,
push: push,
unshift: unshift,
reverse: reverse,
slice: slice,
splice: splice,
indexOf:indexOf,
lastIndexOf:lastIndexOf
}
var is = require('./is.wxs');
var object = require('./object.wxs');
function apply(fun, args) {
return args.map(function (item) {
return fun(item)
})
}
function classnames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
if (is.isString(arg) || is.isNumber(arg)) {
classes.push(arg);
} else if (is.isArray(arg) && arg.length) {
var inner = apply(classnames, arg);
if (inner) {
classes.push(inner);
}
} else if (is.isObject(arg)) {
object.keys(arg).forEach(function (key) {
if (arg[key]) {
classes.push(key);
}
})
}
}
return classes.join(' ');
}
module.exports = classnames;
var TYPE = {
NULL: 'null',
UNDEFINED: 'undefined',
NUMBER: 'Number',
STRING: 'String',
BOOLEAN: 'Boolean',
OBJECT: 'Object',
FUNCTION: 'Function',
ARRAY: 'Array',
DATE: 'Date',
REGEXP: 'RegExp'
}
function isUndefined(val) {
return TYPE.UNDEFINED === typeof val;
}
function isNull(val) {
return val === TYPE.NULL;
}
function _jadgeFun(val, type) {
if (isUndefined(val) || isNull(val)) return false;
return TYPE[type] === val.constructor;
}
function isNumber(val) {
return _jadgeFun(val, 'NUMBER');
}
function isString(val) {
return _jadgeFun(val, 'STRING');
}
function isBoolean(val) {
return _jadgeFun(val, 'BOOLEAN');
}
function isObject(val) {
return _jadgeFun(val, 'OBJECT');
}
function isFunction(val) {
return _jadgeFun(val, 'FUNCTION');
}
function isArray(val) {
return _jadgeFun(val, 'ARRAY');
}
function isDate(val) {
return _jadgeFun(val, 'DATE');
}
function isRegExp(val) {
return _jadgeFun(val, 'REGEXP');
}
module.exports = {
isNull: isNull,
isUndefined: isUndefined,
isNumber: isNumber,
isString: isString,
isBoolean: isBoolean,
isObject: isObject,
isFunction: isFunction,
isArray: isArray,
isDate: isDate,
isRegExp: isRegExp
}
var REGEXP = getRegExp('{|}|"', 'g');
function keys(obj) {
return JSON.stringify(obj)
.replace(REGEXP, '')
.split(',')
.map(function(item) {
return item.split(':')[0];
});
}
module.exports.keys = keys;
\ No newline at end of file
var is = require("./is.wxs");
function _isString(targetString, funName) {
if (!is.isString(targetString)) {
console.log('[WXS:String]' + funName + ',targetString must be string');
return false;
}
return true;
}
/**
* toString 返回指定对象的字符串形式
* @param {String} targetString 目标字符串
*/
function toString(targetString) {
return targetString && targetString.toString();
}
/**
* valueOf 返回指定对象的value
* @param {String} targetString 目标字符串
*/
function valueOf(targetString) {
return targetString && targetString.valueOf();
}
/**
* charAt 一个字符串中返回指定的字符。
* @param {String} targetString 目标字符串
* @param {Number} index 返回指定字符的位置
*
*/
function charAt(targetString, index = 0) {
var validatorString = _isString(targetString, 'charAt');
if (validatorString) return targetString.charAt(index);
}
/**
* charCodeAt 返回0到65535之间的整数,表示给定索引处的UTF-16代码单元
* @param {String} targetString 目标字符串
* @param {Number} index 返回指定字符的位置
*
*/
function charCodeAt(targetString, index = 0) {
var validatorString = _isString(targetString, 'charCodeAt');
if (validatorString) return targetString.charCodeAt(index);
}
/**
* indexOf 查找字符串
* @param {String} targetString 目标字符串
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置
*
*/
function indexOf(targetString, searchValue, fromIndex = 0) {
var validatorString = _isString(targetString, 'indexOf');
if (validatorString) return targetString.indexOf(searchValue, fromIndex);
}
/**
* lastIndexOf 查找字符串最后出现的位置
* @param {String} targetString 目标字符串
* @param {String} searchValue 被查找的值
* @param {Number} fromIndex 开始查找的位置,str.length
*
*/
function lastIndexOf(targetString, searchValue, fromIndex = 0) {
var validatorString = _isString(targetString, 'lastIndexOf');
if (validatorString) return targetString.lastIndexOf(searchValue, fromIndex || targetString.length);
}
/**
* slice 取一个字符串的一部分,并返回一新的字符串
* @param {String} targetString 目标字符串
* @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取原字符串中的字符
* @param {Number} endSlice 在该索引(以 0 为基数)处结束提取字符
*
*/
function slice(targetString, beginSlice, endSlice) {
var validatorString = _isString(targetString, 'slice');
if (validatorString) return targetString.slice(beginSlice, endSlice || targetString.length);
}
/**
* split 分割字符串
* @param {String} targetString 目标字符串
* @param {String} separator 从该索引(以 0 为基数)处开始提取原字符串中的字符
* @param {Number} limit
*
*/
function split(targetString, separator, limit) {
var validatorString = _isString(targetString, 'split');
if (validatorString) return targetString.split(separator, limit);
}
/**
* substring 取一个字符串的一部分,并返回一新的字符串
* @param {String} targetString 目标字符串
* @param {Number} indexStart 需要截取的第一个字符的索引,该字符作为返回的字符串的首字母。
* @param {Number} indexEnd 一个 0 到字符串长度之间的整数,以该数字为索引的字符不包含在截取的字符串内。
*
*/
function substring(targetString, indexStart, indexEnd) {
var validatorString = _isString(targetString, 'substring');
if (validatorString) return targetString.substring(indexStart, indexEnd);
}
/**
* toLowerCase 字符串值转为小写形式
* @param {String} targetString 目标字符串
*
*/
function toLowerCase(targetString) {
var validatorString = _isString(targetString, 'toLowerCase');
if (validatorString) return targetString.toLowerCase();
}
/**
* toLocaleLowerCase 字符串值转为小写形式
* @param {String} targetString 目标字符串
*
*/
function toLocaleLowerCase(targetString) {
var validatorString = _isString(targetString, 'toLocaleLowerCase');
if (validatorString) return targetString.toLocaleLowerCase();
}
/**
* toUpperCase 字符串值转为大写形式
* @param {String} targetString 目标字符串
*
*/
function toUpperCase(targetString) {
var validatorString = _isString(targetString, 'toUpperCase');
if (validatorString) return targetString.toUpperCase();
}
/**
* toLocaleUpperCase 根据任何特定于语言环境的案例映射,返回调用字符串值转换为大写的值。
* @param {String} targetString 目标字符串
*
*/
function toLocaleUpperCase(targetString) {
var validatorString = _isString(targetString, 'toLocaleUpperCase');
if (validatorString) return targetString.toLocaleUpperCase();
}
/**
* trim 从一个字符串的两端删除空白字符
* @param {String} targetString 目标字符串
*
*/
function trim(targetString) {
var validatorString = _isString(targetString, 'trim');
if (validatorString) return targetString.trim();
}
module.exports = {
indexOf: indexOf,
charAt: charAt,
charCodeAt: charCodeAt,
toString: toString,
valueOf: valueOf,
lastIndexOf: lastIndexOf,
slice: slice,
split: split,
substring: substring,
toLowerCase: toLowerCase,
toLocaleLowerCase: toLocaleLowerCase,
toUpperCase: toUpperCase,
toLocaleUpperCase: toLocaleUpperCase,
trim: trim
}
function zeroPadding(num, length = 2) {
if((num + "").length >= length) {
return num;
}
return zeroPadding("0" + num, length)
}
module.exports = zeroPadding;
\ No newline at end of file
import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},externalClasses:["l-form-item-class","l-form-label-class","l-form-content-class","l-error-text-class"],behaviors:[rules],relations:{"../form/index":{type:"parent",linked:function(){},linkChanged:function(){},unlinked:function(){}}},properties:{label:String,labelPlacement:{type:String,value:"row"},alignItems:{type:String,value:"start"},labelWidth:{type:String,value:"200rpx"},labelSlot:{type:Boolean,value:!1},name:{type:String,value:""}},data:{isRequired:!1},attached(){this.initRules(),this.isRequired()},methods:{isRequired(){this.data.rules.forEach(e=>{e.required&&this.setData({isRequired:!0})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<view class="l-form-item-class form-item-container {{'label-' + labelPlacement}} {{tipType === 'text' ? 'textHeight': ''}}">
<view class="l-form-label-class label-text {{isRequired ? 'label-text-required': ''}} {{'label-text-' + labelPlacement+ '-' + alignItems}}" style="min-width: {{labelPlacement==='row' ? labelWidth : '100%'}};max-width: {{labelPlacement==='row' ? labelWidth : '100%'}}">
<view wx:if="{{labelSlot}}">
<slot name="label"/>
</view>
<view wx:else>
{{label}}
</view>
</view>
<view class="label-content l-form-content-class">
<slot/>
</view>
<l-error-tip class="error-text" l-error-text-class="l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</view>
.form-item-container{display:flex;align-items:center;border-bottom:1px solid #eee;color:#777;padding:0 20rpx;position:relative}.form-item-container.textHeight{margin-bottom:44rpx}.form-item-container.label-column{flex-direction:column}.form-item-container.label-column .label-text{line-height:44rpx}.form-item-container.label-row{flex-direction:row}.form-item-container.label-row .label-text{line-height:88rpx}.form-item-container .label-text{display:flex;line-height:88rpx}.form-item-container .label-text-column-start{justify-content:flex-start}.form-item-container .label-text-column-end{justify-content:flex-end}.form-item-container .label-text-column-center{justify-content:center}.form-item-container .label-text-row-start{justify-content:flex-start}.form-item-container .label-text-row-end{justify-content:flex-end}.form-item-container .label-text-row-center{justify-content:center}.form-item-container .label-content{flex:1}.form-item-container .label-text-required::before{display:inline-block;margin-right:4px;color:#f5222d;font-family:SimSun,sans-serif;content:'*'}.error-text{text-align:right;line-height:44rpx;color:#f56c6c;font-size:12px;position:absolute;top:100%;left:0;padding-left:24rpx}.row{display:none!important}
\ No newline at end of file
import eventBus from"../core/utils/event-bus.js";import eventUtil from"../core/utils/event-util";Component({externalClasses:["l-form-container-class","l-form-submit-class","l-form-reset-class","l-form-btn-class"],options:{multipleSlots:!0},relations:{"../form-item/index":{type:"child",linked:function(t){this._initItem(t)},linkChanged:function(){},unlinked:function(){}}},properties:{name:{type:String,value:""},isSubmitValidate:{type:Boolean,value:!0}},attached(){this._init()},detached(){for(let t in this._keys)Object.prototype.hasOwnProperty.call(this._keys,t)&&(eventBus.off("lin-form-blur-"+t),eventBus.off("lin-form-change-"+t))},data:{_this:null},methods:{_init(){wx.lin=wx.lin||{},wx.lin.forms=wx.lin.forms||{},wx.lin.forms[this.properties.name]=this,wx.lin.initValidateForm=t=>{wx.lin._instantiation=t},wx.lin.submitForm=function(t){wx.lin.forms[t].submit()},wx.lin.resetForm=function(t){wx.lin.forms[t].reset()}},_initItem(t){this._keys=this._keys||{},this._errors=this._errors||{};const e=t.properties.name;if(eventBus.on("lin-form-blur-"+e,t=>{this._validateItem(t,"blur")}),eventBus.on("lin-form-change-"+e,t=>{clearTimeout(this.change_time),this.change_time=setTimeout(()=>{this._validateItem(t,"change")},200)}),this._keys[e])throw new Error("表单项存在重复的name:"+e);this._keys[e]="",this._errors[e]=[]},_validateItem(t,e){let i=wx.lin._instantiation,s=this._getValues();const r=this.getRelationNodes("../form-item/index").find(e=>e.properties.name===t);if(!i.selectComponent("#"+t))throw new Error("表单项不存在name:"+t);return r.validatorData(s,e),this._errors[t]=r.data.errors,r.data.errors},_forEachNodes(t,e){let i=this.getRelationNodes("../form-item/index");e&&i.reverse(),i.forEach((e,i)=>{t(e,i)})},_validateForm(){let t=wx.lin._instantiation,e=[],i=this._getValues();return this._forEachNodes(s=>{const r=s.properties.name;if(!t.selectComponent("#"+r))throw new Error("表单项不存在name:"+r);s.validatorData(i),this._errors[r]=s.data.errors,e=e.concat(s.data.errors)},!0),e},_getValues(){let t={},e=wx.lin._instantiation;return this._forEachNodes(i=>{const s=i.properties.name,r=e.selectComponent("#"+s);r&&(t[s]=r.getValues())}),t},submit(){let t=this.data.isSubmitValidate?this._validateForm():[];this.triggerEvent("linsubmit",{values:this._getValues(),errors:this.data.isSubmitValidate?this._errors:{},isValidate:0===t.length})},reset(){let t=wx.lin._instantiation;this._forEachNodes(e=>{e.setData({errorText:""});const i=e.properties.name,s=t.selectComponent("#"+i);s&&s.reset()}),eventUtil.emit(this,"linreset")}}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-form-container-class">
<slot/>
</view>
<view class="l-form-btn-class">
<view class="l-form-submit-class" bind:tap="submit">
<slot name="submit"/>
</view>
<view class="l-form-reset-class" bind:tap="reset">
<slot name="reset"/>
</view>
</view>
Component({relations:{"../grid/index":{type:"parent"}},externalClasses:["l-grid-item","l-grid-item-class"],properties:{key:String,cell:{type:Object,value:{}}},data:{index:0},attached(){},observers:{key:function(){const e=this.getRelationNodes("../grid/index")[0];e&&(e.setData({gridItems:[],childNum:0}),e.initGrids())}},lifetimes:{show(){}},methods:{tapGridItem(){this.triggerEvent("linitemtap",{...this.data},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-grid-item l-grid-item-class grid-item" bindtap="tapGridItem">
<slot></slot>
</view>
\ No newline at end of file
.grid-item{max-width:initial;max-height:initial;display:flex;justify-content:center;align-items:center;flex-direction:column}
\ No newline at end of file
import hover from"../behaviors/hover";Component({options:{multipleSlots:!0},behaviors:[hover],relations:{"../grid-item/index":{type:"child",linked(){this.initGrids()},unlinked(){this.initGrids()}}},externalClasses:["l-class","l-class-grid","l-grid-class"],properties:{rowNum:{type:String,value:3},showBorder:Boolean,showColBorder:Boolean,showRowBorder:Boolean},data:{gridItems:[],childNum:0,currentIndex:-1,currentCell:-1},ready(){this.initGrids()},lifetimes:{show(){}},methods:{initGrids(){let e=this.getRelationNodes("../grid-item/index");if(this.data.childNum===e.length)return;const t=e.map((e,t)=>(e.setData({index:t}),{index:t,key:e.data.key,cell:e.data.cell}));this.setData({gridItems:t,childNum:e.length})},tapGridItem(e){const{gridIndex:t}=e.target.dataset;this.setData({currentIndex:t,currentCell:this.data.gridItems[t].cell})},tapGrid(){this.triggerEvent("lintap",{index:this.data.currentIndex,cell:this.data.currentCell},{bubbles:!0,composed:!0}),this.setData({currentIndex:-1,currentCell:-1})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-grid-item":"../grid-item/index"} }
\ No newline at end of file
<view class="l-grid l-class" bindtap="tapGrid">
<view bindtap="tapGridItem" hover-class="{{isHover?'l-gird-hover':''}}" hover-start-time="20" hover-stay-time="50" data-grid-index="{{item.index}}" class="l-grid-item l-class-grid l-grid-class {{index%rowNum !== rowNum-1 &&(showBorder||showColBorder) ? 'side-grid':''}} {{(index<gridItems.length-(gridItems.length%rowNum||rowNum)) &&(showBorder||showRowBorder)? 'center-grid':''}}" wx:for="{{gridItems}}" wx:key="key" style="min-width:{{100/rowNum}}%;">
<slot name="{{item.key}}"></slot>
</view>
</view>
\ No newline at end of file
.l-grid{display:flex;width:inherit;flex-wrap:wrap}.l-grid .l-grid-item{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;border-style:solid;border-color:#ededed;border-width:0}.l-grid .center-grid{border-bottom-width:2rpx}.l-grid .side-grid{border-right-width:2rpx}.l-gird-hover{opacity:.8}
\ No newline at end of file
Component({externalClasses:["l-class"],options:{addGlobalClass:!0},properties:{name:String,color:{type:String,value:"#3963bc"},size:{type:String,value:"40"}},ready:function(){this.properties.name||console.error("请传入Icon组件的name属性")},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<view class="l-class l-icon {{ name === '' ? '' : 'l-icon-' + name }}" style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color ? 'color:' + color+';' : '' }}"/>
.l-icon{font-family:l-iconfont;font-size:40rpx;color:#3963bc;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:l-iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABlQAAsAAAAALjQAABkCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHfArGDLcsATYCJAOBQAtiAAQgBYRtB4NEG6olZYaYxwFwTfuLqNbE2f9/Sm6MARWY/pOTwg2KLc2GRcKNTOMuNh68NAtDV/m4j5u9WOw1c5P3lMV4fyxtacPmwbwqcERQJeJjvoUr/xOfFoM7qlAqxxySVJo8fE1/f+7uJi8klO5A1epL0yhUtW08QjUFSqNwGP2F6frrN3hzD+Td7hfLPPBAE40owAJriOas2d0ggZANVohsEpKaBJIa0GLBg7URoFALFlwDdeSRUkmQ1g+CSrg7agGq9MoDFWh6QjmhpXdeIQkgwxMAfk21T8jShR+KkqJxLG96X/9jjeEh9oxYZlnksVU6nTO/vAIkM9dp24ARt12bWGaplkImiSTy8J/buqlbgiU4WwVtqL3df8dGUQYwn1t+TOQEou8h32yT80qtaJGIOg3TzrSC5Tssu/BNhIWT/iLg/9f5ulrhkQtbSCUcZhy3d5+k//XuuzYHZIXkoOyA9RndtDzldAKcO0ySHALZ//NkKE89HTO2wzx1GOcibJPh8Qgd0REhHqHOJVmJe0uBTueWyw37zc9Yha5cm4wwQCRl+3p3ixNozZrAkzOBEBgqEkOfx7voI8DwyirNjtAk6uK+RXyoNOktPcT7/vfjn8KQpMpySedR7hHAeaFaGJH3wyWi8Dxn4XoQGWuAQnyV9mc+Yu2WbSXLj6h7WEg/W1i3SU4bs2u3RLX/17yerDGg1Rk0ZNiIURTDCZKiGZbjBVEilckVSpVao9XpDUaT2WJFJKKWvQchncTFTeDneL1E8HOCXppCaAYh5iUyPznU0RxCgBAPIQFCIoQkCMkQUiCkQkiDkA4hA0ImhCwI2RByIORCyIOQD6EAQiGEIgjFEEoglEIog1AOoQJCJYQqCNUQaiDUQqiDUA+hBYSWEFpBaA2hjZco/Lx1lcBbQEljq7xo/zB8INodT2TSZZFmIsXx6lWJCWdeYmW9QJ/LDlCWwAplJguMzBt+o1JWA+bSVyRJHY48AnvD3K9YVGigb5Pyk/wEfGCA0fM6wCxG/YN5jAosh8wAjintnQO6lgcv+INFgedRSFCQmEWdUvoGANDV6b6G3PppWlsoxAgbWLIytrUVCKk/5gbezKowzaLKBmgo4ARAGZzalxVJ/osqWZgiZjwqbaGuBCqS5CWKIVHVGSpZkqYSq4wVQ6MXEyjrhg0HkTzCYIKl4VUbly1xiZh1qQmrKhLV5y6pzgg/kvLrHsFCjuee9Q9lg8YbOCJH3XCyMNuHnqwCTYBg++KoDeOiODRSz9PDQ8R5enSY4uaOLD529tXM44Exr1Qk+KZ1A92Ct8c7WDFwJK3BEO6uWyhWbv8nyRATv4OluVtpGPkykzOorYDGLCjNQu/e1vM8jwKxzTlZaI5Omw0eqRIUQ2WhWafiTtR1ArGJxTBZRSUORrhWWRI4qvcmChDsgJjnAYs70ibEOIqGiS/fA8K/JhOizIcFjiu9lHE+JdmQXngjf1r2rPg74VwkdX1+aTZl9dQRAsFC/cW3GNh8wyNcekdnm1yL4wS+upOVMZBPY5cYozHE/PDoPbVhU7FGmTY0WSCO8ap9lCqRMlpDCN+EGPgQ2kJzlByKW5ouvKHpH3y73fTye4Ye9EYPtqR66aTIChCDNg77L792lT+VUGqRtN2RfpQOptLBn4njhsL8DrZXDMQzqZfvy96pFqZ30s9LFcXK6qFmosLVzchrMhlkVYzKyzkcRyvuvoCmOSRCphk/vDwvjRUkIazIoxvWzUKUcDAM2GCDs0ooBqDP5PRZcqlgE5W4nNKBumK8rbYmeAF4UY8YgvxYNUvhwb9K45GdbGJ5M5pxAuMZGin+dXz1pIAV25dPZaVTm2td810KXCIcAJBHqzSM4cHqdVyRr9cIQRduch6em020Uq4iWZUigR7XGqJXq5wnJjo5ABOYVDQKAZkZXMBkcSPcJn4zOPTuaMUm2L7H5IHitW06Y4iIqnPlQF+wKWnlo1vaiCuFrYOlCy6KfcbhbKPYuJxvk2gnK9tFainFRLpgSa2FfbZ1eMc/7+zIxQTKi02dwCEuZqTmplxctJXTQPs420KBfxvf3OqIJBXSZyf34KBbgwqRYiss7tGLt2ol0tQZJOCY+PBtnQ6Y9f4Xp8261i0PBofa5nInl9F7gKNbPqkXYG+DQKaBYGYedN3msLpyxvfkDU2yTv80WB8H/rFLMsKE0ygsyXB7H7rZt76atmIgpnxnDQ1T1h7PktDYBb2/g96GwKGRd3H/XWMPFNhpEEm2lcc8vIaN8DyULSk/uG5QbNgMKDR6ToD2mBwd52A5ND/3i5LDE+HNrZd4dMC/vV7XEi4atilEVoan5ODZUxAw5YLMNTBFNkoNX6B19as99C64LoCvVHFVqnmlVZwAIJMCxJoKC1VWSlTA27U5KG8PyRWwsmBbydWHpCovsai7N8yQSEjXRgHI+lgg/g5/7i/b02do4KL+WvQaD40wiq4IAk7MG1B79Tp2cTZx2jbAIPgmgkIYIWLnler+jZhKKk+gs4NU+ypkR/Vx9AphNu+QqTtd9kxsq5WF4lE11S1EiFLdXEXEFPGrxpClJRDNHYnVPqqrCfi55KH8KpKYDI1cusGT/eekPJr1ssrr+nvvFDRC4p65VnyyiGUpkGyVqApKbxxVarSO3ZvnL93aVXv49nf1F2/urNm88XWvcY5fmyFkIXYZyy/h2/CWjfAMXEPf9wWUXCz0X8U/ERyoBqhloHowwr8ahedAtTenJrDOijadax7f7OWDDW+34pWyYYYucG4Oc67wDegaALaUW2tsNOO9WTwhhDd3Dh+IuzY0clhJdaPHzTQeIuwgJtfWpYmj5Ok0wrPVMO6gRndp2VHOwIARhLHDlOnwPBKjxJDxTRcEF1eUJHfr1pBrl96bp3DFm6Loya8wctSZLuK0TZ78iVeqnEKRuKgLSn4dTSuuYpssESXPvO7hkWLU6Iznq+m3W/hAKE4Kgmbec56J2sa5L2M/dSXlp9dSiRtGCs97DCEpiVUGFxrURa9m8Thv3LkaWpO8O2DWdhg/0qVBfhrfFiKyZTqeVK7JuwUs09xXTKx6UCoLSl4kMMtrUIENjdgnhLrRkjV9RrUWXRiGDaUFmDkc+t1xZ7MkJN3Xxy+Q0q5M1W/jX0a/mCrKmVD0sv+LJOiTavZk0DuzZDOzCLGSU9ndO7KA91z0CYEKMkRCXXOco3cntPf88zvXMvUvMEPKW26IIx94Xbnn9IZ3rQUEV7aMOdbJq0KjbQ9pIEyZpNK6W+jlyhG3nTY1DQkMD4oqkTS31KIzaXbi7Yat+KnDrfr7KIaPvU97SyDHR2Hjk7aPHMfDbCfN3H1BaJiJpcqSGAee/Lu+6SrlJqdpPeUq5+b6pmuUG5z9lles3TcMoJYqHKH3JhDxJugxFLgyH+ultUtnplnanYdr50tvYn4Cqb2nTy8Fjpin0agz79aAM+YWSwK/+XUj65c2bly9em7DyLp5T885sOUH5xExnJ4OS7Rk+owYfhnAazUOCLg8cjmPGGtvjXt+uzNpgNYwQ9QSZypoY53J/Rqapv+Bcr49EQLgA5yS9WtVmLBTZWyWN9OEmGrN2qdMSRBizevWbder6HxMtX4DwGmSvb0NDCKenJR2qsnALl71Tw+rWAVNX5eGZ737K+HFWcWdhRZWi+zPcLQcKR0cKoUbq+hIqY9rnrwqv789P7+ykO1q5QfDcZWVcTAYWP419INbTHzDfriZ0m4+YkTZVc0qduHEcVzAbtsdF6lc6plXr5qpPIryrGfc9LSC6kZpQkmZ7KNGl0cmWTQ2AA+JT+rubUUGf7m379IwtK9n2Y3JJ/V0o3wUntVjMvVmQbD9jZ38utvHttR9tKsQ4Ib+/nsIJs7A1x7Xd0jCsJmxX+LGrxxj88GZs/IC623OwAfyB4LV+abuNiKmKLJoQXq7qQ9JkF552ED+q8ZJFsYiNjpb6L82sHAed8YZzMGe7m5Tb8IPLNzBJ2FzEF8c6gLGWS4JhfivITf5g/IdanDaZiQy/oHNqXa7BjV4MNjVNfSAeQqMdA0+7XvIPGOjtv+hYcQG7DXrnLqhXGE/evTbGtXaR8vvo/65zJx7/AEzUBlS8cdV4anMZn0Fk7qsQ6lE3fKp1RHPEv8Gs12GwiCPiZ6Xu46AWusclBmbnBoWKAoSrsvt1M1/V917zyCMBb1WKKXs69wdnCdbg0yj7VKNjA6Ci4n0EMeBpjw/JMCX40rc6PNrcMzWzHoQjqv6b1SNjCDF9urg7P7e89h3P/km3upgT83A1XqtjAWAF8/NXaRdTKEcxHTzvUg0X/3B3pTbqBPE6NPXDsDOyo/ehwSaH8V5uDtzAnFhjS74ak7q+Ck5VASNHeckp+CdPTwQaWbTOEbFm6RN8ni0/lszLMsha9T5B/lVy++fU68j/qa2VeFHLR9uemh5dFVoy1KlT5pfC+C6xqFc1NtAl9yTrDPwRrn0dZmep2dgT2AKvW15LSoj2mF2pqDd7hNlRBZ956Wzgi9e09pVFdc+iGYnpmq+ir8u3iIWW+ClmtL47R4bRWzy9vhS4HhHsK9s3/37CpMJIos4YaIw0C+lsKmKL1+UylujqMTZKUQnEKSmKigSvcjSMwqqQio93ejZCAqOEFVLSypMhF3qOL1ZhRocPdtFQEhuDC6p9e3b/LqVr0udtW4MPuqM8hluIOG3ySUicenpm/NdttaailkiViQrypZzXpvyvtGyMfZy1FSKuhlGXPoWaOeIxLk3b0KozPPBjwacbF9E2gW9rMYzU8MuJK14fbT46KXf40JYKp7J1czd+cZUu5trRj6SYWSdM9GfPX6hz7Fp7eNc64C5moq71rUutlaBQ0FDBq62xz9rrqmYsw7IXfskzaHvwniOpiNUijc6+Wk118xbawoStjcNe0Hx6pVClXfWesZX41IvkkhR3FSjqq89v8SbNuYlmw0FArk80NCvnYRn8Vh4XF6ab6ZeBJHH5KOIwD4swRJoXFMA5xuZCSoiLM/gGAy92RD76zvd6r5L21z30bZcgAz+/fcgblDBs8jgwxdxSMS2aDQf88eulCA9o1fdnIEPgwGqC7GgoKdPI44lF17tASpXj7U8152ntjaZMmPVJnW+d/LZMunKRzWpHv+rRln36716o3hkKNnJVUHjUZUeXpMFhQhQ12BLsHbSX2uI0L/99WqbcoznrJYIJwinAlwjjQhvLLJsU5yXKfMJeF5pRiyCm5vhNItGqgjxzkfK5LBeVwQdhg4VyQ8zY5v1UlER54qZcRtEMmaGm/xG4t+HhDCzwbsik2YlMxXJFSytvBf5KCk84GD3NkgwxWxVlQIy3WaicaK8sbykpLikvrF+6KUBQvGFQIFf0BQHKBTNlCalUnDCwB4goO07dVQCMHGLqsWWj3oIaLQQb+zsLcJrOKGmJgFOhMuCEzLLbscjZkKHDykDN1JogQFdt6JNBDR0XcIVED0u3sKOc3b1nSdhpHlf15n/RiMJso1Y78Z9RtdktOFFahgIqNzNNSCKHWVaY+qd6g9MNRtRMkEq4Z1xNeQlPeIDrbq8Ysw2NpkAUGPC5CsTtsnc5KoEuKYSiqs2edWPV5Kq502VZmXmzypEs7JMJyL6aUKuFxgWEu3Qah1HVjiQHB0vqzif51UwGjGWhje7vGg/IJs9rynw0sTGXTY3PIZj552vkMV7FVw2w6eNrT/rVHSGW//5n2WadLd0PLMjXvbLtIKm4B0wIHJpXKKBb62h5nwcJV7Wn443v0wJk908u5/TL4uHNIVwYxfPu/WQNtfFKZodcR08kf5EFjHD7AjueS/b7jCnpkBjE2sw+QGey4quAAqQyQLShDpDTxvUjc4l2jB+Y0K1Aid5lOGQYVTxyeLEj2htNHf55OU54yHjWO9J43n8X0GPlrl0HukRyqNzQdXxYUyl1aroqtfaIZsiNJGrpGctzWpDBjejQOAkGTLl//nO4F9/Dfms4MQOKNM9HJLotJmBj3EzNSUs/qzOVdObYTAAr4SkZyqID+SvQbnMlhAsupf5qB/JjeGGro9p3e/uFHoFS/H8u8TBGbpnUja6F6dX4brhuFotyufNx0g3pMgrDZgpO6oPODzYc8AHOLFODjOG1WoydclkqKen1SdPCwOQiohSflRJUQJ+CFyqUnNPI+pR+GDvqIv2RYL9eRGi/vjfMKJGCkJ43F6N83G3+mmite7ZNad6ZHISgVlvuQYkCAR+9mfS37lZkTP/fm9p/QlgE7sgxgUSiyEXDZlsF+iRDR39iKNTg+g4MYkvyqazURdIIgYuGmNmq86ef8fzgJ4QIesR/2E86JFNpqmIJWbZ29sCh5KLUU8jJZGRT6kW7y0pihYlifrxxEz8x/7pH0/6cnyFY/f2aw4MlvKFXvu+x8UQINfgEDfgCioDuT4U17pDQpZdkRXPFS+dpw6Ebkb5qNwmdnQEtTVhI12BQlRO4m+vtmftUP1DWBaWZNWNbsu7VwV4dWZ1ZsCqbpS3a9PoaCgAGsrkoXJGgLBr1CINTcjpIfEYPFJPZQfs6bqB4E6GkPeRI95Qu0G2fjvkffQu4aZdF4mBy8rgmHY9VmC7Dybb4b9YRNENJN2tq1PRIzGVrLsor+LvtajHAvb7LomltvsCYZy+y3U7VuuD/j61zWnmyNTUMICA+tqd7Ump0n1uXBtHDOn78KEP6UVKIAE87oNzTGVuW/yHlvTzvVNrvYRV4Mx3bhZn/WsFfpurwHapRdYwI5o5HFV5obT6Il9NCL3Cmx3jmzZl5rUQVUWFhIM/Qg+5tWDRzAlRUoYdx/5axGlb9xbGSW3L+y/Nt682ETuP2Js6lwtHgIjUsVdiOvHP4yYiPq22i3DQ5DZgIoUzYn+nGT2nbCx+rOzXgem30eTtzmbLX8y54wkSWHv43Z9o8cf2BYM+NsyZ4mUu6gANq+ubTEjBW5rbazaiXGnvdv2HW15tmdvyCOiOXcb8XXxjM+wN643JNaGP19deMdAzIys2/Ayurf/9hNP00EPldMqOE0/gQrhn+VM3PhRc3iPPd7scAjc9e3/DyigSv6h/C0QXLX7/7QTr8m3q31bIPVnAMOAey0n9gdiQ6t3SpmAq1q4Vdpfe/HaxY2z18tCOxcVm+ndIEeCb5ua/3N47r7hwZdbdtZ8N4EpyDM5UVysoiprqHOoZ3vXiiIjbid9XRLJZ0qOfYsifY+R75gzFjqLIDg358aAODD7Zp8lsal9txclUGPlHc9L3wjz9r0Es2hngWLVz6/FY4WD3uk1DoZ7rkhuj2eWs6EbroKvXvloNVxFy4WXCuSP36tXt8LWrTQCBgmLntSd45detAzoqo9tIFaS26MoBN/hAbl4YdADKy/P+uLC83ANwGJybC1YKd5EWO7CORdRAx3m/rZKGGPaIDoPDkdcu3unZHBNp1bYcaRNFaiPtBA1jHKgoqDvQqHa2cNaMgoozUxRTrEYEbO5QUhYKP6ys4V55PNij3rbxC3vK6oeshYU4ajXF/tSxTT3Y8/gKd2XNh8KUherVoFAXBYH9tFwcFVEALzQE/gaAjdqGOG+fNhJe3F/iS6To6WC4u3qxVxA5ADsehBR4O3RIYanNFcQXZBeAa+TbPFvun6C2PJBcPOldJCv0QO90n1cA271It4Ig3OIYjrj8VZlUfpA0f4cZUly6H4RsDzdO50sca1t6Lb4UvW68ObjYL0ihbmW/wna3BABcaVMHDob4vyDSnwZb7v22iTofZWEuqM3wystEcyJDcG9ciZfk/ei44UgOzd1AHfw7TjnVtn0PgpDdl554D9n8PwHXAz98Jbn7Q6jj/6b714FzP/7dp2TicMSbP/aOBX/3p3FwSax3bjsisbWzFPkIJ3N5fF8E6f5nP77y+IgrsLMun2WgUXNgy9W5CW18jj6ITo77aI5PAfOzaF70mZr0zKhZY04pm9fUSmdPrTX21daq/cGdCQdARBnAitNTw6hbTYZ9q9moRymbX7Uy7Vdro4GorQvIPGJnIXak16/AKYK93C15LpGH9fXa9xfmnp08dyR7/0EanbPHrZz3y58oEBx3aOt8Uo02Ci/27C0NObOtwl/wukuq9WO/LSpvDTvPy8PrV+AUwV7u5zeT5xK/WF9T//wvzD07KZly8+Z/kEY/3R53BwDlUxagKdsyuK3zSQMr2uNo4cWeAws5LrGt+dW+4HWXINz6sQ+uFkHlrv74onJS+KaN/lPgtwENaURjmtCUZsSIozmBeBJIJElWVE03TMt2XM8PwihO0iwvyqpu2q5fLFeCratIEZZN6JQcDysFsIks19GFIGhtujh/vTkJz281Ge9EB5+5YfQJ/oowcrNVC4qawLfyU9qb8gLZpkFW8tgEZCgMAulU6mZ2YRKCQKqN2hDdyjKS4sgDTUKuz7hjTIRh3XI3GVFNpiveCytF8k6Jy8ASICOWwVTmqbrWbu/1mIUFYyWvXfBSe85bYuWD0Jx0wp0bnPg01MQFY4Pqh4NN864MLbmF07r3tEYwjXswSguelepGecvA+tSr+U9nMr3VCg2V5cOiOnkA') format('woff2')}.l-icon-error:before{content:"\e605"}.l-icon-duihao:before{content:"\e63c"}.l-icon-video:before{content:"\e609"}.l-icon-fork:before{content:"\e632"}.l-icon-address:before{content:"\e606"}.l-icon-backward:before{content:"\e607"}.l-icon-add:before{content:"\e608"}.l-icon-cart:before{content:"\e60a"}.l-icon-close:before{content:"\e60b"}.l-icon-checked:before{content:"\e60c"}.l-icon-comment:before{content:"\e60d"}.l-icon-down:before{content:"\e60e"}.l-icon-customer-service:before{content:"\e60f"}.l-icon-delete:before{content:"\e610"}.l-icon-edit:before{content:"\e611"}.l-icon-download:before{content:"\e612"}.l-icon-ellipsis:before{content:"\e613"}.l-icon-favor:before{content:"\e614"}.l-icon-favor-fill:before{content:"\e631"}.l-icon-forward:before{content:"\e615"}.l-icon-help:before{content:"\e616"}.l-icon-eye:before{content:"\e617"}.l-icon-history:before{content:"\e618"}.l-icon-left:before{content:"\e619"}.l-icon-like:before{content:"\e61a"}.l-icon-notification:before{content:"\e61b"}.l-icon-order:before{content:"\e61c"}.l-icon-loading:before{content:"\e61d"}.l-icon-password:before{content:"\e61e"}.l-icon-more:before{content:"\e61f"}.l-icon-picture:before{content:"\e620"}.l-icon-pull-down:before{content:"\e621"}.l-icon-right:before{content:"\e622"}.l-icon-research:before{content:"\e623"}.l-icon-phone:before{content:"\e624"}.l-icon-setting:before{content:"\e625"}.l-icon-scan:before{content:"\e626"}.l-icon-share:before{content:"\e627"}.l-icon-success:before{content:"\e628"}.l-icon-soud:before{content:"\e629"}.l-icon-time:before{content:"\e62a"}.l-icon-warning:before{content:"\e62b"}.l-icon-to-top:before{content:"\e62c"}.l-icon-up:before{content:"\e62d"}.l-icon-WiFi:before{content:"\e62e"}.l-icon-user:before{content:"\e62f"}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-item-class"],behaviors:["wx://form-field",validator],properties:{urls:{type:Array,value:[]},count:{type:[String,Number],value:9},clear:{type:Boolean,value:!1,observer:function(e){e&&this.handleClear()}},size:{type:[String,Number],value:3,options:[3,4,"3","4"]},sizeType:{type:String,value:"original",options:["original","compressed"]},mode:{type:String,value:"aspectFit",options:["scaleToFill","aspectFit","aspectFill","widthFix","top","bottom","center","left","right","top left","top right","bottom left","bottom right"]},custom:{type:Boolean,value:!1},preview:{type:Boolean,value:!0},maxImageSize:{type:Number,value:1e7},cells:{type:Array,value:null}},data:{showBtn:!0,tempFilePath:""},lifetimes:{attached:function(){let e=this.judgeNewOrOld();null!==this.data.cells?(e="new",this.setData({newOrOld:e,urls:this.data.cells})):this.setData({newOrOld:e})}},methods:{handleClear(){let e=this.data.urls;this.setData({urls:[],clear:!1,showBtn:!0});let t={all:e,current:e};this.triggerEvent("linclear",t,{})},onPreviewTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls;let a="",s=[];const i=this.data.newOrOld;if(void 0!==this.data.cells){const e=this.data.cells;a=e[t].url;for(let t=0;t<e.length;t++)s.push(e[t].url)}else if("old"===i)a=this.data.urls[t],s=this.data.urls;else{a=this.data.urls[t].url;for(let e=0;e<l.length;e++)s.push(l[e].url)}let r={index:t,current:l[t],all:l};!0===this.data.preview&&wx.previewImage({current:a,urls:s}),this.triggerEvent("linpreview",r,{})},onAddTap(){const e=this,t=this.data.count-this.data.urls.length;if(0===t)return;const l=this.data.newOrOld;wx.chooseImage({count:t,sizeType:this.data.sizeType,sourceType:["album","camera"],success(t){let a=[];if("old"===l)a=t.tempFilePaths;else for(let l=0;l<t.tempFilePaths.length;l++)a.push({url:t.tempFilePaths[l],imageSize:t.tempFiles[l].size}),a[l].overSize=t.tempFiles[l].size>e.data.maxImageSize;const s=e.data.urls.concat(a);s.length===parseInt(e.data.count)&&e.setData({showBtn:!1}),e.setData({urls:s,value:s,tempFilePath:a});let i={current:a,all:s},r={};e.triggerEvent("linchange",i,r),e.triggerEvent("linpush",i,r);let n=[];for(let e=0;e<s.length;e++)s[e].overSize&&n.push(s[e]);if(n.length>0){let t={current:a,all:s,overSizeList:n};e.triggerEvent("linoversize",t,r)}}})},onDelTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls,a=l[t],s=this.handleSplice(l,a);s.length<parseInt(this.data.count)&&this.setData({showBtn:!0}),this.setData({tempFilePath:a,urls:s,value:s});let i={index:t,current:a,all:s};this.triggerEvent("linremove",i,{})},handleSplice:(e,t)=>e.filter(e=>e!==t),judgeNewOrOld:function(){const e=this.data.urls;return 0!==e.length&&"object"!=typeof e[0]?"old":"new"}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-grid-item":"../grid-item/index","l-grid":"../grid/index"}}
\ No newline at end of file
<l-grid row-num="{{ size }}" l-class="l-class">
<l-grid-item wx:for="{{ urls }}" wx:key="index" key="{{ index }}" slot="{{ index }}">
<view class="item l-item-class" catchtap="onPreviewTap" data-index="{{ index }}">
<view class="close" data-index="{{ index }}" catchtap="onDelTap">
<l-icon name="close" color="#fff" size="22" l-class="close-icon"/>
</view>
<image class="{{size === 3? 'img': 'min-img'}}" mode="{{ mode }}" src="{{newOrOld==='old'? item:item.url }}"/>
</view>
</l-grid-item>
<l-grid-item wx:if="{{ showBtn }}">
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:if="{{ custom }}">
<slot></slot>
</view>
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:else>
<image class="add-icon" src="./image/add.png"/>
</view>
</l-grid-item>
</l-grid>
.item{position:relative}.close{position:absolute;right:10rpx;top:10rpx;height:40rpx;width:40rpx;border-radius:50%;background:rgba(0,0,0,.4);display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;z-index:99}.add{height:220rpx;width:220rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.add-icon{height:100rpx;width:100rpx}.img{height:220rpx;width:220rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.min-img{height:160rpx;width:160rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.flex{border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-anchor-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../index-list/index":{type:"parent"}},data:{anchorSlot:{height:-1},anchor:{height:0},anchorText:"",anchorStyle:"",anchorWrapperStyle:""},lifetimes:{attached(){this.parseAnchorSlotRect()}},methods:{async parseAnchorSlotRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor-slot");t?this.setData({"anchorSlot.height":t.height}):this.setData({"anchorSlot.height":0})},async parseAnchorRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor");t&&this.setData({"anchor.height":t.height})},setFixed(t,e){const a=`\n position:fixed;\n top:${t}rpx;\n `,o=`height:${e}px;`;this.setData({anchorStyle:a,anchorWrapperStyle:o})},setRelative(t){const e=`\n position:relative;\n transform: translate3d(0, ${t}px, 0);\n `;this.setData({anchorStyle:e})},clearStyle(){this.setData({anchorStyle:"",anchorWrapperStyle:""})},isRelative(){return this.data.anchorStyle.indexOf("relative")>0},isFixed(){return this.data.anchorStyle.indexOf("fixed")>0}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-index-list":"../index-list/index"}}
\ No newline at end of file
<view class="anchor-wrapper" style="{{anchorWrapperStyle}}">
<view class="anchor" style="{{anchorStyle}}">
<view wx:if="{{anchorSlot.height!==0}}" class="anchor-slot">
<slot></slot>
</view>
<view wx:if="{{anchorSlot.height===0}}" class="anchor-default l-anchor-class">
{{anchorText}}
</view>
</view>
</view>
.anchor-wrapper{width:100%}.anchor-wrapper .anchor{width:100%}.anchor-wrapper .anchor-default{width:100%;background-color:#f7f8fa;display:flex;align-items:center;padding:8rpx 0 8rpx 30rpx;font-size:26rpx;font-weight:700;color:#323132;box-sizing:border-box}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";import dataUtil from"../core/utils/data-util";import eventUtil from"../core/utils/event-util";import pixelUtil from"../core/utils/pixel-util";const defaultSidebarData=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];Component({externalClasses:["l-tip-class","l-tip-text-class","l-sidebar-class","l-selected-class","l-unselected-class","l-sidebar-item-class"],relations:{"../index-anchor/index":{type:"child"}},options:{multipleSlots:!0,pureDataPattern:/^_/},lifetimes:{attached(){this.init()}},properties:{isStick:{type:Boolean,value:!1},scrollTop:{type:Number,value:0},sidebarData:{type:Array,value:defaultSidebarData},showSidebar:{type:Boolean,value:!0},stickOffsetTop:{type:Number,value:0}},data:{_sidebar:{top:0,height:0,sidebarItemCenterPoints:[],isMoving:!1,sidebarItemRect:{}},_anchor:{anchorTopLocations:[],indexAnchorComponents:[],currentStickAnchorIndex:-1,anchorItemsHeight:[]},_stickOffsetTopPx:0,activeSidebarItem:0,tipTop:0,showTip:!1,tipHeight:0},observers:{scrollTop:function(t){this.setIndexListStyle(t)},stickOffsetTop:function(t){this.setData({_stickOffsetTopPx:pixelUtil.rpx2px(t)})}},methods:{async init(){await this.parseSidebarRect(),await this.parseSidebarItemRect(),await this.parseIndexAnchors(),this.parseAnchorRect(),wx.lin=wx.lin||{},wx.lin.setScrollTop=t=>{dataUtil.setDiffData(this,{scrollTop:t})}},async parseSidebarRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".sidebar");this.setData({"_sidebar.height":t.height,"_sidebar.top":t.top})},async parseSidebarItemRect(){const t=this.data.sidebarData.length,e=await nodeUtil.getNodeRectFromComponent(this,".sidebar-item"),i=this.data._sidebar.height/t,a=e.height,s=await nodeUtil.getNodeFieldsFromComponent(this,".sidebar-item",{computedStyle:["margin-top"]}),o=await nodeUtil.getNodeFieldsFromComponent(this,".tip",{computedStyle:["height"]}),n=[],r=s["margin-top"].replace("px","");for(let e=1;e<=t;e++)n.push((2*e-1)*a/2+e*parseInt(r));const h=parseInt(o.height.replace("px",""));this.setData({tipHeight:h,tipHeightOverflow:.205*h,"_sidebar.sidebarItemRect":e,"_sidebar.sidebarItemHeight":i,"_sidebar.sidebarItemRealHeight":a,"_sidebar.sidebarItemCenterPoints":n})},parseIndexAnchors(){const t=this.getRelationNodes("../index-anchor/index");if(t){this.setData({"_anchor.indexAnchorComponents":t});for(let e=0;e<t.length;e++)t[e].setData({anchorText:this.data.sidebarData[e]})}else console.error("获取 index-anchor 节点实例失败,请参考文档检查您的代码是否书写正确")},async parseAnchorRect(){const t=[],e=[],i=this.data._anchor.indexAnchorComponents;for(const a of i){const i=await nodeUtil.getNodeRectFromComponent(a,".anchor");null!==i&&(t.push(i.top),e.push(i.height))}this.setData({"_anchor.anchorTopLocations":t,"_anchor.anchorItemsHeight":e})},switchTipShow(t){dataUtil.setDiffData(this,{showTip:t})},switchSidebarIndex(t){dataUtil.setDiffData(this,{activeSidebarItem:t})},switchIsMovingSidebar(t){dataUtil.setDiffData(this,{"_sidebar.isMoving":t})},setIndexListStyle(t){const e=this.countCurrentActiveIndex(t);void 0!==e&&(this.data.isStick&&this.setAnchorStyle(t),this.data.showSidebar&&!this.data._sidebar.isMoving&&this.switchSidebarIndex(e))},setAnchorStyle(t){const{anchorTopLocations:e,anchorItemsHeight:i,indexAnchorComponents:a}=this.data._anchor,s=this.countCurrentActiveIndex(t),o=a[s],n=e[s],r=i[s],h=e[s+1],c=this.data._stickOffsetTopPx;if(t+c>=n&&t+c<=h-r&&!o.isFixed()){o.setFixed(this.data.stickOffsetTop,r);for(let t=0;t<a.length;t++)t!==s&&a[t].clearStyle()}else if(t+c>h-r&&t+c<h&&!o.isRelative()){o.setRelative(h-n-r);for(let t=0;t<a.length;t++)t!==s&&a[t].clearStyle()}else if(t+c<n)for(let t=0;t<a.length;t++)a[t].clearStyle()},countCurrentActiveIndex(t){let e=0;const{anchorTopLocations:i}=this.data._anchor;for(let a=0;a<i.length;a++)if(t+this.data._stickOffsetTopPx<i[a]){e=a-1;break}return e<0&&(e=0),e},onTouchMove(t){this.switchTipShow(!0),this.switchIsMovingSidebar(!0);const{top:e,sidebarItemHeight:i}=this.data._sidebar,a=this.data.sidebarData.length,s=t.touches[0].clientY;let o=Math.floor((s-e)/i);o<0?o=0:o>a-1&&(o=a-1);const n=this.data.sidebarData[o];dataUtil.setDiffData(this,{tipText:n,activeSidebarItem:o,tipTop:this.data._sidebar.sidebarItemCenterPoints[o]});let r=this.data._anchor.anchorTopLocations[o]-this.data._stickOffsetTopPx;wx.pageScrollTo({duration:0,scrollTop:r}),eventUtil.emit(this,"linselected",{index:o,tipText:n})},onTouchend(){setTimeout(()=>{this.switchTipShow(!1)},500),this.switchIsMovingSidebar(!1)},onTapSidebar(t){this.onTouchMove(t)}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="index-list">
<view wx:if="{{showSidebar}}" class="sidebar l-sidebar-class" catch:tap="onTapSidebar" catch:touchmove="onTouchMove" catch:touchend="onTouchend">
<block wx:for="{{sidebarData}}" wx:for-item="sidebarItem" wx:key="index">
<view class="sidebar-item l-sidebar-item-class {{activeSidebarItem===index?'sidebar-item-active l-selected-class':'l-unselected-class'}}">{{sidebarItem}}</view>
</block>
<view class="tip l-tip-class" style="top:{{tipTop}}px;{{showTip?'':'opacity:0;'}}transform: rotate(-45deg) translateY({{-tipHeight/2-tipHeightOverflow}}px);">
<view class="tip-text l-tip-text-class">{{tipText}}</view>
</view>
</view>
<slot></slot>
</view>
.index-list .sidebar{font-size:24rpx;position:fixed;right:30rpx;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center}.index-list .sidebar-item{width:40rpx;height:40rpx;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-top:8rpx}.index-list .sidebar-item-active{color:#fff;background-color:#3963bc}.index-list .tip{width:90rpx;height:90rpx;background-color:#d8d8d8;border-radius:90px 90px 0;display:flex;justify-content:center;align-items:center;position:absolute;left:-160rpx;transform:rotate(-45deg) translateY(-35%)}.index-list .tip-text{font-size:30rpx;transform:rotate(45deg)}
\ No newline at end of file
import eventBus from"../core/utils/event-bus.js";import validator from"../behaviors/validator";import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},behaviors:["wx://form-field",validator,rules],externalClasses:["l-class","l-label-class","l-error-text","l-error-text-class","l-input-class"],properties:{label:String,hideLabel:Boolean,labelCustom:Boolean,showRow:{type:Boolean,value:!0},required:Boolean,placeholder:String,type:{type:String,value:"text",options:["text","idcard","digit","password","number"]},value:String,colon:Boolean,focus:Boolean,clear:Boolean,maxlength:{type:Number,value:140},width:{type:Number,value:null},labelWidth:{type:Number,value:200},labelLayout:{type:String,value:"left",options:["left","right"]},disabled:Boolean,placeholderStyle:String,showEye:{type:Boolean,value:!1}},data:{},attached(){},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),this.triggerEvent("linconfirm",e.detail)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail)},getValues(){return this.data.value},reset(){this.setData({value:""})},onTapEyeIcon(){const e=this.data.type;"text"===e?this.setData({type:"password"}):"password"===e&&this.setData({type:"text"})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<label class='form-item {{disabled? "disabled": ""}} l-class form-item-{{labelLayout}}' style="width:{{width===null?'auto':width+'rpx'}}">
<view class="mask" wx:if="{{disabled}}"></view>
<view class="row" hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width}}rpx;"></view>
<view wx:if="{{label && !labelCustom}}" hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout=== "top" ? labelWidth + "rpx" : "" }}'>
<text><text class="text-require" wx:if="{{required}}">* </text>{{label}}<text wx:if="{{colon}}">:</text>
</text>
</view>
<view wx:else hidden="{{hideLabel}}" class="form-label l-label-class form-label-{{labelLayout}}" style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout=== "top" ? labelWidth + "rpx" : "" }}'>
<slot name="left"/>
</view>
<input class="input {{hideLabel?'hideLabel':''}} l-input-class" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<l-icon wx:if="{{showEye&&value}}" name="eye" catch:tap="onTapEyeIcon" size="40" l-class="l-eye l-eye-{{type}}"/>
<view class="close" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close-icon">
<l-icon name="close" color="#fff" size="16"/>
</view>
</view>
<slot name="right"/>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</label>
.form-item{position:relative;font-size:28rpx;color:#333;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}.hideLabel{padding-left:25rpx}.l-eye{padding:10rpx}.l-eye-text{color:#3963bc!important}.l-eye-password{color:rgba(57,99,188,.6)!important}
\ No newline at end of file
import hover from"../behaviors/hover";Component({behaviors:[hover],relations:{"../list/index":{type:"parent",linked(){},linkChanged(){},unlinked(){}}},options:{multipleSlots:!0},externalClasses:["l-class","l-class-icon","l-icon-class","l-class-image","l-image-class","l-class-right","l-right-class","l-class-content","l-content-class","l-class-desc","l-desc-class","l-link-icon-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},image:String,title:String,desc:String,tagPosition:{type:String,value:"left"},tagContent:String,tagShape:{type:String,value:"square"},tagColor:String,tagPlain:Boolean,badgePosition:{type:String,value:"left"},dotBadge:Boolean,badgeCount:Number,badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"},rightDesc:String,gap:Number,leftGap:Number,rightGap:Number,isLink:{type:Boolean,value:!0},linkType:{type:String,value:"navigateTo"},url:String},methods:{tapcell:function(e){const{linkType:t,url:l}=e.currentTarget.dataset;l&&wx[t]({url:l}),this.triggerEvent("lintap",{e:e},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tag":"../tag/index"} }
\ No newline at end of file
<view class="l-list l-class" hover-class="{{isHover?'l-list-hover':''}}" hover-start-time="20" hover-stay-time="50" style="{{gap?'padding:0 '+gap+'rpx;':''}} {{leftGap?'padding-left:'+leftGap+'rpx':''}} {{rightGap?'padding-right:'+rightGap+'rpx':''}}" bind:tap="tapcell" data-url="{{url}}" data-link-type="{{linkType}}">
<l-badge wx:if="{{(badgeCount > 0 || dotBadge ) && badgePosition ==='left'}}" value="{{badgeCount}}" dot="{{dotBadge}}" max-count="{{badgeMaxCount}}" number-type="{{badgeCountType}}">
<template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}"/>
</l-badge>
<template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}" wx:else/>
<l-badge l-class="badge-right" wx:if="{{(badgeCount > 0 || dotBadge ) && badgePosition ==='right'}}" value="{{badgeCount}}" dot="{{dotBadge}}" max-count="{{badgeMaxCount}}" number-type="{{badgeCountType}}">
<template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}"/>
</l-badge>
<template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}" wx:else/>
</view>
<template name="cell-left-main">
<view class="left-section">
<image wx:if="{{image}}" class="l-image l-class-image l-image-class" src="{{image}}" mode="aspectFit|aspectFill|widthFix"/>
<l-icon wx:elif="{{icon}}" l-class="l-icon l-class-icon l-icon-class" name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}"/>
<view class="l-text">
<view class="l-class-content l-content-class">{{title}}</view>
<view class="l-desc l-class-desc l-desc-class" wx:if="{{desc}}">{{desc}}</view>
</view>
<l-tag size="mini" shape="{{tagShape}}" bg-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='left' && !tagPlain}}">{{tagContent}}</l-tag>
<l-tag size="mini" shape="{{tagShape}}" plain="{{tagPlain}}" font-color="{{tagColor}}" l-class="cell-tag" wx:elif="{{tagContent && tagPosition ==='left' && tagPlain}}">{{tagContent}}</l-tag>
<slot name="left-section"></slot>
</view>
</template>
<template name="cell-right-main">
<view class="right-section l-class-right l-right-class">
<slot name="right-section"></slot>
<l-tag size="mini" shape="{{tagShape}}" bg-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='right' && !tagPlain }}">{{tagContent}}</l-tag>
<l-tag size="mini" shape="{{tagShape}}" plain="{{tagPlain}}" font-color="{{tagColor}}" l-class="cell-tag" wx:if="{{tagContent && tagPosition ==='right' && tagPlain }}">{{tagContent}}</l-tag>
<view class="l-text" wx:if="{{rightDesc}}">{{rightDesc}}</view>
<l-icon l-class="l-link-icon-class" size="26" color="#8c98ae" name="right" wx:if="{{isLink}}"/>
</view>
</template>
.l-list{width:100%;min-height:88rpx;display:flex;justify-content:space-between;align-items:center;color:#333;font-size:28rpx;border-bottom:1px solid #f3f3f3;box-sizing:border-box}.l-list-hover{opacity:.8}.l-list .left-section{display:flex;justify-content:space-between;align-items:center}.l-list .left-section .l-icon{margin-right:20rpx}.l-list .left-section .l-desc{color:#d1d3d7;font-size:24rpx}.l-list .left-section .cell-tag{margin-left:20rpx}.l-list .left-section .l-image{width:44rpx;height:44rpx;margin-right:20rpx}.l-list .right-section{display:flex;justify-content:space-between;align-items:center;line-height:1.2}.l-list .right-section .l-text{margin-right:20rpx}.l-list .right-section .cell-tag{margin-right:20rpx}.l-list .badge-right{border-radius:28rpx;min-width:28rpx;left:-20rpx;right:auto;top:0;bottom:0;transform:translate(-100%,2rpx)}
\ No newline at end of file
import computeOffset from"../behaviors/computeOffset";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,validator],externalClasses:["l-container-class","l-class"],properties:{show:{type:Boolean,value:!1},opacity:{type:String,value:"1"},bgColor:String,zIndex:{type:String,value:"776"},type:{type:String,value:"rotate",options:["flash","flip","change","rotate","circle"]},color:{type:String,value:""},size:{type:String,value:"medium"},custom:Boolean,fullScreen:Boolean},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoading=e=>{const{custom:t=!1,fullScreen:o=!1,color:i="",type:a="rotate",size:s="medium",opacity:l="1"}={...e};this.setData({custom:t,fullScreen:o,color:i,type:a,size:s,opacity:l,show:!0})},wx.lin.hideLoading=()=>{this.setData({show:!1})}},doNothingMove(){}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container-loading l-container-class {{fullScreen ? 'content': ''}}" wx:if="{{show && fullScreen}}" style="background:{{bgColor}};opacity:{{opacity}};z-index:{{zIndex}}" catchtouchmove="doNothingMove">
<view wx:if="{{show}}" class="l-class {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}" style="margin-bottom:{{distance}}px">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view wx:if="{{type==='flash' || type==='change' || type==='flip'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
<view class="spinner-circle {{'spinner-circle-' + size}}" wx:if="{{ type === 'circle'}}">
<view class="spinner-container container1">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container2">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container3">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
</view>
<view wx:if="{{ type === 'rotate'}}">
<view class="rotate rotate-{{size}}" style="border-color: {{color}};"></view>
</view>
</block>
</view>
</view>
<view wx:if="{{!fullScreen}}" class="l-container-class" style="position: relative">
<slot name="content"/>
<view wx:if="{{show}}" class="inner-loading-container" style="background:{{bgColor}};opacity:{{opacity}};z-index:{{zIndex}}"></view>
<view wx:if="{{show}}" class="l-class loading-icon-container" style="z-index:{{zIndex + 1}}">
<view class="{{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view wx:if="{{type==='flash' || type==='change' || type==='flip'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="{{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{ type === 'circle'}}" class="spinner-circle {{'spinner-circle-' + size}}">
<view class="spinner-container container1">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container2">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
<view class="spinner-container container3">
<view class="circle1 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle2 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle3 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
<view class="circle4 container-view {{type + '-' + size}}" style="background: {{color}}"></view>
</view>
</view>
<view wx:if="{{ type === 'rotate'}}">
<view class="rotate rotate-{{size}}" style="border-color: {{color}};"></view>
</view>
</block>
</view>
</view>
</view>
.container-loading{position:fixed;height:100%;width:100%;top:0;left:0}.content{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;height:100%}.spinner-flash-medium{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-medium{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-medium{width:30rpx;height:30rpx}.spinner-change-mini{width:20rpx;height:20rpx}.spinner-change-large{width:50rpx;height:50rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#3963bc;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#3963bc;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.spinner-circle{position:relative}.spinner-circle-mini{width:40rpx;height:40rpx}.spinner-circle-medium{width:60rpx;height:60rpx}.spinner-circle-large{width:70rpx;height:70rpx}.container1>.container-view,.container2>.container-view,.container3>.container-view{border-radius:50%;position:absolute;background-color:#3963bc;-webkit-animation:bouncedelay4 1.2s infinite ease-in-out;animation:bouncedelay4 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.circle-mini{width:12rpx;height:12rpx}.circle-medium{width:15rpx;height:15rpx}.circle-large{width:20rpx;height:20rpx}.spinner-circle .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay4{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay4{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.rotate{border-radius:50%;animation:rotate .7s linear infinite}.rotate-mini{height:40rpx;width:40rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-medium{height:50rpx;width:50rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-large{height:70rpx;width:70rpx;border-top:8rpx solid #3963bc;border-right:8rpx solid transparent!important;border-bottom:8rpx solid #3963bc;border-left:8rpx solid #3963bc}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-loading-class","l-end-class","l-line-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{show:Boolean,custom:Boolean,line:Boolean,color:String,size:{type:String,value:"28"},type:{type:String,value:"loading",options:["loading","end"]},endText:{type:String,value:"我是有底线的~"},loadingText:{type:String,value:"加载中..."}},data:{},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showLoadmore=e=>{const{custom:o=!1,line:t=!1,color:i="",size:l="28",type:a="loading",endText:n="我是有底线的",loadingText:s="加载中..."}={...e};this.setData({custom:o,line:t,color:i,size:l,type:a,endText:n,loadingText:s,show:!0})},wx.lin.hideLoadmore=()=>{this.setData({show:!1})}},onLoadmore(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-loading":"../loading/index"}}
\ No newline at end of file
<slot name="content"/>
<view bindtap="onLoadmore" wx:if="{{show}}">
<view wx:if="{{custom && type==='end'}}">
<slot name="end"/>
</view>
<view wx:elif="{{custom && type==='loading'}}">
<slot name="loading"/>
</view>
<view class="loading l-class" wx:else>
<view class="line loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view>
<view class="rotate loading-view" style="border-color: {{color}};width:{{size}}rpx;height:{{size}}rpx" wx:if="{{type=='loading'}}"></view>
<view class="loading-text l-loading-class loading-view" style="color:{{color}};font-size:{{size}}rpx" wx:if="{{type=='loading'}}">{{loadingText}}</view>
<view class="loading-text l-end-class loading-view" style="{{'color:'+color}};font-size:{{size}}rpx" wx:if="{{type=='end'}}">{{endText}}</view>
<view class="line l-line-class loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view>
</view>
</view>
.loadmore-container{display:flex;flex-direction:column;background-color:transparent}.loading{display:flex;flex-direction:row;width:100%;height:72rpx;align-items:center;justify-content:center;background-color:transparent}.loading .loading-view:nth-child(2){margin-left:36rpx}.loading-text{color:#bbb;font-size:28rpx;margin:0 12rpx}.line{width:80rpx;height:2rpx;background-color:#d1d3d7}.rotate{border-radius:50%;animation:rotate .7s linear infinite;height:28rpx;width:28rpx;border-top:4rpx solid #bbb;border-right:4rpx solid transparent!important;border-bottom:4rpx solid #bbb;border-left:4rpx solid #bbb;margin-left:12rpx}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";Component({behaviors:[zIndex],externalClasses:["l-class","l-mask-class"],properties:{show:{type:Boolean,value:!1},opacity:{type:[String,Number],value:.4},zIndex:{type:Number,value:99},center:{type:Boolean,value:!1},locked:{type:Boolean,value:!0},fullScreen:{type:String,value:""},NavColor:{type:String,value:""}},data:{},methods:{doNothingMove(){},onMaskTap(){!0!==this.data.locked&&this.setData({show:!1}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}},attached:function(){}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container-mask {{center? 'center' : ''}} l-class" hidden="{{ show? '' : 'hidden'}}" catchtouchmove="doNothingMove" catchtap="onMaskTap" style="z-index:{{zIndex}}; {{show? 'background: rgba(0,0,0,' + opacity+ ')' : ''}}">
<view class="mask-content l-mask-class">
<slot></slot>
</view>
</view>
\ No newline at end of file
.container-mask{position:fixed;top:0;left:0;width:100%;height:100%;transition:all .3s}.mask-bg{height:100%;width:100%;background:#fff;z-index:99}.mask-content{display:inline-block;z-index:101;overflow:hidden}.center{display:flex;flex-direction:row;align-items:center;justify-content:center}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";import watchShow from"../behaviors/watchShow";import validator from"../behaviors/validator";Component({behaviors:[zIndex,watchShow,validator],externalClasses:["l-class","l-image-class"],properties:{show:Boolean,icon:String,iconColor:{type:String,value:"#fff"},iconSize:{type:String,value:"28"},image:String,content:String,type:{type:String,value:"primary",options:["primary","warning","success","error"]},duration:{type:Number,value:1500},openApi:{type:Boolean,value:!0},top:{type:Number,value:0}},data:{status:!1},observers:{icon:function(){}},attached(){this.initMessage()},pageLifetimes:{show(){this.initMessage()}},methods:{initMessage(){wx.lin=wx.lin||{},wx.lin.showMessage=(t={})=>{const{content:e="",icon:i="",image:a="",type:s="primary",duration:o=1500,success:n=null,top:r=0}=t;return this.data.success=n,this.setData({content:e,icon:i,image:a,duration:o,type:s,top:r}),this.changeStatus(),this},wx.lin.hideMessage=()=>{this.setData({status:!1})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="l-message l-class {{'l-message-'+type}} {{status?'l-message-show':''}}" style="z-index:{{zIndex}};top:{{top}}rpx">
<block wx:if="{{status}}">
<view style="margin-right:15rpx">
<l-icon name="{{icon?icon:type}}" size="{{iconSize}}" color="{{type==='warning'?'#333':iconColor}}"/>
</view>
<image wx:if="{{image}}" src="{{image}}" class="l-message-image l-class-image"/>
{{content}}
<slot/>
</block>
</view>
.l-message{width:750rpx;height:72rpx;border-radius:0rpx 0rpx 16rpx 16rpx;display:flex;justify-content:center;align-items:center;position:fixed;left:50%;font-size:28rpx;color:#fff;opacity:0;box-shadow:0rpx 6rpx 16rpx 0rpx rgba(217,212,191,.5);transform:translateX(-50%) translateZ(0) translateY(-100%);transition:all .4s ease-in-out}.l-message-success{background-color:#34bfa3}.l-message-error{background-color:#f4516c}.l-message-warning{background-color:#ffe57f;color:#333}.l-message-primary{background-color:#3963bc}.l-message-show{transform:translateX(-50%) translateZ(0) translateY(0);opacity:1}.l-message-image{width:30rpx;height:30rpx;margin-right:15rpx}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-icon-class"],properties:{type:{type:String,value:"still"},swipArr:Array,frontIconName:{type:String,value:""},frontIconSize:{type:Number,value:28},frontIconColor:{type:String,value:"#3683D6"},endIconName:{type:String,value:""},endIconSize:{type:Number,value:28},endIconColor:{type:String,value:"#3683D6"},backgroundcolor:{type:String,value:"#DFEDFF"},color:{type:String,value:"#3683D6"},speed:{type:Number,value:1500},show:{type:Boolean,value:!0},close:{type:Boolean,value:!1}},data:{wrapWidth:0,width:0,duration:0,animation:null,timer:null},detached(){this.destroyTimer()},ready(){"roll"===this.properties.type&&this.properties.show&&this.initAnimation()},methods:{async initAnimation(){const t=await nodeUtil.getNodeRectFromComponent(this,".l-noticebar-content"),i=await nodeUtil.getNodeRectFromComponent(this,".l-noticebar-content-wrap"),a=t.width/40*this.data.speed,e=wx.createAnimation({duration:a,timingFunction:"linear"});this.setData({wrapWidth:i.width,width:t.width,duration:a,animation:e},()=>{this.startAnimation()})},startAnimation(){if(0!==this.data.animation.option.transition.duration){this.data.animation.option.transition.duration=0;const t=this.data.animation.translateX(this.data.wrapWidth).step();this.setData({animationData:t.export()})}this.data.animation.option.transition.duration=this.data.duration;const t=this.data.animation.translateX(-this.data.width).step();setTimeout(()=>{this.setData({animationData:t.export()})},100);const i=setTimeout(()=>{this.startAnimation()},this.data.duration);this.setData({timer:i})},destroyTimer(){this.data.timer&&clearTimeout(this.data.timer)},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0}),this.setData({timer:null})},onSwip(t){this.triggerEvent("lintap",{...t.currentTarget.dataset},{bubbles:!0,composed:!0})},onIconTap(){this.triggerEvent("linicontap",{},{bubbles:!0,composed:!0}),this.setData({timer:null})},onClose(){this.setData({timer:null,show:!1})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view wx:if="{{ show }}" class="l-class l-noticebar" style="color: {{ color }}; background-color: {{ backgroundcolor }}">
<l-icon wx:if="{{ frontIconName }}" size="{{frontIconSize}}" color="{{frontIconColor}}" name="{{ frontIconName }}" class="l-noticebar-icon" l-class="l-icon-class"/>
<swiper autoplay vertical interval="{{4*speed}}" class="l-noticebar-content-wrap" wx:if="{{type=='swip'}}">
<block wx:for="{{swipArr}}" wx:key="swip">
<swiper-item data-index="{{index}}" bindtap="onSwip">
{{item}}
</swiper-item>
</block>
</swiper>
<view class="l-noticebar-content-wrap l-noticebar-content-wrap-view" wx:else>
<view class="l-noticebar-content" bindtap="handleTap" animation="{{ animationData }}">
<slot></slot>
</view>
</view>
<l-icon wx:if="{{ endIconName && !close }}" size="{{endIconSize}}" color="{{endIconColor}}" class="l-noticebar-operation" name="{{ endIconName }}" bindtap="onIconTap"/>
<l-icon wx:if="{{close}}" class="l-noticebar-operation" name="close" size="{{endIconSize}}" color="{{endIconColor}}" bindtap="onClose"/>
</view>
.l-noticebar{display:flex;height:72rpx;width:750rpx;line-height:72rpx;font-size:28rpx;color:#3963bc;background-color:#dfedff;overflow:hidden;box-shadow:0 2px 5px 0 rgba(218,224,233,.4);border-radius:0 0 8px 8px}.l-noticebar-icon{display:flex;margin-left:20rpx;margin-right:18rpx;align-items:center}.l-noticebar-icon+.l-noticebar-content-wrap-view{margin-left:5rpx}.l-noticebar-operation{display:flex;margin-right:16rpx;margin-left:8rpx;align-items:center}.l-noticebar-content-wrap{display:flex;margin-left:5rpx;flex:1;height:72rpx;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.l-noticebar-content-wrap .l-noticebar-content{position:absolute;transition-duration:20s}
\ No newline at end of file
import zIndex from"../behaviors/zIndex";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({behaviors:[zIndex,validator],externalClasses:["l-bg-class","l-panel-class","l-class"],properties:{show:{type:Boolean,value:!1},animation:{type:Boolean,value:!0},transition:{type:Boolean,value:null},contentAlign:{type:String,value:"center",options:["top","right","left","bottom","center"]},direction:{type:String,value:null,options:["top","right","left","bottom","center"]},locked:{type:Boolean,value:!1}},attached(){this._init()},pageLifetimes:{show(){this._init()}},data:{status:"show"},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showPopup=t=>{const{zIndex:e=99,animation:o=!0,contentAlign:i="center",locked:a=!1}={...t};this.setData({zIndex:e,animation:o,contentAlign:i,locked:a,show:!0})},wx.lin.hidePopup=()=>{this.setData({status:"hide"}),setTimeout(()=>{this.setData({show:!1})},300)}},doNothingMove(){},doNothingTap(){},onPopupTap(){!0!==this.data.locked&&(this.data.show?(this.setData({status:"hide"}),setTimeout(()=>{this.setData({show:!1,status:"show"})},300)):this.setData({show:!0,status:"show"})),eventUtil.emit(this,"lintap",!0)}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class='container-popup {{ show ? "popup-show" : "" }} {{ "l-popup-" + direction===null?contentAlign:direction }} l-class' style="z-index:{{zIndex}};" catchtouchmove="doNothingMove">
<view class="container-bg l-bg-class"></view>
<view wx:if="{{show}}" class="popup-content {{ show ? ((direction===null)?contentAlign:direction) : ''}} popup-fade-{{direction===null?contentAlign:direction}}-active-{{(transition===null?animation:transition) ? status:''}} l-panel-class" catchtap="onPopupTap">
<view catchtap="doNothingTap">
<slot></slot>
</view>
</view>
</view>
.popup-fade-center-active-show{animation:popup-center-fadein .3s forwards}.popup-fade-center-active-hide{animation:popup-center-fadeout .3s forwards}.popup-fade-top-active-show{animation:popup-top-fadein .3s forwards}.popup-fade-top-active-hide{animation:popup-top-fadeout .3s forwards}.popup-fade-left-active-show{animation:popup-left-fadein .3s forwards}.popup-fade-left-active-hide{animation:popup-left-fadeout .3s forwards}.popup-fade-right-active-show{animation:popup-right-fadein .3s forwards}.popup-fade-right-active-hide{animation:popup-right-fadeout .3s forwards}.popup-fade-bottom-active-show{animation:popup-bottom-fadein .3s forwards}.popup-fade-bottom-active-hide{animation:popup-bottom-fadeout .3s forwards}@keyframes popup-top-fadein{0%{transform:translate3d(0,-100%,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-top-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(0,-100%,0);opacity:.1}}@keyframes popup-left-fadein{0%{transform:translate3d(-100%,0,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-left-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(-100%,0,0);opacity:.1}}@keyframes popup-right-fadein{0%{transform:translate3d(100%,0,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-right-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(100%,0,0);opacity:.1}}@keyframes popup-bottom-fadein{0%{transform:translate3d(0,100%,0);opacity:0}100%{transform:translate3d(0,0,0);opacity:1}}@keyframes popup-bottom-fadeout{0%{transform:translate3d(0,0,0);opacity:1}100%{transform:translate3d(0,100%,0);opacity:.1}}@keyframes popup-center-fadein{0%{transform:scale(.8);opacity:0}50%{transform:scale(1.1)}100%{transform:scale(1);opacity:1}}@keyframes popup-center-fadeout{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1)}100%{transform:scale(.8);opacity:0}}.container-popup{visibility:hidden;position:fixed;top:0;left:0;right:0;bottom:0}.popup-show{visibility:visible}.popup-show .container-bg{display:block;opacity:1}.container-bg{opacity:0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:6;background:rgba(0,0,0,.4);transition:all .3s ease-in-out}.popup-bg{height:100%;width:100%;position:absolute;z-index:90}.popup-content{position:absolute;z-index:100;width:100%;max-width:100%;height:100%}.center{display:flex;height:100%;width:100%;flex-direction:row;align-items:center;justify-content:center}.left{display:flex;flex-direction:row;height:100%}.right{display:flex;flex-direction:row;justify-content:flex-end;height:100%}.bottom{display:flex;flex-direction:column-reverse;width:100%}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-deleted-class","l-unit-class","l-value-class","l-class","l-decimal-class","l-dot-class"],behaviors:[validator],properties:{unit:{type:String,value:"¥"},size:{type:String,value:"28"},color:{type:String,value:"#3963BC"},bold:{type:String,value:"500"},unitColor:String,unitSize:String,unitBold:String,value:{type:String,value:"0.00"},mode:{type:String,value:"number",options:["number","text"]},valueColor:String,valueSize:String,valueBold:String,deleted:Boolean,delColor:String,reserveDigit:{type:Number,value:2},autofix:Boolean},data:{priceInteger:{type:String,value:"0"},priceDecimal:{type:String,value:"00"}},observers:{value:function(){this.reserveNumber()}},methods:{reserveNumber(){this.setData({priceInteger:null,priceDecimal:null});const e=Number(this.data.value);if(!(isNaN(Number(e))||"text"===this.data.mode)&&this.data.autofix){const t=e.toFixed(this.data.reserveDigit).toString().split(".");this._setPrice(t)}else{const e=this.data.value.split(".");this._setPrice(e)}},_setPrice(e){if(1===e.length)this.setData({priceInteger:e[0]});else{if(2!==e.length)throw"price 格式有误,请仔细检查!";this.setData({priceInteger:e[0],priceDecimal:e[1]})}}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class='price-container l-class {{deleted ? "price-del l-deleted-class" : ""}}' style="color: {{delColor?delColor:color}}">
<text class="l-unit-class" style="color: {{unitColor?unitColor:color}}; font-size: {{unitSize?unitSize:size}}rpx; font-weight: {{unitBold?unitBold:bold}}">{{unit}}</text>
<text class="l-value-class" style="color: {{valueColor?valueColor:color}}; font-size: {{valueSize?valueSize:size}}rpx; font-weight: {{valueBold?valueBold:bold}}">{{priceInteger}}<text class="l-dot-class">{{priceDecimal?'.':''}}</text><text class="l-decimal-class">{{priceDecimal?priceDecimal:''}}</text></text>
</view>
.price-del{text-decoration:line-through!important}.price-container{display:inline-block;text-align:center;color:#3963bc;font-size:28rpx}
\ No newline at end of file
import{px2rpx}from"../utils/util.js";import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-text-class","l-active-class","l-background-class"],behaviors:[validator],properties:{percent:{type:Number,value:0},strokeWidth:{type:Number,value:12},borderRadius:{type:Number,value:6},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},showInfo:{type:Boolean,value:!1},textPosition:{type:String,value:"right",options:["left","right"]},textColor:{type:String},interval:{type:Number,value:20},active:{type:Boolean,value:!1},duration:{type:Number,value:30}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{_slotWidth:0,_slotHeight:0,_progressWidth:0,_progressHeight:0,_marginBottom:0,marginLeft:0,marginTop:0,_useSlot:!1},observers:{"_slotWidth, _slotHeight, _progressWidth, _progressHeight, percent,_useSlot":function(t,e,r,i,s,a){if(a){const a=-(e-i)/2,o=(r-t)*s/100;this.setData({marginTop:a,marginLeft:o})}}},lifetimes:{attached(){this.data.percent>100&&this.setData({percent:100});wx.createSelectorQuery().in(this).select(".slot").boundingClientRect(t=>{let e=this.data._useSlot;t.width&&(e=!0),this.setData({_useSlot:e,_slotWidth:px2rpx(t.width),_slotHeight:px2rpx(t.height)})}).exec();wx.createSelectorQuery().in(this).select(".progress").boundingClientRect(t=>{this.setData({_progressHeight:px2rpx(t.height),_progressWidth:px2rpx(t.width)})}).exec();const t=this.data.percent;let e=0;this.data.active&&setInterval(()=>{e<t&&(e+=1,this.setData({percent:e}))},this.data.duration)}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="container l-class">
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='left'}}" style="color:{{textColor?textColor:''}};margin-right:{{interval}}rpx">
{{percent}}%
</view>
<view class="progress short" style="height:{{strokeWidth}}rpx;">
<view class="slot" style="margin-left:{{marginLeft}}rpx;margin-top:{{marginTop}}rpx;">
<slot name="header"></slot>
</view>
<view class="percent {{activeColor?'':'active'}} l-active-class" style="width:{{percent}}%;height:{{strokeWidth}}rpx;border-radius:{{borderRadius}}rpx;{{activeColor?'background-color:'+activeColor+';':''}}"></view>
<view class="background l-background-class" style="height:{{strokeWidth}}rpx;border-radius:{{borderRadius}}rpx;background-color:{{backgroundColor}};"></view>
</view>
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='right'}}" style="color:{{textColor?textColor:''}};margin-left:{{interval}}rpx">
{{percent}}%
</view>
</view>
\ No newline at end of file
.container{display:flex;flex-direction:row;align-items:center}.progress{position:relative;width:100%;transition:all .25s ease-in-out}.percent{position:absolute;z-index:1}.active{background-color:#3963bc}.text{color:#3963bc;font-size:30rpx}.background{position:absolute;width:100%}.header{position:absolute!important;z-index:2}.slot{position:absolute;z-index:2}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({externalClasses:["l-class","l-error-text","l-error-text-class"],behaviors:["wx://form-field",rules],relations:{"../radio/index":{type:"child",linked(){this.init()},linkChanged(){},unlinked(){this.init()}}},properties:{current:{type:String},noneChecked:{type:Boolean,value:!0},placement:{type:String,value:"column"}},data:{currentLength:0},methods:{checkedKeyRepeat(e){let t=e.map(e=>e.data.key);const r=this.isRepeat(t);if(!1!==r)throw new Error("keys有重复元素, radio的key属性不能重复:"+r)},isRepeat(e){let t={};for(let r in e){if(t[e[r]])return e[r];t[e[r]]=!0}return!1},init(){const e=this.getRelationNodes("../radio/index");this.checkedKeyRepeat(e),this.onChangeHandle(e)},onChangeHandle(e){e.forEach(e=>{let t=this.properties.current===e.data.key;e.setChecked(t,e.data.key)})},onEmitEventHandle(e,t){this.properties.current=t?e.key:null;const r=this.getRelationNodes("../radio/index");this.onChangeHandle(r),Object.assign(e,{currentKey:this.properties.current}),this.validatorData({[this.data.name]:this.data.current}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.current},reset(){this.data.current=""}},observers:{current:function(){this.init()}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-radio":"../radio/index"}}
\ No newline at end of file
<view class="l-class radio-group radio-group-{{placement}}">
<slot></slot>
</view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.radio-group{width:100%}.radio-group-row{display:flex;flex-direction:row}.radio-group-column{display:flex;flex-direction:column}
\ No newline at end of file
Component({externalClasses:["l-class","l-disabled-class"],behaviors:["wx://form-field"],relations:{"../radio-group/index":{type:"parent"}},properties:{key:String,cell:Object,size:{type:String,value:"38rpx"},disabled:{type:Boolean},custom:Boolean,color:{type:String,value:"#ccc"},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},placement:{type:String,value:"left"},transition:{type:Boolean,value:!0}},data:{checked:!1},methods:{setChecked(e){this.setData({checked:e})},onRadioChangeTap(){if(this.properties.disabled)return;const e=this.getRelationNodes("../radio-group/index")[0],t=e.properties.noneChecked;let r=!0;if(this.isCurrentSelectedKey(e)&&(r=!1,!t))return;const i=!this.data.checked;this.data.checked=i;const s={checked:i,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(s,r)},isCurrentSelectedKey(e){return e.properties.current===this.properties.key}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view bind:tap="onRadioChangeTap" class="label label-{{placement}} {{disabled?'label-disabled l-disabled-class':'l-class'}}">
<view class="radio" style="color:{{checked?selectColor:(disabled?disabledColor:color)}};font-size:{{size}}">
<slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked?'icon-select':'icon-unselect'}}"></view>
</view>
<slot/>
</view>
\ No newline at end of file
.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.radio{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABwQAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBaIFyATYCJAMMCwgABCAFhG0HOxs9BsgekiQlqiBBkCKqgBDbFA9f+72eu7sf0SUKUEYCjq8CJBWhqlrpakx5POtO5RtaczeTEm4dEZ0nl3vZ/P4QsbZQwBuhkJZZe0ElkSkAzf+5nN4oP2/Mb1kucw086gUYBxToHtgmK5FAPIXhtYt1GOcJtC1qIDsxOz1Aq6DTAvGYpZNAm4sqilRoCvWatUW8V9NMb9Mt4F34/firLbQktYzOPXN3MgNGfhz/9uXVatVlHyGbzw1pExlbgEJcrfWep4izWxTahlppdgJ1RUhzJaqKUGrq6zv94yWijtZ3wRo06aZkroDgZ58ENGRb3WvkdwEvYZyONecufVjvlP/yCN9e6dcv/syKok+S/ILg5fk4v+4VjvzShk88ZPlDX7WRthx5hXV881Hg5krDX9Z84j7MqK4cjZR1JuLFnjJtMX7ePssP3xVQnfFiKPkScCUeVTcdonq0qYhT/P/M8y4Q5ZkuBeY3m1/gqWk5FFo2LcA/s72GnXZzDSQAVPNPvhv+Qobg0R/V/2uDnX/NTgHftl/fyIRqAfkuAJr34wv+r6xnVzEV1JaLLnWltj9bvld3AmI5oEKDYy/j9bPeaUIzJ5MgaViArGkJLdQtqOnYhrqmfWjbZNncMYEpRGlhwxaBMHQNSd8HyIbqaKE+Q83cH9QNQwFtZ2OyZ8dKsPpjjJIEZWBqDrLpUpFyHEQfNboQPZVP4qwiZPsQ5tgEbG1qKRYsqIjwHAu4abqNEApSuFSAZnIZyudLsIxLWZQmTQwh5b7mZqruTU3pUgHoHcOQJALJgFLmQKy0kiLK70/oS593QWhT8pJwC6kh7INgHHZ4qFWTlh6oRVvsRbqXazjTaG0IggJRsJICyExGIXl5JVC5flQWkkY0YUaky/o0s15UX23T+vrC9x2ANrogR4ocRfNNkUP5u9SpAwsAAAAA') format('woff2')}.icon-unselect:before{content:"\e6a1"}.icon-select:before{content:"\e73a"}
\ No newline at end of file
import eventBus from"../core/utils/event-bus";Component({externalClasses:["l-class","l-class-icon","l-class-image","l-icon-class","l-image-class"],options:{multipleSlots:!0},properties:{count:{type:Number,value:5},score:{type:Number,value:0},size:{type:String,value:"36"},disabled:Boolean,activeColor:{type:String,value:"#FF5252"},inActiveColor:{type:String,value:"#FFE5E5"},name:{type:String,value:"favor-fill"},activeImage:String,inActiveImage:String},data:{},methods:{handleClick(e){if(this.data.disabled)return;const{index:t}=e.currentTarget.dataset;this.setData({score:t+1}),this.triggerEvent("linchange",{score:t+1}),eventBus.emit("lin-form-change-"+this.id,this.id)},getValues(){return this.data.score},reset(){this.setData({score:0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"} }
\ No newline at end of file
<view class="l-rate l-class">
<view wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" bindtap="handleClick">
<view class="icon-checked" wx:if="{{score > index}}" hover-class="none" hover-stop-propagation="false" data-rate="{{score-index}}" style="width:{{score-index<1?(score-index)*100:100}}%">
<image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{activeImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{activeColor}}"/>
</view>
<image wx:if="{{activeImage && inActiveImage}}" class="image-item l-class-image l-image-class" src="{{inActiveImage}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
<l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{inActiveColor}}"></l-icon>
</view>
</view>
\ No newline at end of file
.l-rate,.l-rate-star{display:inline-flex}.l-rate-star{position:relative}.l-rate-star~.l-rate-star{margin-left:10rpx}.icon-checked{position:absolute;overflow:hidden}.image-item{width:80rpx;height:80rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-container-class","l-placeholder-class","l-icon-class","l-input-class","l-cancel-class"],behaviors:[validator],options:{multipleSlots:!0},properties:{confirmType:{type:String,value:"search"},placeholder:String,cancelText:{type:String,value:"取消"},frontText:String,custom:Boolean,value:String,type:String,icon:{type:String,value:"research"},iconColor:{type:String,value:"#bdbdbd"},iconSize:{type:String,value:"28"},bgColor:{type:String,value:"#f3f3f3"},showCancel:{type:Boolean,value:!0},shape:{type:String,value:"primary",options:["circle","primary"]},textAlign:{type:String,value:"left",options:["left","right"]},focus:Boolean,clear:{type:Boolean,value:!0},maxlength:{type:Number,value:140},disabled:Boolean,placeholderStyle:String},data:{},methods:{onCancel(){this.triggerEvent("lincancel",{},{bubbles:!0,composed:!0})},handleInputChange(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linchange",t)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:l=""}=t;this.setData({value:l}),this.triggerEvent("linconfirm",t)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail,{bubbles:!0,composed:!0})},handleTapFrontText(e){this.triggerEvent("linfronttap",e.detail)}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-input":"../input/index","l-icon":"../icon/index"}}
\ No newline at end of file
<view class="search-bar l-container-class">
<slot name="before"/>
<view wx:if="{{frontText}}" class="icon-container" bind:tap="handleTapFrontText">
<text class="city">{{frontText}}</text>
<l-icon name="down" color="#333" size="22"/>
</view>
<view class="search-input l-class {{'search-input-'+ shape}}" style="{{'background-color:'+bgColor}}">
<slot wx:if="{{custom}}" name="icon"/>
<l-icon wx:else name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}" l-class="l-icon-class"/>
<input confirm-type="{{confirmType}}" class="input l-input-class {{'input'+ TextAlign}}" value="{{ value }}" type="{{type}}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class l-placeholder-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<view class="close-wrap" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close">
<l-icon name="close" color="#fff" size="15"/>
</view>
</view>
</view>
<view wx:if="{{showCancel}}" class="cancel l-cancel-class" bindtap="onCancel">
{{cancelText}}
</view>
<slot name="after"/>
</view>
.search-bar{display:flex;flex-direction:row;align-items:center;padding:0 20rpx;box-sizing:border-box;width:100%}.search-input{height:60rpx;background-color:#f3f3f3;display:flex;flex-direction:row;flex:1;align-items:center;padding-left:30rpx;box-sizing:border-box}.search-input-primary{border-radius:8rpx}.search-input-circle{border-radius:30rpx}.cancel{font-size:28rpx;color:#666;display:flex;align-items:center;width:60rpx;justify-content:center;height:60rpx;margin-left:15rpx}.input{height:40rpx;line-height:40rpx;flex:1;margin-left:15rpx;font-size:28rpx;color:#666}.input-center{text-align:center}.input-left{text-align:left}.close-wrap{padding:10rpx}.close{height:30rpx;width:30rpx;background:#ddd;display:flex;align-items:center;justify-content:center;border-radius:50%;padding-top:3rpx;box-sizing:border-box;margin-right:15rpx}.pls-class{color:#bdbdbd;font-size:28rpx}.icon-container{display:flex;flex-direction:row;align-items:center;margin-right:15rpx}.city{font-size:28rpx;color:#333;margin-right:10rpx}
\ No newline at end of file
Component({options:{multipleSlots:!0},relations:{"../segment/index":{type:"parent",linked(){},unlinked(){}}},properties:{tab:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"},dotBadge:Boolean,badgeCount:{type:Number},badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"}},observers:{"**":function(e){this.updateData(e)}},data:{},methods:{updateData(e){let t=this.getRelationNodes("../segment/index")[0];if(!t)return;const a=t.data.tabList;if(!(a&&a.length>0))return;const n=a.findIndex(e=>e.key===this.data.key);a[n]=e,t.setData({tabList:a},()=>{t.data.scrollable&&t.queryMultipleNodes()})}}});
\ No newline at end of file
{"component":true,"usingComponents":{} }
\ No newline at end of file
<slot></slot>
\ No newline at end of file
import scrollCenter from"../behaviors/scrollCenter";Component({behaviors:[scrollCenter],externalClasses:["l-class","l-header-class","l-class-active","l-active-class","l-class-inactive","l-inactive-class","l-class-tabimage","l-tab-image-class","l-class-header-line","l-header-line-class","l-class-line","l-line-class","l-class-icon","l-icon-class","l-class-badge","l-badge-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../segment-item/index":{type:"child",linked(e){this.initTabs(e)}}},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},scrollable:Boolean,hasLine:{type:Boolean,value:!0},animatedForLine:Boolean,activeColor:{type:String},inactiveColor:{type:String},equalWidth:{type:Boolean,value:!0},even:{type:Boolean,value:!0},width:Number,height:Number,itemHeight:Number,itemWidth:Number},observers:{activeKey:function(e){if(!e)return;const t=this.data.tabList.findIndex(t=>t.key===e);this.setData({currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},data:{_cells:[],tabList:[],currentIndex:0,_segmentItemInstances:[]},methods:{initTabs(e){const t=this.data.activeKey;let a=this.getRelationNodes("../segment-item/index");if(a.length>0){if(a.length===this.data.tabList.length&&this.data._segmentItemInstances.indexOf(e)>0)return;let s=t,l=this.data.currentIndex,i=[];const n=a.map((e,a)=>(s=t||0!==a?s:e.data.key,l=e.data.key===s?a:l,i[a]=e.dataset.cell,{...e.data}));this.setData({_cells:i,activeKey:s,tabList:n,currentIndex:l,_segmentItemInstances:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},handleChange(e){const t=e.currentTarget.dataset.key,a=e.currentTarget.dataset.index;this._setChangeData({activeKey:t,currentIndex:a})},_setChangeData({activeKey:e,currentIndex:t}){this.setData({activeKey:e,currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:e,currentIndex:t,cell:this.data._cells[t]})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-segment-item":"../segment-item/index"}}
\ No newline at end of file
<view class="l-tabs l-class {{'l-placement-'+placement}} {{placement==='left'||placement==='right'?'l-tabs-vertical':'l-tabs-horizontal'}} {{scrollable ? 'l-tabs-scroll':''}}" style="{{width?'width:'+ width +'rpx;':'' }}{{height?'height:'+height+'rpx':''}}">
<scroll-view scroll-x="{{placement==='top'||placement==='bottom' && scrollable}}" scroll-y="{{placement==='left'||placement==='right' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll l-header-class {{hasLine?'l-tabs-header-line l-class-header-line l-header-line-class':''}}" style="{{width?'width:'+ width +'rpx;':'' }} {{height?'height:'+height+'rpx':''}}">
<view class="l-tabs-header {{( even && equalWidth)?'l-tabs-equal-header':'l-tabs-unequal-header'}}">
<block wx:for="{{tabList}}" wx:key="key">
<view wx:if="{{item.tab}}" class="l-tabs-item {{( even && equalWidth)?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}};{{itemWidth?'width:'+ itemWidth +'rpx':'' }};{{itemHeight?'height:'+itemHeight+'rpx':''}}" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<l-badge l-self-class="badge-view" l-class="l-class-badge l-badge-class" wx:if="{{(item.badgeCount > 0 || item.dotBadge )}}" value="{{item.badgeCount}}" dot="{{item.dotBadge}}" max-count="{{item.badgeMaxCount}}" number-type="{{item.badgeCountType}}">
<template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}"/>
</l-badge>
<template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}" wx:else/>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
<view wx:else class="l-tabs-item {{(even && equalWidth)?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<slot name="{{item.key}}"></slot>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</block>
</view>
</scroll-view>
</view>
<template name="tab-item">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tab-image-class"/>
<l-icon wx:if="{{item.icon}}" l-class="l-class-icon l-icon-class {{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" color="{{item.key===activeKey?activeColor:inactiveColor}}" size="{{item.iconSize}}"/>
{{item.tab}}
</template>
.l-tabs{overflow:auto;width:100%}.l-tabs-header{display:flex;width:100%;flex-direction:row;align-items:center}.l-tabs-header .l-tabs-item{font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs-header .l-icon-active,.l-tabs-header .l-tabs-active{color:#333}.l-tabs-header .l-icon-active,.l-tabs-header .l-icon-inactive{font-size:28rpx}.l-tabs-header .l-icon-inactive,.l-tabs-header .l-tabs-inactive{color:#bbb}.l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-bottom,.l-placement-top{height:80rpx}.l-placement-bottom .l-tabs-header,.l-placement-top .l-tabs-header{height:100%}.l-placement-bottom .l-tabs-header .l-tabs-item,.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-placement-right{flex-direction:row-reverse}.l-placement-bottom{flex-direction:column-reverse}.l-tabs-vertical .l-tabpanel-swiper{height:initial}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible}.l-tabs-vertical{width:160rpx}.l-tabs-vertical .l-tabsscroll{width:160rpx;box-sizing:border-box}.l-tabs-vertical .l-tabs-equal-header{height:100%}.l-tabs-vertical .l-tabs-header{width:100%;flex-direction:column;-webkit-overflow-scrolling:touch;white-space:nowrap;overflow-x:hidden}.l-tabs-vertical .l-tabs-header .l-tabs-item.l-tabs-active{background:#fff}.l-tabs-vertical .l-tabs-header .l-tabs-unequal-width{height:80rpx}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;background:#f6f8fa;width:100%}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;background:#000}.l-tabs-horizontal .l-tabs-equal-width{flex:1}.l-tabs-horizontal .l-tabs-unequal-width{padding:0 20rpx}.l-tabs-horizontal .l-tabsscroll{height:100%;box-sizing:border-box}.l-tabs-horizontal .l-tab-line{height:4rpx;width:0;left:100%;right:0;margin:0 auto}.l-tabs-horizontal .l-line-aminmated{transition:.2s all linear}.l-tabs-horizontal .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{left:0}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;left:0}.l-tabs-horizontal .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0;transform:translateY(-100%)}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-placement-bottom .l-tab-line{top:0}.l-placement-bottom .l-tabs-header-line{border-top:1px solid #f3f3f3}.l-tabs-vertical .l-tab-line{width:6rpx;height:0;border-radius:0 6rpx 6rpx 0;top:0;margin:auto 0}.l-tabs-vertical .l-line-aminmated{transition:.2s all linear}.l-tabs-vertical .l-tabs-active .l-tab-line{height:40rpx}.l-tabs-vertical .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-tabs-vertical .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{height:0;top:0}.l-placement-left .l-tab-line{right:auto}.l-placement-left .l-tabs-header-line{border-left:1px solid #f3f3f3}.l-placement-right .l-tab-line{right:0;left:auto}.l-placement-right .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-bottom{flex-direction:column-reverse}.l-tab-image-placement-left{flex-direction:row}.l-tab-image-placement-right{flex-direction:row-reverse}.l-tabs-header .badge-view{top:-20rpx}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-title-class","l-avatar-class","l-row-class"],behaviors:[validator],properties:{loading:{type:Boolean,value:!0},title:{type:Boolean,value:!0},paragraph:{type:Boolean,value:!0},active:{type:Boolean,value:!0},avatar:Boolean,titleWidth:String,avatarSize:String,avatarShape:{type:String,value:"circle",options:["circle","square"]},rowsWidth:{type:Array,optionalTypes:[Array,String],value:"60%"},rowsHeight:{type:Array,optionalTypes:[Array,String],value:"34rpx"},rows:Number},observers:{"rows,rowsWidth,rowsHeight":function(t,a,e){this._getResult(t,a,"rowsW","100%"),this._getResult(t,e,"rowsH","34rpx"),this._toRows(t)}},data:{},methods:{_arrRepeat(t,a){const e=[];for(let r=0;r<a-1;r++)e.push(t);return e},_getResult(t,a,e,r){if(Array.isArray(a))this.data[e]=a;else{const s=this._arrRepeat(r,t);s.push(a),this.data[e]=s}},_toRows(t){let a=[];for(let e=0;e<t;e++)a.push({width:this.data.rowsW[e],height:this.data.rowsH[e]});this.setData({r:a})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view wx:if="{{loading}}" class="l-skeleton-container l-class">
<view wx:if="{{avatar}}" class="l-avatar-class l-skeleton-avatar bg {{active?'active':''}} l-skeleton-avatar-{{avatarShape}}" style="width:{{avatarSize}};height:{{avatarSize}}"></view>
<view class="l-skeleton-right">
<view wx:if="{{title}}" class="l-skeleton-title-container" style="height:{{avatarSize}}">
<view class="l-skeleton-title bg {{active?'active':''}}" style="height:{{titleHeight}}"></view>
</view>
<view wx:if="{{paragraph}}" wx:for="{{r}}" wx:key="index" class="l-row-class l-skeleton-rows bg {{active?'active':''}}" style="height:{{item.height}};width:{{item.width}}"></view>
</view>
</view>
<slot wx:else/>
\ No newline at end of file
.l-skeleton-container{width:100%;display:flex;flex-direction:row;box-sizing:border-box}.l-skeleton-avatar{height:72rpx;width:72rpx;margin-right:20rpx}.l-skeleton-avatar-circle{border-radius:50%}.l-skeleton-right{display:flex;flex-direction:column;flex:1}.l-skeleton-title{width:100%;height:34rpx}.l-skeleton-title-container{height:72rpx;width:50%;display:flex;align-items:center}.l-skeleton-rows{margin-top:20rpx}.bg{background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%}.active{animation:loading 1.4s ease infinite}@keyframes loading{0%{background-position:100% 50%}100%{background-position:0 50%}}
\ No newline at end of file
const _windowWidth=wx.getSystemInfoSync().windowWidth;Component({options:{multipleSlots:!0},properties:{width:{type:Number,value:_windowWidth},height:{type:Number,value:100},slideWidth:{type:Number,value:0},threshold:{type:Number,value:0},disabled:{type:Boolean,value:!1},autoClose:{type:Boolean,value:!1},close:{type:Boolean,value:!1,observer:function(t){t&&(this.setData({popup:!1,x:0}),this.onCloseTap())}}},data:{viewWidth:_windowWidth,x:0,out:!1},ready(){this.updateRight()},methods:{updateRight(){const t=this;wx.createSelectorQuery().in(this).select(".right").boundingClientRect((function(e){t._slideWidth=e.width;let i=e.width<=50?e.width:50;t._threshold=t.properties.threshold?t.properties.threshold:i,t._viewWidth=t.data.width+e.width*(750/_windowWidth),t.setData({viewWidth:t._viewWidth})})).exec()},onTouchStart(t){this._startX=t.changedTouches[0].pageX},onTouchEnd(t){if(this.properties.disabled)return;this._endX=t.changedTouches[0].pageX,this._length=this._endX-this._startX;const{_endX:e,_startX:i,_threshold:s}=this;this._length>s&&(this.setData({popup:!1,x:0}),this.onCloseTap()),e>i&&!1===this.data.out||(i-e>=s?(this.setData({x:-this._slideWidth,popup:!0,close:!1}),this.onOpenTap()):i-e<s&&i-e>0&&!0!==this.data.popup||e-i>=s?(this.setData({x:0}),this.onCloseTap()):e-i<s&&e-i>0&&(this.setData({x:-this._slideWidth,close:!1}),this.onOpenTap()))},onChange(t){!this.data.out&&t.detail.x<-this._threshold?this.setData({out:!0}):this.data.out&&t.detail.x>=-this._threshold&&this.setData({out:!1})},onRightTap(){this.properties.autoClose&&(this.setData({popup:!1,x:0}),this.onCloseTap()),this.triggerEvent("lintap","click right",{bubbles:!0,composed:!0})},onOpenTap(){this.triggerEvent("slideopen",!0,{bubbles:!0,composed:!0})},onCloseTap(){this.triggerEvent("slideclose",!1,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<movable-area class="container" style="width: {{width}}rpx; height: {{height}}rpx;">
<movable-view direction="horizontal" class="movable-content" out-of-bounds="{{out}}" damping="20" disabled="{{disabled}}" x="{{x}}" style="width: {{width + slideWidth}}rpx; height: {{height}}rpx;" inertia bindtouchend="onTouchEnd" bindtouchstart="onTouchStart" bindchange="onChange">
<view class="left" style="width: {{width}}rpx; height: {{height}}rpx;">
<slot name="left"></slot>
</view>
<view class="right" bindtap="onRightTap" style="width: {{slideWidth}}rpx; height: {{height}}rpx;">
<slot name="right"></slot>
</view>
</movable-view>
</movable-area>
\ No newline at end of file
.movable-content{display:flex;direction:row;overflow:hidden}.container{overflow:hidden}
\ No newline at end of file
Component({externalClasses:["l-class"],properties:{color:String,show:Boolean,type:{type:String,value:"flash"},custom:Boolean,size:{type:String,value:"default"}},methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view wx:if="{{show}}" class="{{type==='flash'?'l-class':''}} {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<view style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='flash' || type==='change'}}" style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce2'}} {{'spinner-'+ type + '-' + size}}"></view>
<view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
</block>
</view>
.spinner-flash-default{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-default{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-default{width:50rpx;height:50rpx}.spinner-change-mini{width:30rpx;height:30rpx}.spinner-change-large{width:70rpx;height:70rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#3963bc;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#3963bc;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}
\ No newline at end of file
Component({externalClasses:["l-class","l-image-class","l-button-class","l-describe-class"],properties:{show:Boolean,type:{type:String,value:"success",observer:"_changeStatus"},image:String,describe:String,buttonText:String,bgColor:{type:String,value:"#fff"},fullScreen:{type:Boolean,value:!0},openApi:{type:Boolean,value:!0},custom:{type:Boolean,value:!1}},data:{},attached(){this._changeStatus(),this.data.openApi&&this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showStatusShow=e=>{const{type:t="success",image:a="",describe:s="",buttonText:i="",bgColor:r="#fff",fullScreen:o=!0}={...e};this.setData({show:!0,type:t,image:a,describe:s,buttonText:i,bgColor:r,fullScreen:o})},wx.lin.hideStatusShow=()=>{this.setData({show:!1})}},_changeStatus(){switch(this.properties.type){case"success":this.setData({typeImage:"image/success.png",typeText:"操作成功~"});break;case"error":this.setData({typeImage:"image/error.png",typeText:"操作失败~"});break;case"cart":this.setData({typeImage:"image/cart.png",typeText:"购物车空空如也,去逛逛吧~"});break;case"order":this.setData({typeImage:"image/order.png",typeText:"您暂时还没有订单哦~"});break;case"network":this.setData({typeImage:"image/network.png",typeText:"糟糕!网络错误~"});break;case"address":this.setData({typeImage:"image/address.png",typeText:"您暂时还没有地址哦~"});break;case"product":this.setData({typeImage:"image/product.png",typeText:"暂时还没有商品哦~~"});break;case"data":this.setData({typeImage:"image/data.png",typeText:"暂时还没有相关数据哦~~"});break;default:console.warn(this.data.type+" is not a valid value")}},tapStatusShow(){this.triggerEvent("lincorvertap",{},{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-button":"../button/index"}}
\ No newline at end of file
<view wx:if="{{show}}" class="l-status-container l-class {{fullScreen ? 'content': ''}}" style="{{'background:'+bgColor}};{{fullScreen ?'align-items:center;':''}}" bind:tap="tapStatusShow">
<block wx:if="{{custom}}">
<slot/>
</block>
<block wx:else>
<image wx:if="{{image}}" class="left-img l-image-class {{fullScreen ? 'image_margin_top': ''}}" src="{{image}}"></image>
<image wx:else class="{{type=='success'||type=='error'?'left-img':'top-img'}} {{type=='address'?'ad-img':''}} l-image-class {{fullScreen ? 'image_margin_top': ''}}" src="{{typeImage}}"></image>
<text wx:if="{{describe}}" class="status-text l-describe-class">{{describe}}</text>
<text wx:else class="status-text l-describe-class">{{typeText}}</text>
<l-button l-class="l-button-class button_margin_top" wx:if="{{buttonText}}">
<view>{{buttonText}}</view>
</l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='network'}}">
<view>重新加载</view>
</l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='cart'}}">
<view>去逛逛</view>
</l-button>
</block>
</view>
\ No newline at end of file
.l-status-container{background-color:#fff;flex-direction:column;display:flex;justify-content:center}.content{position:fixed;top:0;left:0;background:#fff;height:100%;width:100%}.ad-img{width:198rpx!important;height:204rpx!important}.top-img{width:264rpx;height:204rpx}.left-img{width:120rpx;height:184rpx}.image_margin_top{margin-top:-250rpx}.status-text{font-size:30rpx;color:#45526b;margin-top:40rpx}.button_margin_top{margin-top:80rpx}
\ No newline at end of file
Component({externalClasses:["l-class","l-step-class","l-title-class","l-describe-class","l-line-class"],options:{multipleSlots:!0},relations:{"../steps/index":{type:"parent"}},properties:{icon:String,title:String,describe:String,iconSize:{type:Number,value:24},iconColor:String,custom:Boolean},data:{},methods:{updateDataChange(e){this.setData({...e})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view class="step {{'step-'+direction}} l-class" style="{{direction==='row'?'width:'+(1/length)*stepsWidth+'px':'min-height:'+stepMinHeight+'rpx'}}">
<view class="step-container l-step-class {{'step-container-'+direction}}">
<view wx:if="{{custom}}" class="step-custom">
<slot name="dot"/>
</view>
<view wx:else class="l-step-class {{dot && !icon?'step-dot-'+currentStatus.setStatus(activeIndex,index,status)+' step-dot':'step-'+currentStatus.setStatus(activeIndex,index,status)+' step-icon'}}" style="{{dot?currentStatus.dotStyle(activeIndex,index,color):currentStatus.statusStyle(activeIndex,index,color,status)}}">
<l-icon wx:if="{{icon}}" name="{{icon}}" size="{{iconSize}}" color="{{(currentStatus.setStatus(activeIndex,index,status))==='process'?'#3963BC':iconColor}}"/>
<block wx:if="{{!dot && !icon}}">
<view wx:if="{{currentStatus.setStatus(activeIndex,index,status)==='error' || currentStatus.setStatus(activeIndex,index,status)==='finish'}}" class="iconfont icon-{{currentStatus.setStatus(activeIndex,index,status)}}"></view>
<block wx:else>{{index+1}}</block>
</block>
</view>
</view>
<view class="step-content {{'step-content-'+direction}}">
<view class="l-title-class {{activeIndex===index?'step-title-process':'step-title'}}">
{{title}}
</view>
<view class="l-describe-class step-describe">
{{describe}}
<slot name="describe"/>
</view>
</view>
<view class="step-line l-line-class {{'step-line-'+ direction}} {{activeIndex>index?'step-line-finish':'step-line-wait'}}" style="{{activeIndex>index?('background-color:'+color):''}}" wx:if="{{length !== index+1}}">
</view>
</view>
<wxs module="currentStatus">
var setStatus = function(activeIndex,index,status){
if(activeIndex===index){
return status || 'process'
} else if(activeIndex>index){
return 'finish'
}else{
return 'wait'
}
}
var statusStyle = function(activeIndex,index,color,status){
if(activeIndex===index){
return status==='error'?'':('background-color:' + color)
} else if(activeIndex>index){
return ('border-color:' + color + ';color:' + color)
}else{
return ''
}
}
var dotStyle = function(activeIndex,index,color){
if(activeIndex>=index){
return ('background-color:' + color)
} else{
return ''
}
}
module.exports = {
setStatus:setStatus,
statusStyle:statusStyle,
dotStyle:dotStyle
}
</wxs>
\ No newline at end of file
.step{display:flex;position:relative}.step-custom{z-index:2}.step-row{flex-direction:column;align-items:center}.step-column{flex-direction:row;padding-left:30rpx;box-sizing:border-box}.step-container{display:flex;justify-content:center;z-index:2;align-items:center;background-color:#fff}.step-container-row{width:70rpx;height:40rpx}.step-container-column{height:60rpx;width:40rpx}.step-icon{width:40rpx;height:40rpx;display:flex;align-items:center;justify-content:center;font-size:22rpx;transition:.5s;box-sizing:border-box}.step-process{color:#fff;background-color:#3963bc;border-radius:50%}.step-error{background-color:#fff;border:1px solid #f4516c;color:#f4516c;border-radius:50%}.step-finish{background-color:#fff;color:#3963bc;border:1px solid #3963bc;border-radius:50%}.step-wait{background-color:#fff;color:#c4c9d2;border:1px solid #c4c9d2;border-radius:50%}.step-dot{width:24rpx;height:24rpx;border-radius:50%;transition:.5s}.step-dot-process{background-color:#3963bc}.step-dot-wait{background-color:#c4c9d2}.step-dot-error{background-color:#f4516c}.step-dot-finish{background-color:#3963bc}.step-line{background:#c4c9d2;transition:.5s;position:absolute;z-index:0}.step-line-row{height:2rpx;width:100%;left:50%;top:18rpx}.step-line-column{width:2rpx;height:100%;top:20rpx;left:48rpx}.step-line-wait{background-color:#e8e8e8}.step-line-finish{background-color:#3963bc}.step-content{display:flex;flex-direction:column}.step-content-row{align-items:center;width:100%}.step-content-column{margin-left:15rpx}.step-title{color:#595959;font-size:26rpx;line-height:40rpx;margin:10rpx 0}.step-title-process{color:#333;font-size:28rpx;line-height:40rpx;margin:10rpx 0}.step-describe{color:#8c98ae;font-size:22rpx}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAK8AAsAAAAABpQAAAJvAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgp8gQsBNgIkAwwLCAAEIAWEbQc2G9EFyK4wbuGJaCgrSmkBCSe/ZeUtviBzEXztx/bd3f+oNEiuzaerJhKN6WQSJFqlZELxTOZqTS9l0hsflgVC/bD3z/dzv8lMXAksyeryeByfVkhgV93EvwdIwC+b/hetH5jPyAA+z+X0JtCBXONbltMcw496AcYBBbYnRoEEXEQBcAqyOwK15PsEmg2KiewMTy6yCoWzLBD3lqGwilJKUaRqo1C37C3iRaUxPaUnPMffj18LUUFSZc7a3bshnfV++DD/2GVISBPo4QoZU5hCXLeWThULiSvWbCrpb64VIS2VhYlVpqU+6B8vETWnsxWM0XLiI19G8OGABDKoy5VBzDRje98gRHertt+2fLx2cdC6ZJwcnK226Ifh0uzy4vzK8sLSytxprqHAHexGbz8/6za6C3ePjwW29viP3ailnm7Zz+SntAd5IV0IBHuvvy3Xd/41thTw/osdBRahcefh4Gepwb5iah13LrrKV9mRrBsIJKhCjvrnxLq9Trf0wb2ERn0TIg0GcmSNhsjCTqHSYgm1RutoNmnkcIseUrEoTZiwRRA63SBp94as0zNZ2BdU+v2h1hnFaHYczWe2GAmrakCiQqiDmgdLEz73vFSVdM+jkXUVWdTG/DLK0MpCOpGqVkfQR7nEhjBnZIg4cCk8GCaPoesKCKSwUaOESRS0J5O87UUJTXisyjYJKQjSAVUesGgEHw+Hk6ra5+chQ5ZLIXsEDfllSApZ44O0hBRAjph8SPAoz4RyDBmEcICTBA8YJrOQyyWAoH2WDWlIgjmhEGiXdAdx1JTY3uL93xFo5kzMkSJHUT+g+5BNxVpWMAYAAA==') format('woff2')}.iconfont{font-family:iconfont!important;font-size:24rpx;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-finish:before{content:"\e600"}.icon-error:before{content:"\e6cf"}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],options:{multipleSlots:!0},relations:{"../step/index":{type:"child",linked(){this._initSteps()},unlinked(){this._initSteps()}}},properties:{direction:{type:String,value:"row",options:["row","column"]},activeIndex:{type:Number,value:0},color:String,stepMinHeight:{type:String,value:"120"},status:{type:String,value:"process",options:["process","error"]},dot:Boolean},observers:{activeIndex:function(){this._initSteps()}},data:{},methods:{_initSteps(){wx.createSelectorQuery().in(this).select(".steps-container").boundingClientRect().exec(t=>{let e=this.getRelationNodes("../step/index");this.data.length=e.length,this.data.length>0&&e.forEach((e,i)=>{e.updateDataChange({index:i,...this.data,stepsWidth:t[0].width})})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-step":"../step/index"}}
\ No newline at end of file
<view class="l-class steps-container {{'steps-container-'+direction}}">
<slot/>
</view>
\ No newline at end of file
.steps-container{display:flex;width:100%}.steps-container-row{flex-direction:row}.steps-container-column{flex-direction:column}
\ No newline at end of file
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-header-wrapper-class","l-header-class","l-header-sticky-class","l-body-class"],options:{multipleSlots:!0},relations:{"../sticky/index":{type:"parent"}},properties:{top:{type:Number,value:0}},data:{mode:void 0,index:void 0,isFixedTop:!1,stickyItemTop:0,stickyItemHeight:0,stickyItemWrapperHeight:void 0},lifetimes:{ready:function(){const t=this.getParentComponent().data.mode;this.setData({mode:t})}},methods:{updateStickyItemPosition(t){const e=this.getParentComponent(),{index:i,stickyItemTop:s,stickyItemHeight:o,top:a}=this.data,n=t>s-a&&t<o+s-a;this.data.isFixedTop!==n&&(n?e.triggerEvent("linsticky",{index:i}):e.triggerEvent("linunsticky",{index:i}),this.setData({isFixedTop:n}))},async updateStickyItemBaseData(t){this.setData({index:t});const e=this.getParentComponent().data.scrollTop,i=await nodeUtil.getNodeRectFromComponent(this,".l-sticky-item");this.setData({stickyItemTop:i.top+e,stickyItemHeight:i.height});const s=await nodeUtil.getNodeRectFromComponent(this,".l-sticky-item-header");this.setData({stickyItemWrapperHeight:s.height})},getParentComponent(){const t=this.getRelationNodes("../sticky/index");if(0!==t.length)return t[0]}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-sticky-item l-class">
<view class="l-sticky-item-header-wrapper l-header-wrapper-class" style="height:{{isFixedTop&&stickyItemWrapperHeight?stickyItemWrapperHeight+'px':'auto'}}"></view>
<view style="{{mode==='js'?(isFixedTop?'position:fixed;':''):''}} top:{{top}}rpx" class="l-sticky-item-header l-sticky-item-header{{mode==='js'?(isFixedTop?'-fixed l-header-sticky-class':''):(mode==='css'?'-sticky l-header-sticky-class':'')}} l-header-class">
<slot name="header"></slot>
</view>
<view class="l-sticky-item-body l-body-class">
<slot name="body"></slot>
</view>
</view>
.l-sticky-item{display:flex;flex-direction:column}.l-sticky-wrapper{overflow:visible}.l-sticky-item-header{width:100%}.l-sticky-item-header-fixed{position:fixed;top:0}@supports (position:sticky){.l-sticky-item-header-sticky{position:sticky}}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class"],behaviors:[validator],relations:{"../sticky-item/index":{type:"child",linked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},linkChanged(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})},unlinked(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsSizeData()}).catch(t=>{console.error(t)})}}},properties:{mode:{type:String,value:"js",options:["js","css"]},scrollTop:Number},observers:{scrollTop:function(){this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},lifetimes:{attached(){this.checkSupportCssSticky().then(t=>{t||this.initSticky()}).catch(t=>{console.error(t)})}},methods:{initSticky(){wx.lin=wx.lin||{},wx.lin.flushSticky=()=>{this.updateStickyItemsSizeData()},wx.lin.setScrollTop=t=>{this.data.scrollTop=t,this.checkSupportCssSticky().then(t=>{t||this.updateStickyItemsPosition()}).catch(t=>{console.error(t)})}},updateStickyItemsPosition(){const t=this.getStickyItemNodes();for(let e of t)e.updateStickyItemPosition(this.data.scrollTop)},updateStickyItemsSizeData(){this.getStickyItemNodes().forEach((t,e)=>{t.updateStickyItemBaseData(e)})},getStickyItemNodes(){return this.getRelationNodes("../sticky-item/index")},checkSupportCssSticky(){return new Promise(t=>{const e=this.getStickyItemNodes();0===e.length&&t(!1),wx.createSelectorQuery().in(e[0]).select(".l-sticky-item-header").fields({computedStyle:["position"]}).exec(e=>{null===e[0]?t(!1):t("sticky"===e[0].position)})})}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-sticky l-class">
<slot></slot>
</view>
\ No newline at end of file
Component({relations:{"../tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}},"../combined-tabs/index":{type:"parent",linked:function(t){!this.data.parent&&this.setData({parent:t})}}},properties:{tab:String,subTab:String,subKey:String,key:String,icon:String,iconSize:{type:String,value:"20"},image:Object,picPlacement:{type:String,value:"top"}},observers:{"**":function(t){this.updateData(t)}},data:{isCurrent:!1,index:0,parent:null},methods:{updateData(){let t=this.data.parent;t&&t.initTabs()}}});
\ No newline at end of file
{"component":true,"usingComponents":{}}
\ No newline at end of file
<view class="l-tabpanel-content">
<slot></slot>
</view>
\ No newline at end of file
.l-tabpanel-content{width:100%;height:100%}
\ No newline at end of file
import scrollCenter from"../behaviors/scrollCenter";Component({behaviors:[scrollCenter],externalClasses:["l-class-tabs","l-class-header","l-class-active","l-class-content","l-class-inactive","l-class-line","l-class-tabimage","l-class-header-line","l-class-icon","l-tabs-class","l-header-class","l-active-class","l-content-class","l-inactive-class","l-line-class","l-tabimage-class","l-header-line-class","l-icon-class"],relations:{"../tabpanel/index":{type:"child",linked(){this.initTabs()}}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:""},placement:{type:String,value:"top"},animated:Boolean,swipeable:Boolean,scrollable:Boolean,hasLine:{type:Boolean,value:!0},animatedForLine:Boolean,activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"},equalWidth:{type:Boolean,value:!0},contentHeight:Number},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},observers:{activeKey:function(e){if(!e)return;const t=this.data.tabList.findIndex(t=>t.key===e);this.setData({currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},ready(){this.initTabs()},methods:{initTabs(e=this.data.activeKey){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){let a=e,s=this.data.currentIndex;const i=t.map((t,i)=>(a=e||0!==i?a:t.data.key,s=t.data.key===a?i:s,{tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconSize:t.data.iconSize,image:t.data.image,picPlacement:t.data.picPlacement}));this.setData({tabList:i,activeKey:a,currentIndex:s},()=>{this.data.scrollable&&this.queryMultipleNodes()})}},swiperChange(e){const{source:t,current:a}=e.detail;if("touch"===t){const e=a,t=this.data.tabList[a].key;this._setChangeData({activeKey:t,currentIndex:e})}},handleChange(e){const t=e.currentTarget.dataset.key,a=e.currentTarget.dataset.index;this._setChangeData({activeKey:t,currentIndex:a})},_setChangeData({activeKey:e,currentIndex:t}){this.setData({activeKey:e,currentIndex:t},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:e,currentIndex:t})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tabpanel":"../tabpanel/index"}}
\ No newline at end of file
<view class="l-tabs l-class-tabs l-tabs-class {{'l-placement-'+placement}} {{animated ? 'l-aminmated' :''}} {{placement==='left'||placement==='right'?'l-tabs-vertical':'l-tabs-horizontal'}} {{scrollable ? 'l-tabs-scroll':''}}">
<scroll-view scroll-x="{{placement==='top'||placement==='bottom' && scrollable}}" scroll-y="{{placement==='left'||placement==='right' && scrollable}}" scroll-top="{{transformY}}" scroll-left="{{transformX}}" scroll-with-animation class="l-tabsscroll l-class-header l-header-class {{hasLine?'l-tabs-header-line l-class-header-line l-header-line-class':''}}">
<view class="l-tabs-header">
<view class="l-tabs-item {{equalWidth?'l-tabs-equal-width':'l-tabs-unequal-width'}} {{item.key===activeKey ?'l-class-active l-active-class l-tabs-active':'l-class-inactive l-inactive-class l-tabs-inactive'}} {{'l-tab-image-placement-'+item.picPlacement}}" style="color:{{item.key===activeKey?activeColor:inactiveColor}}" wx:for="{{tabList}}" wx:key="key" data-key="{{item.key}}" data-index="{{index}}" bind:tap="handleChange">
<image wx:if="{{ item.image.activeImage || item.image.defaultImage }}" src="{{item.key===activeKey? item.image.activeImage:item.image.defaultImage}}" class="l-tab-image l-class-tabimage l-tabimage-class"/>
<l-icon wx:if="{{item.icon}}" l-class="l-class-icon l-icon-class {{item.key===activeKey ? 'l-icon-active':'l-icon-inactive'}}" name="{{item.icon}}" color="{{item.key===activeKey?activeColor:inactiveColor}}" size="{{item.iconSize}}"/>
{{item.tab}}
<slot wx:if="{{!item.tab}}" name="{{item.key+'.tab'}}"></slot>
<view class="l-tab-line {{item.key===activeKey?'l-class-line l-line-class':''}} {{animatedForLine?'l-line-aminmated':''}}" wx:if="{{hasLine}}" style="background:{{item.key===activeKey?activeColor:inactiveColor}}"></view>
</view>
</view>
</scroll-view>
<view wx:if="{{!swipeable}}" class="l-tabpanel-content l-class-content l-content-class" style="{{contentHeight?'height:'+contentHeight+'rpx;':''}}{{placement==='top'||placement==='bottom' ? 'margin-left:'+ -100 *currentIndex +'%;':'transform:translate(0,'+ -100 * currentIndex +'%) translateZ(0px);'}}">
<view class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':'l-tabpanel-inactive'}}" wx:for="{{tabList}}" wx:key="key" style="{{placement==='left'||placement==='right' ? 'position:absolute;width:100%;height:100%;transform:translate(0,'+ 100 * index +'%) translateZ(0px);':''}}">
<slot name="{{item.key}}"></slot>
</view>
</view>
<swiper wx:else class="l-tabpanel-content l-tabpanel-swiper l-class-content l-content-class" bindchange="swiperChange" style="{{contentHeight?'height:'+contentHeight+'rpx;':''}}" current="{{currentIndex}}" vertical="{{placement==='left'||placement==='right'}}">
<swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<slot name="{{item.key}}"></slot>
</swiper-item>
</swiper>
</view>
.l-tabs{display:flex;border-radius:8rpx;box-sizing:border-box;overflow:hidden;flex-direction:column;height:100%}.l-tabs .l-tabs-header{display:flex;width:100%;flex-direction:row;background:#fff;align-items:center}.l-tabs .l-tabs-header .l-tabs-item{font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs .l-tabs-header .l-tabs-equal-width{flex:1}.l-tabs .l-tabs-header .l-tabs-unequal-width{padding:0 20rpx}.l-tabs .l-tabs-header .l-icon-active,.l-tabs .l-tabs-header .l-tabs-active{color:#333;font-size:28rpx}.l-tabs .l-tabs-header .l-icon-inactive,.l-tabs .l-tabs-header .l-tabs-inactive{font-size:28rpx;color:#bbb}.l-tabs .l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs .l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-bottom .l-tabs-header,.l-placement-top .l-tabs-header{height:80rpx}.l-placement-bottom .l-tabs-header .l-tabs-item,.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-placement-left,.l-placement-right{flex-direction:row}.l-placement-left .l-tabs-header,.l-placement-right .l-tabs-header{flex-direction:column;width:160rpx}.l-placement-left .l-tabs-header>.l-tabs-item,.l-placement-right .l-tabs-header>.l-tabs-item{width:100%;height:80rpx;background:#f6f8fa}.l-placement-left .l-tabs-header>.l-tabs-active,.l-placement-right .l-tabs-header>.l-tabs-active{background:#fff}.l-placement-right{flex-direction:row-reverse}.l-placement-bottom{flex-direction:column-reverse}.l-tabpanel-content{display:flex}.l-placement-left .l-tabpanel-content,.l-placement-right .l-tabpanel-content{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;position:relative;will-change:transform;transition:transform .3s cubic-bezier(.645,.045,.355,1)}.l-tabs-vertical .l-tabpanel-swiper{height:initial}.l-placement-bottom .l-tabpanel-content,.l-placement-top .l-tabpanel-content{width:100%;min-height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.l-aminmated.l-placement-bottom .l-tabpanel-content,.l-aminmated.l-placement-top .l-tabpanel-content{will-change:margin-left;-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.l-tabpanel{width:100%;height:100%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;opacity:1;text-overflow:ellipsis}.l-tabpanel-inactive{opacity:0;height:0;padding:0!important;pointer-events:none}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible}.l-tabs-vertical .l-tabsscroll{width:160rpx}.l-tabs-vertical .l-tabs-header{height:100%;min-height:80rpx;-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;min-height:80rpx}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;background:#000}.l-tabs-horizontal .l-tab-line{height:4rpx;width:0;left:100%;right:0;margin:0 auto}.l-tabs-horizontal .l-line-aminmated{transition:.2s all linear}.l-tabs-horizontal .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{left:0}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;left:0}.l-tabs-horizontal .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-placement-bottom .l-tab-line{top:0}.l-placement-bottom .l-tabs-header-line{border-top:1px solid #f3f3f3}.l-tabs-vertical .l-tab-line{width:6rpx;height:0;border-radius:0 6rpx 6rpx 0;top:0;margin:auto 0}.l-tabs-vertical .l-line-aminmated{transition:.2s all linear}.l-tabs-vertical .l-tabs-active .l-tab-line{height:40rpx}.l-tabs-vertical .l-tabs-active .l-line-aminmated{transition-delay:.1s}.l-tabs-vertical .l-tabs-active.l-tabs-item~.l-tabs-item .l-tab-line{height:0;top:0}.l-placement-left .l-tab-line{right:auto}.l-placement-left .l-tabs-header-line{border-left:1px solid #f3f3f3}.l-placement-right .l-tab-line{right:0;left:auto}.l-placement-right .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-bottom{flex-direction:column-reverse}.l-tab-image-placement-left{flex-direction:row}.l-tab-image-placement-right{flex-direction:row-reverse}
\ No newline at end of file
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-select-class","l-image-class"],behaviors:[validator],properties:{name:String,cell:Object,type:{type:String,value:"touch",options:["reading","touch"]},bgColor:String,fontColor:String,disable:Boolean,shape:{type:String,value:"square",options:["square","circle"]},select:Boolean,plain:Boolean,size:{type:String,value:"medium",options:["large","medium","mini","super-mini"]},location:{type:String,value:"left",options:["left","right"]},icon:String,iconSize:{type:String,value:"20"},iconColor:{type:String,value:"#3683D6"},image:String,iconStyle:{type:String,value:"size:20;color:#3683D6"},height:Number},methods:{handleTap(){if(this.data.disable)return;let e={name:this.data.name,cell:this.data.cell,select:this.data.select};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
\ No newline at end of file
<view style="display:flex">
<view class="l-tag {{type==='touch'?'l-tag-touch':''}} {{plain?'l-tag-plain-'+ size:'l-tag-'+size}} {{disable?'l-tag-disable':''}} {{select?'select l-select-class':'l-class'}} {{plain?'l-tag-plain':''}} {{'l-tag-'+size+'-'+ shape}}" style="{{height?'line-height:'+height+'rpx;height:'+height+'rpx;':''}}{{plain?'color:'+fontColor+';border-color:'+fontColor:'background-color:'+bgColor+';color:'+fontColor}}" bindtap="handleTap">
<view class="{{location==='left'?'content':'content-l'}}" style="{{iconName?'line-height:0':''}}">
<l-icon wx:if="{{icon}}" style="{{location==='left'?'margin-right:5rpx':'margin-left:5rpx'}}" name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}"/>
<image style="{{location==='left'?'margin-right:5rpx':'margin-left:5rpx'}}" wx:if="{{image}}" src="{{image}}" class="{{'tag-image-'+size}} l-image-class"></image>
<slot/>
</view>
</view>
</view>
.l-tag{display:inline-flex;justify-content:center;align-items:center;color:#fff;background-color:#3963bc}.l-tag-touch{min-width:80rpx}.l-tag-super-mini{height:32rpx;font-size:20rpx}.l-tag-mini{height:42rpx;font-size:20rpx}.l-tag-medium{height:50rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-large{height:60rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-super-mini-square{border-radius:2rpx;padding:0 6rpx}.l-tag-mini-square{border-radius:2rpx;padding:0 12rpx}.l-tag-medium-square{border-radius:2rpx;padding:0 16rpx}.l-tag-large-square{border-radius:2rpx;padding:0 18rpx}.l-tag-super-mini-circle{border-radius:16rpx;padding:0 12rpx}.l-tag-mini-circle{border-radius:21rpx;padding:0 16rpx}.l-tag-medium-circle{border-radius:25rpx;padding:0 20rpx}.l-tag-large-circle{border-radius:30rpx;padding:0 24rpx}.l-tag-plain{background-color:#fff;color:#3963bc;border:2rpx solid #3963bc}.l-tag-plain-super-mini{height:28rpx;font-size:20rpx}.l-tag-plain-mini{height:38rpx;font-size:20rpx}.l-tag-plain-medium{height:46rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-plain-large{height:56rpx;font-size:24rpx;letter-spacing:2rpx}.l-tag-disable{background-color:#dee2e6;color:#fff;border-color:#dee2e6}.select{background-color:#3963bc;color:#fff}.content{display:inline-flex;align-items:center;justify-content:center}.content-l{display:inline-flex;flex-direction:row-reverse;align-items:center;justify-content:center}.tag-image-mini{width:20rpx;height:20rpx}.tag-image-large{width:24rpx;height:24rpx}
\ No newline at end of file
import rules from"../behaviors/rules";import eventBus from"../core/utils/event-bus";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class","l-inner-class"],properties:{placeholder:{type:String,value:""},value:{type:String,value:""},focus:{type:Boolean,value:!1},maxlength:{type:Number,value:140},indicator:{type:Boolean,value:!0},autoHeight:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},border:{type:Boolean,value:!0},rules:{type:Object},placeholderStyle:{type:String,value:""},cursorSpacing:{type:Number,value:0}},data:{},attached(){this.initRules()},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){this.triggerEvent("linconfirm",e.detail)},getValues(){return this.data.value},reset(){this.data.value=""}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}}
\ No newline at end of file
<label class='form-item {{disabled? "disabled": ""}}'>
<view class='default-border {{border? "border": ""}} l-class'>
<view class="mask" wx:if="{{disabled}}"></view>
<textarea class="{{autoHeight ? 'textarea-auto-height': 'textarea'}} l-inner-class" type="{{type}}" value="{{ value }}" password="{{type==='password'}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" placeholder-class="pls-class" placeholder-style="{{placeholderStyle}}" disabled="{{disabled}}" focus="{{focus}}" auto-height="{{autoHeight}}" cursor-spacing="{{cursorSpacing}}" bindinput="handleInputChange" bindfocus="handleInputFocus" bindblur="handleInputBlur" bindconfirm="handleInputConfirm"/>
<view class="indicator" wx:if="{{indicator}}">{{value.length + '/' + maxlength}}</view>
</view>
</label>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
.form-item{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.textarea{width:100%;box-sizing:border-box;font-size:28rpx;color:#333;height:200rpx;line-height:40rpx;flex:1;min-height:88rpx}.textarea-auto-height{width:100%;box-sizing:border-box;font-size:28rpx;color:#333}.default-border{position:relative;font-size:28rpx;color:#333;width:100%;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:25rpx}.border{border-radius:4rpx;border:1rpx solid #d8dee5}.pls-class{color:#9a9a9a}.indicator{width:95%;text-align:right;margin-bottom:15rpx;color:#9a9a9a}
\ No newline at end of file
import computeOffset from"../behaviors/computeOffset";import zIndex from"../behaviors/zIndex";import watchShow from"../behaviors/watchShow";Component({behaviors:[computeOffset,zIndex,watchShow],externalClasses:["l-bg-class","l-icon-class","l-class","l-image-class","l-title-class "],properties:{show:{type:Boolean,value:!1},title:String,icon:String,iconSize:String,iconColor:String,image:String,placement:{type:String,value:"bottom"},duration:{type:Number,value:1500},zIndex:{type:Number,value:777},center:{type:Boolean,value:!0},mask:{type:Boolean,value:!1},openApi:{type:Boolean,value:!0},offsetX:Number,offsetY:Number},data:{status:!1,success:"",fail:"",complete:""},observers:{icon:function(){}},attached(){this.data.openApi&&this.initToast()},pageLifetimes:{show(){this.data.openApi&&this.initToast(),this.offsetMargin()}},methods:{initToast(){wx.lin=wx.lin||{},wx.lin.showToast=(e={})=>{const{title:t="",icon:o="",image:s="",placement:i="bottom",duration:a=1500,center:n=!0,mask:l=!1,success:r=null,complete:c=null,offsetX:h=0,offsetY:f=0,iconSize:m="60",iconColor:p=""}=e;return this.setData({title:t,icon:o,image:s,placement:i,duration:a,center:n,mask:l,success:r,complete:c,offsetY:f,offsetX:h,iconSize:m,iconColor:p}),this.changeStatus(),this},wx.lin.hideToast=()=>{this.setData({status:!1})}},strlen(e){for(var t=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s>="0x0001"&&s<="0x007e"||"0xff60"<=s&&s<="0xff9f"?t++:t+=2}return t},doNothingMove(){},onMaskTap(){!0!==this.data.locked&&this.setData({fullScreen:"hide",status:"hide"}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
\ No newline at end of file
<view class="container {{mask?'containerShowMask':'containerNoMask'}}" hidden="{{!status}}" style="z-index:{{zIndex}}">
<view class="l-bg-class toast-bg" wx:if="{{mask}}"></view>
<view class="l-class toast toast-{{placement || 'bottom'}}" style="padding-top:{{(placement || 'bottom')=== 'bottom' ? image || icon ? '25rpx': '': ''}};position:relative;left:{{offsetX}}rpx;top:{{offsetY}}rpx;margin-bottom:{{distance}}px">
<image class="l-image-class toast-icon" wx:if="{{image}}" src="{{image}}"/>
<l-icon class="l-icon-class toast-icon toast-icon-{{icon === 'loading'?'loading':''}}" wx:elif="{{icon && !image}}" size="{{iconSize? iconSize : 60}}" color="{{iconColor? iconColor: icon === 'success'? '#00C292' : icon === 'error' ? '#F4516C' : '#ffffff'}}" name="{{icon}}"/>
<slot wx:else/>
<text class="toast-text l-title-class toast-text-{{placement}}" style="{{placement || 'bottom' === 'bottom' ? icon || image? 'margin-top:10rpx' : '': '' }}">{{ title }}</text>
</view>
</view>
\ No newline at end of file
.container{position:fixed}.containerNoMask{left:50%;top:50%;transform:translate(-50%,-50%)}.containerShowMask{height:100%;width:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:999}.container .toast-bg{height:100%;width:100%;background:rgba(255,255,255,.5);position:absolute;top:0;left:0}.container .toast-top{flex-direction:column-reverse}.container .toast-right{flex-direction:row}.container .toast-bottom{flex-direction:column}.container .toast-left{flex-direction:row-reverse}.container .toast{display:flex;align-items:center;justify-content:center;max-width:400rpx;min-width:280rpx;min-height:88rpx;background:rgba(0,0,0,.7);border-radius:12rpx;color:#fff;font-size:28rpx;line-height:40rpx;box-sizing:border-box;padding:30rpx 50rpx;z-index:999}.container .toast .toast-icon{margin-top:20rpx;margin-bottom:20rpx}.container .toast .toast-icon-loading{animation:loading-fadein 1.5s linear 0s infinite}.container .toast .toast-text{display:inline-block;text-align:center}.container .toast .toast-text-right{display:inline-block;text-align:center;margin-left:20rpx}.container .toast .toast-text-left{display:inline-block;text-align:center;margin-right:20rpx}.container .toast .toast-text-top{margin-bottom:10rpx}@keyframes loading-fadein{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
import transition from"../behaviors/transition";Component({behaviors:[transition(!0)],externalClasses:["l-class","l-enter-class","l-enter-active-class","l-enter-to-class","l-leave-class","l-leave-active-class","l-leave-to-class"],methods:{}});
\ No newline at end of file
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-mask":"../mask/index"}}
\ No newline at end of file
<view wx:if="{{ inited }}" class="l-transition l-class {{ classes }}" style="-webkit-transition-duration:{{ currentDuration }}ms; transition-duration:{{ currentDuration }}ms; {{ display ? '' : 'display: none;' }} {{ customStyle }}" bind:transitionend="onTransitionEnd">
<slot/>
</view>
.l-transition{transition-timing-function:ease}.l-fade-enter-active,.l-fade-leave-active{transition-property:opacity}.l-fade-enter,.l-fade-leave-to{opacity:0}.l-fade-down-enter-active,.l-fade-down-leave-active,.l-fade-left-enter-active,.l-fade-left-leave-active,.l-fade-right-enter-active,.l-fade-right-leave-active,.l-fade-up-enter-active,.l-fade-up-leave-active{transition-property:opacity,transform}.l-fade-up-enter,.l-fade-up-leave-to{transform:translate3d(0,100%,0);opacity:0}.l-fade-down-enter,.l-fade-down-leave-to{transform:translate3d(0,-100%,0);opacity:0}.l-fade-left-enter,.l-fade-left-leave-to{transform:translate3d(-100%,0,0);opacity:0}.l-fade-right-enter,.l-fade-right-leave-to{transform:translate3d(100%,0,0);opacity:0}.l-slide-down-enter-active,.l-slide-down-leave-active,.l-slide-left-enter-active,.l-slide-left-leave-active,.l-slide-right-enter-active,.l-slide-right-leave-active,.l-slide-up-enter-active,.l-slide-up-leave-active{transition-property:transform}.l-slide-up-enter,.l-slide-up-leave-to{transform:translate3d(0,100%,0)}.l-slide-down-enter,.l-slide-down-leave-to{transform:translate3d(0,-100%,0)}.l-slide-left-enter,.l-slide-left-leave-to{transform:translate3d(-100%,0,0)}.l-slide-right-enter,.l-slide-right-leave-to{transform:translate3d(100%,0,0)}
\ No newline at end of file
class DeviceUtil{constructor(t){this.systemInfo=t}px2rpx(t){return 750/this.systemInfo.windowWidth*t}rpx2px(t){return this.systemInfo.windowWidth/750*t}getNavigationBarHeight(){return this.getTitleBarHeight()+this.getStatusBarHeight()}getStatusBarHeight(){return this.px2rpx(this.systemInfo.statusBarHeight)}getTitleBarHeight(){const t=this.systemInfo.statusBarHeight,e=wx.getMenuButtonBoundingClientRect(),i=e.top-t;return this.px2rpx(2*i+e.height)}}const deviceUtil=new DeviceUtil(wx.getSystemInfoSync());export default deviceUtil;
\ No newline at end of file
const promisic=function(n){return function(t={}){return new Promise((c,r)=>{const s=Object.assign(t,{success:n=>{c(n)},fail:n=>{r(n)}});n(s)})}},px2rpx=function(n){const{screenWidth:t}=wx.getSystemInfoSync();return 750/t*n};export{promisic,px2rpx};
\ No newline at end of file
import eventUtil from"../core/utils/event-util";Component({properties:{columnGap:{type:String,value:"20rpx"}},data:{data:[],leftData:[],rightData:[]},attached(){this._init()},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.renderWaterFlow=(t=[],e=!1,a)=>{if("[object Array]"!==Object.prototype.toString.call(t))return console.error("[data]参数类型错误,渲染失败"),!1;this.setData({data:t}),e&&(this.data.leftData=[],this.data.rightData=[]),this._select(t,e).then(()=>{a&&a()}).catch(t=>{console.error(t)})}},_select(t,e){const a=wx.createSelectorQuery().in(this);return this.columnNodes=a.selectAll("#left, #right"),new Promise(a=>{this._render(t,0,e,()=>{a()})})},_render(t,e,a,i){(t.length>e||a)&&0!==this.data.data.length?this.columnNodes.boundingClientRect().exec(h=>{const r=h[0];this.data.leftHeight=r[0].height,this.data.rightHeight=r[1].height,this.data.leftHeight<=this.data.rightHeight||a?this.data.leftData.push(t[e]):this.data.rightData.push(t[e]),this.setData({leftData:this.data.leftData,rightData:this.data.rightData},()=>{this._render(t,++e,!1,i)})}):i&&i()},onTapItem(t){eventUtil.emit(this,"linitemtap",{item:t.currentTarget.dataset.item})}}});
\ No newline at end of file
{"component":true,"usingComponents":{},"componentGenerics":{"l-water-flow-item":true} }
\ No newline at end of file
<view class="l-class water-flow-container" wx:if="{{data.length!==0}}">
<view class="water-column" style="margin-right:{{columnGap}}">
<view id="left">
<block wx:for="{{leftData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block>
</view>
</view>
<view class="water-column">
<view id="right">
<block wx:for="{{rightData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block>
</view>
</view>
</view>
.water-flow-container{display:flex;width:100%;box-sizing:border-box;background:0 0}.water-column{flex:1}
\ No newline at end of file
{
"_from": "lin-ui",
"_id": "lin-ui@0.8.6",
"_inBundle": false,
"_integrity": "sha1-mLXXHCzVzIAutYSCAJyRmlav1KY=",
"_location": "/lin-ui",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "lin-ui",
"name": "lin-ui",
"escapedName": "lin-ui",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npm.taobao.org/lin-ui/download/lin-ui-0.8.6.tgz",
"_shasum": "98b5d71c2cd5cc802eb58482009c919a56afd4a6",
"_spec": "lin-ui",
"_where": "E:\\mini-shimao",
"author": {
"name": "Lin Team"
},
"bugs": {
"url": "https://github.com/TaleLin/lin-ui/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "A high quality UI components library with MiniProgram",
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"child_process": "^1.0.2",
"del": "^5.0.0",
"eslint": "^7.2.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-promise": "^4.2.1",
"gulp": "^4.0.2",
"gulp-clean-css": "^3.9.3",
"gulp-htmlmin": "^5.0.1",
"gulp-imagemin": "^7.1.0",
"gulp-jsonminify": "^1.1.0",
"gulp-less": "^4.0.0",
"gulp-rename": "^1.2.2",
"gulp-uglify-es": "^2.0.0",
"gulp-util": "^3.0.8",
"husky": "^4.2.5",
"jest": "^24.8.0",
"less": "^3.12.2",
"lodash": "^4.17.15",
"miniprogram-simulate": "^1.0.7"
},
"directories": {
"example": "examples"
},
"files": [
"dist"
],
"homepage": "http://doc.mini.talelin.com",
"license": "MIT",
"main": "app.js",
"miniprogram": "dist",
"name": "lin-ui",
"repository": {
"type": "git",
"url": "git+https://github.com/TaleLin/lin-ui.git"
},
"scripts": {
"build": "gulp -f build/index.js build",
"changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s -n .convention-changelog-config.js",
"dev": "gulp -f build/index.js dev",
"fix": "eslint . --fix",
"lint": "eslint .",
"release": "sh build/release.sh",
"watch": "gulp -f build/index.js watch"
},
"version": "0.8.6"
}
let App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
isExpandContent: false,
checkInProblems: [], // 入住问题
ticketsProblems: [], // 门票问题
serviceProblems: [], // 服务问题
ticketQuestionList: [],
serviceQuestionList: [],
accommodationQuestionList: [],
},
linexpand(e) {
console.log(e)
},
linfold(e) {
console.log('66');
console.log(e)
},
onLoad: function(options) {
this.getCommonProblem(1)
this.getCommonProblem(2)
this.getCommonProblem(3)
onLoad: function() {
this.queryQuestionList()
},
checkInTranform(e) {
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`checkInProblems[${index}].flag`]: flag
});
},
ticketsTranform(e) {
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`ticketsProblems[${index}].flag`]: flag
});
},
tranform(e) {
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`serviceProblems[${index}].flag`]: flag
});
},
// 常见问题
getCommonProblem: function (type) {
App.wxRequest({
queryQuestionList: function () {
App.request({
url: 'v1/smCommonProblem/getList',
data: {
type: type, // 1 入住 2门票 3 服务
params: {
type: '',
top: '',
},
success: (res) => {
res.data.forEach(function(item) {
item.flag = false;
})
switch (type) {
}
}).then((response) => {
let funcData = response.data
let funcTicketQuestionList = []
let funcServiceQuestionList = []
let funcAccommodationQuestionList = []
for (let i = 0, l = funcData.length; i < l; i++) {
switch(Number(funcData[i].type)) {
case 1:
this.setData({
checkInProblems: res.data
funcAccommodationQuestionList.push({
'id': funcData[i].id,
'index': Number(funcData[i].top),
'title': funcData[i].title,
'type': Number(funcData[i].type),
'content': funcData[i].content,
'isShowMore': false,
})
break;
break
case 2:
this.setData({
ticketsProblems: res.data
funcTicketQuestionList.push({
'id': funcData[i].id,
'index': Number(funcData[i].top),
'title': funcData[i].title,
'type': Number(funcData[i].type),
'content': funcData[i].content,
'isShowMore': false,
})
break;
break
case 3:
this.setData({
serviceProblems: res.data
funcServiceQuestionList.push({
'id': funcData[i].id,
'index': Number(funcData[i].top),
'title': funcData[i].title,
'type': Number(funcData[i].type),
'content': funcData[i].content,
'isShowMore': false,
})
break;
break
}
}
this.setData({
ticketQuestionList: funcTicketQuestionList,
serviceQuestionList: funcServiceQuestionList,
accommodationQuestionList: funcAccommodationQuestionList,
})
})
}
},
onShowMoreAccommodation(funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
let funcQuestionList = this.data.accommodationQuestionList
funcQuestionList[funcIndex].isShowMore = !funcQuestionList[funcIndex].isShowMore
this.setData({
accommodationQuestionList: funcQuestionList
})
},
onShowMoreTicket(funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
let funcQuestionList = this.data.ticketQuestionList
funcQuestionList[funcIndex].isShowMore = !funcQuestionList[funcIndex].isShowMore
this.setData({
ticketQuestionList: funcQuestionList
})
},
onShowMoreService(funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
let funcQuestionList = this.data.serviceQuestionList
funcQuestionList[funcIndex].isShowMore = !funcQuestionList[funcIndex].isShowMore
this.setData({
serviceQuestionList: funcQuestionList
})
},
})
\ No newline at end of file
<m-nav titleText="常见问题"></m-nav>
<view class="container">
<view class="body">
<block wx:if="{{checkInProblems.length > 0}}">
<view class="row align-c">
<view class="icon">
<image class="icon-img" src="./image/bag.png"></image>
</view>
<view class="title">入住问题</view>
<view class="question_class">
<view class="question_class_title row ac">
<view class="question_class_title_icon row cc ac">
<image src="./image/bag.png"></image>
</view>
<view class="content">
<view class="content-item" wx:for="{{checkInProblems}}" wx:key="index">
<l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="checkInTranform">
<view class="item-title" slot="title">
<view class="row align-c">
<view class="circle"></view>
<view>{{item.title}}</view>
</view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999" />
</view>
<text class="text">{{item.content}}</text>
</l-collapse-item>
</l-collapse>
<text class="font_bold_42 color_regular">入住问题</text>
</view>
<view class="question_list">
<block wx:for="{{accommodationQuestionList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="question_item column" data-index="{{index}}" bindtap="onShowMoreAccommodation">
<view class="row cb ac">
<text class="font_normal_18">●</text>
<text class="question_item_title">{{item.title}}</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}" hidden="{{item.isShowMore}}"></image>
<image class="icon_32" src="{{imageBase + 'icon/arrow-b-2.png'}}" hidden="{{!item.isShowMore}}"></image>
</view>
<view class="question_item_content row" hidden="{{!item.isShowMore}}">
<text class="font_normal_30 color_secondary">{{item.content}}</text>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
<block wx:if="{{ticketsProblems.length > 0}}">
<view class="row align-c">
<view class="icon">
<image class="icon-img" src="./image/ticket.png"></image>
</view>
<view class="title">门票问题</view>
<view class="question_class">
<view class="question_class_title row ac">
<view class="question_class_title_icon row cc ac">
<image src="./image/ticket.png"></image>
</view>
<view class="content">
<view class="content-item" wx:for="{{ticketsProblems}}" wx:key="index">
<l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="ticketsTranform">
<view class="item-title" slot="title">
<view class="row align-c">
<view class="circle"></view>
<view>{{item.title}}</view>
</view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999" />
</view>
<view class="text">{{item.content}}</view>
</l-collapse-item>
</l-collapse>
<text class="font_bold_42 color_regular">门票问题</text>
</view>
<view class="question_list">
<block wx:for="{{ticketQuestionList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="question_item column" data-index="{{index}}" bindtap="onShowMoreTicket">
<view class="row cb ac">
<text class="font_normal_18">●</text>
<text class="question_item_title">{{item.title}}</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}" hidden="{{item.isShowMore}}"></image>
<image class="icon_32" src="{{imageBase + 'icon/arrow-b-2.png'}}" hidden="{{!item.isShowMore}}"></image>
</view>
<view class="question_item_content row" hidden="{{!item.isShowMore}}">
<text class="font_normal_30 color_secondary">{{item.content}}</text>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
<block wx:if="{{serviceProblems.length > 0}}">
<view class="row align-c">
<view class="icon">
<image class="icon-img" src="./image/service.png"></image>
</view>
<view class="title">服务问题</view>
<view class="question_class">
<view class="question_class_title row ac">
<view class="question_class_title_icon row cc ac">
<image src="./image/service.png"></image>
</view>
<view class="content">
<view class="content-item" wx:for="{{serviceProblems}}" wx:key="index">
<l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform">
<view class="item-title" slot="title">
<view class="row align-c">
<view class="circle"></view>
<view>{{item.title}}</view>
</view>
<l-icon name="right" l-class="{{item.flag ? 'tranform':''}}" size="28" color="#999" />
</view>
<view class="text">{{item.content}}</view>
</l-collapse-item>
</l-collapse>
<text class="font_bold_42 color_regular">服务问题</text>
</view>
<view class="question_list">
<block wx:for="{{serviceQuestionList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="question_item column" data-index="{{index}}" bindtap="onShowMoreService">
<view class="row cb ac">
<text class="font_normal_18">●</text>
<text class="question_item_title">{{item.title}}</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}" hidden="{{item.isShowMore}}"></image>
<image class="icon_32" src="{{imageBase + 'icon/arrow-b-2.png'}}" hidden="{{!item.isShowMore}}"></image>
</view>
<view class="question_item_content row" hidden="{{!item.isShowMore}}">
<text class="font_normal_30 color_secondary">{{item.content}}</text>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
</view>
\ No newline at end of file
.body {
width: 670rpx;
padding-top: 60rpx;
.container {
padding: 60rpx 0 0 0;
}
.icon {
width: 75rpx;
height: 75rpx;
border-radius: 50%;
background-color: rgb(226, 246, 253);
display: flex;
align-items: center;
justify-content: center;
.question_class {
width: 670rpx;
margin: 0 40rpx;
}
.icon-img {
width: 55rpx;
height: 55rpx;
.question_class_title_icon {
width: 72rpx;
height: 72rpx;
border-radius: 36rpx;
margin: 0 24rpx 0 0;
background: #E4F5FD;
}
.title {
font-size: 40rpx;
margin-left: 25rpx;
color: rgb(24, 23, 26);
font-weight: 500;
.question_class_title_icon > image {
width: 48rpx;
height: 48rpx;
}
.content {
padding-top: 60rpx;
padding-bottom: 60rpx;
/* 问题列表 */
.question_list {
margin: 36rpx 0 0 0;
padding: 0 0 84rpx 0;
overflow-y: scroll;
}
.content-item {
width: 100%;
height: auto;
border-bottom: 1px solid rgb(247, 246, 247);
.question_item {
width: 670rpx;
min-height: 94rpx;
padding: 28rpx 0 0 10rpx;
border-bottom: 1px #E2E7EF solid;
}
.circle {
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background-color: black;
margin-right: 20rpx;
}
.question_item_title {
margin: 0 0 0 16rpx;
flex-grow: 1;
.item-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 0 30rpx 0;
text-align: left;
}
.text {
width: 610rpx;
height: auto;
margin: auto;
line-height: 2;
font-size: 28rpx;
padding-left: 40rpx;
margin-bottom: 20rpx;
.question_item_content {
width: 598rpx;
margin: 42rpx 32rpx 28rpx 30rpx;
}
.tranform {
transform: rotate(90deg);
}
.question_item_content > text {
line-height: 1.7;
}
\ No newline at end of file
......@@ -2,167 +2,91 @@ let App = getApp()
Page({
data: {
title: '客服中心',
inputHidden: true,
commonProblems: [],
data: [{
title: '进入碧海银虎园区需要提前预约吗?'
},
{
title: '园区餐厅有哪些?如何预订?'
},
{
title: '如何预订海错图门票?'
},
{
title: '如何预订儿童营地门票?'
},
],
height: 0,
mask: false, //控制客服微信的遮罩层显示
phone: '13316748039',
bottom: 0,
focus: false,
remark: '',
isIphoneX: '', //判断是否为iphonex
screenHeight: 0,
keyboardHeight: 0,
questionList: [],
feedbackContent: '',
feedbackOpacity: 0,
feedbackCssMarginTop: 0,
winFeedback: false,
winOperationWechat: false,
},
onLoad: function (options) {
this.getCommonProblem();
this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
isIphoneX: wx.getSystemInfoSync().model.indexOf("iPhone X")
screenHeight: wx.getSystemInfoSync().screenHeight
})
this.queryQuestionList()
},
//获取焦点的时候
linfocus(e) {
this.setData({
bottom: e.detail.height,
})
wx.pageScrollTo({
scrollTop: 0,
})
},
saveImage(e) {
let url = e.currentTarget.dataset.url;
console.log(url);
//用户需要授权
wx.getSetting({
success: (res) => {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success: () => {
// 同意授权
this.saveImg1(url);
},
fail: (res) => {
console.log(res);
}
})
} else {
// 已经授权了
this.saveImg1(url);
}
},
fail: (res) => {
console.log(res);
// 常见问题
queryQuestionList: function () {
App.request({
url: 'v1/smCommonProblem/getList',
params: {
type: '',
top: 1,
}
})
},
saveImg1(url) {
wx.getImageInfo({
src: url,
success: (res) => {
let path = res.path;
wx.saveImageToPhotosAlbum({
filePath: path,
success: (res) => {
console.log(res);
},
fail: (res) => {
console.log(res);
}
}).then((response) => {
let funcData = response.data
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
funcList.push({
'id': funcData[i].id,
'index': Number(funcData[i].top),
'title': funcData[i].title,
'type': Number(funcData[i].type),
'content': funcData[i].content,
'isShowMore': false,
})
},
fail: (res) => {
console.log(res);
}
})
},
//失去焦点
inputBlur(e) {
this.setData({
inputHidden: true,
title: '客服中心',
})
},
bindFeedbackInput: function(e) {
this.setData({
remark: e.detail.value
})
},
//填写反馈
feedback(e) {
console.log(e.detail.height);
this.setData({
focus: true,
inputHidden: false,
title: '填写反馈'
})
},
funcList.sort((funcCurrent, funcNext) => {
return funcCurrent.index - funcNext.index
})
// 关闭遮罩层
onServicephoneClose() {
this.setData({
mask: false
this.setData({
questionList: funcData
})
})
},
//开启微信客服
openMask() {
resetFeedbackState: function () {
this.setData({
mask: true
})
},
//客服热线拨打
call() {
wx.makePhoneCall({
phoneNumber: this.data.phone,
feedbackContent: '',
feedbackOpacity: 0,
winFeedback: false,
})
},
moreProblems() {
wx.navigateTo({
url: '/pages/mine/question-more/question-more',
inputFeedbackContent: function(funcEvent) {
console.log('funcEvent', funcEvent.detail.value)
this.setData({
feedbackContent: funcEvent.detail.value
})
},
tranform(e) {
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
inputFeedbackFocus: function (funcEvent) {
this.setData({
[`commonProblems[${index}].flag`]: flag
});
console.log(this.data.commonProblems);
keyboardHeight: funcEvent.detail.height,
feedbackOpacity: 1,
feedbackCssMarginTop: this.data.screenHeight - funcEvent.detail.height - 518 * wx.getStorageSync('unitProportion'),
})
},
// 提交意见反馈
feedbackSubmit() {
if (this.data.remark == '') {
return
}
let that = this
onFeedbackSubmit: function () {
if (this.data.feedbackContent === '') return
App.ui.showToast({
'iconType': 'loading',
'title': '提交中',
'duration': 60000
})
App.wxRequest({
url: 'v1/smFeedback/doFeedBack',
data: {
content: that.data.remark
content: this.data.feedbackContent
},
success: (res) => {
App.ui.showToast({
......@@ -170,9 +94,9 @@ Page({
'title': '提交成功',
})
this.setData({
inputHidden: true,
winFeedback: true,
title: '客服中心',
remark: '',
feedbackContent: '',
})
},
fail: (err) => {
......@@ -184,23 +108,43 @@ Page({
})
},
// 常见问题
getCommonProblem() {
let that = this
App.wxRequest({
url: 'v1/smCommonProblem/getList',
data: {
type: '',
top: 1,
},
success: function(res) {
res.data.forEach(function(item) {
item.flag = false;
});
that.setData({
commonProblems: res.data
})
}
onMoreQuestion: function () {
wx.navigateTo({ url: '/pages/mine/question-more/question-more' })
},
onShowMore(funcEvent) {
let funcIndex = funcEvent.currentTarget.dataset.index
let funcQuestionList = this.data.questionList
funcQuestionList[funcIndex].isShowMore = !funcQuestionList[funcIndex].isShowMore
this.setData({
questionList: funcQuestionList
})
},
onCustomerServiceWeChat: function () {
this.resetFeedbackState()
this.setData({
winOperationWechat: true,
})
},
onOperationWechatClose: function () {
this.setData({
winOperationWechat: false
})
},
onCallCustomerService: function () {
this.resetFeedbackState()
wx.makePhoneCall({
phoneNumber: this.data.phone,
})
},
onFeedback: function () {
this.setData({
winFeedback: true,
title: '填写反馈'
})
},
})
\ No newline at end of file
<m-toast></m-toast>
<m-nav titleText="{{title}}" styleIndex="{{2}}" isOccupy="{{false}}"></m-nav>
<view style="height:{{height}}px;background-color:white;">
<image class="banner-img" src="http://upload.miaomiao-bao.com/70161202008161703131621.jpg"></image>
<view class="customer-body">
<view class="customer-body-header">
<view class="customer-body-title">常见问题</view>
<view class="row" style="align-items: center;padding-right:10rpx;">
<text bindtap="moreProblems" style="color:rgb(43,45,46);padding-right:15rpx;font-size:26rpx;">更多问题</text>
<l-icon name="right" color="rgb(172,172,174)" size="26" />
</view>
<view class="container">
<image class="banner-img" src="{{resourcesBase + 'bgi/bgi-80.jpg'}}"></image>
<view class="question_title row cb ac">
<text class="font_bold_42 color_regular">常见问题</text>
<view class="question_more row ac" bindtap="onMoreQuestion">
<text class="font_normal_26 color_regular">更多问题</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<block wx:if="{{commonProblems.length > 0}}">
<view class="content">
<view class="content-item" wx:for="{{commonProblems}}" wx:key="index">
<l-collapse>
<l-collapse-item l-body-class="l-body-class" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform" l-title-class="l-title-class" customTitle="{{true}}">
<view class="item-title" slot="title">
<view class="row align-c" style="width:90%;">
<view class="circle"></view>
<view style="width:540rpx;">{{item.title}}</view>
</view>
<l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="26" color="#999" />
</view>
</view>
<view class="text">{{item.content}}</view>
</l-collapse-item>
</l-collapse>
<view class="question_list">
<block wx:for="{{questionList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="question_item column" data-index="{{index}}" bindtap="onShowMore">
<view class="row cb ac">
<text class="font_normal_18">●</text>
<text class="question_item_title">{{item.title}}</text>
<image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}" hidden="{{item.isShowMore}}"></image>
<image class="icon_32" src="{{imageBase + 'icon/arrow-b-2.png'}}" hidden="{{!item.isShowMore}}"></image>
</view>
<view class="question_item_content row" hidden="{{!item.isShowMore}}">
<text class="font_normal_30 color_secondary">{{item.content}}</text>
</view>
</view>
</block>
</view>
</view>
<view class="footer-nav" style="padding-bottom:{{isIphoneX >=0?68:0}}rpx;">
<view class="nav-item" bindtap="call">
<image class="nav-icon" src="{{imageBase + 'icon/service-1.png'}}"></image>
<view class="nav-item-title">客服热线</view>
</view>
<view class="nav-item" bindtap="openMask">
<image class="nav-icon" src="{{imageBase + 'icon/wechat-1.png'}}"></image>
<view class="nav-item-title">客服微信</view>
</view>
<view class="nav-item" bindtap="feedback">
<image class="nav-icon" src="{{imageBase + 'icon/letter-1.png'}}"></image>
<view class="nav-item-title">填写反馈</view>
<view class="operation row cb ac">
<view class="column cc ac" bindtap="onCallCustomerService">
<image class="icon_48" src="{{imageBase + 'icon/service-1.png'}}"></image>
<text class="font_normal_22 color_secondary">客服热线</text>
</view>
<view class="column cc ac" bindtap="onCustomerServiceWeChat">
<image class="icon_48" src="{{imageBase + 'icon/wechat-1.png'}}"></image>
<text class="font_normal_22 color_secondary">客服微信</text>
</view>
<view class="column cc ac" bindtap="onFeedback">
<image class="icon_48" src="{{imageBase + 'icon/letter-1.png'}}"></image>
<text class="font_normal_22 color_secondary">填写反馈</text>
</view>
</view>
</view>
<!-- 客服微信弹窗 -->
<view class="service_phone row cc ac" hidden="{{!mask}}">
<view class="column cc ac">
<image class="service_phone_content" src="./image/service-phone.png"></image>
<view class="service_phone_close row cc ac" bindtap="onServicephoneClose">
<image src="{{imageBase + 'icon/close-1.png'}}"></image>
</view>
<view class="dialog_feedback" wx:if="{{winFeedback}}" bindtap="resetFeedbackState">
<view class="feedback_input_wrap" style="{{'margin-top: ' + feedbackCssMarginTop + 'px; opacity: ' + feedbackOpacity + ';'}}">
<m-textarea
inputId="feedback"
className="feedback_input"
placeholder="请留下您的宝贵意见"
inputMax="{{200}}"
focus="{{true}}"
bindblur="inputFeedbackContent"
bindfocus="inputFeedbackFocus"
>
</m-textarea>
<button class="feedback_submit row cc ac" bindtap="onFeedbackSubmit">
<text class="font_normal_30 color_submit">提交反馈</text>
</button>
</view>
</view>
<!-- 填写意见反馈 -->
<view class="textBox" style="bottom:{{bottom}}px" hidden="{{inputHidden}}">
<view class="textBox-container">
<l-textarea cursor-spacing='0' bind:linblur="inputBlur" bind:lininput="bindFeedbackInput" focus="{{focus}}" adjust-position="{{false}}" bind:linfocus="linfocus" l-class="textArea-class" indicator="{{true}}" maxlength="200" placeholder="请留下您的宝贵意见" value="{{remark}}"
/>
<view class="feedbackButton" bindtap="feedbackSubmit">提交反馈</view>
<view class="operation_wechat row cc ac" hidden="{{!winOperationWechat}}">
<view class="column cc ac">
<image class="operation_wechat_content" src="{{resourcesBase + 'operation-tip/question-wechat.png'}}"></image>
<view class="operation_wechat_close row cc ac">
<image class="icon_48" src="{{imageBase + 'icon/close-1.png'}}" bindtap="onOperationWechatClose"></image>
</view>
</view>
</view>
\ No newline at end of file
.container {
background: #FFFFFF;
}
.banner-img {
display: block;
width: 750rpx;
height: 480rpx;
}
.footer-nav {
.operation {
position: fixed;
bottom: 0rpx;
left: 0;
bottom: 0;
width: 750rpx;
min-height: 100rpx;
height: auto;
display: flex;
align-items: center;
justify-content: space-around;
border-top: 1px solid rgb(244, 242, 244);
background-color: white;
}
.customer-body {
padding-bottom: 120rpx;
padding-top: 60rpx;
width: 670rpx;
margin: auto;
height: auto;
}
.tranform {
transform: rotate(90deg);
}
.customer-body-header {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
}
.customer-body-title {
font-size: 46rpx;
font-weight: 600;
}
.circle {
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background-color: black;
margin-left: 12rpx;
margin-right: 18rpx;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.nav-item-title {
font-size: 22rpx;
font-weight: 400;
color: #959da9;
line-height: 32rpx;
}
.nav-icon {
width: 48rpx;
height: 48rpx;
margin-top: 14rpx;
margin-bottom: 2rpx;
height: 100rpx;
padding: 0 80rpx;
border-top: 1px solid #E2E7EF;
background: #FFFFFF;
}
.mask-content {
......@@ -129,13 +77,6 @@
color: rgb(59, 59, 59);
}
.operation {
font-size: 26rpx;
text-align: center;
margin-top: 20rpx;
color: rgb(63, 61, 59);
}
.close {
width: 80rpx;
height: 80rpx;
......@@ -192,25 +133,6 @@
text-align: center;
}
.content {
padding-top: 0rpx;
padding-bottom: 60rpx;
}
.content-item {
width: 100%;
height: auto;
border-bottom: 1px solid rgb(247, 246, 247);
}
/* .circle{
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background-color: black;
margin-right: 20rpx;
} */
.item-title {
width: 100%;
display: flex;
......@@ -229,8 +151,53 @@
margin-bottom: 20rpx;
}
.service_phone_close > image {
width: 48rpx;
height: 48rpx;
}
.question_title {
width: 670rpx;
margin: 54rpx 0 0 0;
}
.question_more > text {
margin: 0 8rpx 0 0;
}
/* 问题列表 */
.question_list {
margin: 12rpx 0 0 0;
padding: 0 0 98rpx 0;
overflow-y: scroll;
}
.question_item {
width: 670rpx;
min-height: 94rpx;
margin: 0 40rpx;
padding: 28rpx 0 0 10rpx;
border-bottom: 1px #E2E7EF solid;
}
.question_item_title {
margin: 0 0 0 16rpx;
flex-grow: 1;
text-align: left;
}
.question_item_content {
width: 598rpx;
margin: 42rpx 32rpx 28rpx 30rpx;
}
.question_item_content > text {
line-height: 1.7;
}
/* 客服微信弹窗 */
.service_phone {
.operation_wechat {
z-index: 7;
position: fixed;
top: 0;
......@@ -240,20 +207,48 @@
background: rgba(0, 0, 0, .65);
}
.service_phone_content {
.operation_wechat_content {
width: 606rpx;
height: 856rpx;
}
.service_phone_close {
.operation_wechat_close {
width: 80rpx;
height: 80rpx;
margin: 48rpx auto 0 auto;
margin: 48rpx 0 0 0;
border-radius: 50%;
background: #ABAAA9;
background: rgba(254, 252, 249, 0.5);
}
.service_phone_close > image {
width: 48rpx;
height: 48rpx;
/* 填写反馈弹窗 */
.dialog_feedback {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.feedback_input_wrap {
width: 750rpx;
padding: 56rpx 0 32rpx 0;
background: #FFFFFF;
}
.feedback_input {
width: 670rpx;
height: 302rpx;
margin: 0 40rpx 0 40rpx;
padding: 16rpx 24rpx;
border-radius: 4px;
background: #F5F6F8;
}
.feedback_submit {
width: 670rpx;
height: 96rpx;
margin: 32rpx 40rpx 0 40rpx;
border-radius: 4px;
background: #86C5E1;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment