fastadmin

2022-11-16  本文已影响0人  后雪
<div class="form-group">
    <label for="c-good_category_id" class="control-label col-xs-12 col-sm-2">{:__('Good_category_id')}:</label>
    <div class="col-xs-12 col-sm-8">
        <dl class="fieldlist" data-name="row[test]" data-template="testtpl">
            <dd>
                <ins>姓名</ins>
            </dd>
            <dd>
                <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
            </dd>
            <textarea name="row[test]" class="form-control hide" cols="30"
                      rows="5">[{"name":"张三","gender":"男"}]</textarea>
        </dl>
        <!--定义模板,模板语法使用Art-Template模板语法-->
        <script type="text/html" id="testtpl">
            <dd class="form-inline">
                <input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control"
                       value="<%=row['name']%>" size="10">
                <input type="text" name="row[<%=name%>][<%=index%>][gender]" class="form-control"
                       value="<%=row['gender']%>" size="10">
                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span
                    class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
            </dd>
        </script>
    </div>
</div>
上一篇下一篇

猜你喜欢

热点阅读