knockoutjs 怎么动态选中下拉
1个回答
展开全部
self.DepartmentSelected = ko.observable();
self.DepartmentSelect = ko.computed(function () {
if (self.DepartmentSelected() != null || self.DepartmentSelected()!= undefined)
{
console.log(self.DepartmentSelected());
}
}, self);
};
self.DepartmentSelect = ko.computed(function () {
if (self.DepartmentSelected() != null || self.DepartmentSelected()!= undefined)
{
console.log(self.DepartmentSelected());
}
}, self);
};
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询