<div class="doc-query">
    <el-card>
        <h3 class="apititle">{{appinfo?appinfo.name:""}}API文档</h3>
        <div style="text-align:right;margin-top: -10">
            <el-button @click="rtnclick" style="color:blue;margin-right:3px" type="text">返回</el-button>
        </div>
        <div style="height:1px;border:1px solid #ccc;border-bottom: none;width: 100%"></div>
        <div style="display:flex;width: 100%">
            <div style="flex-grow:1;border-left:1px solid #ddd">
                <el-input placeholder="输入关键字进行过滤" v-model="filterText">
                </el-input>
                <el-tree ref="tree" style="width:200px;" @node-click="nclick" default-expand-all :data="appdoctree"
                    :filter-node-method="filterNode"></el-tree>
            </div>
            <div style="flex-grow:7;border: 1px solid #ddd;border-right:none;border-top:none;border-bottom: none">
                <div v-for="pkg in Object.keys(appdoc)" style="text-align:left">
                    <br />
                    <div class="pkg">
                        <div class="pkgtitle">{{pkg}}</div>
                        <div class="classpart" v-for="classdoc in appdoc[pkg]">
                            <div class="classtitle"><a :name="classdoc.name">类：{{classdoc.name}}</a></div>
                            <div class="classdesc">类简介：{{classdoc.desc}}</div>
                            <div class="methodesc" v-for="method in classdoc.methods">
                                <div class="methodtitle">
                                    <div><i class="el-icon-info" />方法名称：<a :name="method.name">{{method.name}}</a></div>
                                    <div>请求方式：POST</div>
                                    <div>请求参数格式：JSON</div>
                                    <div class="classexam">
                                        <div class="examheader">方法描述：</div>
                                        <div v-html="method.methodDesc"></div>
                                    </div>
                                </div>
                                <div>请求参数如下:</div>
                                <el-table :data="method.params" border style="width: 100%">
                                    <el-table-column prop="pname" label="键名称" width="180">
                                    </el-table-column>
                                    <el-table-column prop="ptype" label="值类型" width="180">
                                    </el-table-column>
                                    <el-table-column prop="pdesc" label="描述" width="180">
                                    </el-table-column>
                                    <el-table-column prop="defaultValue" label="默认值" width="180">
                                    </el-table-column>
                                </el-table>
                                <div>返回值：</div>
                                <div v-html="method.rtnType"></div>
                                <div>返回值描述：</div>
                                <div v-html="method.rtnTypeDesc"></div>
                            </div>
                            <div class="classexam">
                                <div class="examheader">类中方法使用示例如下：</div>
                                <div v-html="classdoc.exam"></div>
                            </div>
                            <hr />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </el-card>
</div>