Browse Source

Merge branch 'master' of http://dev.kcshop.com.cn/blobt/kcbasic

wechat_public_accounts
blobt 5 years ago
parent
commit
8728459833
  1. 3
      vendor/blobt/widgets/Menu.php

3
vendor/blobt/widgets/Menu.php

@ -186,13 +186,14 @@ class Menu extends Widget {
*/ */
protected function renderItems($items) { protected function renderItems($items) {
$lines = []; $lines = [];
$n = count($items);
foreach ($items as $i => $item) { foreach ($items as $i => $item) {
/* 获取菜单项的自定义属性 */ /* 获取菜单项的自定义属性 */
$options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));
$tag = ArrayHelper::remove($options, 'tag', 'li'); $tag = ArrayHelper::remove($options, 'tag', 'li');
$class = []; $class = [];
if ($item['active']) {
if (isset($item['active'])) {
$class[] = $this->activeCssClass; $class[] = $this->activeCssClass;
if (isset($item['items'])) { if (isset($item['items'])) {
$class[] = $this->menuOpenClass; $class[] = $this->menuOpenClass;

Loading…
Cancel
Save