问题描述
<?=
GridView::widget([
'dataProvider' => $dataProvider,'filterModel' => $searchModel,'tableOptions' => ['class' => 'table custom-table-view table-striped table-bordered'],'columns' => [
['class' => 'yii\grid\SerialColumn'],[
'label' => 'User name','attribute' => 'name','filterInputoptions' => [
'class' => 'form-control custom-form-control pr-5','placeholder' => 'Search...',],])
?>
这是我正在使用的代码,使用此代码我可以将类添加到其中,这是输出。
<table class="table custom-table-view table-striped table-bordered">
<thead>
<tr id="w0-filters" class="filters">
<td> </td>
<td><input type="text" id="search-name" class="form-control custom-form-control pr-5" name="Search[name]" placeholder="Search..."></td>
</tr>
但我想要的是
<tr id="w0-filters" class="filters">
<td> </td>
<td>
<div class"my_class">
<input type="text" id="search-name" class="form-control custom-form-control pr-5" name="Search[name]" placeholder="Search..."><i class="fa fa-user"></i>
</div>
</td>
如何在输入框外添加 my_class div。?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)