yiisoft/yii2-jquery 问题修复 & 功能扩展

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

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

yiisoft/yii2-jquery

Composer 安装命令:

composer require yiisoft/yii2-jquery

包简介

jQuery integration layer for Yii2 asset bundles, client validation scripts, and widget client scripts.

README 文档

README

Yii Framework

jQuery Integration Extension for Yii2


This extension provides the optional jQuery integration layer for Yii Framework 2.0 applications. It supplies jQuery-backed asset bundles, client-side validation scripts, and widget client scripts for every core validator, grid component, and widget that supports the client-script strategy pattern.

Latest Stable Version Total Downloads build codecov Static Analysis

Installation

Important

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist yiisoft/yii2-jquery:~1.0.0

or add

"yiisoft/yii2-jquery": "~1.0.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, register the bootstrap class in your application configuration:

return [
    'bootstrap' => [
        \yii\jquery\Bootstrap::class,
    ],
    // ...
];

The Bootstrap class configures the DI container with jQuery-based $clientScript defaults for every core validator, grid component, and widget that supports the client-script strategy pattern. No further configuration is required.

Overriding a single validator

You can override the client-script implementation on a per-rule basis by passing the clientScript key in the rule definition:

public function rules(): array
{
    return [
        [
            'email',
            'required',
            'clientScript' => ['class' => MyCustomRequiredClientScript::class],
        ],
    ];
}

Quality code

PHPStan Level StyleCI

Documentation

Support the project

Open Collective

Follow updates

Official website Follow on X Telegram Slack

License

License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固