xj/yii2-ratchet-widget

1.0.0 2015-08-28 05:42 UTC

This package is auto-updated.

Last update: 2024-11-10 21:13:04 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']],
    ]
]);