From 0e96074c85cf32152af79dfda4d9566169f3fdc9 Mon Sep 17 00:00:00 2001 From: "wanying.jwy" Date: Sun, 30 Aug 2020 16:43:16 +0800 Subject: [PATCH 1/2] feat: extend deviceClassName --- .../designer/src/builtin-simulator/host.less | 18 +----------------- packages/plugin-designer/src/index.tsx | 15 ++++++++++++++- packages/react-renderer/package.json | 2 +- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/designer/src/builtin-simulator/host.less b/packages/designer/src/builtin-simulator/host.less index d7c878a64..dbc118ca3 100644 --- a/packages/designer/src/builtin-simulator/host.less +++ b/packages/designer/src/builtin-simulator/host.less @@ -29,23 +29,7 @@ box-shadow: 0 2px 10px 0 rgba(31,56,88,.15); } - // &-device-mobile { - // left: 50%; - // width: 378px; - // transform: translateX(-50%); - // background: url(https://img.alicdn.com/tfs/TB1b4DHilFR4u4jSZFPXXanzFXa-750-1574.png) no-repeat top; - // background-size: 378px 812px; - // top: 8px; - // .@{scope}-canvas-viewport { - // width: auto; - // top: 90px; - // left: 0px; - // right: 0px; - // max-height: 688px; - // } - // } - - &-device-miniapp { // 增加默认的小程序的壳 + &-device-iphonex { // 增加默认的小程序的壳 left: 50%; width: 378px; transform: translateX(-50%); diff --git a/packages/plugin-designer/src/index.tsx b/packages/plugin-designer/src/index.tsx index cc1f76748..2ff8930b7 100644 --- a/packages/plugin-designer/src/index.tsx +++ b/packages/plugin-designer/src/index.tsx @@ -14,6 +14,7 @@ interface DesignerPluginState { renderEnv?: string; device?: string; designMode?: string; + deviceClassName?: string; } export default class DesignerPlugin extends PureComponent { @@ -26,6 +27,7 @@ export default class DesignerPlugin extends PureComponent ); diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json index ce53a7d4a..95e8edf30 100644 --- a/packages/react-renderer/package.json +++ b/packages/react-renderer/package.json @@ -54,5 +54,5 @@ "publishConfig": { "registry": "http://registry.npm.alibaba-inc.com" }, - "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.8.18/build/index.html" + "homepage": "https:/unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@0.8.18/build/index.html" } From 08d78750978c72faeac9a91de77e1cea65395786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=8D=E6=8C=87?= Date: Sun, 30 Aug 2020 16:55:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20iphonex=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/builtin-simulator/host.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/designer/src/builtin-simulator/host.less b/packages/designer/src/builtin-simulator/host.less index dbc118ca3..cbabf2d72 100644 --- a/packages/designer/src/builtin-simulator/host.less +++ b/packages/designer/src/builtin-simulator/host.less @@ -38,9 +38,10 @@ top: 8px; .@{scope}-canvas-viewport { width: auto; - top: 90px; + top: 50px; left: 0px; right: 0px; + margin-top: 40px; max-height: 688px; } }