私はそのプラグインを使用しています:https ://github.com/plentz/jquery-maskmoneyを使用してマネーエディターをフォーマットしています...
そのエディターでKnockoutJSを使用しようとしましたが、機能しません...そのマスクがないとすべて正常に機能します...
私のコードテストは簡単です:
<input id="Price" data-bind="value: Price" type="text" name="Price">
入力をマスクするJavascript
$("#Price").maskMoney({ symbol: 'R$ ', showSymbol: true, thousands: '.', decimal: ',', symbolStay: false });
そしてKnockoutJS
var ViewModel = function () {
this.Price = ko.observable();
this.PriceFinal= ko.computed(function () {
return this.Price()
}, this);
};
ko.applyBindings(new ViewModel());