c#'/ Clients / ClientSelectDataTable'被调用并返回。
self.LookupClient = function () {
$.ajax({
type: 'POST',
url: '/Clients/ClientSelectDataTable'
}).done(function (msg) {
//grab the partial from the controller
$("#SelectClient").html('');
$("#SelectClient").html(msg);
//initialize the js
theClientPicker = new ClientSelectModel('ClientSelectDataTable', '/API/GetAllClients', AssignClient, self.CancelClientSelect, "Select");
ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
$.fancybox("#SelectClient", { //launch ClientSelect widget
modal: true,
afterClose: function () {
theClientPicker.Dispose();
ko.cleanNode($("#SelectClient")[0]);
}
});
});
}
这里抛出异常ko.applyBindings(theClientPicker,$(“#SelectClient”)[0]);
...
if (!sourceBindings) {
if (alreadyBound) {
throw Error("You cannot apply bindings multiple times to the same element.");
我可以捕获到异常,但是弹出窗口不起作用,因为未分配按钮上的事件。
这是一个新的theClientPicker,所以我看不到如何分配它。
发现了问题。这是3.4.2和3.5.0之间引入的缺陷或重大缺陷。恢复并冻结3.4.2可以修复它。
是否有适当的方式来举报?