guopee / yii2-appendgrid
基于 jquery.appendgrid-1.7.1 的 yii2 扩展
1.0.0
2018-08-08 14:32 UTC
Requires
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2024-09-24 03:38:56 UTC
README
基于 jquery.appendGrid-1.7.1 的 yii2 扩展
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist guopee/yii2-appendgrid "*"
或添加
"guopee/yii2-appendgrid": "*"
到您的 composer.json 文件的 require 部分。
使用方法
扩展安装后,只需在您的代码中通过以下方式使用它
<?php $form->field($this, $key)->widget( 'guopee\appendGrid', [ 'configs' => [ 'initRows' => 1, 'columns' => [ ['name' => 'target', 'display' => '目标数量', 'type' => 'number'], ['name' => 'money', 'display' => '优惠金额', 'type' => 'number'], ['name' => 'discount', 'display' => '优惠折扣', 'type' => 'number'], ], 'initData'=>json_decode($this->$key) ] ]) ?>