Browse Source

Pull request #3426: KERNEL-14222 fix: 无法弹出bubble

Merge in VISUAL/fineui from ~IMPACT/fine-ui:es6 to es6

* commit '8e6e978c11e170b8217c08f86bd901057302ed5c':
  KERNEL-14222 fix: 无法弹出bubble
es6
Impact-吴家豪 2 years ago
parent
commit
cfd68d1651
  1. 4
      src/base/single/button/button.basic.js
  2. 34
      src/case/combo/bubblecombo/popup.bubble.js
  3. 2
      src/case/combo/index.js

4
src/base/single/button/button.basic.js

@ -23,7 +23,7 @@ import {
} from "@/core"; } from "@/core";
import { BubbleCombo } from "@/case/combo/bubblecombo/combo.bubble"; import { BubbleCombo } from "@/case/combo/bubblecombo/combo.bubble";
import { Single } from "../0.single"; import { Single } from "../0.single";
import { BubblePopupView, BubblePopupBarView } from "@/case/combo/bubblecombo/popup.bubble"; import { BubblePopupBarView, TextBubblePopupBarView } from "@/case/combo/bubblecombo/popup.bubble";
/** /**
* guy * guy
@ -199,7 +199,7 @@ export class BasicButton extends Single {
height: "100%", height: "100%",
}, },
popup: { popup: {
type: BubblePopupView.xtype, type: TextBubblePopupBarView.xtype,
text: getBubble(), text: getBubble(),
ref: _ref => { ref: _ref => {
popup = _ref; popup = _ref;

34
src/case/combo/bubblecombo/popup.bubble.js

@ -1,40 +1,24 @@
import { shortcut, extend, i18nText, each, isWidget, createWidget } from "@/core"; import { shortcut, extend, i18nText, each, isWidget, createWidget } from "@/core";
import { PopupView } from "@/base/layer/layer.popup"; import { PopupView } from "@/base/layer/layer.popup";
import { Button } from "@/base";
import { Label } from "@/base/single/label/label"; import { Label } from "@/base/single/label/label";
@shortcut() @shortcut()
export class BubblePopupView extends PopupView { export class BubblePopupView extends PopupView {
static xtype = "bi.bubble_popup_view"; static xtype = "bi.bubble_popup_view";
static EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
static EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
_defaultConfig() { _defaultConfig() {
const config = super._defaultConfig(...arguments); const config = super._defaultConfig(...arguments);
return extend(config, { return extend(config, {
baseCls: `${config.baseCls} bi-text-bubble-bar-popup-view`, baseCls: `${config.baseCls} bi-bubble-popup-view`,
text: "", minWidth: 70,
maxWidth: 300,
// minHeight: 50,
showArrow: true,
}); });
} }
_createContent() {
const o = this.options;
return {
type: Label.xtype,
text: o.text,
whiteSpace: "normal",
textAlign: "left",
ref: _ref => {
this.text = _ref;
},
};
}
populate(v) {
this.text.setText(v || this.options.text);
}
} }
@shortcut() @shortcut()
@ -72,7 +56,7 @@ export class BubblePopupBarView extends BubblePopupView {
} else { } else {
items.push({ items.push({
el: extend({ el: extend({
type: "bi.button", type: Button.xtype,
height: 24, height: 24,
handler: v => { handler: v => {
this.fireEvent(BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); this.fireEvent(BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
@ -131,7 +115,7 @@ export class TextBubblePopupBarView extends BubblePopupBarView {
const o = this.options; const o = this.options;
return { return {
type: "bi.label", type: Label.xtype,
text: o.text, text: o.text,
whiteSpace: "normal", whiteSpace: "normal",
textAlign: "left", textAlign: "left",

2
src/case/combo/index.js

@ -1,5 +1,5 @@
export { BubbleCombo } from "./bubblecombo/combo.bubble"; export { BubbleCombo } from "./bubblecombo/combo.bubble";
export { BubblePopupView } from "./bubblecombo/popup.bubble"; export { BubblePopupView, BubblePopupBarView, TextBubblePopupBarView } from "./bubblecombo/popup.bubble";
export { EditorIconCheckCombo } from "./editoriconcheckcombo/combo.editiconcheck"; export { EditorIconCheckCombo } from "./editoriconcheckcombo/combo.editiconcheck";

Loading…
Cancel
Save