Skip to content

Commit

Permalink
fix: dialog 交互优化
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ngjie committed Feb 18, 2024
1 parent ef7ed74 commit 5f99b8d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
<div align="center">
<strong>

[English](README.md) | [简体中文](README.zh.md)
English | [中文](README.zh.md)

</strong>
</div>

## When to use

- When the required data does not meet the desired effect and `Mock` is required
- When we need to verify some **exception scenarios** or **boundary values** during the development or production phase
- When data changes frequently during the development phase, resulting in the interface not working properly
- When 404 appears on the interface
- When actual data fails to meet expected results, mocking data is needed.
- In development or production stages, verification of exceptional scenarios or edge cases is necessary.
- The frequent changes in interface data hinder the development process.
- When a certain interface returns a 404 error.

## Installation

Expand All @@ -63,6 +63,7 @@ Video: [https://www.youtube.com/watch?v=F\_\_7LXBqnvQ&list=PLniy0-3-8-V1ZhsmG6\_
![issues_checked](https://github.com/g0ngjie/ajax-proxy/wiki/images/issues_checked.png)
- You can select the `Network` section in Developer Tools and disable caching by checking ☑️
![issues_disabled_cache](https://github.com/g0ngjie/ajax-proxy/wiki/images/issues_disabled_cache.png)
2. [Function-based response explanation](README.func.md)

## Monorepo

Expand All @@ -86,7 +87,7 @@ You can test it directly in [Swagger](https://petstore.swagger.io/)

## ⭐ Stargazers

Thank you very much for your support!
Thank you for your support!

[![Stargazers for ajax-proxy](https://reporoster.com/stars/g0ngjie/ajax-proxy)](https://github.com/g0ngjie/ajax-proxy/stargazers)

Expand Down
12 changes: 7 additions & 5 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@
<div align="center">
<strong>

[English](README.md) | [简体中文](README.zh.md)
[English](README.md) | 中文

</strong>
</div>

## 适用场景

- 当需数据无法满足预期结果,需要 `Mock`
- 当我们在开发或者生产阶段需要验证一些 **异常场景** 或者 **临界值**
- 当开发阶段数据频繁变更,导致页面无法正常联调时
- 当某个接口 404 时
- 当实际数据无法达到预期结果时,需要进行 Mock 数据处理。
- 在开发或生产阶段,需要验证异常场景或临界值。
- 开发阶段数据频繁变更,导致页面无法正常联调时。
- 某个接口返回 404 错误时。

<!-- - 当 ... ... -->

## 安装
Expand Down Expand Up @@ -69,6 +70,7 @@
![issues_checked](https://github.com/g0ngjie/ajax-proxy/wiki/images/issues_checked.png)
- 方法 2: 可以在开发者工具中的`网络(network)`里面,通过 ☑️ 禁用缓存
![issues_disabled_cache](https://github.com/g0ngjie/ajax-proxy/wiki/images/issues_disabled_cache.png)
2. [函数方式响应说明](README.func.md)

## Monorepo

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ajax-proxy",
"private": true,
"description": "Modify your Ajax response to test",
"version": "2.2.9",
"version": "2.2.10",
"scripts": {
"dev": "pnpm -C ./packages/vue-panels serve",
"watch": "run-p watch:lib watch:chrome",
Expand Down
2 changes: 2 additions & 0 deletions packages/code-editor/packages/useEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ function customCompletions(target, type = 'interceptor') {
export function getDefaultContent(type = "interceptor") {
let defaultContent = type === 'interceptor' ?
`
/** @see https://github.com/g0ngjie/ajax-proxy/blob/master/README.func.md */
function setup(req, res, next) {
// TODO...
// type Next = { override?: string, status?: string | number }
next({ override: "", status: "" });
}
` :
`
/** @see https://github.com/g0ngjie/ajax-proxy/blob/master/README.func.md */
function setup(
req, /** req: { url: string, method: string }*/
next /**{ url: string, headers?: { [key: string]: string } }*/
Expand Down
2 changes: 1 addition & 1 deletion packages/shell-chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Ajax Proxy",
"version": "2.2.9",
"version": "2.2.10",
"description": "Modify your Ajax response to test",
"author": "Gj",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-panels/src/views/interceptor/modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:visible.sync="isShow"
:before-close="handleClose"
:close-on-click-modal="false"
:close-on-press-escape="false"
:close-on-press-escape="true"
top="1%"
width="80%"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-panels/src/views/redirector/modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:visible.sync="isShow"
:before-close="handleClose"
:close-on-click-modal="false"
:close-on-press-escape="false"
:close-on-press-escape="true"
top="1%"
width="80%"
>
Expand Down

0 comments on commit 5f99b8d

Please sign in to comment.