Merge pull request #8626 from lurunze1226/fix-crud2-scaffold-columns-control

chore(amis-editor): CRUD2列配置控件始终展示顶部操作区
This commit is contained in:
wutong 2023-11-14 21:07:51 +08:00 committed by GitHub
commit 382f03ed4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,19 +449,29 @@ export class CRUDColumnControl extends React.Component<
size="sm"
className={cx('flex')}
/>
) : Array.isArray(options) && options.length > 0 ? (
) : (
<>
{this.renderHeader()}
<ul className={cx('ae-CRUDConfigControl-list')} ref={this.dragRef}>
{options.map((item, index) => {
return this.renderOption(item, index);
})}
</ul>
{Array.isArray(options) && options.length > 0 ? (
<ul
className={cx('ae-CRUDConfigControl-list')}
ref={this.dragRef}
>
{options.map((item, index) => {
return this.renderOption(item, index);
})}
</ul>
) : (
<ul
className={cx('ae-CRUDConfigControl-list')}
ref={this.dragRef}
>
<p className={cx(`ae-CRUDConfigControl-placeholder`)}>
</p>
</ul>
)}
</>
) : (
<ul className={cx('ae-CRUDConfigControl-list')} ref={this.dragRef}>
<p className={cx(`ae-CRUDConfigControl-placeholder`)}></p>
</ul>
)}
{showAddModal ? (