Browse Source

KERNEL-14222 fix: 无法弹出bubble

es6
impact 2 years ago
parent
commit
8e6e978c11
  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";
import { BubbleCombo } from "@/case/combo/bubblecombo/combo.bubble";
import { Single } from "../0.single";
import { BubblePopupView, BubblePopupBarView } from "@/case/combo/bubblecombo/popup.bubble";
import { BubblePopupBarView, TextBubblePopupBarView } from "@/case/combo/bubblecombo/popup.bubble";
/**
* guy
@ -199,7 +199,7 @@ export class BasicButton extends Single {
height: "100%",
},
popup: {
type: BubblePopupView.xtype,
type: TextBubblePopupBarView.xtype,
text: getBubble(),
ref: _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 { PopupView } from "@/base/layer/layer.popup";
import { Button } from "@/base";
import { Label } from "@/base/single/label/label";
@shortcut()
export class BubblePopupView extends PopupView {
static xtype = "bi.bubble_popup_view";
static EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
static EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
_defaultConfig() {
const config = super._defaultConfig(...arguments);
return extend(config, {
baseCls: `${config.baseCls} bi-text-bubble-bar-popup-view`,
text: "",
baseCls: `${config.baseCls} bi-bubble-popup-view`,
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()
@ -72,7 +56,7 @@ export class BubblePopupBarView extends BubblePopupView {
} else {
items.push({
el: extend({
type: "bi.button",
type: Button.xtype,
height: 24,
handler: v => {
this.fireEvent(BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
@ -131,7 +115,7 @@ export class TextBubblePopupBarView extends BubblePopupBarView {
const o = this.options;
return {
type: "bi.label",
type: Label.xtype,
text: o.text,
whiteSpace: "normal",
textAlign: "left",

2
src/case/combo/index.js

@ -1,5 +1,5 @@
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";

Loading…
Cancel
Save