<ion-card class="app-palace-menu" *ngFor="let item of items">
    <ion-item lines="full">
        <ion-label slot="start">{{ item.text }}</ion-label>
        <a [hidden]="!item.items || (item.items.length <= 4)" class="app-palace-menu-a" href="javascript:;" slot="end" (click)="openChange(item)">{{ item.isOpen ? '收起' : '展开' }}</a>
    </ion-item>
    <ion-card-content>
        <ion-grid>
            <ion-row>
                <ng-container *ngFor="let child of item.items;let i = index;">
                    <ion-col size="3" class="app-palace-menu-item" (click)="onClick(child)" [hidden]="!item.isOpen && (i > 3)">
                        <div class="icon">
                            <app-icon [item]="child" [isDefault]="true"></app-icon>
                        </div>
                        <div class="title {{ child.textcls }}">
                            {{ child.text }}
                        </div>
                    </ion-col>
                </ng-container>
                <ion-col *ngIf="isCustom" size="3" class="app-palace-menu-item" (tap)="editMenus()" [hidden]="(!item.isOpen || (item.items.length <= 4))">
                    <div class="icon">
                        <ion-icon name="add" style="width: 100%;height: 100%;"></ion-icon>
                    </div>
                    <div class="title">
                        添加功能
                    </div>
                </ion-col>
            </ion-row>
        </ion-grid>
    </ion-card-content>
</ion-card>