Skip to content

Commit

Permalink
🔀 feat: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Dec 18, 2023
2 parents 2c78710 + b618cda commit 11c65d8
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 278 deletions.
16 changes: 7 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Changelog

## [Version 0.31.0-rc.2](https://github.com/ant-design/pro-editor/compare/v0.31.0-rc.1...v0.31.0-rc.2)
## [Version 0.31.0](https://github.com/ant-design/pro-editor/compare/v0.30.0...v0.31.0)

<sup>Released on **2023-12-06**</sup>
<sup>Released on **2023-12-12**</sup>

#### 🐛 修复
#### ✨ 新特性

- Merge branch, update Layout Pannel Styles, update snapshot.
- Change all default size as middle & update FieldSet doc.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed
#### What's improved

- Merge branch ([5b4c5a1](https://github.com/ant-design/pro-editor/commit/5b4c5a1))
- Update Layout Pannel Styles ([a3144ac](https://github.com/ant-design/pro-editor/commit/a3144ac))
- Update snapshot ([f2665ef](https://github.com/ant-design/pro-editor/commit/f2665ef))
- Change all default size as middle & update FieldSet doc ([92d12aa](https://github.com/ant-design/pro-editor/commit/92d12aa))

</details>

Expand All @@ -27,7 +25,7 @@

</div>

## [Version&nbsp;0.31.0-rc.1](https://github.com/ant-design/pro-editor/compare/v0.30.0...v0.31.0-rc.1)
## [Version&nbsp;0.30.0](https://github.com/ant-design/pro-editor/compare/v0.29.2...v0.30.0)

<sup>Released on **2023-12-06**</sup>

Expand Down
8 changes: 3 additions & 5 deletions src/ActionGroup/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ demo:
<code src="./demos/basic.tsx" ></code>
<code src="./demos/config.tsx" title='配置使用' description= "通过配置 `items` 渲染整个内容,你可以通过在 items 声明 type 为 divider 来渲染一个分隔符"></code>
<code src="./demos/dropMenu.tsx" title="dropdown" description="通过配置 `dropdownMenu` 可以在尾部渲染一个下拉内容"></code>
<code src="./demos/type.tsx" title="模式配置"

> </code>
> <code src="./demos/custom.tsx" title='自定义' description= "通过 `render` 可以自定义渲染特殊的操作内容" ></code>
> <code src="./demos/withPanel.tsx" iframe title="浮动面板中使用" description="配合 DraggablePanel 可以使得整个面板可浮动拖拽"></code>
<code src="./demos/type.tsx" title="模式配置"></code>
<code src="./demos/custom.tsx" title='自定义' description= "通过 `render` 可以自定义渲染特殊的操作内容" ></code>
<code src="./demos/withPanel.tsx" iframe title="浮动面板中使用" description="配合 DraggablePanel 可以使得整个面板可浮动拖拽"></code>

## API

Expand Down
4 changes: 2 additions & 2 deletions src/ActionIcon/ActionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ActionIcon: FC<ActionIconProps> = ({
onClick,
className,
arrow = false,
size,
size = 'default',
tooltipDelay = 0.5,
prefixCls: customPrefixCls,
...restProps
Expand All @@ -68,7 +68,7 @@ const ActionIcon: FC<ActionIconProps> = ({
className={cx(styles.container, className)}
type={'text'}
style={{ cursor }}
size={'small'}
size={typeof size === 'number' || size === 'default' ? 'middle' : size}
{...restProps}
onClick={onClick}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/ActionIcon/__snapshots__/ActionIcon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`ActionIcon > 可正常渲染 1`] = `
<div>
<button
class="studio-btn studio-btn-text studio-btn-sm studio-btn-icon-only studio-actionicon emotion-0"
class="studio-btn studio-btn-text studio-btn-icon-only studio-actionicon emotion-0"
type="button"
>
<span
Expand Down Expand Up @@ -88,7 +88,7 @@ exports[`ActionIcon > 带有标题 1`] = `
<div>
<button
class="studio-btn studio-btn-text studio-btn-sm studio-btn-icon-only studio-actionicon emotion-0"
class="studio-btn studio-btn-text studio-btn-icon-only studio-actionicon emotion-0"
data-testid="smile"
type="button"
>
Expand Down
21 changes: 21 additions & 0 deletions src/FieldSelect/demos/custom.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { FieldSelectOptionType } from '@ant-design/pro-editor';
import { APIFieldType, FieldSelect } from '@ant-design/pro-editor';

const Demo = () => {
const options: FieldSelectOptionType[] = [
{
label: 'orderId',
value: 'orderId',
type: APIFieldType.integer,
},
{
label: 'orderNumber',
value: 'orderNumber',
type: APIFieldType.string,
},
];

return <FieldSelect options={options} defaultValue={'orderId'} showCustomField={false} />;
};

export default Demo;
17 changes: 12 additions & 5 deletions src/FieldSelect/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@ Extend the common selector, when selecting a field, add the field type.

<code src="./demos/basic.tsx" ></code>

### Turn off custom input

You can turn off the ability to customize input by setting `showCustomField` to False

<code src="./demos/custom.tsx" ></code>

## API

> Other attributes refer to antd `Select` component.
| Property | Description | Type | Default |
| :------- | :---------- | :------------------------------- | :------ |
| options | Options | Refer to `FieldSelectOptionType` | - |
| onChange | Callback | (value: string) => void | - |
| value | Value | string | - |
| Property | Description | Type | Default |
| :-------------- | :--------------------------------------- | :------------------------------- | :------ |
| options | Options | Refer to `FieldSelectOptionType` | - |
| onChange | Callback | (value: string) => void | - |
| value | Value | string | - |
| showCustomField | Whether to use custom input capabilities | boolean | true |

### FieldSelectOptionType Option Type

Expand Down
17 changes: 12 additions & 5 deletions src/FieldSelect/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@ group: 基础组件

<code src="./demos/basic.tsx" ></code>

### 关闭自定义输入

你可以将 `showCustomField` 设置为 False 来关闭自定义输入的能力

<code src="./demos/custom.tsx" ></code>

## API

> 其他属性参考 antd `Select` 组件。
| 参数 | 说明 | 类型 | 默认值 |
| :------- | :----- | :-------------------------- | :----- |
| options | 选项值 | 参考`FieldSelectOptionType` | - |
| onChange | 回调 | (value: string) => void | - |
| value || string | - |
| 参数 | 说明 | 类型 | 默认值 |
| :-------------- | :--------------------- | :-------------------------- | :----- |
| options | 选项值 | 参考`FieldSelectOptionType` | - |
| onChange | 回调 | (value: string) => void | - |
| value || string | - |
| showCustomField | 是否使用自定义输入能力 | boolean | true |

### FieldSelectOptionType 选项类型

Expand Down
6 changes: 3 additions & 3 deletions src/antd/InputNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const InputNumber: FC<InputNumberProps> = ({
onFocus,
onBlur,
onPressEnter,
...props
...rest
}) => {
const { styles, cx } = useStyles();

Expand All @@ -65,8 +65,8 @@ export const InputNumber: FC<InputNumberProps> = ({
return (
<ConfigProvider>
<_InputNumber
size={'small'}
{...props}
size={'middle'}
{...rest}
value={input}
onFocus={(event) => {
onFocus?.(event);
Expand Down
Loading

0 comments on commit 11c65d8

Please sign in to comment.