knockout.js 如何在knockout中引导带有单击功能的下拉按钮

iugsix8n  于 2022-11-10  发布在  其他
关注(0)|答案(1)|浏览(170)

我有一个带选项的按钮下拉菜单,它可以按照我的要求工作,但我需要删除选项中的输入圆图像,可以吗?
或者其他什么主意?谢谢!

<div class="dropdown">
        <button class="btn btn-secondary btn-sm dropdown-toggle" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Menu 2</button> 
        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
            <a class="dropdown-item"><input type="radio" name="options" value="type1"  autocomplete="off" data-bind="checked: type"> option 1 </a>
            <a class="dropdown-item"><input type="radio" name="options" value="type2"  autocomplete="off" data-bind="checked: type"> option 2 </a>
        </div>
    </div>
toe95027

toe950271#

只需添加以下css规则:

input[type="radio"] {
    visibility:hidden;
}

相关问题