我正在使用淘汰賽與對於某些項目,ASP.NET MVC。
我使用淘汰賽什麼是Knockout自定義綁定「之後」變量?
ko.bindingHandlers.select2 = {
after: ["options", "value", "selectedOptions"],
init: function (el, valueAccessor, allBindingsAccessor, viewModel) {
// no explicit reference to the 'after' variable
},
update: function (el, valueAccessor, allBindingsAccessor, viewModel) {
// no explicit reference to the 'after' variable
}
}
以下bindingHandler
我從this question得到這個代碼,我修改了它的小。
對於Select2 plugin,它基本上是custom binding handler
。
問題
我只是想知道什麼after: ["options", "value", "selectedOptions"],
在這裏的意思。在init
或update
函數中沒有任何地方提及這個變量。
這個變量在這方面有什麼含義嗎?或者這是一個淘汰的指令,使其在完成執行[options
,value
,selectedOptions
]綁定後執行此自定義綁定?
注意 custom binding的文檔沒有提到這個變量。