xj/yii2-ratchet-widget

yii2-ratchet-widget

1.0.0 2015-08-28 05:42 UTC

This package is auto-updated.

Last update: 2024-09-10 20:45:10 UTC


README

https://github.com/twbs/ratchet

composer.json

"require": {
    "xj/yii2-ratchet-widget": "~1.0.0"
}

注册资产

基础

RatchetAsset::register($this);

Android主题

RatchetAndroidAsset::register($this);

Ios主题

RatchetIosAsset::register($this);

Widget标签栏

图标

echo TabBar::widget([
    'items' => [
        ['label' => '首页', 'url' => ['shop/index'], 'icon' => 'icon icon-home'],
        ['label' => '最新', 'url' => ['shop/hot'], 'icon' => 'icon icon-search'],
        ['label' => '热门', 'url' => ['shop/hot'], 'icon' => 'icon icon-star-filled'],
        ['label' => '没想好', 'url' => ['shop/hot'], 'icon' => 'icon icon-gear'],
        ['label' => '订单', 'url' => ['profile/order'], 'icon' => 'icon icon-person'],
    ]
]);

仅标签

echo TabBar::widget([
    'items' => [
        ['label' => '首页', 'url' => ['shop/index']],
        ['label' => '最新', 'url' => ['shop/hot']],
        ['label' => '热门', 'url' => ['shop/hot']],
        ['label' => '没想好', 'url' => ['shop/hot']],
        ['label' => '订单', 'url' => ['profile/order']],
    ]
]);