fastadmin 附件

Posted canyingv

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fastadmin 附件相关的知识,希望对你有一定的参考价值。

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 附件的主要内容,如果未能解决你的问题,请参考以下文章

FastAdmin 简介

fastadmin获取插件的配置参数的方法

fastadmin的selectpage没有分页

FastAdmin 如何升级?

如何修改 FastAdmin 弹窗大小?

FastAdmin 发邮件时的一个有趣报错