在Bootstrap表中使用Bootstrap标签 [英] Using Bootstrap Labels in Bootstrap tables

查看:67
本文介绍了在Bootstrap表中使用Bootstrap标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将引导标签添加到我在引导表中拥有的<th>字段中,以便获取显示在标签中的字段结果.解决此问题的最佳方法是什么?将<span>放在<th>内不会产生期望的结果.我只希望结果成为标签-这可能吗?

I'm trying to add a bootstrap label to a <th> field I have in bootstrap-table that I have so that I can get the results of the fields to display in a label. What's the best way to approach this? Putting the <span> inside the <th> doesn't yield the desired result. I'd just like the results to be labels - is this possible?

    <table id="medicationtable">
    <thead>
    <tr>
        <th data-field="Medication_Name">Medication Name</th>
        <th data-field="Read_Code">Read Code</th>
        <th data-field="Dose">Dose</th>
        <th data-field="Date_Started">Date Started</th>
        <th data-field="Date_Ended">Date Ended</th>
    </tr>
    </thead>
</table>

推荐答案

如果从远程数据生成表,我认为这是不可能的.如果要将其他html添加到生成的单元格中,则需要将bootstrap-table应用于html中已存在的表.

I don't think it's possible if you're generating the table from remote data. If you want to add additional html into the cells generated, you'd need to apply bootstrap-table to an already existing table in the html.

http://issues.wenzhixin.net.cn /bootstrap-table/#options/from-html.html

这篇关于在Bootstrap表中使用Bootstrap标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆