<?php
return array
(
    'list' => array
    (
        'field'      => array
        (
            'name',
            //'key',
            'sort' => array
            (
                'type' => 'input',
                'tips' => '双击修改排序',
            ),
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
            'cdate',
        ),
        'tree' => array('parent_id', '0', 'id'),
        'button' => array
        (
            '新增主分类' => array('add', array('parent_id' => '0')),
        ),
        'data_button' => array
        (
            '编辑' => array('edit', 'name,key,desc,icon,sort,status'),
            '新增子分类' => array('fastadd', array('parent_id' => 'id'), '', 'parent_id=0'),
        ),
        'search'    => array
        (
            'name',
            'key',
            'status',
        ),
    ),
    'update' => array
    (
        'field'    => array
        (
            'name' => array
            (
                'rules' => true,
            ),
            /*
            'key' => array
            (
                'desc' => '如果为空，将自动按照名称首字母生成',
            ),
            */
            'parent_id',
            'desc' => 'textarea',
            'icon' => array
            (
                'type' => 'upload',
                'upload' => '1',
                'yun' => true,
                'multiple' => false,
                'limit' => 1,
                'style' => 'list',
                'desc' => '可以到"https://www.iconfont.cn/"下载之后上传',
            ),
            'status' => array
            (
                'type' => 'radio',
            ),
            'sort',
        ),
        'check' => 'key',
        'start' => 'manage/common.updateKey',
    ),
);