thinkphp在模板中使用volist的疑问

浏览:1783 发布日期:2013/05/10 分类:求助交流 关键字: volist 长度为零 if empity
<table class="data">
    <thead>
        <tr>
            <th class="check-column align-center"><input type="checkbox" class="checkbox set-checked" hidefocus></th>
            <th class="title-column">标题</th>
            <th class="content-column">内容</th>
            <th class="">
                <button class="add">添加</button>
                <button class="del-checked">删除所选</button>
            </th>
        </tr>
    </thead>
    <tbody>
        <volist name="list" id="data" empty="暂时没有数据">
        <tr>            
            <td class="align-center"><input type="checkbox" class="checkbox" id="{$data.id}" hidefocus></td>
            <td class="title-column">{$data.title}</td>
            <td class="content-column">{$data.content}</td>
            <td class="">
                <button class="edit" id="e_{$data.id}">修改</button>
                <button class="delete" id="d_{$data.id}">删除</button>
            </td>
        </tr>
        </volist>
    </tbody>
</table>
如果是这样暂无数据这个提示会显示在table之外,可不可以用if标签来判断list的长度为0时在tbody内输出特定的html片段
最佳答案
评论( 相关
后面还有条评论,点击查看>>