Skip to content

Commit e90a320

Browse files
authored
Merge pull request #510 from TaleLin/develop
feat:增加grid、list等组件hover效果
2 parents f54f0cf + 3dd73cf commit e90a320

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+352
-136
lines changed

build/release.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
git checkout master
2+
git merge develop
3+
4+
echo "Select a option to release (input a serial number):"
5+
echo
6+
7+
select VERSION in patch minor major "Specific Version"
8+
do
9+
echo
10+
if [[ $REPLY =~ ^[1-4]$ ]]; then
11+
if [[ $REPLY == 4 ]]; then
12+
read -p "Enter a specific version: " -r VERSION
13+
echo
14+
if [[ -z $REPLY ]]; then
15+
VERSION=$REPLY
16+
fi
17+
fi
18+
19+
read -p "Release $VERSION - are you sure? (y/n) " -n 1 -r
20+
echo
21+
22+
if [[ $REPLY =~ ^[Yy]$ || -z $REPLY ]];
23+
then
24+
npm run build
25+
26+
if [[ `git status --porcelain` ]];
27+
then
28+
git add -A
29+
git commit -am "build: compile $VERSION"
30+
fi
31+
# bump version
32+
npm version $VERSION
33+
NEW_VERSION=$(node -p "require('./package.json').version")
34+
35+
# npm release
36+
npm publish
37+
38+
echo Releasing ${NEW_VERSION} ...
39+
40+
echo "✅ Released to npm."
41+
42+
# github release
43+
git add -A
44+
git commit -m "release v${NEW_VERSION}"
45+
git origin master
46+
git push origin refs/tags/v${NEW_VERSION}
47+
48+
# async develop
49+
git checkout develop
50+
git rebase master
51+
git push origin develop
52+
53+
echo "✅ Released to Github."
54+
else
55+
echo Cancelled
56+
fi
57+
break
58+
else
59+
echo Invalid \"${REPLY}\"
60+
echo "To continue, please input a serial number(1-4) of an option."
61+
echo
62+
fi
63+
done

dist/action-sheet/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import zIndex from '../behaviors/zIndex';
2+
import hover from '../behaviors/hover';
23

34
Component({
4-
behaviors: [zIndex],
5+
behaviors: [zIndex,hover],
56
externalClasses: ['l-class-title', 'l-class-item', 'l-class-cancel','l-title-class','l-item-class','l-cancel-class'],
67
properties: {
78
locked: Boolean,

dist/action-sheet/index.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
44
{{ title }}
55
</view>
6-
<view class="" wx:for="{{ itemList }}" wx:key="{{ item.name }}">
6+
<view wx:for="{{ itemList }}" wx:key="{{ item.name }}" hover-class="{{isHover?'list-hover':''}}">
77
<l-button bind:lintap="handleClickItem" data-index="{{ index }}" data-item="{{ item }}" open-type="{{ item.openType }}" icon="{{ item.icon }}" type="ghost" size="large" special="{{true}}" long>
88
<view style="{{ item.color ? 'color: ' + item.color : '' }}" class="l-item-button l-class-item l-item-class {{item.image || item.icon ? 'l-image-button':''}}">
99
<image wx:if="{{item.image}}" class="l-button-image" src="{{item.image}}" style="{{item.imageStyle}}"/>
@@ -17,7 +17,7 @@
1717
</view>
1818
</l-button>
1919
</view>
20-
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}">
20+
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}">
2121
<l-button type="ghost" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
2222
<view class="l-item-button l-cancel-button">{{ cancelText }}</view>
2323
</l-button>

dist/action-sheet/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>text{margin-left:20rpx}
1+
.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>text{margin-left:20rpx}.list-hover{opacity:.8}

dist/avatar/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Component({
22
externalClasses: [
3-
'l-class',
3+
'l-class',
44
'l-class-text',
55
'l-text-class'
66
],
@@ -48,7 +48,7 @@ Component({
4848
this._isHaveUserAvatarUrl(openData);
4949
this._isHaveUserNickName(openData);
5050
},
51-
51+
5252
_isHaveUserAvatarUrl: function (openData) {
5353
this.setData({
5454
_isHaveUserAvatarUrl: openData.indexOf('userAvatarUrl') !== -1
@@ -61,9 +61,10 @@ Component({
6161
});
6262
},
6363
tapAvatar: function (e) {
64-
this.triggerEvent('lintap', {
65-
e
66-
}, { bubbles: true, composed: true });
64+
this.triggerEvent('lintap', e, {
65+
bubbles: true,
66+
composed: true
67+
});
6768
},
6869
}
6970
});

dist/badge/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;transform:translateX(50%);background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx;right:-14rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx;right:-2rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}
1+
.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}

dist/behaviors/hover.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// eslint-disable-next-line no-undef
2+
export default Behavior({
3+
behaviors: [],
4+
properties: {
5+
isHover:{
6+
type: Boolean,
7+
value: true
8+
}
9+
}
10+
});

dist/button/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Component({
6464
methods: {
6565
// button点击事件
6666
handleTap() {
67-
if (this.data.disabled) return false;
67+
if (this.data.disabled || this.data.loading) return false;
6868
this.triggerEvent('lintap', {}, {
6969
bubbles: true,
7070
composed: true

dist/count-selector/index.wxml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<view class="l-class container-count">
22
<view class="symbol {{result<=min|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}"
33
catchtap="{{result<=min|| disabled?'doNothing':'reduceTap'}}"
4-
data-type="overflow_min">
4+
data-type="overflow_min"
5+
hover-class="count-hover">
56
<view class="l-icon l-icon-reduce" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
67
</view>
78
<input wx:if="{{focus}}"
@@ -14,7 +15,8 @@
1415
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
1516
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}"
1617
catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}"
17-
data-type="overflow_max">
18+
data-type="overflow_max"
19+
hover-class="count-hover">
1820
<view class="l-icon l-icon-add" style="font-size:{{iconSize}};color:{{iconColor}}"></view>
1921
</view>
2022
</view>

dist/count-selector/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}
1+
.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8}

0 commit comments

Comments
 (0)