feat: improve code
This commit is contained in:
parent
dde1bd4fc2
commit
1229a10df6
@ -509,7 +509,7 @@ Upload.Attachment = connect(
|
||||
>
|
||||
{file.imageUrl && (
|
||||
<img
|
||||
src={file.imageUrl}
|
||||
src={`${file.imageUrl}?x-oss-process=style/thumbnail`}
|
||||
alt={file.title}
|
||||
className="ant-upload-list-item-image"
|
||||
/>
|
||||
|
@ -5,6 +5,14 @@
|
||||
}
|
||||
|
||||
.nb-upload {
|
||||
.ant-upload-list-item.ant-upload-list-item-list-type-picture-card {
|
||||
padding: 3px;
|
||||
}
|
||||
.ant-upload-list-item-thumbnail {
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
.ant-upload-list-item-actions {
|
||||
left: auto;
|
||||
right: 4px;
|
||||
|
@ -32,11 +32,13 @@ export class Field extends Model {
|
||||
if (fields.length) {
|
||||
props['children'] = fields;
|
||||
}
|
||||
if (this.getUiSchema) {
|
||||
const uiSchema = await this.getUiSchema();
|
||||
if (uiSchema) {
|
||||
// props['uiSchema1'] = uiSchema;
|
||||
props['uiSchema'] = await uiSchema.toJSONSchema();
|
||||
}
|
||||
}
|
||||
return props;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Model, ModelCtor } from '@nocobase/database';
|
||||
import { actions, middlewares } from '@nocobase/actions';
|
||||
import { sort } from '@nocobase/actions/src/actions/common';
|
||||
import { sort } from '@nocobase/actions/lib/actions/common';
|
||||
import { cloneDeep, omit } from 'lodash';
|
||||
|
||||
export const create = async (ctx: actions.Context, next: actions.Next) => {
|
||||
|
Loading…
Reference in New Issue
Block a user