Skip to content

Commit

Permalink
fix: 不禁止默认事件,要不然menu点击无效
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwei committed May 17, 2024
1 parent 2573a63 commit 43d1096
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
36 changes: 23 additions & 13 deletions src/client/router/Layout/Menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@
<div class="menu-box">
<div class="title">电脑壁纸</div>
<div class="menu">
<div class="item" :class="{ itemActive: currentKey === '/index' }" @click="handleClick({ key: '/index' })">
<div
class="item"
:class="{ itemActive: currentKey === '/index' }"
@click="handleClick({ key: '/index' })">
最新壁纸
</div>
<div class="item category" :class="{ itemActive: currentKey.includes('cid=') }">
<div
class="item category"
:class="{ itemActive: currentKey.includes('cid=') }">
分类壁纸
<Category class="category-box" />
</div>
<div class="item" :class="{ itemActive: currentKey === '/bing' }" @click="handleClick({ key: '/bing' })">
<div
class="item"
:class="{ itemActive: currentKey === '/bing' }"
@click="handleClick({ key: '/bing' })">
必应美图
</div>
</div>
Expand Down Expand Up @@ -59,16 +67,18 @@ function handleClick({ key }) {
}
.title {
background-image: -webkit-gradient(linear,
left top,
right bottom,
color-stop(0, #f22),
color-stop(0.15, #f2f),
color-stop(0.3, #22f),
color-stop(0.45, #2ff),
color-stop(0.6, #2f2),
color-stop(0.85, #ff2),
color-stop(1, #f22));
background-image: -webkit-gradient(
linear,
left top,
right bottom,
color-stop(0, #f22),
color-stop(0.15, #f2f),
color-stop(0.3, #22f),
color-stop(0.45, #2ff),
color-stop(0.6, #2f2),
color-stop(0.85, #ff2),
color-stop(1, #f22)
);
color: transparent;
background-clip: text;
font-size: 28px;
Expand Down
6 changes: 3 additions & 3 deletions src/client/views/bing/components/FullpageScroll/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const handleMouseWheel = (e) => {
} else if (e.wheelDelta > 30 && !inMove.value) {
moveDown();
}
e.preventDefault();
// e.preventDefault();
return false;
};
Expand Down Expand Up @@ -84,12 +84,12 @@ const handleMouseWheelDOM = (e) => {
const touchStartY = ref(0);
const touchStart = (e) => {
e.preventDefault();
// e.preventDefault();
touchStartY.value = e.touches[0].clientY;
};
const touchMove = (e) => {
if (inMove.value) return false;
e.preventDefault();
// e.preventDefault();
const currentY = e.touches[0].clientY;
Expand Down

0 comments on commit 43d1096

Please sign in to comment.