Merge remote-tracking branch 'amis/master' into new

This commit is contained in:
rickcole 2020-07-29 18:06:03 +08:00
commit de6771993b
9 changed files with 59 additions and 56 deletions

View File

@ -131,13 +131,14 @@
&-actions {
border-top: $Card-borderWidth solid $Card-actions-borderColor;
display: table;
display: flex;
flex-direction: row;
width: 100%;
table-layout: fixed;
> a {
background-color: transparent;
display: table-cell;
flex-grow: 1;
border-color: $Card-actions-borderColor;
border-style: solid;
border-width: 0 $Card-borderWidth 0 0;

View File

@ -1,4 +1,7 @@
.#{$ns}Page {
width: 100%;
min-height: 100%;
&-header {
padding: $Page-header-paddingY $Page-header-paddingX;
}
@ -21,15 +24,13 @@
&-headerRow {
border-bottom: $borderWidth solid $borderColor;
display: table;
table-layout: fixed;
width: 100%;
border-spacing: 0;
display: flex;
flex-direction: row;
align-items: center;
.#{$ns}Page-header,
.#{$ns}Page-toolbar {
display: table-cell;
vertical-align: middle;
flex-grow: 1;
}
.#{$ns}Page-toolbar {
@ -85,20 +86,13 @@
}
.#{$ns}Page--withSidebar {
display: table;
table-layout: fixed;
width: 100%;
height: 100%;
border-spacing: 0;
display: flex;
flex-direction: row;
align-items: stretch;
.#{$ns}Page-aside,
.#{$ns}Page-content {
display: table-cell;
vertical-align: top;
}
.#{$ns}Page-content {
width: 100%;
> .#{$ns}Page-content {
width: 0;
flex-grow: 1;
}
}
}

View File

@ -24,4 +24,14 @@
background-color: $Remark-onHover-bg;
border-color: $Remark-onHover-borderColor;
}
> svg {
width: ($Remark-width - px2rem(2px));
height: ($Remark-width - px2rem(2px));
color: $Remark-iconColor;
}
&:hover > svg {
color: $Remark-onHover-iconColor;
}
}

View File

@ -6,10 +6,7 @@
list-style: none;
user-select: none;
&::before {
display: table;
content: ' ';
}
@include clearfix();
> .#{$ns}Tabs-link {
margin-bottom: -$Tabs-borderWidth;

View File

@ -79,7 +79,7 @@
}
.#{$ns}Form-remark {
margin-top: ($Form-input-height - $fontSizeBase) / 2;
padding-top: $Form-label-paddingTop;
vertical-align: top;
}
@ -271,10 +271,6 @@
display: inline-block;
}
> .#{$ns}Remark {
padding-top: $Form-label-paddingTop;
}
> .#{$ns}Form-control.#{$ns}InputGroup {
display: inline-flex;
}

View File

@ -72,7 +72,7 @@ export class BaiduMapPicker extends React.Component<
this.initMap();
} else {
loadScript(
`http://api.map.baidu.com/api?v=2.0&ak=${this.props.ak}&callback={{callback}}`
`//api.map.baidu.com/api?v=2.0&ak=${this.props.ak}&callback={{callback}}`
).then(this.initMap);
}
}

View File

@ -757,8 +757,7 @@ export function HocStoreFactory(renderer: {
//
// 特殊处理 CRUD。
// CRUD 中 toolbar 里面的 data 是空对象,但是 __super 会不一样
(nextProps.store?.storeType === 'CRUDStore' &&
nextProps.data &&
(nextProps.data &&
props.data &&
nextProps.data.__super !== props.data.__super)
) {

View File

@ -103,27 +103,32 @@ export default class Grid<T> extends React.Component<GridProps & T, object> {
fromBsClass((column as Column).columnClassName)
)}
>
{Array.isArray(column)
? this.renderColumns(column)
: this.renderChild(`column/${key}`, column, key, length)}
</div>
);
}
renderColumns(columns: ColumnArray): React.ReactElement<any> | null {
const {className, classnames: cx} = this.props;
return (
<div className={cx('Grid', className)}>
{columns.map((column, key) =>
this.renderColumn(column, key, columns.length)
{Array.isArray(column) ? (
<div className={cx('Grid')}>
{column.map((column, key) =>
this.renderColumn(column, key, column.length)
)}
</div>
) : (
this.renderChild(`column/${key}`, column, key, length)
)}
</div>
);
}
renderColumns(columns: ColumnArray) {
return columns.map((column, key) =>
this.renderColumn(column, key, columns.length)
);
}
render() {
return this.renderColumns(this.props.columns);
const {className, classnames: cx} = this.props;
return (
<div className={cx('Grid', className)}>
{this.renderColumns(this.props.columns)}
</div>
);
}
}

View File

@ -56,17 +56,18 @@ export default class HBox extends React.Component<HBoxProps, object> {
);
}
render() {
const {className, columns, classPrefix: ns} = this.props;
renderColumns() {
const {columns} = this.props;
return (
<div className={cx(`${ns}Hbox`, className)}>
{columns.map((column, key) =>
this.renderColumn(column, key, columns.length)
)}
</div>
return columns.map((column, key) =>
this.renderColumn(column, key, columns.length)
);
}
render() {
const {className, classnames: cx} = this.props;
return <div className={cx(`Hbox`, className)}>{this.renderColumns()}</div>;
}
}
@Renderer({