<template>
    <div class="wot" @click="showList = false">
        <div class="form">
            <div class="row">
                <i class="icon-search"></i>
                <input v-model="pn" type="text" placeholder="输入昵称">
                <div class="select-wrap"  v-if="selectList && pn">
                    <ul class="select">
                    <li v-for="(item,index) in selectList"
                        :key="index"
                        @click.stop="submit(item.pn,item.zone)">
                        <span class="pn"><em>{{item.match[0]}}</em> {{item.test}}</span><span class="zone">{{zoneList[item.zone]}}</span>
                        
                    </li>
                </ul>
                </div>
                
            </div>
            <!-- <div class="row icon-down" @click.stop="showList = !showList">
                <p class="checked">{{zoneList[this.zoneIndex]}}</p>
                <div class="zone" v-show="showList">
                    <p v-for="(item, index) in zoneList"
                        :key="index"
                        @click.stop="selectZone(index)">
                        {{item}}
                    </p>                
                </div>
            </div> -->
            <div class="panel clearfix" v-show="searchHistory.length != 0">
                <span class="l">最近搜索</span>
                <span class="r" @click.stop="delSearchHistory()">清空记录</span>
            </div>
            <ul class="history">
                <li v-for="(item, index) in searchHistory"
                    :key="index"
                    @click.stop="query(item.pn, item.zone)">
                    {{item.pn}}    
                </li>
                
            </ul>
            <div class="rank">
                <a href="http://wotapp.duowan.com/index.php?r=m/rankList&wotapp_device=AiFjYBS6TUOXAckdTJcbbNiv678Pdr1EflOcpbn61ey8&from=bbsapp" data-client="http://wotapp.duowan.com/index.php?r=m/rankList&wotapp_device=AiFjYBS6TUOXAckdTJcbbNiv678Pdr1EflOcpbn61ey8&from=bbsapp">坦克世界战绩排行榜</a>
            </div>
        </div>
        <!-- <a class="submit" @click.stop="submit()">查询</a> -->

    </div>
</template>

<script>
    import wot from './js/wot.js'
    export default wot
</script>

<style lang="sass">
    @import './sass/wot.scss';
</style>
