Solve the problem that the drop-down box of fastadmin add page and edit page does not display

As the title, in the add.html and edit.html files generated by fastadmin, the content of the drop-down box is not displayed. There is an explanation in the component-"dynamic drop-down list in the document. You need to add attributes to support
1.add.html

<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Class_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-class_id" data-rule="required" data-source="spclass/index" class="form-control selectpage" name="row[class_id]" type="text" value="" data-field="name">
        </div>
    </div>

2.edit.html

<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Class_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-class_id" data-rule="required" data-source="spclass/index" class="form-control selectpage" name="row[class_id]" type="text" value="{$row.class_id}">
        </div>
    </div>

Guess you like

Origin blog.csdn.net/qq_36129701/article/details/81315459