我想为我的选择下拉菜单设置一个默认值或提示一个文本,我已经设法将正确的内容放入选择中,但我希望能够有一个与内容不同的默认值,例如“选择国家"然后列出国家。
到目前为止,这是 select 的样子,而 testing 变量如下所示:testFillSelect: "Select Country..",
<div class="form-group">
<label>Countries:</label>
{{view "select2"
prompt="Select country.."
content=countries
optionValuePath="content.id"
optionLabelPath="content.name"
selectionBinding=testFillSelect
selection=countries.id
class="form-control"}}
</div>
问题是,selectionBinding
它似乎不起作用,因为它什么都不做,而且prompt
除非它是字符串中的空格,否则它也不起作用。我试过select和select2,也没有任何区别。有谁知道如何正确地做到这一点?