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