Skip to content

Commit

Permalink
Merge pull request #398 from ielgnaw/staging
Browse files Browse the repository at this point in the history
bugfix: 修复 tooltip 弹层中无法滚动的问题 && bump to 2.5.5
  • Loading branch information
ielgnaw authored May 29, 2023
2 parents 7e5b103 + d4b3eba commit 2147150
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
8 changes: 8 additions & 0 deletions example/components/changelog/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

<div class="changelog-wrapper">

### 2.5.5 {page=#/changelog}
###### 2023.05.29

* **[fix]**:
- 修复 tooltip 弹层中无法滚动的问题

---

### 2.5.4 {page=#/changelog}
###### 2023.05.26

Expand Down
2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<meta name="format-detection" content="telephone=no, email=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="referrer" content="never" />
<title>MagicBox-Vue 组件库 | 腾讯蓝鲸智云</title>
<title>MagicBox-Vue2 组件库 | 腾讯蓝鲸智云</title>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bk-magic-vue",
"version": "2.5.4",
"version": "2.5.5",
"description": "基于蓝鲸 Magicbox 和 Vue 的前端组件库",
"main": "dist/bk-magic-vue.min.js",
"files": [
Expand Down
13 changes: 7 additions & 6 deletions src/utils/tippy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,12 +910,13 @@ function createTippy(reference, collectionProps) {
}
});

// 在 tooltips 上禁用鼠标滚轮默认事件
addWheelListener(popper, function (event) {
const ev = event || window.event
ev.stopPropagation && ev.stopPropagation()
ev.preventDefault && ev.preventDefault()
}, false)
// 在 tooltips 上禁用鼠标滚轮默认事件(禁止后,下拉框等使用到 tooltip 渲染弹层的组件无法滚动)
// addWheelListener(popper, function (event) {
// console.error(popper);
// const ev = event || window.event
// ev.stopPropagation && ev.stopPropagation()
// ev.preventDefault && ev.preventDefault()
// }, false)

return instance;
/* ======================= 🔒 Private methods 🔒 ======================= */
Expand Down

0 comments on commit 2147150

Please sign in to comment.