From 3cdfbc9ac37988d8aa3d5cf08c9ef2a6b6038724 Mon Sep 17 00:00:00 2001 From: Jesse Rodriguez <54310591+1pone@users.noreply.github.com> Date: Wed, 3 Jan 2024 19:18:10 +0800 Subject: [PATCH] fix: skip mock tooltip (#587) * fix: skip mock tooltip * chore: update version to 0.6.14 --------- Co-authored-by: onePone --- package.json | 2 +- packages/arex-core/package.json | 2 +- .../arex-core/src/components/HelpTooltip.tsx | 14 ++++++- packages/arex/package.json | 2 +- .../arex/src/i18n/locales/cn/components.json | 1 + .../arex/src/i18n/locales/en/components.json | 1 + .../Replay/FormItem/ExcludeOperation.tsx | 40 +++++++++++-------- .../src/panes/AppSetting/Replay/index.tsx | 27 ++++++++++++- packages/arex/vite.config.ts | 2 +- 9 files changed, 67 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 4c31c2c11..fd9e62b2a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "arex", "private": true, - "version": "0.6.13", + "version": "0.6.14", "description": "", "homepage": "https://github.com/arextest/arex", "main": "index.js", diff --git a/packages/arex-core/package.json b/packages/arex-core/package.json index 93f9de09b..f8c2765d5 100644 --- a/packages/arex-core/package.json +++ b/packages/arex-core/package.json @@ -1,6 +1,6 @@ { "name": "@arextest/arex-core", - "version": "0.3.7", + "version": "0.3.8", "homepage": "https://github.com/arextest/arex", "main": "dist/arex-core.js", "module": "dist/arex-core.js", diff --git a/packages/arex-core/src/components/HelpTooltip.tsx b/packages/arex-core/src/components/HelpTooltip.tsx index 91bae5ffc..0cc151193 100644 --- a/packages/arex-core/src/components/HelpTooltip.tsx +++ b/packages/arex-core/src/components/HelpTooltip.tsx @@ -2,10 +2,20 @@ import { QuestionCircleOutlined } from '@ant-design/icons'; import { Tooltip, Typography } from 'antd'; import React, { FC } from 'react'; -const HelpTooltip: FC<{ title: React.ReactNode; children: React.ReactNode }> = (props) => ( +export interface HelpTooltipProps { + title: React.ReactNode; + maxWidth?: string; + children: React.ReactNode; +} + +const HelpTooltip: FC = (props) => ( <> {props.children} - + diff --git a/packages/arex/package.json b/packages/arex/package.json index bdf35279b..5e344b596 100644 --- a/packages/arex/package.json +++ b/packages/arex/package.json @@ -1,7 +1,7 @@ { "name": "arex", "private": true, - "version": "0.6.13", + "version": "0.6.14", "author": "arextest", "main": "dist-electron/main.js", "files": [ diff --git a/packages/arex/src/i18n/locales/cn/components.json b/packages/arex/src/i18n/locales/cn/components.json index e08c6e875..fa7f7b587 100644 --- a/packages/arex/src/i18n/locales/cn/components.json +++ b/packages/arex/src/i18n/locales/cn/components.json @@ -310,6 +310,7 @@ "QPSTips": "有效范围 1 - 20", "emptyQPS": "请输入最大QPS", "skipMock": "不Mock依赖", + "skipMockTooltip": "设置不需要回放的接口,多个值使用','分隔。", "sync": "同步", "emptyContractTip": "无报文契约,请尝试同步更新契约", "contract": "契约", diff --git a/packages/arex/src/i18n/locales/en/components.json b/packages/arex/src/i18n/locales/en/components.json index 5642305a9..a0a1c2adf 100644 --- a/packages/arex/src/i18n/locales/en/components.json +++ b/packages/arex/src/i18n/locales/en/components.json @@ -312,6 +312,7 @@ "QPSTips": "Allowable value range 1 - 20", "emptyQPS": "Please input your max QPS", "skipMock": "Skip Mock", + "skipMockTooltip": "Configure interfaces that do not require mocks, multiple values separated by ','.", "sync": "Sync", "emptyContractTip": "No contract, please try to synchronize the contract", "contract": "Contract", diff --git a/packages/arex/src/panes/AppSetting/Replay/FormItem/ExcludeOperation.tsx b/packages/arex/src/panes/AppSetting/Replay/FormItem/ExcludeOperation.tsx index 5039f7fb0..a53739b75 100644 --- a/packages/arex/src/panes/AppSetting/Replay/FormItem/ExcludeOperation.tsx +++ b/packages/arex/src/panes/AppSetting/Replay/FormItem/ExcludeOperation.tsx @@ -1,5 +1,5 @@ import { DeleteOutlined, PlusOutlined, SaveOutlined } from '@ant-design/icons'; -import { styled, TooltipButton, useTranslation } from '@arextest/arex-core'; +import { css, styled, TooltipButton, useTranslation } from '@arextest/arex-core'; import { useRequest } from 'ahooks'; import { App, Button, Input, Select, Space, Table } from 'antd'; import { ColumnsType } from 'antd/lib/table'; @@ -46,7 +46,6 @@ const ExcludeOperation: FC = (props) => { title: t('appSetting.path'), dataIndex: 'key', key: 'key', - width: '50%', render: (text, record, i) => ( = (props) => { title: t('appSetting.value'), dataIndex: 'value', key: 'value', - width: '50%', render: (text, record, i) => (