Browse Source

Pull request #2240: BI-95811 feat: 支持direction

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit '3a9a45563b23f0034e938301bfa801f08433d912':
  无jira任务 删除loadingpane
  无jira任务 去掉多余
  无jira任务 类型
  BI-95811 feat: 支持direction
  无jira任务 改下变量名
es6
imp 3 years ago
parent
commit
95575516b1
  1. 11
      demo/js/config/demo.pane.js
  2. 2
      dist/fix/fix.compact.js
  3. 1
      karma.conf.js
  4. 1
      src/case/combo/editoriconcheckcombo/combo.editiconcheck.js
  5. 1
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  6. 1
      src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js
  7. 1
      src/case/combo/textvaluecombo/combo.textvalue.js
  8. 31
      src/case/loading/loading_pane.js
  9. 6
      src/core/4.widget.js
  10. 5
      typescript/case/loading/loading_pane.ts
  11. 3
      typescript/index.ts
  12. 2
      typescript/shims-tsx.ts

11
demo/js/config/demo.pane.js

@ -4,11 +4,15 @@
* description:
*/
!(function () {
var Pane = BI.inherit(BI.LoadingPane, {
var Pane = BI.inherit(BI.Pane, {
props: {
},
mounted: function () {
console.log('loading pane mounted');
},
render: function () {
return {
type: "bi.center_adapt",
@ -19,8 +23,11 @@
};
},
beforeInit: function (callback) {
beforeRender: function (callback) {
var self = this;
this.loading();
setTimeout(function () {
self.loaded();
callback();
}, 3000);
}

2
dist/fix/fix.compact.js vendored

@ -183,7 +183,7 @@
delete this.__cacheStore;
};
_.each(["_afterRender", "_mount", "__afterMount"], function (name) {
_.each(["__afterRender", "_mount", "__afterMount"], function (name) {
var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store);

1
karma.conf.js

@ -35,7 +35,6 @@ module.exports = function (config) {
exclude: [
"src/base/single/input/file.js",
"src/case/loading/loading_pane.js",
"src/case/ztree/**/*.js",
"src/widget/multitree/**/*.js",
"src/widget/multiselecttree/**/*.js",

1
src/case/combo/editoriconcheckcombo/combo.editiconcheck.js

@ -64,6 +64,7 @@ BI.EditorIconCheckCombo = BI.inherit(BI.Widget, {
this.editorIconCheckCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
direction: o.direction,
element: this,
adjustLength: 2,
el: this.trigger,

1
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -52,6 +52,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
type: "bi.combo",
element: this,
container: o.container,
direction: o.direction,
adjustLength: 2,
el: this.trigger,
popup: {

1
src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js

@ -44,6 +44,7 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
this.textIconCheckCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
direction: o.direction,
element: this,
adjustLength: 2,
el: this.trigger,

1
src/case/combo/textvaluecombo/combo.textvalue.js

@ -46,6 +46,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
this.textIconCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
direction: o.direction,
element: this,
adjustLength: 2,
el: this.trigger,

31
src/case/loading/loading_pane.js

@ -1,31 +0,0 @@
/**
* author: young
* createdDate: 2018/12/18
* description:
*/
BI.LoadingPane = BI.inherit(BI.Pane, {
_mount: function () {
var isMounted = BI.Pane.superclass._mount.apply(this, arguments);
if (isMounted) {
if (this.beforeInit) {
this.__asking = true;
this.loading();
this.beforeInit(BI.bind(this.__loaded, this));
}
}
},
_initRender: function () {
if (this.beforeInit) {
this.__async = true;
} else {
this._render();
}
},
__loaded: function () {
this.__asking = false;
this.loaded();
this._render();
}
});

6
src/core/4.widget.js

@ -128,7 +128,7 @@
}
renderCallbackCalled = true;
self._render();
self._afterRender();
self.__afterRender();
self.__async = false;
}
@ -137,7 +137,7 @@
(self.options.beforeRender || self.beforeRender).call(self, render);
} else {
self._render();
self._afterRender();
self.__afterRender();
}
}
@ -149,7 +149,7 @@
}
},
_afterRender: function () {
__afterRender: function () {
pushTarget(this);
this.__async === true && this._isMounted && callLifeHook(this, "beforeMount");
this._mount();

5
typescript/case/loading/loading_pane.ts

@ -1,5 +0,0 @@
import { Pane } from "../../base/pane";
export declare class LoadingPane extends Pane {
__loaded: (...args: any[]) => void;
}

3
typescript/index.ts

@ -24,7 +24,6 @@ import { SmallTextValueCombo } from './case/combo/combo.textvaluesmall';
import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { SignEditor } from "./case/editor/editor.sign";
import { StateEditor } from './case/editor/editor.state';
import { LoadingPane } from "./case/loading/loading_pane";
import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo";
import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser";
import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list";
@ -205,7 +204,6 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
HighlightBehavior: typeof HighlightBehavior;
RedMarkBehavior: typeof RedMarkBehavior;
Pane: typeof Pane;
LoadingPane: typeof LoadingPane;
Tab: typeof Tab;
ButtonGroup: typeof ButtonGroup;
Combo: typeof Combo;
@ -411,7 +409,6 @@ export {
BehaviorFactory,
RedMarkBehavior,
HighlightBehavior,
LoadingPane,
Searcher,
AbstractLabel,
Label,

2
typescript/shims-tsx.ts

@ -19,6 +19,8 @@ interface UIProps {
interface AdditionalProps {
column: number;
row: number;
innerVGap: number;
innerHGap: number;
}
interface ElementClassProps<T> extends UIProps {

Loading…
Cancel
Save