本文整理汇总了TypeScript中@eg/core/server-store.service.ServerStoreService.getItem方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.ServerStoreService.getItem方法的具体用法?TypeScript service.ServerStoreService.getItem怎么用?TypeScript service.ServerStoreService.getItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@eg/core/server-store.service.ServerStoreService
的用法示例。
在下文中一共展示了service.ServerStoreService.getItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: fetchSettings
fetchSettings(): Promise<any> {
const promises = [];
promises.push(
this.store.getItem('eg.search.search_lib').then(
id => this.staffCat.defaultSearchOrg = this.org.get(id)
)
);
promises.push(
this.store.getItem('eg.search.pref_lib').then(
id => this.staffCat.prefOrg = this.org.get(id)
)
);
return Promise.all(promises);
}
示例2: printViaHatch
printViaHatch(printReq: PrintRequest) {
// Send a full HTML document to Hatch
const html = `<html><body>${printReq.text}</body></html>`;
this.serverStore.getItem(`eg.print.config.${printReq.printContext}`)
.then(config => {
const msg = new HatchMessage({
action: 'print',
content: html,
settings: config || {},
contentType: 'text/html',
showDialog: printReq.showDialog
});
this.hatch.sendRequest(msg).then(
ok => console.debug('Print request succeeded'),
err => console.warn('Print request failed', err)
);
});
}
示例3: getGridConfig
getGridConfig(persistKey: string): Promise<GridPersistConf> {
if (!persistKey) { return Promise.resolve(null); }
return this.store.getItem('eg.grid.' + persistKey);
}