承接 kak/area 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kak/area

最新稳定版本:v1.0.0

Composer 安装命令:

composer require kak/area

包简介

area container widgets for Yii2

README 文档

README

The widget can, Duplicate area by clicking the button Preview

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kak/area "*"

or add

"kak/area": "*"

to the require section of your composer.json file.

Usage area widget

Once the extension is installed, simply use it in your code by:

<?php kak\widgets\area\Area::begin([
        'label' => 'add params',
        'items' => [
            ['key' => 'key.name'],
            ['key' => 'key.name1'],
            ['key' => 'key.name2' , 'value' => '2'],
            ['key' => 'key.name3'],
        ]
]);?>
    <div class="row form-group">
        <div class="col-xs-1">
            <button type="button" class="btn btn-danger" role="area.remove" >-</button>
        </div>    
        <div class="col-xs-4">
            <input type="text" name="params[key][]"  placeholder="Key"  value="{%=o.key%}" class="form-control"/>
        </div>
        <div class="col-xs-4">
            <input type="text" name="params[value][]" placeholder="Value"  value="{%=o.value%}" class="form-control"/>
        </div>
    </div>
<?php kak\widgets\area\Area::end();?>

Usage area widget render template file

Once the extension is installed, simply use it in your code by:

<?php
$models = PostParams::findOne($id);
kak\widgets\area\Area::widget([
    'item' => new PostParams,
    'items' => $models,
    'viewParams' => [
        'form' => $form
    ],
    'viewItem' => '@app\views\post\_item-post-param'
]);

viewItem is closure function support

<?php
 kak\widgets\area\Area::widget([
     'item' => new PostParams,
     'items' => $models,
     'viewParams' => [
         'form' => $form
     ],
     'viewItem' => function($params, $thisArea){
        
     },
 ]);   

kak\widgets\area\Area

Class Area @package kak\widgets\area

public buttonLabel string text button

public buttonOptions array html options button add item

public viewItem String|Closure render view file templated

public viewParams array addintion view params

public template string template btn layout

public item array default item or model

public items array data array or models

public itemOptions array html options block item

public label string text label

public labelOptions array html options label

统计信息

  • 总下载量: 1.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固