本文整理汇总了TypeScript中@eg/core/store.service.StoreService.getLocalItem方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.StoreService.getLocalItem方法的具体用法?TypeScript service.StoreService.getLocalItem怎么用?TypeScript service.StoreService.getLocalItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@eg/core/store.service.StoreService
的用法示例。
在下文中一共展示了service.StoreService.getLocalItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ngOnInit
ngOnInit() {
this.searchContext = this.staffCat.searchContext;
this.defaultTab =
this.store.getLocalItem('eg.cat.default_record_tab')
|| 'catalog';
// Watch for URL record ID changes
// This includes the initial route.
// When applying the default configured tab, no navigation occurs
// to apply the tab name to the URL, it displays as the default.
// This is done so no intermediate redirect is required, which
// messes with browser back/forward navigation.
this.route.paramMap.subscribe((params: ParamMap) => {
this.recordTab = params.get('tab');
this.recordId = +params.get('id');
this.searchContext = this.staffCat.searchContext;
if (!this.recordTab) {
this.recordTab = this.defaultTab || 'catalog';
}
this.loadRecord();
});
}
示例2: open
async open(args: NgbModalOptions): Promise<boolean> {
this.holdIds = [].concat(this.holdIds); // array-ify ints
this.transferTarget =
this.store.getLocalItem('eg.circ.hold.title_transfer_target');
if (!this.transferTarget) {
this.toast.warning(await this.targetNeeded.current());
return Promise.reject('Transfer Target Required');
}
return super.open(args);
}
示例3: reprintLast
reprintLast() {
const prev = this.store.getLocalItem('eg.print.last_printed');
if (prev) {
const req: PrintRequest = {
text: prev.content,
printContext: prev.context || 'default',
contentType: prev.content_type || 'text/html',
showDialog: Boolean(prev.show_dialog)
};
this.print(req);
}
}
示例4: useHatch
useHatch(): boolean {
return this.store.getLocalItem('eg.hatch.enable.printing')
&& this.hatch.connect();
}