本文整理汇总了TypeScript中ts/opg.ts.default.warn方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ts.default.warn方法的具体用法?TypeScript ts.default.warn怎么用?TypeScript ts.default.warn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ts/opg.ts.default
的用法示例。
在下文中一共展示了ts.default.warn方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
btnBatchCataloger.click(function () {
let checked = tb.getCheckData() ;
if(checked && checked.length){
console.log(checked);
cache.set('checkedBatchCategory' , checked);
let prog = checked[checked.length-1];
let assetName = prog['assetName'], assetId = prog['assetId'], orderId = prog['orderId'] ;
let pop = parent.opg.confirm(`<iframe src="${infoPage}?isBat=1&assetId=${assetId}&orderId=${orderId}" />`, function (i, ifr) {
ifr.doSave(true , pop, tb);
return true;
}, {
title: `编目: ${assetName}`,
btnMax: true,
width: 900,
height: 500,
buttons: {
ok: {
className : 'btn-success' ,
text : '完成编目'
},
cancel: '返回'
}
}).toggle();
}
else{
opg.warn('请选择批量编目工单');
}
});
示例2: function
window['getChecked'] = function () {
let row = tb.getCheckData();
if(!row){
opg.warn('请选择节目');
}
return row;
};
示例3: function
window['getChecked'] = function () {
let rows = tb.getCheckData();
if(!rows){
opg.warn('请选择地域');
}
return rows;
};
示例4:
$('#btnBatchDelete').click(function () {
let checked = tb.getCheckData() ;
if(checked && checked.length){
console.log(checked);
}
else{
opg.warn(`请选择${moduleName}队列`);
}
});
示例5: function
window['loadImages'] = function (data: any, msg?: string) {
for (let key in data) {
let img = document.getElementById(`img_${key}`) as HTMLImageElement ;
if(img){
img.src = (data[key]['path'] || data[key]) + '?' + Math.random();
hasImages++;
}
}
$('#msgH3').text(msg || '');
if (msg) {
opg.warn(msg);
}
};
示例6: function
window['doSave'] = function (popWin, table) {
if (conditions.length < 1)
return opg.warn('配置条件不可为空');
let param = {ruleId, type: +$('#configType').val(), conditions};
console.log(param);
//return;
return opg.api.addConfig(param, function () {
popWin.close();
table.update();
});
};
示例7: function
window['doUpload'] = function (pop: Popup, tb: Table) {
if (file) {
let formData = new FormData(document.getElementById('wrapForm') as HTMLFormElement);
opg.api.upload(formData, function (data) {
console.log(data, pop);
opg.ok('导入成功' , ()=>{
tb.update();
pop.close();
});
});
}
else {
opg.warn('请选择文件');
}
};
示例8: function
$('#btnBatchDelete').click(function () {
let checked = tb.getCheckedValue();
if (checked && checked.length) {
console.log(checked);
opg.danger(`要删除这${checked.length}项配置吗?`, function () {
opg.api.batchDelete({configIds: checked.join(',')}, function () {
tb.update();
});
}, {
title: '请确认',
});
}
else {
opg.warn(`请选择配置`);
}
},
示例9: function
window['doUpload'] = function(pop){
if(file){
let formData = new FormData(document.getElementById('wrapForm') as HTMLFormElement);
opg.api.uploadZip(formData , function(data){
console.log(data , pop);
let win = cache.get('srcWindow') ;
cache.remove('srcWindow');
win.loadImages(data.picUrl , data.message);
pop.close();
});
}
else {
opg.warn('请选择zip文件');
}
};
示例10: FormData
window['doUpload'] = (pop)=>{
if(chooser.file){
let formData = new FormData();
formData.append('file', chooser.file);
formData.append('assetId', assetId);
formData.append('picSize', opg.request['size']);
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();
});
}
else {
opg.warn('请选择图像文件');
}
};