diff --git a/packages/core/client/src/schema-component/common/dnd-context/index.tsx b/packages/core/client/src/schema-component/common/dnd-context/index.tsx index d72a488a3..be7394b25 100644 --- a/packages/core/client/src/schema-component/common/dnd-context/index.tsx +++ b/packages/core/client/src/schema-component/common/dnd-context/index.tsx @@ -20,7 +20,6 @@ const useDragEnd = (props?: any) => { const wrapSchema = over?.data?.current?.wrapSchema; const onSuccess = over?.data?.current?.onSuccess; const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true; - if (!activeSchema || !overSchema) { props?.onDragEnd?.(event); return; diff --git a/packages/plugins/data-visualization/src/client/block/ChartConfigure.tsx b/packages/plugins/data-visualization/src/client/block/ChartConfigure.tsx index a69144e72..6ada06874 100644 --- a/packages/plugins/data-visualization/src/client/block/ChartConfigure.tsx +++ b/packages/plugins/data-visualization/src/client/block/ChartConfigure.tsx @@ -199,9 +199,8 @@ export const ChartConfigure: React.FC<{ afterSave(); return; } - insert(createRendererSchema(rendererProps), { + insert(gridRowColWrap(createRendererSchema(rendererProps)), { onSuccess: afterSave, - wrap: gridRowColWrap, }); }} onCancel={() => { diff --git a/packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx b/packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx index da781d5c9..7cd1b4bbd 100644 --- a/packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx +++ b/packages/plugins/data-visualization/src/client/renderer/ChartRenderer.tsx @@ -96,11 +96,7 @@ ChartRenderer.Designer = function Designer() { - insertAdjacent('afterEnd', createRendererSchema(schema?.['x-decorator-props']), { - wrap: gridRowColWrap, - }) - } + onClick={() => insertAdjacent('afterEnd', gridRowColWrap(createRendererSchema(schema?.['x-decorator-props'])))} > {t('Duplicate')} diff --git a/packages/plugins/data-visualization/src/server/actions/query.ts b/packages/plugins/data-visualization/src/server/actions/query.ts index 2ba510469..7fd7733db 100644 --- a/packages/plugins/data-visualization/src/server/actions/query.ts +++ b/packages/plugins/data-visualization/src/server/actions/query.ts @@ -161,11 +161,7 @@ export const parseBuilder = (ctx: Context, builder: QueryParams) => { }); orders.forEach((item: OrderProps) => { - const dialect = sequelize.getDialect(); - let alias = `"${item.alias}"`; - if (dialect === 'mysql') { - alias = `\`${item.alias}\``; - } + const alias = sequelize.getQueryInterface().quoteIdentifier(item.alias); const name = hasAgg ? sequelize.literal(alias) : sequelize.col(item.field as string); order.push([name, item.order || 'ASC']); });