gpt4 book ai didi

javascript - knockout js : what is the proper way to trade out an image for text

转载 作者:行者123 更新时间:2023-11-28 14:57:12 25 4
gpt4 key购买 nike

我有一个文本区域,我希望在其中有不同的内容:“正在加载...”以及一些正在加载的 gif,或者来自后端的实际文本。

我可以使用data-bind=text:... 将“正在加载...”换成其他文本,但是获取 gif 的正确方法是什么?

最佳答案

快速的解决方案是为包含 gif 的元素添加“visible”或“if”绑定(bind),这样只有当条件为 true 时才会显示该元素。

关于javascript - knockout js : what is the proper way to trade out an image for text,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42442958/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com