发布于2023-09-17 19:02 阅读(1026) 评论(0) 点赞(9) 收藏(5)
正如您从标题中看到的,我尝试更改占位符文本,其中显示“没有结果匹配”,并且从选定的标签中显示为灰色(禁用)。
我尝试使用“占位符”,但它不起作用。
<div>
<select chosen disable-search="true" id="newpaymentMethod"
placeholder="Placeholder text"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
然后我尝试使用“no_results_text”,仍然不起作用
<div>
<select chosen disable-search="true" id="newpaymentMethod"
no_results_text="Placeholder test"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
有什么想法吗?谢谢
在我检查了Angular-Chosen的 GitHub 文档后,我找到了如何使用“no_result_text”。
请看下面的一段代码:
<div>
<select chosen disable-search="true" id="newpaymentMethod"
no-results-text="'Placeholder test'"
class="easytrade-input full-width" name="newpaymentMethod"
ng-model="vm.newRecord.paymentMethod"
ng-options="paymentMethod.type as paymentMethod.description
for paymentMethod in vm.paymentMethodOptions"
required>
</select>
</div>
因此,您必须使用“no-results-text”而不是“no_results_text”,并且文本应该用 ' ' 括起来,就像下面的“ 'text here' ”
希望我的回答能帮助别人:)
作者:黑洞官方问答小能手
链接:http://www.qianduanheidong.com/blog/article/531404/d93f40fecaac92a5863c/
来源:前端黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
---无人问津也好,技不如人也罢,你都要试着安静下来,去做自己该做的事,而不是让内心的烦躁、焦虑,坏掉你本来就不多的热情和定力
Copyright © 2018-2021 前端黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-3
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!