Knockoutjs:observearray替换不更新html temp

2024-10-05 13:14:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我将参数传递给视图的脚本

var commentModel =  function(config) {
    var self = this;
    self.comments = ko.observableArray(ko.utils.parseJson(config.comments));
...

我需要控制评论。那里是一个可见参数,它在更改可见性时更改。 我第一次意识到是推卸

^{pr2}$

现在我尝试用replaсe.Element重写它所替换的元素,但它不更新模板。告诉我该怎么办?在


Tags: self脚本视图config参数var评论function

热门问题