



let group = $M.find('#content')
group.listener
(
    'tap','[tab]',(event,cur)=>
    {
        GlobalMenu(cur)
    }
)

let  list=new $View.getView({id:'#content'})


var up=new $Data.getData
(
    '#content',true,(val,don)=>
    {
        let name=don.name
        let inner=don.$innerhtml
        if(inner)
        {
            $M.find(inner).innerHTML=val
        }
        else
        {
            let param=$M.param()
            let dom=$M.find(param.id);
            dom.style[name]=val
        }        
    }
)




let typeDom=$M.find('#type')
typeDom.listener
(
    'tap','li',(event,dom)=>
    {
        let type=dom.getAttribute('type_name')
        let param=$M.param()
        switch (type) 
        {
            case 'com':
                $Route.push('layout@content@slideDetail@com',{id:param.id})
            break;
            case 'code':
                $Route.push('layout@content@slideDetail@code',{id:param.id})
            break;
            case 'aut':
                $Route.push('layout@content@slideDetail@aut',{id:param.id})
            break;
            case 'adv':
                $Route.push('layout@content@slideDetail@adv',{id:param.id})
            break;
            case 'api':
                $Route.push('layout@content@slideDetail@api',{id:param.id})
            break;

            default:
                $M.info('不支持此类型')
                return
            break;
        }

        $Draw.activeChilds(typeDom,dom,'is-active')
    }
)


$M.find('#content').rely
(
    'html','slide-detail-index-update',(data)=>
    {
        data=data.detail
        let type=data.type
        let param=data.param

        switch (data.type) 
        {
            case 'com':
                list.new()
                list.set(param)
            break;

            case 'show':
                $M.show('#content')
            break;

            default:
                console.log('暂不支持此类型：',data.type)
            break;
        }
    }
)