From c7d43e0a70babdbc3bf899e803234d26dd1b5d82 Mon Sep 17 00:00:00 2001 From: Treecat Date: Mon, 16 Jan 2023 16:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=20refact:base=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=B7=91=E4=B8=80=E4=B8=8B=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/1.pane.js | 7 ++++--- src/base/layer/layer.drawer.js | 14 ++++++++++++-- src/base/layer/layer.popover.js | 6 ++++-- src/base/single/0.single.js | 2 +- src/base/single/editor/editor.js | 2 +- src/base/single/editor/editor.textarea.js | 2 +- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/base/1.pane.js b/src/base/1.pane.js index 3f07c307f..31176dbd5 100644 --- a/src/base/1.pane.js +++ b/src/base/1.pane.js @@ -1,5 +1,5 @@ -import { Label, Text } from "./single"; import { + AbsoluteCenterLayout, CenterAdaptLayout, HorizontalAdaptLayout, VerticalLayout, @@ -12,7 +12,8 @@ import { createWidget, Providers } from "@/core"; -import { Layers } from "@/base"; +import { Label, Text } from "./single"; +import { Layers } from "@/base/0.base"; /** * 当没有元素时有提示信息的view @@ -43,7 +44,7 @@ export class Pane extends Widget { _assertTip() { if (!this._tipText) { createWidget({ - type: "bi.absolute_center_adapt", + type: AbsoluteCenterLayout.xtype, element: this, items: [ { diff --git a/src/base/layer/layer.drawer.js b/src/base/layer/layer.drawer.js index 395bd9a6c..0b1fdf81f 100644 --- a/src/base/layer/layer.drawer.js +++ b/src/base/layer/layer.drawer.js @@ -1,4 +1,14 @@ -import { HTapeLayout, AbsoluteLayout, Layout, VerticalLayout, Widget, shortcut, isPlainObject, extend } from "@/core"; +import { + VTapeLayout, + HTapeLayout, + AbsoluteLayout, + Layout, + VerticalLayout, + Widget, + shortcut, + isPlainObject, + extend +} from "@/core"; import { Label, IconButton } from "../single"; /** @@ -128,7 +138,7 @@ export class Drawer extends Widget { return extend( { - type: "bi.vtape", + type: VTapeLayout.xtype, items, }, this._getSuitableSize() diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js index 4b766acff..7b4c56a54 100644 --- a/src/base/layer/layer.popover.js +++ b/src/base/layer/layer.popover.js @@ -1,4 +1,6 @@ import { + VTapeLayout, + RightVerticalAdaptLayout, HTapeLayout, AbsoluteLayout, VerticalLayout, @@ -202,7 +204,7 @@ export class Popover extends Widget { scrolly: false, } : { - type: "bi.vtape", + type: VTapeLayout.xtype, height: this._getSuitableHeight(size.height), } ); @@ -302,7 +304,7 @@ export class BarPopover extends Popover { const { footer, warningTitle } = this.options; footer || (this.options.footer = { - type: "bi.right_vertical_adapt", + type: RightVerticalAdaptLayout.xtype, lgap: 10, items: [ { diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index 34ee4ca98..6d2408b4f 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -1,5 +1,5 @@ import { Widget, shortcut, Actions, extend, isKey, isNotNull, isFunction, isPlainObject, isNull, delay } from "@/core"; -import { Tooltips } from "@/base"; +import { Tooltips } from "@/base/0.base"; /** * guy diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 7aba92760..85174dfd6 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -13,7 +13,7 @@ import { } from "@/core"; import { Label } from "../label"; import { Single } from "../0.single"; -import { Bubbles } from "@/base"; +import { Bubbles } from "@/base/0.base"; /** * Created by GUY on 2015/4/15. diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index cdfa0966a..50c9b404f 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -16,7 +16,7 @@ import { } from "@/core"; import { Label } from "../label"; import { Single } from "../0.single"; -import { Bubbles } from "@/base"; +import { Bubbles } from "@/base/0.base"; /** *