antkaz/yii2-iview

This package is abandoned and no longer maintained. No replacement package was suggested.

The iView extension for the Yii framework

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 4

Forks: 1

Open Issues: 0

Type:yii2-extension

v0.2 2018-06-03 11:28 UTC

This package is auto-updated.

Last update: 2020-02-14 20:07:52 UTC


README

68747470733a2f2f66696c652e697669657775692e636f6d2f646973742f37366563623665373664326334333830363566393063643766386661373337312e706e67

IVIew Extension for Yii2


License Build Status Maintainability

This is the IView UI extension based on Vue.js for Yii2. It allows you to use the components of the IView library in your application.

Documentation:

Installation

The preferred way to install this extension is through composer.

Run

php composer.phar require antkaz/yii2-iview

or add

"antkaz/yii2-iview": "dev-master"

to the require section of your composer.json file.

Usage

After installing the extension, just use it in your code:

<?php

use antkaz\iview\IViewAsset;
use antkaz\vue\Vue;
use \yii\web\JsExpression;

IViewAsset::register($this);
?>
<div class="iview">
    <?php Vue::begin([
        'clientOptions' => [
            'data' => [
                'visible' => false
            ],
            'methods' => [
                'show' => new JsExpression('function() {this.visible = true;}')
            ]
        ]
    ]) ?>

    <i-button @click="show">Click me!</i-button>
    <Modal v-model="visible" title="Welcome">Welcome to iView</Modal>

    <?php Vue::end() ?>
</div>

The above example displays a button. Clicking this button opens a modal window.