mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08:00
fix(plugin-error-handler): cannot find module '@formily/json-schema'
This commit is contained in:
parent
2b3cd45ca1
commit
14f30e61e8
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nocobase/plugin-error-handler",
|
||||
"version": "0.7.0-alpha.7",
|
||||
"version": "0.7.0-alpha.9",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"licenses": [
|
||||
@ -17,7 +17,8 @@
|
||||
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nocobase/server": "0.7.0-alpha.7"
|
||||
"@formily/json-schema": "^2.0.15",
|
||||
"@nocobase/server": "0.7.0-alpha.9"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { compile } from '@formily/json-schema/lib/compiler';
|
||||
import { Schema } from '@formily/json-schema';
|
||||
import { Plugin } from '@nocobase/server';
|
||||
import lodash from 'lodash';
|
||||
import { BaseError } from 'sequelize';
|
||||
@ -27,7 +27,7 @@ export class PluginErrorHandler extends Plugin {
|
||||
const model = instance.constructor;
|
||||
const collection = this.db.modelCollection.get(model);
|
||||
const field = collection.getField(path);
|
||||
const fieldOptions = compile(field.options, { t: tFunc });
|
||||
const fieldOptions = Schema.compile(field.options, { t: tFunc });
|
||||
const title = lodash.get(fieldOptions, 'uiSchema.title', path);
|
||||
return title;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user