当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript server-store.service.ServerStoreService类代码示例

本文整理汇总了TypeScript中@eg/core/server-store.service.ServerStoreService的典型用法代码示例。如果您正苦于以下问题:TypeScript service.ServerStoreService类的具体用法?TypeScript service.ServerStoreService怎么用?TypeScript service.ServerStoreService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了service.ServerStoreService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
    }
开发者ID:jamesrf,项目名称:Evergreen,代码行数:17,代码来源:resolver.service.ts

示例2: Error

    saveGridConfig(): Promise<any> {
        if (!this.persistKey) {
            throw new Error('Grid persistKey required to save columns');
        }
        const conf = new GridPersistConf();
        conf.version = 2;
        conf.limit = this.pager.limit;
        conf.columns = this.columnSet.compileSaveObject();

        return this.store.setItem('eg.grid.' + this.persistKey, conf);
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:11,代码来源:grid.ts

示例3: fetchSettings

    fetchSettings(): Promise<any> {

        return this.store.getItemBatch([
            'eg.search.search_lib',
            'eg.search.pref_lib'
        ]).then(settings => {
            this.staffCat.defaultSearchOrg =
                this.org.get(settings['eg.search.search_lib']);
            this.staffCat.prefOrg =
                this.org.get(settings['eg.search.pref_lib']);
        });
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:12,代码来源:resolver.service.ts

示例4: 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)
            );
        });
    }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:22,代码来源:print.component.ts

示例5: getGridConfig

 getGridConfig(persistKey: string): Promise<GridPersistConf> {
     if (!persistKey) { return Promise.resolve(null); }
     return this.store.getItem('eg.grid.' + persistKey);
 }
开发者ID:StephenGWills,项目名称:Evergreen,代码行数:4,代码来源:grid.ts


注:本文中的@eg/core/server-store.service.ServerStoreService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。