Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gomezshui committed Mar 8, 2022
2 parents 8c5de23 + 94f872b commit f8003b6
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 一行最多 100 字符
printWidth: 100
printWidth: 120
# 使用 2 个空格缩进
tabWidth: 2
# 不使用缩进符,而使用空格
Expand Down
1 change: 1 addition & 0 deletions example/components/demo-block/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<t-button
t-class="demo-block__oper-btn"
size="large"
block
data-type="{{ btnItem.type }}"
bind:tap="clickHandle"
>
Expand Down
3 changes: 1 addition & 2 deletions example/pages/back-top/back-top.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page {
margin-top: 32rpx;

&-item {
margin-bottom: 32rpx;
margin: 0 32rpx 32rpx;

.t-class-button {
font-size: 32rpx;
Expand All @@ -17,7 +17,6 @@ page {
display: flex;
}


.skeleton-text {
border-radius: 16rpx;
}
Expand Down
48 changes: 42 additions & 6 deletions example/pages/back-top/back-top.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,46 @@
<view class="demo-section__desc">圆型返回顶部</view>
<view class="button-group">
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{0}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{0}}"
>
圆白底
</t-button>
</view>
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{1}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{1}}"
>
圆黑底
</t-button>
</view>
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{2}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{2}}"
>
圆白底纯图标
</t-button>
</view>
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{3}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{3}}"
>
圆黑底纯图标
</t-button>
</view>
Expand All @@ -30,12 +54,24 @@
<view class="demo-section__desc">半圆型返回顶部</view>
<view class="button-group">
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{4}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{4}}"
>
半圆白底
</t-button>
</view>
<view class="button-group-item">
<t-button t-class="t-class-button" size="large" bindtap="onBtnClick" data-index="{{5}}">
<t-button
t-class="t-class-button"
size="large"
block
bindtap="onBtnClick"
data-index="{{5}}"
>
半圆黑底
</t-button>
</view>
Expand Down
8 changes: 6 additions & 2 deletions example/pages/indexes/indexes.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
background-color: #fff;
font-size: 32rpx;
line-height: 48rpx;
color: rgba(0, 0, 0, .9);
color: rgba(0, 0, 0, 0.9);
padding: 48rpx 0rpx 96rpx 0rpx;
min-height: 100vh;

.box {
margin: 0 32rpx;
}

.sub-title {
margin-top: 40rpx;
font-weight: bold;
Expand All @@ -25,7 +29,7 @@
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(0, 0, 0, .9);
color: rgba(0, 0, 0, 0.9);
margin-bottom: 18px;
}
}
14 changes: 8 additions & 6 deletions example/pages/indexes/indexes.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<view class="demo-title">Indexes 索引</view>
<view class="demo-desc">用于页面中信息快速检索,可以根据目录中的页码快速找到所需的内容。</view>
<t-demo title="01 类型" desc="基础索引类型">
<t-button t-class="type-button" size="large" bind:tap="tapShowLetter">
<navigator url="/pages/indexes/display">字母索引</navigator>
</t-button>
<t-button t-class="type-button" size="large" bind:tap="tapShowNumber">
<navigator url="/pages/indexes/display">数字索引</navigator>
</t-button>
<view class="box">
<t-button t-class="type-button" variant="plain" size="large" block bind:tap="tapShowLetter">
<navigator url="/pages/indexes/display">字母索引</navigator>
</t-button>
<t-button t-class="type-button" variant="plain" size="large" block bind:tap="tapShowNumber">
<navigator url="/pages/indexes/display">数字索引</navigator>
</t-button>
</view>
</t-demo>
</view>
4 changes: 4 additions & 0 deletions example/pages/loading/loading.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ page {
font-size: 24rpx;
}

.box {
margin: 0 32rpx;
}

.t-slider__container {
margin: 0 32rpx;
}
Expand Down
8 changes: 5 additions & 3 deletions example/pages/loading/loading.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
<view class="demo-section__desc">加载失败</view>
<t-loading theme="error" class="loading-style" loading bind:reload="reloadPage"></t-loading>
<view class="demo-section__desc">进度条加载</view>
<t-button size="large" plain class="progress-btn" bind:tap="goToProgress"
>页面进度条加载</t-button
>
<view class="box">
<t-button size="large" plain class="progress-btn" block bind:tap="goToProgress"
>页面进度条加载</t-button
>
</view>
</t-demo>

<t-demo title="02 状态" desc="如果加载状态在延迟内结束,则不显示">
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
}
},
"lint-staged": {
"{src,example,script}/**/*.{js,ts,wxml,html,json,wxs}": [
"{src,example,script}/**/*.{js,ts,wxml,html,json,wxs,less}": [
"prettier --write"
],
"{src,example}/**/*.{js,ts}": [
Expand All @@ -102,4 +102,4 @@
"dependencies": {
"dayjs": "^1.10.7"
}
}
}
22 changes: 11 additions & 11 deletions src/popup/popup.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@import '../common/style/index.less';

@popup: ~"@{prefix}-popup";
@popup-position: ~"@{popup}--position";
@popup-transition: ~"@{popup}--transition";
@popup: ~'@{prefix}-popup';
@popup-position: ~'@{popup}--position';
@popup-transition: ~'@{popup}--transition';

.@{popup} {
position: fixed;
z-index: 2500;
z-index: 1500;
top: 0;
left: 0;
display: flex;
Expand All @@ -21,7 +21,7 @@
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
background-color: rgba(0, 0, 0, 0.6);
}

&__content {
Expand Down Expand Up @@ -72,7 +72,7 @@

.@{popup}__content {
opacity: 0;
transform: scale(.8);
transform: scale(0.8);
}

&.@{popup-position}-top {
Expand Down Expand Up @@ -103,13 +103,13 @@
&.@{popup-transition}-enter-to {
.@{popup}__overlay {
opacity: 1;
transition: opacity .3s;
transition: opacity 0.3s;
}

.@{popup}__content {
opacity: 1;
transform: none;
transition: opacity .3s, transform .3s;
transition: opacity 0.3s, transform 0.3s;
}

&.@{popup-position}-top {
Expand Down Expand Up @@ -175,13 +175,13 @@
&.@{popup-transition}-leave-to {
.@{popup}__overlay {
opacity: 0;
transition: opacity .3s;
transition: opacity 0.3s;
}

.@{popup}__content {
opacity: 0;
transform: scale(.8);
transition: opacity .3s, transform .3s;
transform: scale(0.8);
transition: opacity 0.3s, transform 0.3s;
}

&.@{popup-position}-top {
Expand Down

0 comments on commit f8003b6

Please sign in to comment.