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


TypeScript Cache.getInstance方法代码示例

本文整理汇总了TypeScript中ts/util/store.Cache.getInstance方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Cache.getInstance方法的具体用法?TypeScript Cache.getInstance怎么用?TypeScript Cache.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ts/util/store.Cache的用法示例。


在下文中一共展示了Cache.getInstance方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

		opg.api.uploadPic(formData , (data)=>{

			let cache = Cache.getInstance();
			cache.set('imgUpload' , data);

			let container = `<iframe src="/page/produce/catalog/viewImage.html"></iframe>`;

			let previewWin = top.opg.confirm(container , function (i , iframe) {
				iframe.doSave(assetId , previewWin) ;
				return true ;
			} , {
				title: `图片预览`,
				btnMax : true ,
				width: 600,
				height: 420,
				buttons: {
					ok: `保存图片`,
					cancel: '取消',
				},
				onDestroy : function () {
					console.warn("cache.remove('imgUpload');");
					cache.remove('imgUpload');
				}
			}).toggle();

			pop.close();
		});
开发者ID:rpdg,项目名称:fy.js,代码行数:27,代码来源:uploadImage.ts

示例2: port

function port(assetId){
	parent.window['importMetaData'](assetId);
	let cache = Cache.getInstance();
	let pop = cache.get('importWin');
	cache.remove('importWin');
	pop.close();
}
开发者ID:rpdg,项目名称:fy.js,代码行数:7,代码来源:copyInfo.ts

示例3: modifyCopyrightTime

	/**
	 * 修改版权时间
	 * @param row
	 * @param tb
	 */
	static modifyCopyrightTime( row: any , tb: Table) {

		let cache = Cache.getInstance();
		let cacheKey = 'contract';

		console.log(row);
		cache.set(cacheKey, row);

		let pop = top.opg.confirm(`<iframe src="${moduleRoot}time.html" />`, function (i, ifr) {
			ifr.doSave(pop , tb);
			return true;
		}, {
			title: '修改版权时间',
			btnMax: true,
			width: 680,
			height: 400,
			buttons: {
				ok: '保存',
				cancel: '返回',
			},
			onClose: function () {
				cache.remove(cacheKey);
				tb.update();
			},
		});
	}
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:contract.ts

示例4: function

tb.jq.on('click' , '.port' , function () {
	let elem = $(this) , idx = elem.data('idx');
	let data = dbData[idx];

	let cache = Cache.getInstance();
	let win = cache.get('windowSrc');
	win.importDbData(data);

	let pop = cache.get('importWin');
	pop.close();

});
开发者ID:rpdg,项目名称:fy.js,代码行数:12,代码来源:douban.ts

示例5: constructor

	constructor(row) {

		if (row.type == 3000) {//电视剧
			this.createEpisode(row);
		}
		else {//其他
			this.createTable(row);
		}


		let cache = Cache.getInstance();

		//delete
		this.tbMedia.tbody.on('click', '.btnDelete', function () {
			let btn = $(this),
				title = btn.data('title'),
				id = btn.data('id');

			opg.confirm(`要删除“<b>${title}</b>”吗?`, () => {
				opg.api.delete({id: id}, () => {
					if (row.type == 3000){
						btn.parent().parent().remove();
						//opg.ok(`删除节目 <b>${title}</b> 成功`);
					}
					else{
						cache.remove('currentRow');

						let pop:PopUp = cache.get('currentViewWindow');
						pop.close();
					}
				});
			});
		});

		
		//delete media file
		this.tbMedia.tbody.on('click', '.btnDeleteFile', function () {
			let btn = $(this),
				title = btn.data('title'),
				id = btn.data('id');

			opg.confirm(`要删除此文件吗?`, () => {
				opg.api.deleteFile({id: id}, () => {
					btn.parent().parent().remove();
					/*opg.ok(`删除文件成功`, () => {
						//PopUp.closeLast();
					});*/
				});
			});
		});
	}
开发者ID:rpdg,项目名称:fy.js,代码行数:51,代码来源:viewMedia.ts

示例6: opg

$('.btn-douban').click(function () {
	let pop = opg(`<iframe src="/page/produce/catalog/douban.html" />`).popup({
		title: '豆瓣查询',
		width: 720,
		height: 480,
		btnMax: true,
		onDestroy: function () {
			cache.remove('windowSrc');
			cache.remove('importWin');
		}
	});

	let cache = Cache.getInstance();
	cache.set('importWin', pop);
	cache.set('windowSrc', window);
});
开发者ID:rpdg,项目名称:fy.js,代码行数:16,代码来源:metaData.ts

示例7: modify

	/**
	 * 修改版权合同(带节目列表展示)
	 * @param contractId
	 * @param tb
	 */
	static modify(contractId: string, tb: Table) {

		let cache = Cache.getInstance();
		let cacheKey = 'currentPop';

		let pop = opg.popTop(`<iframe src="${moduleRoot}add.html?contractId=${contractId}" />`, {
			title: '修改版权合同',
			btnMax: true,
			width: 900,
			height: 600,
			onClose: function () {
				cache.remove(cacheKey);
				tb.update();
			},
		});

		cache.set(cacheKey, pop);
	}
开发者ID:rpdg,项目名称:fy.js,代码行数:23,代码来源:contract.ts

示例8: function

					return `<button class="btn-mini btn-warning" data-oid="${val}" data-aid="${row.assetId}" data-title="${row.managerName}" data-idx="${row[':index']}">二审</button>`;
				//return '';
				return `<button class="btn-mini btn-info" data-oid="${val}" data-aid="${row.assetId}" data-title="${row.managerName}" data-idx="${row[':index']}">查看</button>`;
			}
		}
	],
	api: opg.api.audit,
	onAjaxEnd: (data) => {
		list = data.results;
	},
	pagination: {
		pageSize: 10
	}
});

let cache = Cache.getInstance(), list = [];

//edit
tb.tbody.on('click', '.btn-warning', function () {
	let btn = $(this),
		title = btn.data('title'),
		assetId = btn.data('aid'),
		orderId = btn.data('oid'),
		idx = btn.data('idx') ,
		row = list[idx];

	opg.api.checkAuditPermission({orderId}, function (data) {
		if (data.result) {
			if(!row.executor)
				tb.update();
开发者ID:rpdg,项目名称:fy.js,代码行数:30,代码来源:index.ts

示例9: function

import opg from 'ts/opg.ts';

import {Cache} from 'ts/util/store' ;


let cache = Cache.getInstance();


let assetId = opg.request['assetId'] ;

$('#tbImages').on('click' , '.btn-info' , function () {
	//制作
	cache.set('srcWindow' ,window);

	let size = $(this).data('size');

	//cache.set('curImage' , document.getElementById(`img_${size}`));
	//console.warn(cache.get('curImage') , `img_${size}` ) ;

	let pop = top.opg(`<iframe src="/page/produce/catalog/metaDataGenImage.html?assetId=${assetId}&size=${size}"></iframe>`).popup({
		title: `制作图片`,
		btnMax : true ,
		width: 680,
		height: 480,
		buttons :{
			ok : '上传',
			cancel : '返回',
		},
		callback:function (i, ifr) {
			//console.log(i, ifr);
			if(i==0){
开发者ID:rpdg,项目名称:fy.js,代码行数:31,代码来源:metaData_Image.ts

示例10: closeSelfWindow

function closeSelfWindow(){
	let cache = Cache.getInstance();
	let pop :PopUp = cache.get('currentPop') as PopUp ;
	pop.close();
}
开发者ID:rpdg,项目名称:fy.js,代码行数:5,代码来源:add.ts


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