Skip to content

Commit

Permalink
fix(navbar): css standard
Browse files Browse the repository at this point in the history
  • Loading branch information
jin0209 committed Dec 15, 2021
1 parent cde562f commit 249af24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/navbar/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@

&--visible-animation {
opacity: 1;
transition: opacity .3s cubic-bezier(.645, .045, .355, 1);
transition: opacity .3s cubic-bezier(.645, .045, .355, 1);
transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

&--hide-animation {
opacity: 0;
transition: opacity .3s cubic-bezier(.645, .045, .355, 1);
transition: opacity .3s cubic-bezier(.645, .045, .355, 1);
transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

&--hide {
Expand Down Expand Up @@ -100,7 +100,7 @@
top: 12rpx;
bottom: 12rpx;
left: 0;
background-color: rgba(0, 0, 0, .2);
background-color: rgba(0, 0, 0, 0.2);
width: 1px;
}
}
Expand All @@ -110,7 +110,7 @@
}
}

&__icon {
&-icon {
display: flex;
align-items: center;
}
Expand All @@ -130,7 +130,7 @@
justify-content: center;
overflow: hidden;

&_title {
&-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
Expand Down
10 changes: 5 additions & 5 deletions src/navbar/navbar.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<t-icon
wx:if="{{leftIcon!=='slot'}}"
name="{{leftIcon}}"
class="{{classPrefix}}__capsule__icon t-class-left-icon"
class="{{classPrefix}}__capsule-icon t-class-left-icon"
/>
<slot name="left-icon" class="t-class-left-icon"></slot>
</view>
<view class="{{classPrefix}}__btn t-class-nav-btn" bindtap="goHome">
<t-icon
wx:if="{{homeIcon!=='slot'}}"
name="{{homeIcon}}"
class="{{classPrefix}}__capsule__icon t-class-home-icon"
class="{{classPrefix}}__capsule-icon t-class-home-icon"
/>
<slot name="home-icon" class="t-class-home-icon"></slot>
</view>
Expand All @@ -31,15 +31,15 @@
<t-icon
wx:if="{{leftIcon!=='slot'}}"
name="{{leftIcon}}"
class="{{classPrefix}}__capsule__icon t-class-left-icon"
class="{{classPrefix}}__capsule-icon t-class-left-icon"
/>
<slot name="left-icon" class="t-class-left-icon"></slot>
</view>
<view wx:if="{{hasHomeIcon}}" class="{{classPrefix}}__btn" bindtap="goHome">
<t-icon
wx:if="{{homeIcon!=='slot'}}"
name="{{homeIcon}}"
class="{{classPrefix}}__capsule__icon t-class-home-icon"
class="{{classPrefix}}__capsule-icon t-class-home-icon"
/>
<slot name="home-icon" class="t-class-home-icon"></slot>
</view>
Expand All @@ -48,7 +48,7 @@
<view class="{{classPrefix}}__center t-class-center">
<block wx:if="{{title}}">
<slot wx:if="{{title === 'slot'}}" name="title" class="t-class-title"></slot>
<text wx:else class="{{classPrefix}}__center_title t-class-title">{{showTitle}}</text>
<text wx:else class="{{classPrefix}}__center-title t-class-title">{{showTitle}}</text>
</block>
</view>
</block>
Expand Down

0 comments on commit 249af24

Please sign in to comment.