Merge pull request #521 from RickCole21/master

drawer的wizard中popoverContainer问题
This commit is contained in:
liaoxuezhi 2020-04-02 17:00:43 +08:00 committed by GitHub
commit 6f0a6f1a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 24 deletions

View File

@ -1,20 +1,21 @@
## Tabs ## Tabs
| 属性名 | 类型 | 默认值 | 说明 | | 属性名 | 类型 | 默认值 | 说明 |
| ----------------- | ----------------------- | ----------------------------------- | -------------------------------------------------------- | | --------------------- | --------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------- |
| type | `string` | `"tabs"` | 指定为 Tabs 渲染器 | | type | `string` | `"tabs"` | 指定为 Tabs 渲染器 |
| className | `string` | | 外层 Dom 的类名 | | className | `string` | | 外层 Dom 的类名 |
| tabsClassName | `string` | | Tabs Dom 的类名 | | tabsClassName | `string` | | Tabs Dom 的类名 |
| tabs | `Array` | | tabs 内容 | | activeKey | `number`或`string` | | 配置默认展示的 tab。配置`tabs`中`tab` 的`hash`值,或者配置需要展示第`n`个 `tab``0` 是第一个 |
| toolbar | [Container](./Types.md#container) | | tabs 中的工具栏 | | tabs | `Array` | | tabs 内容 |
| toolbarClassName | `string` | | tabs 中工具栏的类名 | | toolbar | [Container](./Types.md#container) | | tabs 中的工具栏 |
| tabs[x].title | `string` | | Tab 标题 | | toolbarClassName | `string` | | tabs 中工具栏的类名 |
| tabs[x].icon | `icon` | | Tab 的图标 | | tabs[x].title | `string` | | Tab 标题 |
| tabs[x].tab | [Container](./Types.md#container) | | 内容区 | | tabs[x].icon | `icon` | | Tab 的图标 |
| tabs[x].hash | `string` | | 设置以后将跟 url 的 hash 对应 | | tabs[x].tab | [Container](./Types.md#container) | | 内容区 |
| tabs[x].reload | `boolean` | | 设置以后内容每次都会重新渲染,对于 crud 的重新拉取很有用 | | tabs[x].hash | `string` | | 设置以后将跟 url 的 hash 对应 |
| tabs[x].unmountOnExit | `boolean` | | 每次退出都会销毁当前tab栏内容 | | tabs[x].reload | `boolean` | | 设置以后内容每次都会重新渲染,对于 crud 的重新拉取很有用 |
| tabs[x].className | `string` | `"bg-white b-l b-r b-b wrapper-md"` | Tab 区域样式 | | tabs[x].unmountOnExit | `boolean` | | 每次退出都会销毁当前 tab 栏内容 |
| tabs[x].className | `string` | `"bg-white b-l b-r b-b wrapper-md"` | Tab 区域样式 |
```schema:height="500" scope="body" ```schema:height="500" scope="body"
[ [
@ -25,7 +26,7 @@
"title": "Tab 1", "title": "Tab 1",
"tab": "Content 1" "tab": "Content 1"
}, },
{ {
"title": "Tab 2", "title": "Tab 2",
"tab": "Content 2" "tab": "Content 2"
@ -50,7 +51,7 @@
"title": "Tab 1", "title": "Tab 1",
"tab": "Content 1" "tab": "Content 1"
}, },
{ {
"title": "Tab 2", "title": "Tab 2",
"tab": "Content 2" "tab": "Content 2"

View File

@ -129,7 +129,7 @@
background-color: $white; background-color: $white;
border-radius: $borderRadius; border-radius: $borderRadius;
font-size: $fontSizeSm; font-size: $fontSizeSm;
line-height: $fontSizeSm; line-height: px2rem(10px);
text-align: center; text-align: center;
user-select: none; user-select: none;
} }
@ -207,7 +207,7 @@
bottom: px2rem(-6px); bottom: px2rem(-6px);
left: 50%; left: 50%;
cursor: ns-resize; cursor: ns-resize;
width: px2rem(20px); width: px2rem(24px);
height: px2rem(12px); height: px2rem(12px);
} }
} }
@ -265,7 +265,7 @@
cursor: ew-resize; cursor: ew-resize;
writing-mode: vertical-lr; writing-mode: vertical-lr;
width: px2rem(12px); width: px2rem(12px);
height: px2rem(20px); height: px2rem(24px);
} }
} }
@ -300,7 +300,7 @@
top: px2rem(-6px); top: px2rem(-6px);
left: 50%; left: 50%;
cursor: ns-resize; cursor: ns-resize;
width: px2rem(20px); width: px2rem(24px);
height: px2rem(12px); height: px2rem(12px);
} }
} }
@ -338,6 +338,6 @@
cursor: ew-resize; cursor: ew-resize;
writing-mode: vertical-lr; writing-mode: vertical-lr;
width: px2rem(12px); width: px2rem(12px);
height: px2rem(20px); height: px2rem(24px);
} }
} }

View File

@ -759,7 +759,8 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
render, render,
store, store,
classPrefix: ns, classPrefix: ns,
classnames: cx classnames: cx,
popOverContainer
} = this.props; } = this.props;
const currentStep = this.state.currentStep; const currentStep = this.state.currentStep;
@ -791,7 +792,7 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
onSubmit: this.handleSubmit, onSubmit: this.handleSubmit,
onAction: this.handleAction, onAction: this.handleAction,
disabled: store.loading, disabled: store.loading,
popOverContainer: this.getPopOverContainer, popOverContainer: popOverContainer || this.getPopOverContainer,
onChange: this.handleChange onChange: this.handleChange
} }
) )