viewModel.get("button187db").on("click", function (args) { var flag = cb.utils.getRealObjectName("", viewModel, "mdf") + "_"; //获取附件 var aattachment = viewModel .getGridModel() .getSelectedRows()[0].enclosure; //获取附件个数 let attlentth = viewModel._get_data("cache").allTabelFileData[flag + aattachment] .length; if (attlentth < 1) { if (cb.lang.lang == "zh_CN") { cb.utils.alert("附件为空,请先上传附件!"); } else if (cb.lang.lang.toLocaleLowerCase == "tw_CN") { cb.utils.alert("附件为空,请先上传附件!"); } else { cb.utils.alert("附件为空,请先上传附件!"); } return false; } });
标签:lang,判断,cb,utils,viewModel,附件,上传 From: https://www.cnblogs.com/LFxanla/p/17162751.html