|
137 | 137 | <button v-show="types != null && types.length > 1" class="transfer" id="vType" :disabled="isEditResponse" @click="changeType()">{{ getTypeName(type) }}</button>
|
138 | 138 | <div style="height: 100%;display: flex;flex-grow: 1">
|
139 | 139 | <input class="url" id="vUrlComment" :disabled="isEditResponse" type="text" style="width: 100%; position: absolute; z-index: -100; color: darkseagreen;background: #0000;" />
|
140 |
| - <input class="url" id="vUrl" :disabled="isEditResponse" type="text" @keyup="doOnKeyUp(event)" placeholder="请输入请求的接口地址" style="z-index: 0; background: #0000;" /> |
| 140 | + <input class="url" id="vUrl" :disabled="isEditResponse" type="text" @copy="doOnCopy" @paste="doOnPaste" @keyup="doOnKeyUp(event)" placeholder="请输入请求的接口地址" style="z-index: 0; background: #0000;" /> |
141 | 141 | </div>
|
142 | 142 | <button class="send" id="vSend" @click="onClickSend()">{{ isEditResponse ? '模拟返回' : '发送请求' }}</button>
|
143 | 143 | </div>
|
|
195 | 195 | </textarea>
|
196 | 196 | <textarea v-show="! isEditResponse" id="vWarning" style="width: 100%; height: 100%; position: absolute; z-index: 0; color: orangered; background-color: #0000;" wrap="off" disabled>
|
197 | 197 | </textarea>
|
198 |
| - <textarea id="vInput" @keyup="onChange(true)" style="width: 100%;height: 100%; position: absolute; z-index: 100; background: #0000;" wrap="off" placeholder="{ // 根对象,可在内部加 format,tag,version,@role,@database,@schema,@datasource,@explain,@cache 等全局关键词键值对 |
| 198 | + <textarea id="vInput" @copy="doOnCopy" @paste="doOnPaste" @keyup="onChange(true)" style="width: 100%;height: 100%; position: absolute; z-index: 100; background: #0000;" wrap="off" placeholder="{ // 根对象,可在内部加 format,tag,version,@role,@database,@schema,@datasource,@explain,@cache 等全局关键词键值对 |
199 | 199 | '[]': { // 数组,可在内部加 count,page,query,join 等关键词键值对
|
200 | 200 | 'count': 5, // 每页数量
|
201 | 201 | 'page': 0, // 分页页码
|
|
251 | 251 | 
|
252 | 252 |
|
253 | 253 | ## 快捷键
|
254 |
| -Ctrl + I 或 Command + I 格式化 JSON |
| 254 | +Ctrl + I 或 Command + I 格式化 JSON,清除所有注释和无效空格、换行等; |
| 255 | +Ctrl + / 或 Command + / 对选中行 新增行注释 或 取消行注释; |
255 | 256 |
|
256 | 257 | #### 右上角设置项 > 预览请求输入框,显示对应的预览效果
|
257 | 258 | */
|
|
262 | 263 | {
|
263 | 264 | "User": {
|
264 | 265 | "id": 82001
|
265 |
| - }, |
| 266 | + }, // 以上查一个对象,以下查一个数组,Comment.userId = User.id |
266 | 267 | "[]": {
|
267 |
| - "Comment": { |
268 |
| - "userId@": "User/id" |
| 268 | + Comment : { |
| 269 | + 'userId@': "User/id" |
269 | 270 | }
|
270 | 271 | }
|
271 | 272 | }
|
|
275 | 276 | 注释可省略。行注释前必须有两个空格;段注释必须在 JSON 下方。
|
276 | 277 |
|
277 | 278 | ## 快捷键
|
278 |
| -Ctrl + I 或 Command + I 格式化 JSON |
| 279 | +Ctrl + I 或 Command + I 格式化输入框,清除所有注释和无效空格、换行等; |
| 280 | +Ctrl + / 或 Command + / 对选中行 新增行注释 或 取消行注释; |
279 | 281 |
|
280 | 282 | #### 右上角设置项 > 预览请求输入框,显示对应的预览效果
|
281 | 283 | */
|
|
388 | 390 | <a >条</a>
|
389 | 391 | </div>
|
390 | 392 |
|
391 |
| - <textarea id="vRandom" style="width: 100%;height: 100%;" wrap="off" |
| 393 | + <textarea id="vRandom" @copy="doOnCopy" @paste="doOnPaste" style="width: 100%;height: 100%;" wrap="off" |
392 | 394 | placeholder="# 常用:
|
393 | 395 | RANDOM_IN(val0:Any, val1:Any ...) // 从选项内随机取值
|
394 | 396 | RANDOM_INT(min:Integer, max:Integer) // 从范围内随机取整数
|
|
410 | 412 | @explain: ORDER_IN(true, false) // 顺序取值
|
411 | 413 | // 从数据库随机取值 []/Comment/toId: RANDOM_DB()
|
412 | 414 |
|
413 |
| - // 注释可省略,但如果未省略则前面两个空格必须;清空文本内容可查看规则。</textarea> |
| 415 | + // 注释可省略,但如果未省略则前面两个空格必须;清空文本内容可查看规则。 |
| 416 | + |
| 417 | + // ## 快捷键 |
| 418 | + // Ctrl + I 或 Command + I 格式化文本,清除所有注释和无效空格、换行等; |
| 419 | + // Ctrl + / 或 Command + / 对选中行 新增行注释 或 取消行注释; |
| 420 | + </textarea> |
414 | 421 | </div>
|
415 | 422 |
|
416 | 423 |
|
|
423 | 430 | </svg>
|
424 | 431 | </a>
|
425 | 432 | </div>
|
426 |
| - <textarea id="vHeader" @keyup="onChange(true)" style="width: 100%;height: 100%;" wrap="off" placeholder="Authorization: Basic YWRtaW46YWRtaW4= // 示例,支持单行注释 |
427 |
| -My-Header: 'Secret' + Math.random() // 示例,代码执行结果作为实际值,值为 fun(arg0, arg1..) 等包含函数名与括号的格式 "></textarea> |
| 433 | + <textarea id="vHeader" @copy="doOnCopy" @paste="doOnPaste" @keyup="onChange(true)" style="width: 100%;height: 100%;" wrap="off" placeholder="Authorization: Basic YWRtaW46YWRtaW4= // 示例,支持单行注释 |
| 434 | +My-Header: 'Secret' + Math.random() // 示例,代码执行结果作为实际值,值为 fun(arg0, arg1..) 等包含函数名与括号的格式 |
| 435 | + // ## 快捷键 |
| 436 | + // Ctrl + I 或 Command + I 格式化文本,清除所有注释和无效空格、换行等; |
| 437 | + // Ctrl + / 或 Command + / 对选中行 新增行注释 或 取消行注释;"></textarea> |
428 | 438 | </div>
|
429 | 439 |
|
430 | 440 | </div>
|
|
0 commit comments