Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
561ec67b
Commit
561ec67b
authored
Dec 04, 2019
by
Junling Bu
Browse files
feat[litemall-wx]: 采用vant-weapp tag组件
parent
52c0f60d
Changes
54
Show whitespace changes
Inline
Side-by-side
litemall-wx/lib/vant-weapp/wxs/object.wxs
0 → 100644
View file @
561ec67b
/* eslint-disable */
var REGEXP = getRegExp('{|}|"', 'g');
function keys(obj) {
return JSON.stringify(obj)
.replace(REGEXP, '')
.split(',')
.map(function(item) {
return item.split(':')[0];
});
}
module.exports.keys = keys;
litemall-wx/lib/vant-weapp/wxs/utils.wxs
0 → 100644
View file @
561ec67b
var bem = require('./bem.wxs').bem;
var memoize = require('./memoize.wxs').memoize;
module.exports = {
bem: memoize(bem),
memoize: memoize
};
litemall-wx/lib/zanui-weapp/capsule/index.js
deleted
100644 → 0
View file @
52c0f60d
'
use strict
'
;
Component
({
externalClasses
:
[
'
custom-class
'
],
/**
* 组件的属性列表
* 用于组件自定义设置
*/
properties
:
{
// 颜色状态
type
:
{
type
:
String
,
value
:
''
},
// 自定义颜色
color
:
{
type
:
String
,
value
:
''
},
// 左侧内容
leftText
:
{
type
:
String
,
value
:
''
},
// 右侧内容
rightText
:
{
type
:
String
,
value
:
''
}
}
});
\ No newline at end of file
litemall-wx/lib/zanui-weapp/capsule/index.wxml
deleted
100644 → 0
View file @
52c0f60d
<view class="custom-class zan-capsule zan-capsule--{{type}}">
<block wx:if="{{color}}">
<view class="zan-capsule__left" style="background: {{ color }}; border-color: {{ color }}">{{ leftText }}</view>
<view class="zan-capsule__right" style="color: {{ color }}; border-color: {{ color }}">{{ rightText }}</view>
</block>
<block wx:else>
<view class="zan-capsule__left">{{ leftText }}</view>
<view class="zan-capsule__right">{{ rightText }}</view>
</block>
</view>
\ No newline at end of file
litemall-wx/lib/zanui-weapp/capsule/index.wxss
deleted
100644 → 0
View file @
52c0f60d
.zan-capsule {
display: inline-block;
font-size: 12px;
vertical-align: middle;
line-height: 19px;
-webkit-transform: scale(0.83);
transform: scale(0.83);
}
.zan-capsule__left, .zan-capsule__right {
display: inline-block;
line-height: 17px;
height: 19px;
vertical-align: middle;
box-sizing: border-box;
}
.zan-capsule__left {
padding: 0 2px;
color: #fff;
background: #999;
border-radius: 2px 0 0 2px;
border: 1rpx solid #999;
}
.zan-capsule__right {
padding: 0 5px;
color: #999;
border-radius: 0 2px 2px 0;
border: 1rpx solid #999;
}
.zan-capsule--danger .zan-capsule__left {
color: #fff;
background: #f24544;
border-color: #f24544;
}
.zan-capsule--danger .zan-capsule__right {
color: #f24544;
border-color: #f24544;
}
litemall-wx/pages/groupon/grouponList/grouponList.json
View file @
561ec67b
{
"navigationBarTitleText"
:
"团购专区"
,
"usingComponents"
:
{
"zan-capsule"
:
"/lib/zanui-weapp/capsule/index"
}
"navigationBarTitleText"
:
"团购专区"
}
\ No newline at end of file
litemall-wx/pages/groupon/grouponList/grouponList.wxml
View file @
561ec67b
...
...
@@ -8,9 +8,7 @@
<view class="text">
<view class="header">
<text class="name">{{item.name}}</text>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="{{item.grouponMember}}人成团" rightText="立减{{item.grouponDiscount}}" />
</view>
<van-tag type="warning">{{item.grouponMember}}人成团</van-tag>
</view>
<text class="desc">{{item.brief}}</text>
<view class="price">
...
...
litemall-wx/pages/groupon/grouponList/grouponList.wxss
View file @
561ec67b
...
...
@@ -54,16 +54,6 @@ page, .container {
font-size: 30rpx;
}
.groupon-list .capsule-tag {
float: right;
padding-right: 0rpx;
padding-top: 8rpx;
}
.groupon-list .zan-capsule + .zan-capsule {
margin-left: 10px;
}
.groupon-list .desc {
width: 476rpx;
display: block;
...
...
litemall-wx/pages/groupon/myGroupon/myGroupon.json
View file @
561ec67b
{
"navigationBarTitleText"
:
"我的团购"
,
"usingComponents"
:
{
"zan-capsule"
:
"../../../lib/zanui-weapp/capsule/index"
}
"navigationBarTitleText"
:
"我的团购"
}
\ No newline at end of file
litemall-wx/pages/groupon/myGroupon/myGroupon.wxml
View file @
561ec67b
...
...
@@ -40,12 +40,8 @@
</view>
<view class="b">
<view class="l">实付:¥{{item.actualPrice}}</view>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="状态" rightText="{{item.joinerCount>=item.rules.discountMember?'已达成':'团购中'}}" />
</view>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="发起" rightText="{{item.creator}}" wx:if="{{!item.isCreator}}" />
</view>
<van-tag type="primary">{{item.joinerCount>=item.rules.discountMember?'已达成':'团购中'}}</van-tag>
<van-tag round type="warning" wx:if="{{!item.isCreator}}">{{item.creator}}发起</van-tag>
</view>
</navigator>
</view>
...
...
litemall-wx/pages/groupon/myGroupon/myGroupon.wxss
View file @
561ec67b
...
...
@@ -4,15 +4,6 @@ page {
background: #f4f4f4;
}
.capsule-tag {
float: right;
/* padding-right: 10rpx; */
}
.zan-capsule + .zan-capsule {
margin-left: 5px;
}
.orders-switch {
width: 100%;
background: #fff;
...
...
litemall-wx/pages/index/index.json
View file @
561ec67b
{
"navigationBarTitleText"
:
"首页"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"zan-capsule"
:
"../../lib/zanui-weapp/capsule/index"
}
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
litemall-wx/pages/index/index.wxml
View file @
561ec67b
...
...
@@ -72,9 +72,7 @@
<view class="text">
<view class="header">
<text class="name">{{item.name}}</text>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="{{item.grouponMember}}人成团" rightText="立减{{item.grouponDiscount}}" />
</view>
<van-tag type="warning">{{item.grouponMember}}人成团</van-tag>
</view>
<text class="desc">{{item.brief}}</text>
<view class="price">
...
...
litemall-wx/pages/index/index.wxss
View file @
561ec67b
...
...
@@ -242,16 +242,6 @@
font-size: 30rpx;
}
.a-groupon .capsule-tag {
float: right;
padding-right: 0rpx;
padding-top: 8rpx;
}
.a-groupon .zan-capsule + .zan-capsule {
margin-left: 10px;
}
.a-groupon .b .desc {
width: 476rpx;
display: block;
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment