Skip to content

Commit bca7ced

Browse files
committed
修复无法自动收缩问题
1 parent 208d440 commit bca7ced

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import EventHandler from "../../modules/event-handler.js"
33

44
export function init(id, invoke, callback) {
55
const el = document.getElementById(id)
6+
const headerEl = el.querySelector('.ribbon-header')
67
const rt = {
7-
element: el, invoke, callback,
8+
element: el, headerEl, invoke, callback,
89
handlerClick: e => {
9-
const isFloat = el.classList.contains('is-float')
10+
const isFloat = headerEl.classList.contains('is-float')
1011
if (isFloat) {
11-
const expanded = el.classList.contains('is-expand')
12+
const expanded = headerEl.classList.contains('is-expand')
1213
if (expanded) {
1314
const ribbonBody = e.target.closest('.ribbon-body');
1415
if (ribbonBody) {

0 commit comments

Comments
 (0)