Browse Source

无jira任务 删除loadingpane

es6
imp 3 years ago
parent
commit
3a9a45563b
  1. 11
      demo/js/config/demo.pane.js
  2. 1
      karma.conf.js
  3. 31
      src/case/loading/loading_pane.js
  4. 5
      typescript/case/loading/loading_pane.ts
  5. 3
      typescript/index.ts

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

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

1
karma.conf.js

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

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();
}
});

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 { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { SignEditor } from "./case/editor/editor.sign"; import { SignEditor } from "./case/editor/editor.sign";
import { StateEditor } from './case/editor/editor.state'; import { StateEditor } from './case/editor/editor.state';
import { LoadingPane } from "./case/loading/loading_pane";
import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo"; import { AllValueMultiTextValueCombo } from "./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo";
import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser"; import { AbstractTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser";
import { AbstractListTreeValueChooser } from "./component/treevaluechooser/abstract.treevaluechooser.list"; 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; HighlightBehavior: typeof HighlightBehavior;
RedMarkBehavior: typeof RedMarkBehavior; RedMarkBehavior: typeof RedMarkBehavior;
Pane: typeof Pane; Pane: typeof Pane;
LoadingPane: typeof LoadingPane;
Tab: typeof Tab; Tab: typeof Tab;
ButtonGroup: typeof ButtonGroup; ButtonGroup: typeof ButtonGroup;
Combo: typeof Combo; Combo: typeof Combo;
@ -411,7 +409,6 @@ export {
BehaviorFactory, BehaviorFactory,
RedMarkBehavior, RedMarkBehavior,
HighlightBehavior, HighlightBehavior,
LoadingPane,
Searcher, Searcher,
AbstractLabel, AbstractLabel,
Label, Label,

Loading…
Cancel
Save