From 22498d8fc6fcf7e46c22612141aa9356f6fab7a7 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 29 Mar 2023 00:12:39 +0800 Subject: [PATCH] fix( importable-field): incorrect display when moving sort handle (#1613) * fix: importable-field incorrect display when moving sort * fix: cascader --------- Co-authored-by: chenos --- packages/plugins/export/src/client/useShared.ts | 4 ++-- packages/plugins/import/src/client/useShared.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/plugins/export/src/client/useShared.ts b/packages/plugins/export/src/client/useShared.ts index c62efce37..3a3562666 100644 --- a/packages/plugins/export/src/client/useShared.ts +++ b/packages/plugins/export/src/client/useShared.ts @@ -1,5 +1,5 @@ import { css } from '@emotion/css'; -import { useCollection } from '@nocobase/client'; +import { Cascader, useCollection } from '@nocobase/client'; import { useFields } from './useFields'; export const useShared = () => { @@ -38,7 +38,7 @@ export const useShared = () => { dataIndex: { type: 'array', 'x-decorator': 'FormItem', - 'x-component': 'Cascader', + 'x-component': Cascader, required: true, enum: fields, 'x-component-props': { diff --git a/packages/plugins/import/src/client/useShared.ts b/packages/plugins/import/src/client/useShared.ts index 2d56f4587..926a7c4f4 100644 --- a/packages/plugins/import/src/client/useShared.ts +++ b/packages/plugins/import/src/client/useShared.ts @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; import type { VoidField } from '@formily/core'; -import { useCollection } from '@nocobase/client'; +import { useCollection, Cascader } from '@nocobase/client'; import { useTranslation } from 'react-i18next'; import { NAMESPACE } from './constants'; import { useFields } from './useFields'; @@ -52,7 +52,7 @@ export const useShared = () => { dataIndex: { type: 'array', 'x-decorator': 'FormItem', - 'x-component': 'Cascader', + 'x-component': Cascader, required: true, enum: fields, 'x-component-props': { @@ -61,7 +61,6 @@ export const useShared = () => { value: 'name', children: 'children', }, - // labelInValue: true, changeOnSelect: false, }, },