guopee / yii2-appendgrid

基于 jquery.appendgrid-1.7.1 的 yii2 扩展

安装次数: 11

依赖者: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分支: 0

开放问题: 0

语言:HTML

类型:yii2 扩展

1.0.0 2018-08-08 14:32 UTC

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)
	        ]
	])
?>