Skip to content

Commit 60b07e5

Browse files
feat: ✨ 移除 Navbar 点击热区的激活态样式
Closes: #511
1 parent 20148a7 commit 60b07e5

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

docs/component/navbar.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ function handleBackHome() {
136136
align-items: center;
137137
--wot-search-padding: 0;
138138
--wot-search-side-padding: 0;
139+
:deep() {
140+
.wd-search {
141+
background: transparent;
142+
}
143+
}
139144
}
140145
```
141146

src/pages/navbar/Index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
* @Author: weisheng
33
* @Date: 2023-10-17 17:20:31
4-
* @LastEditTime: 2024-03-04 12:48:00
4+
* @LastEditTime: 2024-10-12 12:47:30
55
* @LastEditors: weisheng
66
* @Description:
77
* @FilePath: \wot-design-uni\src\pages\navbar\Index.vue
@@ -89,5 +89,10 @@ function handleBackHome() {
8989
align-items: center;
9090
--wot-search-padding: 0;
9191
--wot-search-side-padding: 0;
92+
:deep() {
93+
.wd-search {
94+
background: transparent;
95+
}
96+
}
9297
}
9398
</style>

src/uni_modules/wot-design-uni/components/wd-navbar/index.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
@include e(text) {
1313
color: $-dark-color;
14-
@include m(hover){
15-
background-color: $-dark-background3;
16-
}
1714
}
1815

1916
:deep(.wd-navbar__arrow) {
@@ -72,17 +69,8 @@
7269
left: 0;
7370
}
7471

75-
@include e(left) {
76-
@include m(hover){
77-
background-color: $-navbar-hover-color;
78-
}
79-
}
80-
8172
@include e(right) {
8273
right: 0;
83-
@include m(hover){
84-
background-color: $-navbar-hover-color;
85-
}
8674
}
8775

8876
@include edeep(arrow) {

src/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
<slot name="capsule" />
77
</view>
88

9-
<view
10-
:class="`wd-navbar__left ${leftDisabled ? 'is-disabled' : ''}`"
11-
:hover-class="leftDisabled || $slots.left ? '' : 'wd-navbar__left--hover'"
12-
:hover-stay-time="70"
13-
@click="handleClickLeft"
14-
v-else-if="!$slots.left"
15-
>
9+
<view :class="`wd-navbar__left ${leftDisabled ? 'is-disabled' : ''}`" @click="handleClickLeft" v-else-if="!$slots.left">
1610
<wd-icon v-if="leftArrow" name="arrow-left" custom-class="wd-navbar__arrow" />
1711
<view v-if="leftText" class="wd-navbar__text">{{ leftText }}</view>
1812
</view>
@@ -25,13 +19,7 @@
2519
<slot name="title" />
2620
<block v-if="!$slots.title && title">{{ title }}</block>
2721
</view>
28-
<view
29-
:class="`wd-navbar__right ${rightDisabled ? 'is-disabled' : ''}`"
30-
@click="handleClickRight"
31-
v-if="$slots.right || rightText"
32-
:hover-class="rightDisabled ? '' : 'wd-navbar__right--hover'"
33-
:hover-stay-time="70"
34-
>
22+
<view :class="`wd-navbar__right ${rightDisabled ? 'is-disabled' : ''}`" @click="handleClickRight" v-if="$slots.right || rightText">
3523
<slot name="right" />
3624

3725
<view v-if="!$slots.right && rightText" class="wd-navbar__text" hover-class="wd-navbar__text--hover" :hover-stay-time="70">

0 commit comments

Comments
 (0)