|
|
@ -33,8 +33,7 @@ export class ConnectionList extends BI.LoadingPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const connectionLength = BI.size(this.model.connections); |
|
|
|
if (BI.size(this.model.connections) === 0) { |
|
|
|
if (connectionLength === 0) { |
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: CenterAdapt, |
|
|
|
type: CenterAdapt, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
@ -76,9 +75,6 @@ export class ConnectionList extends BI.LoadingPane { |
|
|
|
type: LoadingBar, |
|
|
|
type: LoadingBar, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: any) => { |
|
|
|
this.loadingBar = _ref; |
|
|
|
this.loadingBar = _ref; |
|
|
|
connectionLength > this.model.showItemNum ? |
|
|
|
|
|
|
|
this.loadingBar.setLoaded() : |
|
|
|
|
|
|
|
null; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
handler: () => { |
|
|
|
handler: () => { |
|
|
|
this.loadingBar.setLoading(); |
|
|
|
this.loadingBar.setLoading(); |
|
|
@ -89,6 +85,14 @@ export class ConnectionList extends BI.LoadingPane { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
created() { |
|
|
|
|
|
|
|
if (this.model.showItemNum) { |
|
|
|
|
|
|
|
BI.size(this.model.connections) > this.model.showItemNum ? |
|
|
|
|
|
|
|
this.loadingBar.setLoaded() : |
|
|
|
|
|
|
|
null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private renderList(start = 0) { |
|
|
|
private renderList(start = 0) { |
|
|
|
const itemNum = Math.min(this.model.connections.length, this.model.showItemNum); |
|
|
|
const itemNum = Math.min(this.model.connections.length, this.model.showItemNum); |
|
|
|
|
|
|
|
|
|
|
|