Browse Source

Pull request #3133: KERNEL-13123 feat: combo trigger支持 hover-click

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'daee5f31b8a51f5cc25ea1edb2895596619681db':
  无JIRA chore: 描述
  KERNEL-13123 feat: combo trigger支持 hover-click
es6
Dailer-刘荣歆 2 years ago
parent
commit
b3540cf335
  1. 11
      src/base/combination/bubble.js
  2. 4
      typescript/core/platform/web/detectElementResize.ts

11
src/base/combination/bubble.js

@ -12,7 +12,7 @@
attributes: {
tabIndex: -1,
},
trigger: "click", // click || hover || click-hover || ""
trigger: "click", // click || hover || click-hover || "hover-click" || ""
toggle: true,
direction: "",
placement: "bottom-start", // top-start/top/top-end/bottom-start/bottom/bottom-end/left-start/left/left-end/right-start/right/right-end
@ -219,6 +219,15 @@
}
});
break;
case "hover-click":
self.element.on("mouseenter." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
self._popupView(e);
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo);
self.fireEvent(BI.Bubble.EVENT_EXPAND);
}
});
break;
default:
break;
}

4
typescript/core/platform/web/detectElementResize.ts

@ -2,5 +2,5 @@ import { Widget } from "../../../core/widget";
export type _DetectElementResize = {
addResizeListener: (widget: Widget, fn: Function) => Function
removeResizeListener: (widget: Widget, fn: Function) => void
}
removeResizeListener: (widget: Widget, fn?: Function) => void
}

Loading…
Cancel
Save