echotrue/yii2-area 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

echotrue/yii2-area

Composer 安装命令:

composer require echotrue/yii2-area

包简介

Yii2.0 area selecter

README 文档

README

Yii2.0 area selecter

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist echotrue/yii2-area "*"

or add

"echotrue/yii2-area": "*"

to the require section of your composer.json file.

Usage

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

 Controller :
 public function actions()
     {
         return [
             'area'    => [
                 'class' => 'echotrue\area\AreaAction',
                 'tableName' => 'china_area',
             ]
         ];
     }
            
 View:           
 <?= $form->field($model,'name')->widget(\echotrue\area\Area::className(), [
        'model'     => $model,
        'options'   => [
            'tableName' => 'china_area',
            'url'       => \yii\helpers\Url::to(['site/area'])
        ]
    ]) ?>

or

    Controller :
    public function actions()
     {
         return [
             'area'    => [
                 'class' => 'echotrue\area\AreaAction',
                 'tableName' => 'china_area',
             ]
         ];
     }
     View:
    echo \echotrue\area\Area::widget([
        'name'    => 'name',
        'options' => [
            'tableName' => 'china_area',
            'url'       => \yii\helpers\Url::to(['site/area'])
        ]
    ]);

configuration

options:

  • tableName : The table'name of the area source,without table prefix
  • url : The request url for inline actions .
  • template : default template like this , maybe you can customize your template
<div class='row'>
    {hideInput}
    <div class='col-sm-3'>{province}</div>
    <div class='col-sm-3'>{city}</div>
    <div class='col-sm-3'>{regional}</div>
</div>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2016-12-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固