xj/yii2-ratchet-widget

yii2-ratchet-widget

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/xj/yii2-ratchet-widget

1.0.0 2015-08-28 05:42 UTC

This package is auto-updated.

Last update: 2025-10-10 22:58:49 UTC


README

https://github.com/twbs/ratchet

composer.json

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

RegisterAssets

Base

RatchetAsset::register($this);

AndroidTheme

RatchetAndroidAsset::register($this);

IosTheme

RatchetIosAsset::register($this);

Widget TabBar

Icon

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'],
    ]
]);

Label Only

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