fix: change import acl
This commit is contained in:
parent
89af2175de
commit
dfab92b175
@ -5,7 +5,6 @@ import { enUS, zhCN } from './locale';
|
|||||||
import { importMiddleware } from './middleware';
|
import { importMiddleware } from './middleware';
|
||||||
|
|
||||||
export class ImportPlugin extends Plugin {
|
export class ImportPlugin extends Plugin {
|
||||||
|
|
||||||
beforeLoad() {
|
beforeLoad() {
|
||||||
this.app.i18n.addResources('zh-CN', namespace, zhCN);
|
this.app.i18n.addResources('zh-CN', namespace, zhCN);
|
||||||
this.app.i18n.addResources('en-US', namespace, enUS);
|
this.app.i18n.addResources('en-US', namespace, enUS);
|
||||||
@ -25,6 +24,8 @@ export class ImportPlugin extends Plugin {
|
|||||||
this.app.acl.setAvailableAction('importXlsx', {
|
this.app.acl.setAvailableAction('importXlsx', {
|
||||||
displayName: '{{t("Import")}}',
|
displayName: '{{t("Import")}}',
|
||||||
allowConfigureFields: true,
|
allowConfigureFields: true,
|
||||||
|
type: 'new-data',
|
||||||
|
onNewRecord: true,
|
||||||
});
|
});
|
||||||
this.app.acl.use(async (ctx, next) => {
|
this.app.acl.use(async (ctx, next) => {
|
||||||
const { actionName } = ctx.action;
|
const { actionName } = ctx.action;
|
||||||
|
Loading…
Reference in New Issue
Block a user