Commit b826bd05 by 严立

LL - 二期初始代码

parent 848a39fe
Showing with 1905 additions and 1853 deletions
{ {
"pages": [ "pages": [
"pages/home/home/home",
"pages/home/dynamic/dynamic",
"pages/home/home", "pages/home/dynamic-detail/dynamic-detail",
"pages/mine/mine", "pages/home/night-appointment/night-appointment",
"pages/play/play", "pages/home/guide/guide",
"pages/ownerCertification/ownerCertification", "pages/home/history/history",
"pages/hotelAccommodation/hotelAccommodation", "pages/play/home/home",
"pages/login/login", "pages/play/service/service",
"pages/guide/guide", "pages/play/service-detail/service-detail",
"pages/campsite/campsite", "pages/play/service-sell/service-sell",
"pages/campsite-mirror/campsite-mirror", "pages/play/activity/activity",
"pages/play/activity-detail/activity-detail",
"pages/myInfo/myInfo", "pages/play/activity-entry/activity-entry",
"pages/myActivity/myActivity", "pages/play/movie/movie",
"pages/myAppointment/myAppointment", "pages/play/movie-detail/movie-detail",
"pages/moreProblems/moreProblems", "pages/play/point-detail/point-detail",
"pages/customerService/customerService", "pages/play/strategy-detail/strategy-detail",
"pages/appointment/appointment", "pages/commodity/home/home",
"pages/activity/activity", "pages/commodity/shopping-cart/shopping-cart",
"pages/activityDetail/activityDetail", "pages/commodity/food/food",
"pages/activity-detail/activity-detail", "pages/commodity/project/project",
"pages/activity-entry/activity-entry", "pages/commodity/snacks/snacks",
"pages/notice/notice", "pages/commodity/art/art",
"pages/notice-detail/notice-detail", "pages/commodity/room/room",
"pages/shop-detail/shop-detail", "pages/commodity/room-appointment/room-appointment",
"pages/shop-point-detail/shop-point-detail", "pages/campsite/home/home",
"pages/strategy/strategy", "pages/campsite/home-mirror/home-mirror",
"pages/mine/home/home",
"pages/index/index" "pages/mine/info/info",
"pages/mine/order/order",
"pages/mine/card/card",
"pages/mine/accumulate/accumulate",
"pages/mine/appointment/appointment",
"pages/mine/appointment-ticket/appointment-ticket",
"pages/mine/appointment-detail/appointment-detail",
"pages/mine/authentication-state/authentication-state",
"pages/mine/authentication-input/authentication-input",
"pages/mine/question/question",
"pages/mine/question-more/question-more",
"pages/pay/home/home",
"pages/pay/order-input/order-input",
"pages/pay/order-detail/order-detail",
"pages/pay/coupon/coupon",
"pages/pay/coupon-input/coupon-input",
"pages/pay/coupon-detail/coupon-detail",
"pages/login/login"
], ],
"usingComponents": { "usingComponents": {
"navigation": "../component/navigation/navigation", "navigation": "../component/navigation/navigation",
...@@ -45,13 +62,13 @@ ...@@ -45,13 +62,13 @@
"l-tabpanel": "../miniprogram_npm/lin-ui/tabpanel/index", "l-tabpanel": "../miniprogram_npm/lin-ui/tabpanel/index",
"l-toast": "../miniprogram_npm/lin-ui/toast/index", "l-toast": "../miniprogram_npm/lin-ui/toast/index",
"l-water-flow": "../miniprogram_npm/lin-ui/water-flow/index", "l-water-flow": "../miniprogram_npm/lin-ui/water-flow/index",
"l-input":"../miniprogram_npm/lin-ui/input/index", "l-input": "../miniprogram_npm/lin-ui/input/index",
"l-mask":"../miniprogram_npm/lin-ui/mask/index", "l-mask": "../miniprogram_npm/lin-ui/mask/index",
"l-arc-popup":"../miniprogram_npm/lin-ui/arc-popup/index", "l-arc-popup": "../miniprogram_npm/lin-ui/arc-popup/index",
"l-collapse":"../miniprogram_npm/lin-ui/collapse/index", "l-collapse": "../miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item":"../miniprogram_npm/lin-ui/collapse-item/index", "l-collapse-item": "../miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea":"../miniprogram_npm/lin-ui/textarea/index", "l-textarea": "../miniprogram_npm/lin-ui/textarea/index",
"l-notice-bar":"../miniprogram_npm/lin-ui/notice-bar/index" "l-notice-bar": "../miniprogram_npm/lin-ui/notice-bar/index"
}, },
"window": { "window": {
"navigationStyle": "custom", "navigationStyle": "custom",
...@@ -67,25 +84,25 @@ ...@@ -67,25 +84,25 @@
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [ "list": [
{ {
"pagePath": "pages/home/home", "pagePath": "pages/home/home/home",
"iconPath": "image/tabbar/home.png", "iconPath": "image/tabbar/home.png",
"selectedIconPath": "image/tabbar/home-s.png", "selectedIconPath": "image/tabbar/home-s.png",
"text": "首页" "text": "首页"
}, },
{ {
"pagePath": "pages/play/play", "pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png", "iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png", "selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩" "text": "畅玩"
}, },
{ {
"pagePath": "pages/campsite/campsite", "pagePath": "pages/campsite/home/home",
"iconPath": "image/tabbar/campsite.png", "iconPath": "image/tabbar/campsite.png",
"selectedIconPath": "image/tabbar/campsite-s.png", "selectedIconPath": "image/tabbar/campsite-s.png",
"text": "营地" "text": "营地"
}, },
{ {
"pagePath": "pages/mine/mine", "pagePath": "pages/mine/home/home",
"iconPath": "image/tabbar/mine.png", "iconPath": "image/tabbar/mine.png",
"selectedIconPath": "image/tabbar/mine-s.png", "selectedIconPath": "image/tabbar/mine-s.png",
"text": "我的" "text": "我的"
......
@import '/wxss/samcss-reset.wxss'; @import '/wxss/samcss-reset.wxss';
@import '/wxss/samcss-layout.wxss'; @import '/wxss/samcss-layout.wxss';
@import '/wxss/samcss-theme.wxss'; @import '/wxss/samcss-theme.wxss';
\ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
<view class="navigation"> <view class="navigation">
<!-- 状态栏 --> <!-- 状态栏 -->
<view id="status" class='status' style="{{statusCss}}"></view> <view id="status" class='status' style="{{statusCss}}"></view>
<!-- 标题栏 --> <!-- 标题栏 -->
<view id="navbar" class='title' style="{{titleCss}}"> <view id="navbar" class='title' style="{{titleCss}}">
<view class='back-icon' wx:if="{{backIcon}}" bindtap='onBack'> <view class='back-icon' wx:if="{{backIcon}}" bindtap='onBack'>
<image src='{{backIcon}}'></image> <image src='{{backIcon}}'></image>
</view> </view>
<view class='home-icon' wx:if="{{homeIcon}}" bindtap='onHome'> <view class='home-icon' wx:if="{{homeIcon}}" bindtap='onHome'>
<image src='{{homeIcon}}'></image> <image src='{{homeIcon}}'></image>
</view> </view>
<view class='title-icon' wx:if="{{titleImg}}"> <view class='title-icon' wx:if="{{titleImg}}">
<image src='{{titleImg}}' style='{{iconCss}}'></image> <image src='{{titleImg}}' style='{{iconCss}}'></image>
</view> </view>
<view class='title-text' style="{{titleCss}}" wx:if="{{titleText && !titleImg}}"> <view class='title-text' style="{{titleCss}}" wx:if="{{titleText && !titleImg}}">
<text style='{{textCss}}'>{{titleText}}</text> <text style='{{textCss}}'>{{titleText}}</text>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
.navigation { .navigation {
z-index: 2000; z-index: 2000;
} }
.status { .status {
width: 750rpx; width: 750rpx;
} }
.title { .title {
position: relative; position: relative;
} }
.back-icon, .back-icon,
.home-icon { .home-icon {
z-index: 1900; z-index: 1900;
width: 28px; width: 28px;
height: 100%; height: 100%;
position: absolute; position: absolute;
transform: translateY(-50%); transform: translateY(-50%);
top: 50%; top: 50%;
display: flex; display: flex;
} }
.back-icon { .back-icon {
left: 16px; left: 16px;
} }
.home-icon { .home-icon {
left: 44px left: 44px
} }
.back-icon image { .back-icon image {
width: 28px; width: 28px;
height: 28px; height: 28px;
margin: auto; margin: auto;
} }
.home-icon image { .home-icon image {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin: auto; margin: auto;
} }
.title-icon { .title-icon {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.title-text { .title-text {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: absolute; position: absolute;
width: 750rpx; width: 750rpx;
font-weight: bold; font-weight: bold;
} }
\ No newline at end of file
// 小程序富文本插件 https://github.com/jin-yufeng/Parser // 小程序富文本插件 https://github.com/jin-yufeng/Parser
var dom;var search;function t(t){for(var e=t.length,i=5381;e--;)i+=(i<<5)+t.charCodeAt(e);return i}var e={},i=require("./libs/MpHtmlParser.js"),n=wx.getFileSystemManager&&wx.getFileSystemManager();Component({options:{pureDataPattern:/^[acdgtu]|W/},data:{nodes:[]},properties:{html:{type:String,observer:function(t){this.setContent(t)}},autopause:{type:Boolean,value:!0},autoscroll:Boolean,autosetTitle:{type:Boolean,value:!0},compress:Number,domain:String,lazyLoad:Boolean,loadingImg:String,selectable:Boolean,tagStyle:Object,showWithAnimation:Boolean,useAnchor:Boolean,useCache:Boolean},relations:{"../parser-group/parser-group":{type:"ancestor"}},created:function(){var t=this;this.imgList=[],this.imgList.setItem=function(t,e){var i=this;if(t&&e){if(0==e.indexOf("http")&&this.includes(e)){for(var s,a="",o=0;(s=e[o])&&("/"!=s||"/"==e[o-1]||"/"==e[o+1]);o++)a+=Math.random()>.5?s.toUpperCase():s;return a+=e.substr(o),this[t]=a}if(this[t]=e,e.includes("data:image")){var r=e.match(/data:image\/(\S+?);(\S+?),(.+)/);if(!r)return;var l=wx.env.USER_DATA_PATH+"/"+Date.now()+"."+r[1];n&&n.writeFile({filePath:l,data:r[3],encoding:r[2],success:function(){return i[t]=l}})}}},this.imgList.each=function(t){for(var e=0,i=this.length;e<i;e++)this.setItem(e,t(this[e],e,this))},dom&&(this.document=new dom(this)),search&&(this.search=function(e){return search(t,e)})},detached:function(){this.imgList.each(function(t){t&&t.includes(wx.env.USER_DATA_PATH)&&n&&n.unlink({filePath:t})}),clearInterval(this._timer)},methods:{in:function(t){t.page&&t.selector&&t.scrollTop&&(this._in=t)},navigateTo:function(t){var e=this;if(!this.data.useAnchor)return t.fail&&t.fail("Anchor is disabled");var i=(this._in?this._in.page:this).createSelectorQuery().select((this._in?this._in.selector:".top")+(t.id?">>>#"+t.id:"")).boundingClientRect();this._in?i.select(this._in.selector).fields({rect:!0,scrollOffset:!0}):i.selectViewport().scrollOffset(),i.exec(function(i){if(!i[0])return e.group?e.group.navigateTo(e.i,t):t.fail&&t.fail("Label not found");var n=i[1].scrollTop+i[0].top-(i[1].top||0)+(t.offset||0);if(e._in){var s={};s[e._in.scrollTop]=n,e._in.page.setData(s)}else wx.pageScrollTo({scrollTop:n});t.success&&t.success()})},getText:function(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.nodes,i="",n=0;t=e[n++];)if("text"==t.type)i+=t.text.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");else if("br"==t.type)i+="\n";else{var s="p"==t.name||"div"==t.name||"tr"==t.name||"li"==t.name||"h"==t.name[0]&&t.name[1]>"0"&&t.name[1]<"7";s&&i&&"\n"!=i[i.length-1]&&(i+="\n"),t.children&&(i+=this.getText(t.children)),s&&"\n"!=i[i.length-1]?i+="\n":"td"!=t.name&&"th"!=t.name||(i+="\t")}return i},getVideoContext:function(t){if(!t)return this.videoContexts;for(var e=this.videoContexts.length;e--;)if(this.videoContexts[e].id==t)return this.videoContexts[e]},setContent:function(n,s){var a,o=this,r=new i(n,this.data);if(this.data.useCache){var l=t(n);e[l]?a=e[l]:e[l]=a=r.parse()}else a=r.parse();this.triggerEvent("parse",a);var h={};if(s)for(var c=this.data.nodes.length,d=a.length;d--;)h["nodes["+(c+d)+"]"]=a[d];else h.nodes=a;this.showWithAnimation&&(h.showAm="animation: show .5s"),this.setData(h,function(){o.triggerEvent("load")}),a.title&&this.data.autosetTitle&&wx.setNavigationBarTitle({title:a.title}),this.imgList.length=0,this.videoContexts=[];for(var u,g=this.selectAllComponents(".top,.top>>>._node"),f=0;u=g[f++];){u.top=this;for(var m,p=0;m=u.data.nodes[p++];)if(!m.c)if("img"==m.name)this.imgList.setItem(m.attrs.i,m.attrs.src);else if("video"==m.name||"audio"==m.name){var v;v="video"==m.name?wx.createVideoContext(m.attrs.id,u):u.selectComponent("#"+m.attrs.id),v&&(v.id=m.attrs.id,this.videoContexts.push(v))}}var x;clearInterval(this._timer),this._timer=setInterval(function(){o.createSelectorQuery().select(".top").boundingClientRect(function(t){t&&(o.rect=t,t.height==x&&(o.triggerEvent("ready",t),clearInterval(o._timer)),x=t.height)}).exec()},350)}}}) var dom;var search;function t(t){for(var e=t.length,i=5381;e--;)i+=(i<<5)+t.charCodeAt(e);return i}var e={},i=require("./libs/MpHtmlParser.js"),n=wx.getFileSystemManager&&wx.getFileSystemManager();Component({options:{pureDataPattern:/^[acdgtu]|W/},data:{nodes:[]},properties:{html:{type:String,observer:function(t){this.setContent(t)}},autopause:{type:Boolean,value:!0},autoscroll:Boolean,autosetTitle:{type:Boolean,value:!0},compress:Number,domain:String,lazyLoad:Boolean,loadingImg:String,selectable:Boolean,tagStyle:Object,showWithAnimation:Boolean,useAnchor:Boolean,useCache:Boolean},relations:{"../parser-group/parser-group":{type:"ancestor"}},created:function(){var t=this;this.imgList=[],this.imgList.setItem=function(t,e){var i=this;if(t&&e){if(0==e.indexOf("http")&&this.includes(e)){for(var s,a="",o=0;(s=e[o])&&("/"!=s||"/"==e[o-1]||"/"==e[o+1]);o++)a+=Math.random()>.5?s.toUpperCase():s;return a+=e.substr(o),this[t]=a}if(this[t]=e,e.includes("data:image")){var r=e.match(/data:image\/(\S+?);(\S+?),(.+)/);if(!r)return;var l=wx.env.USER_DATA_PATH+"/"+Date.now()+"."+r[1];n&&n.writeFile({filePath:l,data:r[3],encoding:r[2],success:function(){return i[t]=l}})}}},this.imgList.each=function(t){for(var e=0,i=this.length;e<i;e++)this.setItem(e,t(this[e],e,this))},dom&&(this.document=new dom(this)),search&&(this.search=function(e){return search(t,e)})},detached:function(){this.imgList.each(function(t){t&&t.includes(wx.env.USER_DATA_PATH)&&n&&n.unlink({filePath:t})}),clearInterval(this._timer)},methods:{in:function(t){t.page&&t.selector&&t.scrollTop&&(this._in=t)},navigateTo:function(t){var e=this;if(!this.data.useAnchor)return t.fail&&t.fail("Anchor is disabled");var i=(this._in?this._in.page:this).createSelectorQuery().select((this._in?this._in.selector:".top")+(t.id?">>>#"+t.id:"")).boundingClientRect();this._in?i.select(this._in.selector).fields({rect:!0,scrollOffset:!0}):i.selectViewport().scrollOffset(),i.exec(function(i){if(!i[0])return e.group?e.group.navigateTo(e.i,t):t.fail&&t.fail("Label not found");var n=i[1].scrollTop+i[0].top-(i[1].top||0)+(t.offset||0);if(e._in){var s={};s[e._in.scrollTop]=n,e._in.page.setData(s)}else wx.pageScrollTo({scrollTop:n});t.success&&t.success()})},getText:function(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.nodes,i="",n=0;t=e[n++];)if("text"==t.type)i+=t.text.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");else if("br"==t.type)i+="\n";else{var s="p"==t.name||"div"==t.name||"tr"==t.name||"li"==t.name||"h"==t.name[0]&&t.name[1]>"0"&&t.name[1]<"7";s&&i&&"\n"!=i[i.length-1]&&(i+="\n"),t.children&&(i+=this.getText(t.children)),s&&"\n"!=i[i.length-1]?i+="\n":"td"!=t.name&&"th"!=t.name||(i+="\t")}return i},getVideoContext:function(t){if(!t)return this.videoContexts;for(var e=this.videoContexts.length;e--;)if(this.videoContexts[e].id==t)return this.videoContexts[e]},setContent:function(n,s){var a,o=this,r=new i(n,this.data);if(this.data.useCache){var l=t(n);e[l]?a=e[l]:e[l]=a=r.parse()}else a=r.parse();this.triggerEvent("parse",a);var h={};if(s)for(var c=this.data.nodes.length,d=a.length;d--;)h["nodes["+(c+d)+"]"]=a[d];else h.nodes=a;this.showWithAnimation&&(h.showAm="animation: show .5s"),this.setData(h,function(){o.triggerEvent("load")}),a.title&&this.data.autosetTitle&&wx.setNavigationBarTitle({title:a.title}),this.imgList.length=0,this.videoContexts=[];for(var u,g=this.selectAllComponents(".top,.top>>>._node"),f=0;u=g[f++];){u.top=this;for(var m,p=0;m=u.data.nodes[p++];)if(!m.c)if("img"==m.name)this.imgList.setItem(m.attrs.i,m.attrs.src);else if("video"==m.name||"audio"==m.name){var v;v="video"==m.name?wx.createVideoContext(m.attrs.id,u):u.selectComponent("#"+m.attrs.id),v&&(v.id=m.attrs.id,this.videoContexts.push(v))}}var x;clearInterval(this._timer),this._timer=setInterval(function(){o.createSelectorQuery().select(".top").boundingClientRect(function(t){t&&(o.rect=t,t.height==x&&(o.triggerEvent("ready",t),clearInterval(o._timer)),x=t.height)}).exec()},350)}}})
\ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
<!--picker/picker.wxml--> <!--picker/picker.wxml-->
<view class="full-box {{isOpen?'cur':''}}"> <view class="full-box {{isOpen?'cur':''}}">
<!--<view class="modal" bindtap="tapModal"></view>--> <!--<view class="modal" bindtap="tapModal"></view>-->
<view class="picker"> <view class="picker">
<view class="picker-header" style="{{pickerHeaderStyle}}"> <view class="picker-header" style="{{pickerHeaderStyle}}">
<view bindtap="cancle" > <view bindtap="cancle" >
<text style="{{cancelStyle}}">{{cancelText}}</text> <text style="{{cancelStyle}}">{{cancelText}}</text>
</view> </view>
<text style="{{titleStyle}}">{{titleText}}</text> <text style="{{titleStyle}}">{{titleText}}</text>
<view bindtap="sure"> <view bindtap="sure">
<text style="{{sureStyle}}">{{sureText}}</text> <text style="{{sureStyle}}">{{sureText}}</text>
</view> </view>
</view> </view>
<picker-view <picker-view
value="{{value}}" value="{{value}}"
class="picker-content" class="picker-content"
bindpickstart="_bindpickstart" bindpickstart="_bindpickstart"
bindchange="_bindChange" bindchange="_bindChange"
bindpickend="_bindpickend" bindpickend="_bindpickend"
indicator-style="{{indicatorStyle}}" indicator-style="{{indicatorStyle}}"
mask-style="{{maskStyle}}" mask-style="{{maskStyle}}"
> >
<picker-view-column wx:for="{{columnsData}}" wx:key="{{index}}"> <picker-view-column wx:for="{{columnsData}}" wx:key="{{index}}">
<view wx:for="{{item}}" wx:for-item="itemIn" class="picker-line" wx:key="{{index}}"> <view wx:for="{{item}}" wx:for-item="itemIn" class="picker-line" wx:key="{{index}}">
<text class="line1" style="{{chooseItemTextStyle}}">{{isUseKeywordOfShow?itemIn[keyWordsOfShow]:itemIn}}</text> <text class="line1" style="{{chooseItemTextStyle}}">{{isUseKeywordOfShow?itemIn[keyWordsOfShow]:itemIn}}</text>
</view> </view>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
</view> </view>
</view> </view>
/* picker/picker.wxss */ /* picker/picker.wxss */
.full-box{ .full-box{
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
top: 0; top: 0;
z-index: 9999; z-index: 9999;
opacity: 0; opacity: 0;
background:rgba(0,0,0,.4); background:rgba(0,0,0,.4);
transition:all .4s ease-in-out 0; transition:all .4s ease-in-out 0;
pointer-events:none; pointer-events:none;
} }
.full-box.cur{ .full-box.cur{
opacity:1; opacity:1;
pointer-events:auto pointer-events:auto
} }
.modal{ .modal{
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 50%; height: 50%;
bottom:-50%; bottom:-50%;
left: 0; left: 0;
background: transparent; background: transparent;
transition:all .4s ease-in-out 0; transition:all .4s ease-in-out 0;
} }
.picker{ .picker{
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 235px; height: 235px;
bottom: -235px; bottom: -235px;
left: 0; left: 0;
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
transition:all .4s ease-in-out 0; transition:all .4s ease-in-out 0;
} }
.cur .picker{ .cur .picker{
bottom:0; bottom:0;
} }
.cur .modal{ .cur .modal{
bottom:50%; bottom:50%;
} }
.picker-line{ .picker-line{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.picker-header { .picker-header {
height: 20%; height: 20%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 20rpx; padding: 0 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee;
} }
.picker-header view { .picker-header view {
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.picker-header view text{ .picker-header view text{
font-size: 36rpx; font-size: 36rpx;
} }
.picker-content { .picker-content {
flex-grow: 1; flex-grow: 1;
} }
.line1{ .line1{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
lines:1 lines:1
} }
\ No newline at end of file
function _typeof(obj) { function _typeof(obj) {
return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase(); return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
} }
function isString(obj) { //是否字符串 function isString(obj) { //是否字符串
return _typeof(obj) === 'string' return _typeof(obj) === 'string'
} }
function isPlainObject(obj) { function isPlainObject(obj) {
return _typeof(obj) === 'object'; return _typeof(obj) === 'object';
} }
module.exports = { module.exports = {
isString, isString,
isPlainObject isPlainObject
} }
Component({ Component({
/** properties: {
* 组件的属性列表 bannerActiveIndex: {
*/ type: Number,
properties: { value: 0
bannerActiveIndex: { },
type: Number, bannerStyle: {
value: 0 type: Number,
}, value: 0
bannerStyle: { }
type: Number, },
value: 0
} data: {
}, style: [
{
data: { style: 'width: 200rpx; height: 50rpx',
style: [ styleImage: [
{ './image/a-1.png',
style: 'width: 200rpx; height: 50rpx', './image/a-2.png',
styleImage: [ './image/a-3.png',
'./image/a-1.png', ]
'./image/a-2.png', }, {
'./image/a-3.png', style: 'width: 540rpx; height: 50rpx',
] styleImage: [
}, { './image/b-1.png',
style: 'width: 540rpx; height: 50rpx', './image/b-2.png',
styleImage: [ './image/b-3.png',
'./image/b-1.png', ]
'./image/b-2.png', }
'./image/b-3.png', ],
] lineStyle: [],
} containerStyle: '',
], },
lineStyle: [],
containerStyle: '', lifetimes: {
}, attached: function () {
this.setStyle()
lifetimes: { },
attached: function () { },
console.log(this.data.bannerStyle)
this.setStyle() methods: {
}, setStyle: function () {
}, this.setData({
lineStyle: this.data.style[this.data.bannerStyle].styleImage,
methods: { containerStyle: this.data.style[this.data.bannerStyle].style
setStyle: function () { })
this.setData({ }
lineStyle: this.data.style[this.data.bannerStyle].styleImage, }
containerStyle: this.data.style[this.data.bannerStyle].style })
})
}
}
})
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file
<!--component/swiper-point/swiper-point.wxml--> <!--component/swiper-point/swiper-point.wxml-->
<view class="swiper-point"> <view class="swiper-point">
<view class="swiper-point-group" style="{{containerStyle}}"> <view class="swiper-point-group" style="{{containerStyle}}">
<block wx:for="{{lineStyle}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{lineStyle}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image src="{{item}}" mode="widthFix" class="{{index === bannerActiveIndex ? '' : 'inactive-line'}}"></image> <image src="{{item}}" mode="widthFix" class="{{index === bannerActiveIndex ? '' : 'inactive-line'}}"></image>
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file
.swiper-point { .swiper-point {
z-index: 1100; z-index: 1100;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
} }
.swiper-point-group { .swiper-point-group {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.inactive-line { .inactive-line {
opacity: .5; opacity: .5;
} }
\ No newline at end of file
<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}"> <l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
<view class="l-action-sheet"> <view class="l-action-sheet">
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}"> <view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
{{ title }} {{ title }}
</view> </view>
<view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}"> <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> <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':''}}"> <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}}"/> <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> <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> <text class="l-button-text">{{ item.name }}</text>
</view> </view>
</l-button> </l-button>
</view> </view>
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}"> <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}}"> <l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
<view class="l-item-button l-cancel-button">{{ cancelText }}</view> <view class="l-item-button l-cancel-button">{{ cancelText }}</view>
</l-button> </l-button>
</view> </view>
</view> </view>
</l-popup> </l-popup>
<wxs src="index.wxs" module="album"></wxs> <wxs src="index.wxs" module="album"></wxs>
<view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}"> <view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}">
<block wx:for="{{urls}}" wx:key="index"> <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}}"/> <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> </block>
</view> </view>
var containerStyle = function (urls, multipleSize, gapRow, gapColumn) { var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;' urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;'
if (urls.length === 2 || urls.length === 4) { 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);' 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 { } 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);' 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) { var blockClass = function (urls, horizontalScreen) {
if (urls.length === 1) { if (urls.length === 1) {
if (horizontalScreen) { if (horizontalScreen) {
return 'l-single-image-class' return 'l-single-image-class'
} else { } else {
return 'vertical l-single-image-class' return 'vertical l-single-image-class'
} }
} else { } else {
return 'l-multi-image-class' return 'l-multi-image-class'
} }
} }
var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) { var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
if (urls.length === 1) { if (urls.length === 1) {
if (horizontalScreen) { if (horizontalScreen) {
return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;' return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
} else { } else {
return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;' return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
} }
} else { } else {
return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;' return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
} }
} }
module.exports = { module.exports = {
containerStyle: containerStyle, containerStyle: containerStyle,
blockClass: blockClass, blockClass: blockClass,
blockStyle: blockStyle blockStyle: blockStyle
} }
<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"> <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}}"> <scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
<view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class"> <view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
<slot name="header"/> <slot name="header"/>
</view> </view>
<view class="content-arc-popup"> <view class="content-arc-popup">
<slot/> <slot/>
</view> </view>
</scroll-view> </scroll-view>
</l-popup> </l-popup>
\ No newline at end of file
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar"> <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"> <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"/> <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}}"/> <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"/> <image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
</view> </view>
<view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}"> <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"/> <open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
<text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text> <text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
</view> </view>
</view> </view>
<view class="l-badge" bindtap="handleTap"> <view class="l-badge" bindtap="handleTap">
<slot/> <slot/>
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view> <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> <view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
</block> </block>
</view> </view>
\ No newline at end of file
<label for="{{name}}" bindtap="handleTap" class="l-label-class"> <label for="{{name}}" bindtap="handleTap" class="l-label-class">
<block wx:if="{{special}}"> <block wx:if="{{special}}">
<view class="special-container l-class"> <view class="special-container l-class">
<slot/> <slot/>
</view> </view>
</block> </block>
<block wx:else> <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 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> <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}}"/> <l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
<slot/> <slot/>
</view> </view>
</block> </block>
</label> </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 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> </button>
\ No newline at end of file
<view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx"> <view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx">
<cover-view class="capsule-bar" style="background-color: {{bgColor}};"> <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="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-bar" style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};">
<cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view> <cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
</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 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-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-image class="icon-left" src="icons/capsule-left-{{capsuleColor}}.png"></cover-image>
</cover-view> </cover-view>
<cover-view class="line"></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-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-image class="icon-right" src="icons/capsule-right-{{capsuleColor}}.png"></cover-image>
</cover-view> </cover-view>
</cover-view> </cover-view>
</cover-view> </cover-view>
<view class="content-container"> <view class="content-container">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
<view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}"> <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'}}"> <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> <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"> <view class="card-content">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text> <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<slot/> <slot/>
</view> </view>
</block> </block>
<block wx:if="{{type ==='avatar'}}"> <block wx:if="{{type ==='avatar'}}">
<view class="card-avatar-top"> <view class="card-avatar-top">
<view class="card-avatar-left"> <view class="card-avatar-left">
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image> <image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
<view class="card-avatar"> <view class="card-avatar">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text> <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<text class="describe">{{describe}}</text> <text class="describe">{{describe}}</text>
</view> </view>
</view> </view>
<slot name="more"/> <slot name="more"/>
</view> </view>
<slot/> <slot/>
</block> </block>
</view> </view>
\ No newline at end of file
<view class="l-class checkbox-group checkbox-group-{{placement}}"> <view class="l-class checkbox-group checkbox-group-{{placement}}">
<slot></slot> <slot></slot>
</view> </view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
<view bind:tap="onCheckboxChangeTap" class="label label-{{placement}} label-placement-{{parentPlacement}} {{disabled ? 'label-disabled l-disabled-class' : 'l-class'}}"> <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}}"> <view class="checkbox" style="color:{{checked ? selectColor : (disabled ? disabledColor : color)}};font-size: {{size}}">
<slot wx:if="{{custom}}" name="icon"/> <slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view> <view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view>
</view> </view>
<slot/> <slot/>
</view> </view>
<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 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 !== 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 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 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"> <view wx:if="{{showValue}}" class="l-value-class" style="color:{{valueColor?valueColor:''}};font-size:{{valueSize}}rpx">
{{displayPercent}}% {{displayPercent}}%
</view> </view>
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
<view class="container l-class"> <view class="container l-class">
<view bind:tap="onTapTitle" class="container-title l-title-class"> <view bind:tap="onTapTitle" class="container-title l-title-class">
<view style="{{disable?'color:#DEE2E6':''}}" wx:if="{{!customTitle}}">{{title}}</view> <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> <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> <slot name="title"></slot>
</view> </view>
<view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s"> <view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s">
<view class="container-body-wrapper l-body-class"> <view class="container-body-wrapper l-body-class">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
</view> </view>
<view class="container"> <view class="container">
<slot></slot> <slot></slot>
</view> </view>
<view class="l-tabs l-placement-top l-tabs-horizontal {{aminmated ? 'l-aminmated' :''}} {{scrollable ? 'l-tabs-scroll':''}}"> <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> <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':''}}"> <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> <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 class="l-tabs-main">
<view wx:if="{{!swipeable}}" class="l-tabpanel-content l-content-class"> <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-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-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"> <view class="l-subpanel" wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot> <slot name="{{tab.key}}"></slot>
</view> </view>
</view> </view>
<slot name="{{item.key}}" wx:else></slot> <slot name="{{item.key}}" wx:else></slot>
</view> </view>
</view> </view>
<swiper wx:else class="l-tabpanel-content l-content-class" bindchange="swiperChange" current="{{currentIndex}}"> <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"> <swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<view wx:if="{{item.subTabs.length>0}}"> <view wx:if="{{item.subTabs.length>0}}">
<swiper class="" vertical bindchange="subSwiperChange" current="{{item.subCurrentIndex}}"> <swiper class="" vertical bindchange="subSwiperChange" current="{{item.subCurrentIndex}}">
<swiper-item wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key"> <swiper-item wx:for="{{item.subTabs}}" wx:for-item="tab" wx:key="key">
<slot name="{{tab.key}}"></slot> <slot name="{{tab.key}}"></slot>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<slot name="{{item.key}}" wx:else></slot> <slot name="{{item.key}}" wx:else></slot>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view> </view>
</view> </view>
<template name="tab-header"> <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"> <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 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"> <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"/> <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}}"/> <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}} {{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 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>
</view> </view>
</scroll-view> </scroll-view>
</template> </template>
<view class="l-class container-count"> <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="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 class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view> </view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/> <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 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-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 class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view> </view>
</view> </view>
\ No newline at end of file
<view class="l-countdown l-class"> <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 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> </view>
\ No newline at end of file
<view class="l-class container-count"> <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="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 class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view> </view>
<input wx:if="{{focus}}" class="l-count-class count" disabled="{{disabled}}" type="number" focus="{{focus}}" value="{{result}}" bindblur="onBlur"/> <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 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-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 class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
</view> </view>
</view> </view>
\ No newline at end of file
<view wx:if="{{show}}" class="tab-bar tab-bar-{{position}}" style='background: {{backgroundImg? "url("+ backgroundImg+ ")" : backgroundColor}}'> <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 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: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> <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 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 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> <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 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.redDot}}" class="reddot"></view>
<view wx:if="{{item.badge}}" class="badge">{{item.badge}}</view> <view wx:if="{{item.badge}}" class="badge">{{item.badge}}</view>
</view> </view>
</view> </view>
<l-popup show="{{show}}" animation="show" contentAlign="center" locked="{{true}}" bind:lintap="onDialogTap" l-bg-class="l-bg-class" z-index="{{zIndex}}"> <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-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-title l-title-class" style="color:{{titleColor}}" wx:if="{{showTitle}}">{{title}}</view>
<view class="dialog-content l-content-class" style="color:{{contentColor}}"> <view class="dialog-content l-content-class" style="color:{{contentColor}}">
<slot/> <slot/>
{{content}} {{content}}
</view> </view>
<view class="dialog-btn-group"> <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-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 class="dialog-btn-confirm l-confirm-class" style="color: {{confirmColor}}" hover-class="{{isHover?'group-hover':''}}" catchtap="onConfirmTap">{{confirmText}}</view>
</view> </view>
</view> </view>
</l-popup> </l-popup>
var is = require('./is.wxs'); var is = require('./is.wxs');
var object = require('./object.wxs'); var object = require('./object.wxs');
function apply(fun, args) { function apply(fun, args) {
return args.map(function (item) { return args.map(function (item) {
return fun(item) return fun(item)
}) })
} }
function classnames() { function classnames() {
var classes = []; var classes = [];
for (var i = 0; i < arguments.length; i++) { for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i]; var arg = arguments[i];
if (!arg) continue; if (!arg) continue;
if (is.isString(arg) || is.isNumber(arg)) { if (is.isString(arg) || is.isNumber(arg)) {
classes.push(arg); classes.push(arg);
} else if (is.isArray(arg) && arg.length) { } else if (is.isArray(arg) && arg.length) {
var inner = apply(classnames, arg); var inner = apply(classnames, arg);
if (inner) { if (inner) {
classes.push(inner); classes.push(inner);
} }
} else if (is.isObject(arg)) { } else if (is.isObject(arg)) {
object.keys(arg).forEach(function (key) { object.keys(arg).forEach(function (key) {
if (arg[key]) { if (arg[key]) {
classes.push(key); classes.push(key);
} }
}) })
} }
} }
return classes.join(' '); return classes.join(' ');
} }
module.exports = classnames; module.exports = classnames;
var TYPE = { var TYPE = {
NULL: 'null', NULL: 'null',
UNDEFINED: 'undefined', UNDEFINED: 'undefined',
NUMBER: 'Number', NUMBER: 'Number',
STRING: 'String', STRING: 'String',
BOOLEAN: 'Boolean', BOOLEAN: 'Boolean',
OBJECT: 'Object', OBJECT: 'Object',
FUNCTION: 'Function', FUNCTION: 'Function',
ARRAY: 'Array', ARRAY: 'Array',
DATE: 'Date', DATE: 'Date',
REGEXP: 'RegExp' REGEXP: 'RegExp'
} }
function isUndefined(val) { function isUndefined(val) {
return TYPE.UNDEFINED === typeof val; return TYPE.UNDEFINED === typeof val;
} }
function isNull(val) { function isNull(val) {
return val === TYPE.NULL; return val === TYPE.NULL;
} }
function _jadgeFun(val, type) { function _jadgeFun(val, type) {
if (isUndefined(val) || isNull(val)) return false; if (isUndefined(val) || isNull(val)) return false;
return TYPE[type] === val.constructor; return TYPE[type] === val.constructor;
} }
function isNumber(val) { function isNumber(val) {
return _jadgeFun(val, 'NUMBER'); return _jadgeFun(val, 'NUMBER');
} }
function isString(val) { function isString(val) {
return _jadgeFun(val, 'STRING'); return _jadgeFun(val, 'STRING');
} }
function isBoolean(val) { function isBoolean(val) {
return _jadgeFun(val, 'BOOLEAN'); return _jadgeFun(val, 'BOOLEAN');
} }
function isObject(val) { function isObject(val) {
return _jadgeFun(val, 'OBJECT'); return _jadgeFun(val, 'OBJECT');
} }
function isFunction(val) { function isFunction(val) {
return _jadgeFun(val, 'FUNCTION'); return _jadgeFun(val, 'FUNCTION');
} }
function isArray(val) { function isArray(val) {
return _jadgeFun(val, 'ARRAY'); return _jadgeFun(val, 'ARRAY');
} }
function isDate(val) { function isDate(val) {
return _jadgeFun(val, 'DATE'); return _jadgeFun(val, 'DATE');
} }
function isRegExp(val) { function isRegExp(val) {
return _jadgeFun(val, 'REGEXP'); return _jadgeFun(val, 'REGEXP');
} }
module.exports = { module.exports = {
isNull: isNull, isNull: isNull,
isUndefined: isUndefined, isUndefined: isUndefined,
isNumber: isNumber, isNumber: isNumber,
isString: isString, isString: isString,
isBoolean: isBoolean, isBoolean: isBoolean,
isObject: isObject, isObject: isObject,
isFunction: isFunction, isFunction: isFunction,
isArray: isArray, isArray: isArray,
isDate: isDate, isDate: isDate,
isRegExp: isRegExp isRegExp: isRegExp
} }
var REGEXP = getRegExp('{|}|"', 'g'); var REGEXP = getRegExp('{|}|"', 'g');
function keys(obj) { function keys(obj) {
return JSON.stringify(obj) return JSON.stringify(obj)
.replace(REGEXP, '') .replace(REGEXP, '')
.split(',') .split(',')
.map(function(item) { .map(function(item) {
return item.split(':')[0]; return item.split(':')[0];
}); });
} }
module.exports.keys = keys; module.exports.keys = keys;
\ No newline at end of file
function zeroPadding(num, length = 2) { function zeroPadding(num, length = 2) {
if((num + "").length >= length) { if((num + "").length >= length) {
return num; return num;
} }
return zeroPadding("0" + num, length) return zeroPadding("0" + num, length)
} }
module.exports = zeroPadding; module.exports = zeroPadding;
\ No newline at end of file
<view class="l-form-item-class form-item-container {{'label-' + labelPlacement}} {{tipType === 'text' ? 'textHeight': ''}}"> <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 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}}"> <view wx:if="{{labelSlot}}">
<slot name="label"/> <slot name="label"/>
</view> </view>
<view wx:else> <view wx:else>
{{label}} {{label}}
</view> </view>
</view> </view>
<view class="label-content l-form-content-class"> <view class="label-content l-form-content-class">
<slot/> <slot/>
</view> </view>
<l-error-tip class="error-text" l-error-text-class="l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip class="error-text" l-error-text-class="l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</view> </view>
<view class="l-form-container-class"> <view class="l-form-container-class">
<slot/> <slot/>
</view> </view>
<view class="l-form-btn-class"> <view class="l-form-btn-class">
<view class="l-form-submit-class" bind:tap="submit"> <view class="l-form-submit-class" bind:tap="submit">
<slot name="submit"/> <slot name="submit"/>
</view> </view>
<view class="l-form-reset-class" bind:tap="reset"> <view class="l-form-reset-class" bind:tap="reset">
<slot name="reset"/> <slot name="reset"/>
</view> </view>
</view> </view>
<view class="l-grid-item l-grid-item-class grid-item" bindtap="tapGridItem"> <view class="l-grid-item l-grid-item-class grid-item" bindtap="tapGridItem">
<slot></slot> <slot></slot>
</view> </view>
\ No newline at end of file
<view class="l-grid l-class" bindtap="tapGrid"> <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}}%;"> <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> <slot name="{{item.key}}"></slot>
</view> </view>
</view> </view>
\ No newline at end of file
Component({ Component({
externalClasses: ["l-class"], externalClasses: ["l-class"],
options: { options: {
addGlobalClass: !0 addGlobalClass: !0
}, },
properties: { properties: {
name: String, name: String,
color: { color: {
type: String, type: String,
value: "#3963bc" value: "#3963bc"
}, },
size: { size: {
type: String, type: String,
value: "40" value: "40"
} }
}, },
ready: function() { ready: function() {
this.properties.name || console.error("请传入Icon组件的name属性") this.properties.name || console.error("请传入Icon组件的name属性")
}, },
methods: {} methods: {}
}); });
\ 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+';' : '' }}"/> <view class="l-class l-icon {{ name === '' ? '' : 'l-icon-' + name }}" style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color ? 'color:' + color+';' : '' }}"/>
<l-grid row-num="{{ size }}" l-class="l-class"> <l-grid row-num="{{ size }}" l-class="l-class">
<l-grid-item wx:for="{{ urls }}" wx:key="index" key="{{ index }}" slot="{{ index }}"> <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="item l-item-class" catchtap="onPreviewTap" data-index="{{ index }}">
<view class="close" data-index="{{ index }}" catchtap="onDelTap"> <view class="close" data-index="{{ index }}" catchtap="onDelTap">
<l-icon name="close" color="#fff" size="22" l-class="close-icon"/> <l-icon name="close" color="#fff" size="22" l-class="close-icon"/>
</view> </view>
<image class="{{size === 3? 'img': 'min-img'}}" mode="{{ mode }}" src="{{newOrOld==='old'? item:item.url }}"/> <image class="{{size === 3? 'img': 'min-img'}}" mode="{{ mode }}" src="{{newOrOld==='old'? item:item.url }}"/>
</view> </view>
</l-grid-item> </l-grid-item>
<l-grid-item wx:if="{{ showBtn }}"> <l-grid-item wx:if="{{ showBtn }}">
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:if="{{ custom }}"> <view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:if="{{ custom }}">
<slot></slot> <slot></slot>
</view> </view>
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:else> <view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:else>
<image class="add-icon" src="./image/add.png"/> <image class="add-icon" src="./image/add.png"/>
</view> </view>
</l-grid-item> </l-grid-item>
</l-grid> </l-grid>
<view class="anchor-wrapper" style="{{anchorWrapperStyle}}"> <view class="anchor-wrapper" style="{{anchorWrapperStyle}}">
<view class="anchor" style="{{anchorStyle}}"> <view class="anchor" style="{{anchorStyle}}">
<view wx:if="{{anchorSlot.height!==0}}" class="anchor-slot"> <view wx:if="{{anchorSlot.height!==0}}" class="anchor-slot">
<slot></slot> <slot></slot>
</view> </view>
<view wx:if="{{anchorSlot.height===0}}" class="anchor-default l-anchor-class"> <view wx:if="{{anchorSlot.height===0}}" class="anchor-default l-anchor-class">
{{anchorText}} {{anchorText}}
</view> </view>
</view> </view>
</view> </view>
<view class="index-list"> <view class="index-list">
<view wx:if="{{showSidebar}}" class="sidebar l-sidebar-class" catch:tap="onTapSidebar" catch:touchmove="onTouchMove" catch:touchend="onTouchend"> <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"> <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> <view class="sidebar-item l-sidebar-item-class {{activeSidebarItem===index?'sidebar-item-active l-selected-class':'l-unselected-class'}}">{{sidebarItem}}</view>
</block> </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 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 class="tip-text l-tip-text-class">{{tipText}}</view>
</view> </view>
</view> </view>
<slot></slot> <slot></slot>
</view> </view>
<label class='form-item {{disabled? "disabled": ""}} l-class form-item-{{labelLayout}}' style="width:{{width===null?'auto':width+'rpx'}}"> <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="mask" wx:if="{{disabled}}"></view>
<view class="row" hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width}}rpx;"></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" : "" }}'> <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><text class="text-require" wx:if="{{required}}">* </text>{{label}}<text wx:if="{{colon}}">:</text>
</text> </text>
</view> </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" : "" }}'> <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"/> <slot name="left"/>
</view> </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"/> <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}}"/> <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" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close-icon"> <view class="close-icon">
<l-icon name="close" color="#fff" size="16"/> <l-icon name="close" color="#fff" size="16"/>
</view> </view>
</view> </view>
<slot name="right"/> <slot name="right"/>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
</label> </label>
<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}}"> <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}}"> <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}}"/> <template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}"/>
</l-badge> </l-badge>
<template is="cell-left-main" data="{{image,icon,title,desc,tagContent,tagPosition,tagColor,tagShape,tagPlain,iconSize,iconColor}}" wx:else/> <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}}"> <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}}"/> <template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}"/>
</l-badge> </l-badge>
<template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}" wx:else/> <template is="cell-right-main" data="{{rightDesc,tagContent,tagPosition,isLink,tagColor,tagShape,tagPlain}}" wx:else/>
</view> </view>
<template name="cell-left-main"> <template name="cell-left-main">
<view class="left-section"> <view class="left-section">
<image wx:if="{{image}}" class="l-image l-class-image l-image-class" src="{{image}}" mode="aspectFit|aspectFill|widthFix"/> <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}}"/> <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-text">
<view class="l-class-content l-content-class">{{title}}</view> <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 class="l-desc l-class-desc l-desc-class" wx:if="{{desc}}">{{desc}}</view>
</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}}" 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> <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> <slot name="left-section"></slot>
</view> </view>
</template> </template>
<template name="cell-right-main"> <template name="cell-right-main">
<view class="right-section l-class-right l-right-class"> <view class="right-section l-class-right l-right-class">
<slot name="right-section"></slot> <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}}" 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> <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> <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}}"/> <l-icon l-class="l-link-icon-class" size="26" color="#8c98ae" name="right" wx:if="{{isLink}}"/>
</view> </view>
</template> </template>
<slot name="content"/> <slot name="content"/>
<view bindtap="onLoadmore" wx:if="{{show}}"> <view bindtap="onLoadmore" wx:if="{{show}}">
<view wx:if="{{custom && type==='end'}}"> <view wx:if="{{custom && type==='end'}}">
<slot name="end"/> <slot name="end"/>
</view> </view>
<view wx:elif="{{custom && type==='loading'}}"> <view wx:elif="{{custom && type==='loading'}}">
<slot name="loading"/> <slot name="loading"/>
</view> </view>
<view class="loading l-class" wx:else> <view class="loading l-class" wx:else>
<view class="line loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view> <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="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-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="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 class="line l-line-class loading-view" style="{{'background-color:'+color}}" wx:if="{{line}}"></view>
</view> </view>
</view> </view>
<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="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"> <view class="mask-content l-mask-class">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
\ 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"> <view class="l-message l-class {{'l-message-'+type}} {{status?'l-message-show':''}}" style="z-index:{{zIndex}};top:{{top}}rpx">
<block wx:if="{{status}}"> <block wx:if="{{status}}">
<view style="margin-right:15rpx"> <view style="margin-right:15rpx">
<l-icon name="{{icon?icon:type}}" size="{{iconSize}}" color="{{type==='warning'?'#333':iconColor}}"/> <l-icon name="{{icon?icon:type}}" size="{{iconSize}}" color="{{type==='warning'?'#333':iconColor}}"/>
</view> </view>
<image wx:if="{{image}}" src="{{image}}" class="l-message-image l-class-image"/> <image wx:if="{{image}}" src="{{image}}" class="l-message-image l-class-image"/>
{{content}} {{content}}
<slot/> <slot/>
</block> </block>
</view> </view>
<view wx:if="{{ show }}" class="l-class l-noticebar" style="color: {{ color }}; background-color: {{ backgroundcolor }}"> <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"/> <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'}}"> <swiper autoplay vertical interval="{{4*speed}}" class="l-noticebar-content-wrap" wx:if="{{type=='swip'}}">
<block wx:for="{{swipArr}}" wx:key="swip"> <block wx:for="{{swipArr}}" wx:key="swip">
<swiper-item data-index="{{index}}" bindtap="onSwip"> <swiper-item data-index="{{index}}" bindtap="onSwip">
{{item}} {{item}}
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<view class="l-noticebar-content-wrap l-noticebar-content-wrap-view" wx:else> <view class="l-noticebar-content-wrap l-noticebar-content-wrap-view" wx:else>
<view class="l-noticebar-content" bindtap="handleTap" animation="{{ animationData }}"> <view class="l-noticebar-content" bindtap="handleTap" animation="{{ animationData }}">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
<l-icon wx:if="{{ endIconName && !close }}" size="{{endIconSize}}" color="{{endIconColor}}" class="l-noticebar-operation" name="{{ endIconName }}" bindtap="onIconTap"/> <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"/> <l-icon wx:if="{{close}}" class="l-noticebar-operation" name="close" size="{{endIconSize}}" color="{{endIconColor}}" bindtap="onClose"/>
</view> </view>
<view class='container-popup {{ show ? "popup-show" : "" }} {{ "l-popup-" + direction===null?contentAlign:direction }} l-class' style="z-index:{{zIndex}};" catchtouchmove="doNothingMove"> <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 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 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"> <view catchtap="doNothingTap">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
</view> </view>
<view class='price-container l-class {{deleted ? "price-del l-deleted-class" : ""}}' style="color: {{delColor?delColor:color}}"> <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-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> <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> </view>
<view class="container l-class"> <view class="container l-class">
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='left'}}" style="color:{{textColor?textColor:''}};margin-right:{{interval}}rpx"> <view class="text l-text-class" wx:if="{{showInfo && textPosition==='left'}}" style="color:{{textColor?textColor:''}};margin-right:{{interval}}rpx">
{{percent}}% {{percent}}%
</view> </view>
<view class="progress short" style="height:{{strokeWidth}}rpx;"> <view class="progress short" style="height:{{strokeWidth}}rpx;">
<view class="slot" style="margin-left:{{marginLeft}}rpx;margin-top:{{marginTop}}rpx;"> <view class="slot" style="margin-left:{{marginLeft}}rpx;margin-top:{{marginTop}}rpx;">
<slot name="header"></slot> <slot name="header"></slot>
</view> </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="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 class="background l-background-class" style="height:{{strokeWidth}}rpx;border-radius:{{borderRadius}}rpx;background-color:{{backgroundColor}};"></view>
</view> </view>
<view class="text l-text-class" wx:if="{{showInfo && textPosition==='right'}}" style="color:{{textColor?textColor:''}};margin-left:{{interval}}rpx"> <view class="text l-text-class" wx:if="{{showInfo && textPosition==='right'}}" style="color:{{textColor?textColor:''}};margin-left:{{interval}}rpx">
{{percent}}% {{percent}}%
</view> </view>
</view> </view>
\ No newline at end of file
<view class="l-class radio-group radio-group-{{placement}}"> <view class="l-class radio-group radio-group-{{placement}}">
<slot></slot> <slot></slot>
</view> </view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
<view bind:tap="onRadioChangeTap" class="label label-{{placement}} {{disabled?'label-disabled l-disabled-class':'l-class'}}"> <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}}"> <view class="radio" style="color:{{checked?selectColor:(disabled?disabledColor:color)}};font-size:{{size}}">
<slot wx:if="{{custom}}" name="icon"/> <slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked?'icon-select':'icon-unselect'}}"></view> <view wx:else class="iconfont {{checked?'icon-select':'icon-unselect'}}"></view>
</view> </view>
<slot/> <slot/>
</view> </view>
\ No newline at end of file
<view class="l-rate l-class"> <view class="l-rate l-class">
<view wx:for="{{count}}" wx:key="item" class="l-rate-star" data-index="{{index}}" bindtap="handleClick"> <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}}%"> <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> <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}}"/> <l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{activeColor}}"/>
</view> </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> <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> <l-icon wx:else name="{{name}}" l-class="l-class-icon l-icon-class" size="{{size}}" color="{{inActiveColor}}"></l-icon>
</view> </view>
</view> </view>
\ No newline at end of file
<view class="search-bar l-container-class"> <view class="search-bar l-container-class">
<slot name="before"/> <slot name="before"/>
<view wx:if="{{frontText}}" class="icon-container" bind:tap="handleTapFrontText"> <view wx:if="{{frontText}}" class="icon-container" bind:tap="handleTapFrontText">
<text class="city">{{frontText}}</text> <text class="city">{{frontText}}</text>
<l-icon name="down" color="#333" size="22"/> <l-icon name="down" color="#333" size="22"/>
</view> </view>
<view class="search-input l-class {{'search-input-'+ shape}}" style="{{'background-color:'+bgColor}}"> <view class="search-input l-class {{'search-input-'+ shape}}" style="{{'background-color:'+bgColor}}">
<slot wx:if="{{custom}}" name="icon"/> <slot wx:if="{{custom}}" name="icon"/>
<l-icon wx:else name="{{icon}}" size="{{iconSize}}" color="{{iconColor}}" l-class="l-icon-class"/> <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"/> <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-wrap" wx:if="{{clear&&value}}" bindtap="onClearTap">
<view class="close"> <view class="close">
<l-icon name="close" color="#fff" size="15"/> <l-icon name="close" color="#fff" size="15"/>
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{showCancel}}" class="cancel l-cancel-class" bindtap="onCancel"> <view wx:if="{{showCancel}}" class="cancel l-cancel-class" bindtap="onCancel">
{{cancelText}} {{cancelText}}
</view> </view>
<slot name="after"/> <slot name="after"/>
</view> </view>
<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':''}}"> <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':''}}"> <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'}}"> <view class="l-tabs-header {{( even && equalWidth)?'l-tabs-equal-header':'l-tabs-unequal-header'}}">
<block wx:for="{{tabList}}" wx:key="key"> <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"> <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}}"> <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}}"/> <template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}"/>
</l-badge> </l-badge>
<template is="tab-item" data="{{item,activeKey,hasLine,activeColor,inactiveColor,animatedForLine}}" wx:else/> <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 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>
<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"> <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> <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 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>
</block> </block>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<template name="tab-item"> <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"/> <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}}"/> <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}} {{item.tab}}
</template> </template>
<view wx:if="{{loading}}" class="l-skeleton-container l-class"> <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 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 class="l-skeleton-right">
<view wx:if="{{title}}" class="l-skeleton-title-container" style="height:{{avatarSize}}"> <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 class="l-skeleton-title bg {{active?'active':''}}" style="height:{{titleHeight}}"></view>
</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 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>
</view> </view>
<slot wx:else/> <slot wx:else/>
\ No newline at end of file
<movable-area class="container" style="width: {{width}}rpx; height: {{height}}rpx;"> <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"> <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;"> <view class="left" style="width: {{width}}rpx; height: {{height}}rpx;">
<slot name="left"></slot> <slot name="left"></slot>
</view> </view>
<view class="right" bindtap="onRightTap" style="width: {{slideWidth}}rpx; height: {{height}}rpx;"> <view class="right" bindtap="onRightTap" style="width: {{slideWidth}}rpx; height: {{height}}rpx;">
<slot name="right"></slot> <slot name="right"></slot>
</view> </view>
</movable-view> </movable-view>
</movable-area> </movable-area>
\ No newline at end of file
<view wx:if="{{show}}" class="{{type==='flash'?'l-class':''}} {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}"> <view wx:if="{{show}}" class="{{type==='flash'?'l-class':''}} {{type + '-spinner'}} {{type==='change'||custom?'':'spinner-' + type + '-' + size}}">
<block wx:if="{{custom}}"> <block wx:if="{{custom}}">
<slot/> <slot/>
</block> </block>
<block wx:else> <block wx:else>
<view style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce1'}} {{'spinner-'+ type + '-' + size}}"></view> <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==='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> <view wx:if="{{type==='change'}}" style="{{color?'background-color:'+color:''}}" class="l-class {{type+'-bounce3'}} {{'spinner-'+ type + '-' + size}}"></view>
</block> </block>
</view> </view>
<view wx:if="{{show}}" class="l-status-container l-class {{fullScreen ? 'content': ''}}" style="{{'background:'+bgColor}};{{fullScreen ?'align-items:center;':''}}" bind:tap="tapStatusShow"> <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}}"> <block wx:if="{{custom}}">
<slot/> <slot/>
</block> </block>
<block wx:else> <block wx:else>
<image wx:if="{{image}}" class="left-img l-image-class {{fullScreen ? 'image_margin_top': ''}}" src="{{image}}"></image> <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> <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:if="{{describe}}" class="status-text l-describe-class">{{describe}}</text>
<text wx:else class="status-text l-describe-class">{{typeText}}</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}}"> <l-button l-class="l-button-class button_margin_top" wx:if="{{buttonText}}">
<view>{{buttonText}}</view> <view>{{buttonText}}</view>
</l-button> </l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='network'}}"> <l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='network'}}">
<view>重新加载</view> <view>重新加载</view>
</l-button> </l-button>
<l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='cart'}}"> <l-button l-class="l-button-class button_margin_top" wx:if="{{!buttonText && type ==='cart'}}">
<view>去逛逛</view> <view>去逛逛</view>
</l-button> </l-button>
</block> </block>
</view> </view>
\ 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 {{'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 class="step-container l-step-class {{'step-container-'+direction}}">
<view wx:if="{{custom}}" class="step-custom"> <view wx:if="{{custom}}" class="step-custom">
<slot name="dot"/> <slot name="dot"/>
</view> </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)}}"> <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}}"/> <l-icon wx:if="{{icon}}" name="{{icon}}" size="{{iconSize}}" color="{{(currentStatus.setStatus(activeIndex,index,status))==='process'?'#3963BC':iconColor}}"/>
<block wx:if="{{!dot && !icon}}"> <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> <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 wx:else>{{index+1}}</block>
</block> </block>
</view> </view>
</view> </view>
<view class="step-content {{'step-content-'+direction}}"> <view class="step-content {{'step-content-'+direction}}">
<view class="l-title-class {{activeIndex===index?'step-title-process':'step-title'}}"> <view class="l-title-class {{activeIndex===index?'step-title-process':'step-title'}}">
{{title}} {{title}}
</view> </view>
<view class="l-describe-class step-describe"> <view class="l-describe-class step-describe">
{{describe}} {{describe}}
<slot name="describe"/> <slot name="describe"/>
</view> </view>
</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 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>
</view> </view>
<wxs module="currentStatus"> <wxs module="currentStatus">
var setStatus = function(activeIndex,index,status){ var setStatus = function(activeIndex,index,status){
if(activeIndex===index){ if(activeIndex===index){
return status || 'process' return status || 'process'
} else if(activeIndex>index){ } else if(activeIndex>index){
return 'finish' return 'finish'
}else{ }else{
return 'wait' return 'wait'
} }
} }
var statusStyle = function(activeIndex,index,color,status){ var statusStyle = function(activeIndex,index,color,status){
if(activeIndex===index){ if(activeIndex===index){
return status==='error'?'':('background-color:' + color) return status==='error'?'':('background-color:' + color)
} else if(activeIndex>index){ } else if(activeIndex>index){
return ('border-color:' + color + ';color:' + color) return ('border-color:' + color + ';color:' + color)
}else{ }else{
return '' return ''
} }
} }
var dotStyle = function(activeIndex,index,color){ var dotStyle = function(activeIndex,index,color){
if(activeIndex>=index){ if(activeIndex>=index){
return ('background-color:' + color) return ('background-color:' + color)
} else{ } else{
return '' return ''
} }
} }
module.exports = { module.exports = {
setStatus:setStatus, setStatus:setStatus,
statusStyle:statusStyle, statusStyle:statusStyle,
dotStyle:dotStyle dotStyle:dotStyle
} }
</wxs> </wxs>
\ No newline at end of file
<view class="l-class steps-container {{'steps-container-'+direction}}"> <view class="l-class steps-container {{'steps-container-'+direction}}">
<slot/> <slot/>
</view> </view>
\ No newline at end of file
<view class="l-sticky-item l-class"> <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 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"> <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> <slot name="header"></slot>
</view> </view>
<view class="l-sticky-item-body l-body-class"> <view class="l-sticky-item-body l-body-class">
<slot name="body"></slot> <slot name="body"></slot>
</view> </view>
</view> </view>
<view class="l-sticky l-class"> <view class="l-sticky l-class">
<slot></slot> <slot></slot>
</view> </view>
\ No newline at end of file
<view class="l-tabpanel-content"> <view class="l-tabpanel-content">
<slot></slot> <slot></slot>
</view> </view>
\ 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':''}}"> <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':''}}"> <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-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"> <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"/> <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}}"/> <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}} {{item.tab}}
<slot wx:if="{{!item.tab}}" name="{{item.key+'.tab'}}"></slot> <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 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>
</view> </view>
</scroll-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 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);':''}}"> <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> <slot name="{{item.key}}"></slot>
</view> </view>
</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 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"> <swiper-item class="l-tabpanel {{item.key===activeKey?'l-tabpanel-active':''}}" wx:for="{{tabList}}" wx:key="key">
<slot name="{{item.key}}"></slot> <slot name="{{item.key}}"></slot>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view style="display:flex"> <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="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':''}}"> <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}}"/> <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> <image style="{{location==='left'?'margin-right:5rpx':'margin-left:5rpx'}}" wx:if="{{image}}" src="{{image}}" class="{{'tag-image-'+size}} l-image-class"></image>
<slot/> <slot/>
</view> </view>
</view> </view>
</view> </view>
<label class='form-item {{disabled? "disabled": ""}}'> <label class='form-item {{disabled? "disabled": ""}}'>
<view class='default-border {{border? "border": ""}} l-class'> <view class='default-border {{border? "border": ""}} l-class'>
<view class="mask" wx:if="{{disabled}}"></view> <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"/> <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 class="indicator" wx:if="{{indicator}}">{{value.length + '/' + maxlength}}</view>
</view> </view>
</label> </label>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
import computeOffset from "../behaviors/computeOffset"; import computeOffset from "../behaviors/computeOffset";
import zIndex from "../behaviors/zIndex"; import zIndex from "../behaviors/zIndex";
import watchShow from "../behaviors/watchShow"; import watchShow from "../behaviors/watchShow";
Component({ Component({
behaviors: [computeOffset, zIndex, watchShow], behaviors: [computeOffset, zIndex, watchShow],
externalClasses: ["l-bg-class", "l-icon-class", "l-class", "l-image-class", "l-title-class "], externalClasses: ["l-bg-class", "l-icon-class", "l-class", "l-image-class", "l-title-class "],
properties: { properties: {
show: { show: {
type: Boolean, type: Boolean,
value: !1 value: !1
}, },
title: String, title: String,
icon: String, icon: String,
iconSize: String, iconSize: String,
iconColor: String, iconColor: String,
image: String, image: String,
placement: { placement: {
type: String, type: String,
value: "bottom" value: "bottom"
}, },
duration: { duration: {
type: Number, type: Number,
value: 1500 value: 1500
}, },
zIndex: { zIndex: {
type: Number, type: Number,
value: 777 value: 777
}, },
center: { center: {
type: Boolean, type: Boolean,
value: !0 value: !0
}, },
mask: { mask: {
type: Boolean, type: Boolean,
value: !1 value: !1
}, },
openApi: { openApi: {
type: Boolean, type: Boolean,
value: !0 value: !0
}, },
offsetX: Number, offsetX: Number,
offsetY: Number offsetY: Number
}, },
data: { data: {
status: !1, status: !1,
success: "", success: "",
fail: "", fail: "",
complete: "" complete: ""
}, },
observers: { observers: {
icon: function() {} icon: function() {}
}, },
attached() { attached() {
this.data.openApi && this.initToast() this.data.openApi && this.initToast()
}, },
pageLifetimes: { pageLifetimes: {
show() { show() {
this.data.openApi && this.initToast(), this.offsetMargin() this.data.openApi && this.initToast(), this.offsetMargin()
} }
}, },
methods: { methods: {
initToast() { initToast() {
wx.lin = wx.lin || {}, wx.lin.showToast = (e = {}) => { wx.lin = wx.lin || {}, wx.lin.showToast = (e = {}) => {
const { const {
title: t = "", title: t = "",
icon: o = "", icon: o = "",
image: s = "", image: s = "",
placement: i = "bottom", placement: i = "bottom",
duration: a = 1500, duration: a = 1500,
center: n = !0, center: n = !0,
mask: l = !1, mask: l = !1,
success: r = null, success: r = null,
complete: c = null, complete: c = null,
offsetX: h = 0, offsetX: h = 0,
offsetY: f = 0, offsetY: f = 0,
iconSize: m = "60", iconSize: m = "60",
iconColor: p = "" iconColor: p = ""
} = e; } = e;
console.log(e) console.log(e)
return this.setData({ return this.setData({
title: t, title: t,
icon: o, icon: o,
image: s, image: s,
placement: i, placement: i,
duration: a, duration: a,
center: n, center: n,
mask: l, mask: l,
success: r, success: r,
complete: c, complete: c,
offsetY: f, offsetY: f,
offsetX: h, offsetX: h,
iconSize: m, iconSize: m,
iconColor: p iconColor: p
}), this.changeStatus(), this }), this.changeStatus(), this
}, wx.lin.hideToast = () => { }, wx.lin.hideToast = () => {
this.setData({ this.setData({
status: !1 status: !1
}) })
} }
}, },
strlen(e) { strlen(e) {
for (var t = 0, o = 0; o < e.length; o++) { for (var t = 0, o = 0; o < e.length; o++) {
var s = e.charCodeAt(o); var s = e.charCodeAt(o);
s >= "0x0001" && s <= "0x007e" || "0xff60" <= s && s <= "0xff9f" ? t++ : t += 2 s >= "0x0001" && s <= "0x007e" || "0xff60" <= s && s <= "0xff9f" ? t++ : t += 2
} }
return t return t
}, },
doNothingMove() {}, doNothingMove() {},
onMaskTap() { onMaskTap() {
!0 !== this.data.locked && this.setData({ !0 !== this.data.locked && this.setData({
fullScreen: "hide", fullScreen: "hide",
status: "hide" status: "hide"
}), this.triggerEvent("lintap", !0, { }), this.triggerEvent("lintap", !0, {
bubbles: !0, bubbles: !0,
composed: !0 composed: !0
}) })
} }
} }
}); });
\ No newline at end of file
<view class="container {{mask?'containerShowMask':'containerNoMask'}}" hidden="{{!status}}" style="z-index:{{zIndex}}"> <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-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"> <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}}"/> <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}}"/> <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/> <slot wx:else/>
<text class="toast-text l-title-class toast-text-{{placement}}" style="{{placement || 'bottom' === 'bottom' ? icon || image? 'margin-top:10rpx' : '': '' }}">{{ title }}</text> <text class="toast-text l-title-class toast-text-{{placement}}" style="{{placement || 'bottom' === 'bottom' ? icon || image? 'margin-top:10rpx' : '': '' }}">{{ title }}</text>
</view> </view>
</view> </view>
\ No newline at end of file
.container { .container {
position: fixed; position: fixed;
} }
.containerNoMask { .containerNoMask {
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.containerShowMask { .containerShowMask {
height: 100%; height: 100%;
width: 100%; width: 100%;
top: 0; top: 0;
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 999; z-index: 999;
} }
.container .toast-bg { .container .toast-bg {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
} }
.container .toast-top { .container .toast-top {
flex-direction: column-reverse; flex-direction: column-reverse;
} }
.container .toast-right { .container .toast-right {
flex-direction: row; flex-direction: row;
} }
.container .toast-bottom { .container .toast-bottom {
flex-direction: column; flex-direction: column;
} }
.container .toast-left { .container .toast-left {
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.container .toast { .container .toast {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
max-width: 400rpx; max-width: 400rpx;
min-width: 280rpx; min-width: 280rpx;
min-height: 88rpx; min-height: 88rpx;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
border-radius: 12rpx; border-radius: 12rpx;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx 50rpx; padding: 30rpx 50rpx;
z-index: 999; z-index: 999;
} }
.container .toast .toast-icon { .container .toast .toast-icon {
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.container .toast .toast-icon-loading { .container .toast .toast-icon-loading {
animation: loading-fadein 1.5s linear 0s infinite; animation: loading-fadein 1.5s linear 0s infinite;
} }
.container .toast .toast-text { .container .toast .toast-text {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
} }
.container .toast .toast-text-right { .container .toast .toast-text-right {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
margin-left: 20rpx; margin-left: 20rpx;
} }
.container .toast .toast-text-left { .container .toast .toast-text-left {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 20rpx;
} }
.container .toast .toast-text-top { .container .toast .toast-text-top {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
@keyframes loading-fadein { @keyframes loading-fadein {
0% { 0% {
transform: rotate(0); transform: rotate(0);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
<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"> <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/> <slot/>
</view> </view>
<view class="l-class water-flow-container" wx:if="{{data.length!==0}}"> <view class="l-class water-flow-container" wx:if="{{data.length!==0}}">
<view class="water-column" style="margin-right:{{columnGap}}"> <view class="water-column" style="margin-right:{{columnGap}}">
<view id="left"> <view id="left">
<block wx:for="{{leftData}}" wx:key="index"> <block wx:for="{{leftData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/> <l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block> </block>
</view> </view>
</view> </view>
<view class="water-column"> <view class="water-column">
<view id="right"> <view id="right">
<block wx:for="{{rightData}}" wx:key="index"> <block wx:for="{{rightData}}" wx:key="index">
<l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/> <l-water-flow-item data-item="{{item}}" catch:tap="onTapItem" data="{{item}}"/>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
MIT License MIT License
Copyright (c) 2020 TaleLin Copyright (c) 2020 TaleLin
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}"> <l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
<view class="l-action-sheet"> <view class="l-action-sheet">
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}"> <view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
{{ title }} {{ title }}
</view> </view>
<view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}"> <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> <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':''}}"> <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}}"/> <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> <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> <text class="l-button-text">{{ item.name }}</text>
</view> </view>
</l-button> </l-button>
</view> </view>
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}"> <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}}"> <l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
<view class="l-item-button l-cancel-button">{{ cancelText }}</view> <view class="l-item-button l-cancel-button">{{ cancelText }}</view>
</l-button> </l-button>
</view> </view>
</view> </view>
</l-popup> </l-popup>
<wxs src="index.wxs" module="album"></wxs> <wxs src="index.wxs" module="album"></wxs>
<view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}"> <view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}">
<block wx:for="{{urls}}" wx:key="index"> <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}}"/> <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> </block>
</view> </view>
var containerStyle = function (urls, multipleSize, gapRow, gapColumn) { var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;' urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;'
if (urls.length === 2 || urls.length === 4) { 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);' 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 { } 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);' 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) { var blockClass = function (urls, horizontalScreen) {
if (urls.length === 1) { if (urls.length === 1) {
if (horizontalScreen) { if (horizontalScreen) {
return 'l-single-image-class' return 'l-single-image-class'
} else { } else {
return 'vertical l-single-image-class' return 'vertical l-single-image-class'
} }
} else { } else {
return 'l-multi-image-class' return 'l-multi-image-class'
} }
} }
var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) { var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
if (urls.length === 1) { if (urls.length === 1) {
if (horizontalScreen) { if (horizontalScreen) {
return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;' return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
} else { } else {
return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;' return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
} }
} else { } else {
return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;' return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
} }
} }
module.exports = { module.exports = {
containerStyle: containerStyle, containerStyle: containerStyle,
blockClass: blockClass, blockClass: blockClass,
blockStyle: blockStyle blockStyle: blockStyle
} }
<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"> <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}}"> <scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
<view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class"> <view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
<slot name="header"/> <slot name="header"/>
</view> </view>
<view class="content-arc-popup"> <view class="content-arc-popup">
<slot/> <slot/>
</view> </view>
</scroll-view> </scroll-view>
</l-popup> </l-popup>
\ No newline at end of file
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar"> <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"> <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"/> <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}}"/> <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"/> <image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
</view> </view>
<view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}"> <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"/> <open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
<text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text> <text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
</view> </view>
</view> </view>
<view class="l-badge" bindtap="handleTap"> <view class="l-badge" bindtap="handleTap">
<slot/> <slot/>
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view> <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> <view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
</block> </block>
</view> </view>
\ No newline at end of file
<label for="{{name}}" bindtap="handleTap" class="l-label-class"> <label for="{{name}}" bindtap="handleTap" class="l-label-class">
<block wx:if="{{special}}"> <block wx:if="{{special}}">
<view class="special-container l-class"> <view class="special-container l-class">
<slot/> <slot/>
</view> </view>
</block> </block>
<block wx:else> <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 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> <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}}"/> <l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
<slot/> <slot/>
</view> </view>
</block> </block>
</label> </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 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> </button>
\ No newline at end of file
<view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx"> <view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx">
<cover-view class="capsule-bar" style="background-color: {{bgColor}};"> <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="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-bar" style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};">
<cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view> <cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
</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 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-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-image class="icon-left" src="icons/capsule-left-{{capsuleColor}}.png"></cover-image>
</cover-view> </cover-view>
<cover-view class="line"></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-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-image class="icon-right" src="icons/capsule-right-{{capsuleColor}}.png"></cover-image>
</cover-view> </cover-view>
</cover-view> </cover-view>
</cover-view> </cover-view>
<view class="content-container"> <view class="content-container">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
<view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}"> <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'}}"> <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> <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"> <view class="card-content">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text> <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<slot/> <slot/>
</view> </view>
</block> </block>
<block wx:if="{{type ==='avatar'}}"> <block wx:if="{{type ==='avatar'}}">
<view class="card-avatar-top"> <view class="card-avatar-top">
<view class="card-avatar-left"> <view class="card-avatar-left">
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image> <image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
<view class="card-avatar"> <view class="card-avatar">
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text> <text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
<text class="describe">{{describe}}</text> <text class="describe">{{describe}}</text>
</view> </view>
</view> </view>
<slot name="more"/> <slot name="more"/>
</view> </view>
<slot/> <slot/>
</block> </block>
</view> </view>
\ No newline at end of file
<view class="l-class checkbox-group checkbox-group-{{placement}}"> <view class="l-class checkbox-group checkbox-group-{{placement}}">
<slot></slot> <slot></slot>
</view> </view>
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/> <l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
<view bind:tap="onCheckboxChangeTap" class="label label-{{placement}} label-placement-{{parentPlacement}} {{disabled ? 'label-disabled l-disabled-class' : 'l-class'}}"> <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}}"> <view class="checkbox" style="color:{{checked ? selectColor : (disabled ? disabledColor : color)}};font-size: {{size}}">
<slot wx:if="{{custom}}" name="icon"/> <slot wx:if="{{custom}}" name="icon"/>
<view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view> <view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view>
</view> </view>
<slot/> <slot/>
</view> </view>
<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 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 !== 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 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 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"> <view wx:if="{{showValue}}" class="l-value-class" style="color:{{valueColor?valueColor:''}};font-size:{{valueSize}}rpx">
{{displayPercent}}% {{displayPercent}}%
</view> </view>
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
<view class="container l-class"> <view class="container l-class">
<view bind:tap="onTapTitle" class="container-title l-title-class"> <view bind:tap="onTapTitle" class="container-title l-title-class">
<view style="{{disable?'color:#DEE2E6':''}}" wx:if="{{!customTitle}}">{{title}}</view> <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> <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> <slot name="title"></slot>
</view> </view>
<view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s"> <view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s">
<view class="container-body-wrapper l-body-class"> <view class="container-body-wrapper l-body-class">
<slot></slot> <slot></slot>
</view> </view>
</view> </view>
</view> </view>

633 Bytes | W: | H:

633 Bytes | W: | H:

pages/mine/image/inform.png
pages/mine/home/image/inform.png
pages/mine/image/inform.png
pages/mine/home/image/inform.png
  • 2-up
  • Swipe
  • Onion skin

17.4 KB | W: | H:

17.4 KB | W: | H:

pages/mine/image/mine.png
pages/mine/home/image/mine.png
pages/mine/image/mine.png
pages/mine/home/image/mine.png
  • 2-up
  • Swipe
  • Onion skin

3.61 KB | W: | H:

3.61 KB | W: | H:

pages/play/image/food.png
pages/play/home/image/food.png
pages/play/image/food.png
pages/play/home/image/food.png
  • 2-up
  • Swipe
  • Onion skin

719 Bytes | W: | H:

719 Bytes | W: | H:

pages/play/image/hotel-s.png
pages/play/home/image/hotel-s.png
pages/play/image/hotel-s.png
pages/play/home/image/hotel-s.png
  • 2-up
  • Swipe
  • Onion skin
This diff could not be displayed because it is too large.
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