2015-11-19 01:32:29 +08:00
|
|
|
import ko from 'ko';
|
|
|
|
|
2019-07-05 03:19:24 +08:00
|
|
|
class IdentityUserStore {
|
2016-07-16 05:29:42 +08:00
|
|
|
constructor() {
|
2015-11-19 01:32:29 +08:00
|
|
|
this.identities = ko.observableArray([]);
|
2019-07-05 03:19:24 +08:00
|
|
|
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
|
2015-11-19 01:32:29 +08:00
|
|
|
|
2020-09-24 21:08:57 +08:00
|
|
|
this.getIDS = () => this.identities().map(item => (item ? item.id() : null)).filter(value => null !== value);
|
2015-11-19 01:32:29 +08:00
|
|
|
}
|
|
|
|
}
|
2016-04-21 01:12:51 +08:00
|
|
|
|
2016-09-13 04:50:21 +08:00
|
|
|
export default new IdentityUserStore();
|