From af43eb94502e0b9acc32cc9c30617e95f45da677 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Wed, 6 Mar 2024 23:19:50 +0800 Subject: [PATCH] refactor: mobilePage:addBlock --- .../plugin-mobile-client/src/client/core/schema/common/page.ts | 2 +- .../src/client/core/schema/components/page/Page.Designer.tsx | 2 +- .../src/client/core/schema/initializers/BlockInitializers.ts | 2 +- .../plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts | 2 +- .../plugins/@nocobase/plugin-mobile-client/src/server/routes.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts index fbf9b9ae56..e2de8d88a5 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/common/page.ts @@ -7,7 +7,7 @@ export const PageSchema = { grid: { type: 'void', 'x-component': 'Grid', - 'x-initializer': 'blockInitializers:mobilePage', + 'x-initializer': 'mobilePage:addBlock', 'x-component-props': { showDivider: false, }, diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx index 07e20a020d..5ab4834fee 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/components/page/Page.Designer.tsx @@ -77,7 +77,7 @@ export const PageDesigner = (props) => { 'x-component-props': {}, 'x-initializer': 'TabPaneInitializers', 'x-initializer-props': { - gridInitializer: 'blockInitializers:mobilePage', + gridInitializer: 'mobilePage:addBlock', }, properties: { tab1: { diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts index 246b42a22a..36f8b31695 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/client/core/schema/initializers/BlockInitializers.ts @@ -75,7 +75,7 @@ export const mBlockInitializers_deprecated = new CompatibleSchemaInitializer({ export const mBlockInitializers = new CompatibleSchemaInitializer( { - name: 'blockInitializers:mobilePage', + name: 'mobilePage:addBlock', title: '{{t("Add block")}}', icon: 'PlusOutlined', wrap: gridRowColWrap, diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts index a378aadc15..a895263aeb 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/server/plugin.ts @@ -32,7 +32,7 @@ export class MobileClientPlugin extends Plugin { grid: { type: 'void', 'x-component': 'Grid', - 'x-initializer': 'blockInitializers:mobilePage', + 'x-initializer': 'mobilePage:addBlock', 'x-component-props': { showDivider: false, }, diff --git a/packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts b/packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts index d96e13651f..dafca09888 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts +++ b/packages/plugins/@nocobase/plugin-mobile-client/src/server/routes.ts @@ -18,7 +18,7 @@ export const routes = [ grid: { type: 'void', 'x-component': 'Grid', - 'x-initializer': 'blockInitializers:mobilePage', + 'x-initializer': 'mobilePage:addBlock', 'x-component-props': { showDivider: false, },