|
111 | 111 | <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(! isPreviewEnabled, 10)">预览左侧输入框: {{ isPreviewEnabled ? '已开启,点击关闭' : '已关闭,点击开启' }}</a> |
112 | 112 | <a v-show="User.id != null && User.id > 0" style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(! isEditResponse, 11)">当前编辑模式: {{ isEditResponse ? 'Response 后端响应结果' : 'Request 前端请求参数' }}</a> |
113 | 113 | <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(StringUtil.isEmpty(host, true), 3)">{{ StringUtil.isEmpty(host, true) ? '隐藏(固定)URL Host: 可用空格隔开' : '显示(编辑)URL Host: \n' + host }}</a> |
| 114 | + <a style="border-bottom: #DDD 1px solid;width: 100%;display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;" href="javascript:void(0)" @click="showConfig(! isHeaderShow, 4)">{{ (isHeaderShow ? '隐藏(固定)' : '显示(编辑)') + (isEditResponse ? '参数值 Argument Value' : '参数值 Argument Value' ) }}</a> |
114 | 115 | <a style="border-bottom: #DDD 1px solid;width: 100%;display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;" href="javascript:void(0)" @click="showConfig(! isRandomShow, 5)">{{ isRandomShow ? '隐藏(固定)参数注入 Random Test' : '显示(编辑)参数注入 Random Test' }}</a> |
115 | | - <a style="border-bottom: #DDD 1px solid;width: 100%;display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;" href="javascript:void(0)" @click="showConfig(! isHeaderShow, 4)">{{ (isHeaderShow ? '隐藏(固定)' : '显示(编辑)') + (isEditResponse ? '响应头 Response Header' : '请求头 Request Header' ) }}</a> |
116 | | - <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 2)">生成代码(封装,解析) : {{ language || '例如 Java' }}</a> |
| 116 | + <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 2)">生成代码(封装,解析) : {{ language || '例如 Java' }}</a> |
117 | 117 | <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 0)">数据库类型 Database: {{ database || '例如 MYSQL' }}</a> |
118 | 118 | <a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 1)">数据库名/模式 Schema: {{ schema || '例如 sys' }}</a> |
119 | 119 | <a v-show="User.id == null || User.id <= 0" style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 7)">使用的请求类型: {{ types == null || types.length <= 0 ? '点击设置' : (types instanceof Array ? types.join() : types) }}</a> |
|
171 | 171 | </div> |
172 | 172 | <div class="left-panel"> |
173 | 173 | <ul v-show="isTestCaseShow" class="historys" style="width: 100%;height: 100%;overflow: hidden;overflow-y: scroll;padding-bottom: 50px"> |
174 | | - <li v-for="(item, index) in testCases" > |
| 174 | + <li v-for="(item, index) in testCases" :id="'docItem' + index" > |
175 | 175 | <div style="display: inline-table"> |
176 | 176 | <button v-show="false && types != null && types.length > 1" style="width: 48px;margin-right: 6px;padding: 0px;position: relative" id="vDocType" @click="restoreRemoteAndTest(index, item)">{{ getTypeName(item.Document.type) }}</button> |
177 | 177 | <a class="hint--rounded hint--no-animate" ref="testCaseTexts" @mouseover="setRequestHint(index, item)" href="javascript:void(0)" @click="restoreRemote(index, item)" :style="{ color: index == currentDocIndex ? 'black' : 'gray' }"> {{(item.Document.version > 0 ? 'V' + item.Document.version : 'V*') + ' ' + item.Document.name + ' ' + item.Document.url}}</a> |
|
256 | 256 |
|
257 | 257 | <!-- 临时生成的配置子项 --> |
258 | 258 | <ul v-show="isRandomSubListShow" class="historys" style="width: 100%;height: 100%;overflow: hidden;overflow-y: scroll; padding-bottom: 100px"> |
259 | | - <li style="width: 100%" v-for="(item, index) in randomSubs" > |
| 259 | + <li style="width: 100%" v-for="(item, index) in randomSubs" :id="'randomSubItem' + index" > |
260 | 260 | <a v-show="! isRandomEditable" class="hint--rounded hint--no-animate" ref="randomSubTexts" @mouseover="setRequestHint(index, item, true)" href="javascript:void(0)" @click="restoreRandom(index, item)" :style="{ color: index == currentRandomSubIndex ? 'black' : 'gray' }">{{ (item.Random || {}).name }}</a> |
261 | 261 | <input v-show="isRandomEditable" style="width: 96%" v-model="(item.Random || {}).name" @keyup="doOnKeyUp(event, 'randomSub', false, item)" /> |
262 | 262 |
|
|
286 | 286 |
|
287 | 287 | <!-- 持久化存储的配置项 --> |
288 | 288 | <ul v-show="isRandomListShow" class="historys" style="width: 100%;height: 100%;overflow: hidden;overflow-y: scroll;padding-bottom: 100px"> |
289 | | - <li style="width: 100%; display: inline-table" v-for="(item, index) in randoms" > |
| 289 | + <li style="width: 100%; display: inline-table" v-for="(item, index) in randoms" :id="'randomItem' + index" > |
290 | 290 | <input v-model="(item.Random || {}).count" style="min-width: 12px; max-width: 30px; width: auto; text-align: center" type="number" @keyup="doOnKeyUp(event, 'random', false, item)" /> |
291 | 291 | <a style="margin-left: 4px; ">次</a> |
292 | 292 | <a v-show="! isRandomEditable" style="top: 13px; left: 68px; position: absolute" class="hint--rounded hint--no-animate" ref="randomTexts" @mouseover="setRequestHint(index, item, true)" href="javascript:void(0)" @click="restoreRandom(index, item)" :style="{ color: index == currentRandomIndex ? 'black' : 'gray' }">{{ (item.Random || {}).name }}</a> |
|
345 | 345 | userId: RANDOM_IN(82001, 82002, 82003) // 随机选项取值 |
346 | 346 | limit: ORDER_IN(1, 3, 5, 10) // 顺序选项取值 |
347 | 347 | offset: RANDOM_INT(0, 5) // 随机范围取值 |
348 | | - // 从数据库随机取值 userId: RANDOM_DB('Comment', 'userId') |
| 348 | + // 从数据库随机取值 userId: RANDOM_DB(0, 100000, 'Comment', 'userId') |
349 | 349 |
|
350 | 350 | // 注释可省略,但如果未省略则前面两个空格必须;清空文本内容可查看规则。 |
351 | 351 |
|
|
496 | 496 | </div> |
497 | 497 |
|
498 | 498 | <!--<div class="statement">--> |
499 | | - <!--Copyright ©2016-2021 APIJSON.cn All right reserved.--> |
| 499 | + <!--Copyright ©2022 APIJSON.cn All right reserved.--> |
500 | 500 | <!--<a href="https://beian.miit.gov.cn/" target="_blank">--> |
501 | 501 | <!--<span >粤ICP备18005508号-1.</span>--> |
502 | 502 | <!--</a>--> |
|
513 | 513 | <button @click="save()" >保存</button> |
514 | 514 | </div> |
515 | 515 |
|
516 | | - <!--弹出下载文本框--> |
517 | | - <div class="save-box" v-show="isExportShow"> |
518 | | - <div id="divSaveBoxCheck" v-show="isExportCheckShow && ! isEditResponse" style="position: absolute; width: 120px; height: 30px; padding: 0px; margin: 0px; left: -45px; top: 6px; display: inline-block"> |
519 | | - <input type="checkbox" style="position: relative; width: 18px; top: 1px; " id="cbSaveBoxCheck" value="first_checkbox"><label id="lblSaveBox" for="cbSaveBoxCheck" style="top: 0px; right: -36px">{{ exTxt.label || '发布简单接口'}}</label> |
520 | | - </div> |
521 | | - |
522 | | - <svg class="icon close-icon" @click="showExport(false, isExportRemote)"> |
523 | | - <use xlink:href="svg/icon.svg#close"></use> |
524 | | - </svg> |
525 | | - |
526 | | - <input type="text" placeholder="请输入名称" v-model="exTxt.name" /> |
527 | | - <div style="display: inline-block; margin-top: 6px; padding-bottom: 0px"><button @click="exportTxt(0)">{{isExportRemote ? '上传' : '下载'}}</button><button v-show="isExportRemote && (isExportRandom != true || isEditResponse != true)" style="margin-left: 6px" @click="exportTxt(1)">{{isExportRandom ? '发布简单接口' : '分享'}}</button></div> |
528 | | - </div> |
| 516 | + <!--弹出下载文本框--> |
| 517 | + <div class="save-box" v-show="isExportShow"> |
| 518 | +<!-- <div id="divSaveBoxCheck" v-show="isExportCheckShow && ! isEditResponse" style="position: absolute; width: 120px; height: 30px; padding: 0px; margin: 0px; left: -45px; top: 6px; display: inline-block">--> |
| 519 | +<!-- <input type="checkbox" style="position: relative; width: 18px; top: 1px; " id="cbSaveBoxCheck" value="first_checkbox"><label id="lblSaveBox" for="cbSaveBoxCheck" style="top: 0px; right: -36px">{{ exTxt.label || '发布简单接口'}}</label>--> |
| 520 | +<!-- </div>--> |
| 521 | + <svg class="icon close-icon" @click="showExport(false, isExportRemote)"> |
| 522 | + <use xlink:href="svg/icon.svg#close"></use> |
| 523 | + </svg> |
| 524 | + |
| 525 | + <input type="text" placeholder="请输入名称" v-model="exTxt.name" /> |
| 526 | + <div style="display: inline-block; margin-top: 6px; padding-bottom: 0px"><button @click="exportTxt(0)">{{isExportRemote ? '上传' : '下载'}}</button><button v-show="isExportRemote && (isExportRandom != true && isEditResponse != true)" style="margin-left: 6px" @click="exportTxt(1)">{{isExportRandom ? '发布简单接口' : '分享'}}</button></div> |
| 527 | + </div> |
529 | 528 |
|
530 | 529 | <!--弹出设置文本框--> |
531 | 530 | <div class="save-box" v-show="isConfigShow"> |
|
0 commit comments