simialbi/yii2-widget-turbo 问题修复 & 功能扩展

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

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

simialbi/yii2-widget-turbo

最新稳定版本:1.2.0

Composer 安装命令:

composer require simialbi/yii2-widget-turbo

包简介

Yii2 implementation of hotwired turbo

README 文档

README

Latest Stable Version Total Downloads License build

This repository is work in progress. The Frame widget can already be used.

Resources

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require --prefer-dist simialbi/yii2-widget-turbo

or add

"simialbi/yii2-widget-turbo": "^1.0.0"

to the require section of your composer.json.

Usage

Example Usage

Basic Frame

<?php
Frame::begin([
    'options' => [
        'id' => 'example-frame'
    ]
]);
?>
    <a href="/messages/expanded">
        Show all expanded messages in this frame.
    </a>
    
    <form action="/messages">
        Show response from this form within this frame.
    </form>
<?php
Frame::end();

Eager loaded frame

<?php
Frame::begin([
    'options' => [
        'id' => 'example-frame',
        'src' => Url::to(['/messages'])
    ]
]);
?>
    Content will be replaced when /messages has been loaded.
<?php
Frame::end();

Lazy loaded frame

<?php
Frame::begin([
    'options' => [
        'id' => 'example-frame',
        'src' => Url::to(['/messages'])
    ],
    'lazyLoading' => true
]);
?>
    Content will be replaced when the frame becomes visible and /messages has been loaded.
<?php
Frame::end();

License

yii2-widget-turbo is released under MIT license. See bundled LICENSE for details.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-29