【发布时间】:2022-08-20 15:50:20
【问题描述】:
下面是我正在编写的代码示例:
<table class=\"table table-striped\">
<tr class=\"table-dark\">
<th>#</th>
<th>Column 1</th>
<th colspan=\"3\">Column 2</th>
</tr>
<tr class=\"table-info\">
<th></th>
<th>Title</th>
<th>0</th>
<th>1</th>
<th>2</th>
</tr>
<tr>
<td></td>
<td>Category</td>
<td>
<input
class=\"form-check-input\"
type=\"radio\"
name=\"category\"
value=\"0\"
v-model=\"categoryMdl\"
/>
</td>
<td>
<input
class=\"form-check-input\"
type=\"radio\"
name=\"category\"
value=\"1\"
v-model=\"categoryMdl\"
/>
</td>
<td>
<input
class=\"form-check-input\"
type=\"radio\"
name=\"category\"
value=\"2\"
v-model=\"categoryMdl\"
/>
</td>
</tr>
</table>
最初,在我添加 v-model 之前,代码正确显示了 Bootstrap 5 表类。只是在我添加表中的类无法正常工作之后。
我有其他引导类,它工作正常。
知道为什么将 v-model 引入我的表列会干扰引导类吗?有没有办法解决它?
我很茫然,因为我最近才开始使用 Vue。尝试查找解决方案,但我得到的最接近的是“将它们放在子元素中”。但我的输入是子元素,它正在造成严重破坏。
标签: javascript html css vuejs3 bootstrap-5