码迷,mamicode.com
首页 > 其他好文 > 详细

fastadmin 附件

时间:2020-07-13 15:41:51      阅读:72      评论:0      收藏:0      [点我收藏+]

标签:admin   Matter   required   for   formatter   lin   multiple   inline   size   

1 mysql

技术图片

 

 

2 js

{field: ‘attachfile‘, title: __(‘Attachfile‘),formatter:Table.api.formatter.url}

3 add.html

<div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__(‘Attachfile‘)}:</label>
    <div class="col-xs-12 col-sm-8">
        <div class="input-group">
            <input id="c-attachfile" data-rule="required" class="form-control" size="50" name="row[attachfile]" type="text" value="">
            <div class="input-group-addon no-border no-padding">
                <span><button type="button" id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile" data-multiple="false" data-preview-id="p-attachfile"><i class="fa fa-upload"></i> {:__(‘Upload‘)}</button></span>
                <span><button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-list"></i> {:__(‘Choose‘)}</button></span>
            </div>
            <span class="msg-box n-right" for="c-attachfile"></span>
        </div>
        <ul class="row list-inline plupload-preview" id="p-attachfile"></ul>
    </div>
</div>

4 edit.html

<div class="form-group">
    <label class="control-label col-xs-12 col-sm-2">{:__(‘Attachfile‘)}:</label>
    <div class="col-xs-12 col-sm-8">
        <div class="input-group">
            <input id="c-attachfile" data-rule="required" class="form-control" size="50" name="row[attachfile]" type="text" value="{$row.attachfile|htmlentities}">
            <div class="input-group-addon no-border no-padding">
                <span><button type="button" id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile" data-multiple="false" data-preview-id="p-attachfile"><i class="fa fa-upload"></i> {:__(‘Upload‘)}</button></span>
                <span><button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-attachfile" data-multiple="false"><i class="fa fa-list"></i> {:__(‘Choose‘)}</button></span>
            </div>
            <span class="msg-box n-right" for="c-attachfile"></span>
        </div>
        <ul class="row list-inline plupload-preview" id="p-attachfile"></ul>
    </div>
</div>

 

fastadmin 附件

标签:admin   Matter   required   for   formatter   lin   multiple   inline   size   

原文地址:https://www.cnblogs.com/CanyingV/p/13293314.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!