From 0cdd1060b795e0e53bc30b7041f227881f9de05a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Tue, 8 Jun 2021 14:39:45 +0800 Subject: [PATCH 1/6] chore(release): publish 1.0.54 --- CHANGELOG.md | 11 +++++++++++ lerna.json | 2 +- packages/designer/CHANGELOG.md | 8 ++++++++ packages/designer/package.json | 8 ++++---- packages/editor-core/CHANGELOG.md | 8 ++++++++ packages/editor-core/package.json | 6 +++--- packages/editor-preset-general/CHANGELOG.md | 8 ++++++++ packages/editor-preset-general/package.json | 14 +++++++------- packages/editor-skeleton/CHANGELOG.md | 8 ++++++++ packages/editor-skeleton/package.json | 10 +++++----- packages/engine/CHANGELOG.md | 8 ++++++++ packages/engine/package.json | 14 +++++++------- packages/ignitor/CHANGELOG.md | 8 ++++++++ packages/ignitor/package.json | 2 +- packages/plugin-designer/CHANGELOG.md | 8 ++++++++ packages/plugin-designer/package.json | 4 ++-- packages/plugin-outline-pane/CHANGELOG.md | 8 ++++++++ packages/plugin-outline-pane/package.json | 10 +++++----- packages/rax-renderer/CHANGELOG.md | 8 ++++++++ packages/rax-renderer/package.json | 6 +++--- packages/rax-simulator-renderer/CHANGELOG.md | 8 ++++++++ packages/rax-simulator-renderer/package.json | 10 +++++----- packages/react-renderer/CHANGELOG.md | 8 ++++++++ packages/react-renderer/package.json | 4 ++-- packages/react-simulator-renderer/CHANGELOG.md | 8 ++++++++ packages/react-simulator-renderer/package.json | 10 +++++----- packages/renderer-core/CHANGELOG.md | 8 ++++++++ packages/renderer-core/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/utils/CHANGELOG.md | 8 ++++++++ packages/utils/package.json | 4 ++-- packages/vision-polyfill/CHANGELOG.md | 11 +++++++++++ packages/vision-polyfill/package.json | 10 +++++----- 34 files changed, 201 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8669baa..b9888b431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + + +### Bug Fixes + +* fieldId 有值时跳过 initial, 因为在目前 vc 的 fieldId 实现是每次返回不同的值 ([0360572](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/03605724769b72ab28aa6c4ae7311c10257dd8f0)) + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) diff --git a/lerna.json b/lerna.json index 19314d62a..d55eddef2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "1.0.53", + "version": "1.0.54", "npmClient": "tnpm", "registry": "http://registry.npm.alibaba-inc.com", "useWorkspaces": true, diff --git a/packages/designer/CHANGELOG.md b/packages/designer/CHANGELOG.md index e59fb4d57..daa2bfd62 100644 --- a/packages/designer/CHANGELOG.md +++ b/packages/designer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-designer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-designer diff --git a/packages/designer/package.json b/packages/designer/package.json index d56277fe8..d0f030512 100644 --- a/packages/designer/package.json +++ b/packages/designer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-designer", - "version": "1.0.53", + "version": "1.0.54", "description": "Designer for Ali LowCode Engine", "main": "lib/index.js", "module": "es/index.js", @@ -14,9 +14,9 @@ }, "license": "MIT", "dependencies": { - "@ali/lowcode-editor-core": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-editor-core": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "classnames": "^2.2.6", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.5", diff --git a/packages/editor-core/CHANGELOG.md b/packages/editor-core/CHANGELOG.md index ea7557d9e..4290ecfcf 100644 --- a/packages/editor-core/CHANGELOG.md +++ b/packages/editor-core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-editor-core + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-editor-core diff --git a/packages/editor-core/package.json b/packages/editor-core/package.json index 104f29ccf..c11d1a584 100644 --- a/packages/editor-core/package.json +++ b/packages/editor-core/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-editor-core", - "version": "1.0.53", + "version": "1.0.54", "description": "Core Api for Ali lowCode engine", "license": "MIT", "main": "lib/index.js", @@ -13,8 +13,8 @@ "build": "build-scripts build --skip-demo" }, "dependencies": { - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@alifd/next": "^1.19.16", "@recore/obx": "^1.0.9", "@recore/obx-react": "^1.0.8", diff --git a/packages/editor-preset-general/CHANGELOG.md b/packages/editor-preset-general/CHANGELOG.md index 05b731762..f594f6233 100644 --- a/packages/editor-preset-general/CHANGELOG.md +++ b/packages/editor-preset-general/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-editor-preset-general + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-editor-preset-general diff --git a/packages/editor-preset-general/package.json b/packages/editor-preset-general/package.json index 42d5990e9..b92f998a0 100644 --- a/packages/editor-preset-general/package.json +++ b/packages/editor-preset-general/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-editor-preset-general", - "version": "1.0.53", + "version": "1.0.54", "description": "Ali General Editor Preset", "main": "lib/index.js", "private": true, @@ -14,12 +14,12 @@ }, "license": "MIT", "dependencies": { - "@ali/lowcode-editor-core": "1.0.53", - "@ali/lowcode-editor-skeleton": "1.0.53", - "@ali/lowcode-plugin-designer": "1.0.53", - "@ali/lowcode-plugin-outline-pane": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-editor-core": "1.0.54", + "@ali/lowcode-editor-skeleton": "1.0.54", + "@ali/lowcode-plugin-designer": "1.0.54", + "@ali/lowcode-plugin-outline-pane": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@alifd/next": "^1.19.12", "@alife/theme-lowcode-dark": "^0.1.0", "@alife/theme-lowcode-light": "^0.1.0", diff --git a/packages/editor-skeleton/CHANGELOG.md b/packages/editor-skeleton/CHANGELOG.md index 12940afa8..c4f08938c 100644 --- a/packages/editor-skeleton/CHANGELOG.md +++ b/packages/editor-skeleton/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-editor-skeleton + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-editor-skeleton diff --git a/packages/editor-skeleton/package.json b/packages/editor-skeleton/package.json index 6742c93db..5b2715764 100644 --- a/packages/editor-skeleton/package.json +++ b/packages/editor-skeleton/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-editor-skeleton", - "version": "1.0.53", + "version": "1.0.54", "description": "alibaba lowcode editor skeleton", "main": "lib/index.js", "module": "es/index.js", @@ -19,10 +19,10 @@ "editor" ], "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-editor-core": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-editor-core": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@ali/ve-icons": "latest", "@ali/ve-less-variables": "^2.0.0", "@alifd/next": "^1.20.12", diff --git a/packages/engine/CHANGELOG.md b/packages/engine/CHANGELOG.md index bf0196806..14f0e8d82 100644 --- a/packages/engine/CHANGELOG.md +++ b/packages/engine/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-engine + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-engine diff --git a/packages/engine/package.json b/packages/engine/package.json index fe040d704..725982e2c 100644 --- a/packages/engine/package.json +++ b/packages/engine/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-engine", - "version": "1.0.53", + "version": "1.0.54", "description": "Universal API for AliLowCode engine", "main": "lib/engine-core.js", "module": "es/engine-core.js", @@ -18,14 +18,14 @@ }, "license": "MIT", "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-editor-core": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-editor-core": "1.0.54", "@ali/lowcode-editor-setters": "1.0.30", - "@ali/lowcode-editor-skeleton": "1.0.53", + "@ali/lowcode-editor-skeleton": "1.0.54", "@ali/lowcode-engine-ext": "^1.0.0", - "@ali/lowcode-plugin-designer": "1.0.53", - "@ali/lowcode-plugin-outline-pane": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-plugin-designer": "1.0.54", + "@ali/lowcode-plugin-outline-pane": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@ali/ve-i18n-util": "^2.0.0", "@ali/ve-icons": "^4.1.9", "@ali/ve-less-variables": "2.0.3", diff --git a/packages/ignitor/CHANGELOG.md b/packages/ignitor/CHANGELOG.md index 56e21af28..97f968c42 100644 --- a/packages/ignitor/CHANGELOG.md +++ b/packages/ignitor/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-ignitor + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-ignitor diff --git a/packages/ignitor/package.json b/packages/ignitor/package.json index 3fabfe127..38a56f4e5 100644 --- a/packages/ignitor/package.json +++ b/packages/ignitor/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-ignitor", - "version": "1.0.53", + "version": "1.0.54", "description": "点火器,bootstrap lce project", "main": "lib/index.js", "private": true, diff --git a/packages/plugin-designer/CHANGELOG.md b/packages/plugin-designer/CHANGELOG.md index 06f5e8a80..e337c3c3f 100644 --- a/packages/plugin-designer/CHANGELOG.md +++ b/packages/plugin-designer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-plugin-designer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-plugin-designer diff --git a/packages/plugin-designer/package.json b/packages/plugin-designer/package.json index 169398d00..4cebfc395 100644 --- a/packages/plugin-designer/package.json +++ b/packages/plugin-designer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-plugin-designer", - "version": "1.0.53", + "version": "1.0.54", "description": "alibaba lowcode editor designer plugin", "files": [ "es", @@ -20,7 +20,7 @@ ], "author": "xiayang.xy", "dependencies": { - "@ali/lowcode-editor-core": "1.0.53", + "@ali/lowcode-editor-core": "1.0.54", "react": "^16.8.1", "react-dom": "^16.8.1" }, diff --git a/packages/plugin-outline-pane/CHANGELOG.md b/packages/plugin-outline-pane/CHANGELOG.md index a2dc65579..c0ac67efe 100644 --- a/packages/plugin-outline-pane/CHANGELOG.md +++ b/packages/plugin-outline-pane/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-plugin-outline-pane + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-plugin-outline-pane diff --git a/packages/plugin-outline-pane/package.json b/packages/plugin-outline-pane/package.json index fe5930d43..3861e2f0d 100644 --- a/packages/plugin-outline-pane/package.json +++ b/packages/plugin-outline-pane/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-plugin-outline-pane", - "version": "1.0.53", + "version": "1.0.54", "description": "Outline pane for Ali lowCode engine", "files": [ "es", @@ -14,10 +14,10 @@ "test:snapshot": "ava --update-snapshots" }, "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-editor-core": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-editor-core": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@alifd/next": "^1.19.16", "classnames": "^2.2.6", "react": "^16", diff --git a/packages/rax-renderer/CHANGELOG.md b/packages/rax-renderer/CHANGELOG.md index 0f99b0836..7d2cc747e 100644 --- a/packages/rax-renderer/CHANGELOG.md +++ b/packages/rax-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-rax-renderer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-rax-renderer diff --git a/packages/rax-renderer/package.json b/packages/rax-renderer/package.json index 533eacd04..1a417311d 100644 --- a/packages/rax-renderer/package.json +++ b/packages/rax-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-rax-renderer", - "version": "1.0.53", + "version": "1.0.54", "description": "Rax renderer for Ali lowCode engine", "main": "lib/index.js", "module": "lib/index.js", @@ -30,8 +30,8 @@ "build": "build-scripts build" }, "dependencies": { - "@ali/lowcode-renderer-core": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-renderer-core": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "rax-find-dom-node": "^1.0.1" }, "devDependencies": { diff --git a/packages/rax-simulator-renderer/CHANGELOG.md b/packages/rax-simulator-renderer/CHANGELOG.md index 484631693..04ed53bfe 100644 --- a/packages/rax-simulator-renderer/CHANGELOG.md +++ b/packages/rax-simulator-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-rax-simulator-renderer diff --git a/packages/rax-simulator-renderer/package.json b/packages/rax-simulator-renderer/package.json index f87425410..82cf500e3 100644 --- a/packages/rax-simulator-renderer/package.json +++ b/packages/rax-simulator-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-rax-simulator-renderer", - "version": "1.0.53", + "version": "1.0.54", "description": "rax simulator renderer for alibaba lowcode designer", "main": "lib/index.js", "module": "es/index.js", @@ -13,10 +13,10 @@ "test:snapshot": "ava --update-snapshots" }, "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-rax-renderer": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-rax-renderer": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@ali/recore-rax": "^1.2.4", "@ali/vu-css-style": "^1.0.2", "@recore/obx": "^1.0.8", diff --git a/packages/react-renderer/CHANGELOG.md b/packages/react-renderer/CHANGELOG.md index c5aa576e5..8c9e4f6c8 100644 --- a/packages/react-renderer/CHANGELOG.md +++ b/packages/react-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-react-renderer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-react-renderer diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json index b69ab9054..41aebf365 100644 --- a/packages/react-renderer/package.json +++ b/packages/react-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-react-renderer", - "version": "1.0.53", + "version": "1.0.54", "description": "react renderer for ali lowcode engine", "main": "lib/index.js", "module": "es/index.js", @@ -23,7 +23,7 @@ "react" ], "dependencies": { - "@ali/lowcode-renderer-core": "1.0.53", + "@ali/lowcode-renderer-core": "1.0.54", "@alifd/next": "^1.21.16" }, "devDependencies": { diff --git a/packages/react-simulator-renderer/CHANGELOG.md b/packages/react-simulator-renderer/CHANGELOG.md index 8792f5df1..ff5d75eba 100644 --- a/packages/react-simulator-renderer/CHANGELOG.md +++ b/packages/react-simulator-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-react-simulator-renderer + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-react-simulator-renderer diff --git a/packages/react-simulator-renderer/package.json b/packages/react-simulator-renderer/package.json index 8754bdf98..277ba69f1 100644 --- a/packages/react-simulator-renderer/package.json +++ b/packages/react-simulator-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-react-simulator-renderer", - "version": "1.0.53", + "version": "1.0.54", "description": "react simulator renderer for alibaba lowcode designer", "main": "lib/index.js", "module": "es/index.js", @@ -16,10 +16,10 @@ "build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo" }, "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-react-renderer": "1.0.53", - "@ali/lowcode-types": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-react-renderer": "1.0.54", + "@ali/lowcode-types": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@ali/vu-css-style": "^1.0.2", "@recore/obx": "^1.0.8", "@recore/obx-react": "^1.0.7", diff --git a/packages/renderer-core/CHANGELOG.md b/packages/renderer-core/CHANGELOG.md index ae5b641bb..06e8160b7 100644 --- a/packages/renderer-core/CHANGELOG.md +++ b/packages/renderer-core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-renderer-core + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-renderer-core diff --git a/packages/renderer-core/package.json b/packages/renderer-core/package.json index 1a779863d..f3b9668ac 100644 --- a/packages/renderer-core/package.json +++ b/packages/renderer-core/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-renderer-core", - "version": "1.0.53", + "version": "1.0.54", "description": "renderer core", "license": "MIT", "main": "lib/index.js", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 2ba01f12f..0ebc9dc03 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-types + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-types diff --git a/packages/types/package.json b/packages/types/package.json index f7f83bfd5..a373448dc 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-types", - "version": "1.0.53", + "version": "1.0.54", "description": "Types for Ali lowCode engine", "files": [ "es", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 6693de127..6cd28c486 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + +**Note:** Version bump only for package @ali/lowcode-utils + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) **Note:** Version bump only for package @ali/lowcode-utils diff --git a/packages/utils/package.json b/packages/utils/package.json index 22b99883b..ab53d2346 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-utils", - "version": "1.0.53", + "version": "1.0.54", "description": "Utils for Ali lowCode engine", "files": [ "es", @@ -14,7 +14,7 @@ "test:snapshot": "ava --update-snapshots" }, "dependencies": { - "@ali/lowcode-types": "1.0.53", + "@ali/lowcode-types": "1.0.54", "@alifd/next": "^1.19.16", "lodash.get": "^4.4.2", "react": "^16" diff --git a/packages/vision-polyfill/CHANGELOG.md b/packages/vision-polyfill/CHANGELOG.md index 46f06fe78..9a3d44d29 100644 --- a/packages/vision-polyfill/CHANGELOG.md +++ b/packages/vision-polyfill/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.54](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.53...v1.0.54) (2021-06-08) + + +### Bug Fixes + +* fieldId 有值时跳过 initial, 因为在目前 vc 的 fieldId 实现是每次返回不同的值 ([0360572](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/commit/03605724769b72ab28aa6c4ae7311c10257dd8f0)) + + + + + ## [1.0.53](https://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/compare/v1.0.52...v1.0.53) (2021-06-07) diff --git a/packages/vision-polyfill/package.json b/packages/vision-polyfill/package.json index 3304d6c60..99e137689 100644 --- a/packages/vision-polyfill/package.json +++ b/packages/vision-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-vision-polyfill", - "version": "1.0.53", + "version": "1.0.54", "description": "Vision Polyfill for Ali lowCode engine", "main": "lib/index.js", "private": true, @@ -18,10 +18,10 @@ }, "license": "MIT", "dependencies": { - "@ali/lowcode-designer": "1.0.53", - "@ali/lowcode-editor-core": "1.0.53", - "@ali/lowcode-editor-skeleton": "1.0.53", - "@ali/lowcode-utils": "1.0.53", + "@ali/lowcode-designer": "1.0.54", + "@ali/lowcode-editor-core": "1.0.54", + "@ali/lowcode-editor-skeleton": "1.0.54", + "@ali/lowcode-utils": "1.0.54", "@ali/ve-i18n-util": "^2.0.0", "@ali/ve-icons": "^4.1.9", "@ali/ve-less-variables": "2.0.3", From 91ad1abbb9275b016205df78b7600d6642fdf806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Tue, 8 Jun 2021 13:49:20 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor(props):=20=E5=B0=86=E5=BA=95?= =?UTF-8?q?=E5=B1=82=20prop=20=E7=9A=84=E5=B1=82=E7=BA=A7=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=88=90=E8=B7=9F=E5=85=83=E6=95=B0=E6=8D=AE=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E4=B8=80=E8=87=B4,=20=E6=94=AF=E6=8C=81=E9=80=9A?= =?UTF-8?q?=E8=BF=87=20API=20=E6=96=B9=E5=BC=8F=E8=AE=BE=E7=BD=AE=20prop?= =?UTF-8?q?=20=E5=88=86=E6=94=AF=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/designer/setting/setting-field.ts | 10 ++-- .../designer/src/document/node/props/prop.ts | 57 ++++++++++++++++++- .../designer/src/document/node/props/props.ts | 2 + .../src/components/object-setter/index.tsx | 22 ++++--- .../src/components/settings/main.ts | 14 ++--- 5 files changed, 82 insertions(+), 23 deletions(-) diff --git a/packages/designer/src/designer/setting/setting-field.ts b/packages/designer/src/designer/setting/setting-field.ts index 2267fcef9..0bedf77c3 100644 --- a/packages/designer/src/designer/setting/setting-field.ts +++ b/packages/designer/src/designer/setting/setting-field.ts @@ -6,13 +6,13 @@ import { computed, obx } from '@ali/lowcode-editor-core'; import { cloneDeep } from '@ali/lowcode-utils'; function getSettingFieldCollectorKey(parent: SettingEntry, config: FieldConfig) { - let top = parent; + let cur = parent; const path = [config.name]; - while (top !== parent.top) { - if (top instanceof SettingField && top.type !== 'group') { - path.unshift(top.name); + while (cur !== parent.top) { + if (cur instanceof SettingField && cur.type !== 'group') { + path.unshift(cur.name); } - top = top.parent; + cur = cur.parent; } return path.join('.'); } diff --git a/packages/designer/src/document/node/props/prop.ts b/packages/designer/src/document/node/props/prop.ts index 1622bcfac..148654962 100644 --- a/packages/designer/src/document/node/props/prop.ts +++ b/packages/designer/src/document/node/props/prop.ts @@ -1,11 +1,12 @@ import { untracked, computed, obx, engineConfig } from '@ali/lowcode-editor-core'; -import { CompositeValue, isJSExpression, isJSSlot, JSSlot, SlotSchema } from '@ali/lowcode-types'; +import { CompositeValue, FieldConfig, isJSExpression, isJSSlot, JSSlot, SlotSchema } from '@ali/lowcode-types'; import { uniqueId, isPlainObject, hasOwnProperty, compatStage } from '@ali/lowcode-utils'; import { PropStash } from './prop-stash'; import { valueToSource } from './value-to-source'; import { Props } from './props'; import { SlotNode, Node } from '../node'; import { TransformStage } from '../transform-stage'; +import { getFocusedElement } from 'medium-editor'; export const UNSET = Symbol.for('unset'); export type UNSET = typeof UNSET; @@ -14,10 +15,40 @@ export interface IPropParent { delete(prop: Prop): void; readonly props: Props; readonly owner: Node; + readonly path: string[]; } export type ValueTypes = 'unset' | 'literal' | 'map' | 'list' | 'expression' | 'slot'; +function hasItemsInMetadata(prop: Prop) { + const path = prop.path; + const { configure } = prop.getNode().componentMeta.getMetadata(); + if (!path || path.length === 0) return false; + let props = configure?.props; + while (path.length > 0) { + let name = path.shift(); + let matchedProp = getMatchedProp(props, name!); + if (!matchedProp) return false; + if (path.length === 0) return !!matchedProp?.items; + props = matchedProp.items; + } +} + +function getMatchedProp(props: FieldConfig[] | undefined, name: string): FieldConfig | null { + let found = null; + if (!props) return null; + for (const prop of props) { + if (prop.name === name) { + found = prop; + break; + } else if (prop.type === 'group' && prop.items) { + found = getMatchedProp(prop.items, name); + if (found) return found; + } + } + return found; +} + export class Prop implements IPropParent { readonly isProp = true; @@ -253,6 +284,21 @@ export class Prop implements IPropParent { }; } + this.dispose(); + + // 将父属性设置成一个对象,得同时把子属性都设值,同时清空其他子属性 + if (this._type === 'map' && isPlainObject(val)) { + this.items?.forEach((item) => { + // @ts-ignore + if ([item.key] in val) { + // @ts-ignore + item.setValue(val[item.key]); + } else { + this.clearPropValue(item.key!); + } + }); + } + if (oldValue !== this._value) { editor?.emit('node.innerProp.change', { node: this.owner, @@ -261,7 +307,6 @@ export class Prop implements IPropParent { newValue: this._value, }); } - this.dispose(); } @computed getValue(): CompositeValue { @@ -358,7 +403,13 @@ export class Prop implements IPropParent { @obx.val private _maps: Map | null = null; - @computed private get items(): Prop[] | null { + get path(): string[] { + return (this.parent.path || []).concat(this.key as string); + } + + private get items(): Prop[] | null { + // 不在元数据配置项中的,不产生 items + if (!hasItemsInMetadata(this)) return null; let _items: any; untracked(() => { _items = this._items; diff --git a/packages/designer/src/document/node/props/props.ts b/packages/designer/src/document/node/props/props.ts index 3c40d17fd..028d190a0 100644 --- a/packages/designer/src/document/node/props/props.ts +++ b/packages/designer/src/document/node/props/props.ts @@ -37,6 +37,8 @@ export class Props implements IPropParent { return maps; } + readonly path = []; + get props(): Props { return this; } diff --git a/packages/editor-skeleton/src/components/object-setter/index.tsx b/packages/editor-skeleton/src/components/object-setter/index.tsx index 1dcb7e25f..ec309ff2c 100644 --- a/packages/editor-skeleton/src/components/object-setter/index.tsx +++ b/packages/editor-skeleton/src/components/object-setter/index.tsx @@ -1,9 +1,9 @@ import { Component, Fragment } from 'react'; import { Icon, Button } from '@alifd/next'; -import { SetterType, FieldConfig } from '@ali/lowcode-types'; +import { SetterType, FieldConfig, CustomView } from '@ali/lowcode-types'; import { createSettingFieldView } from '../settings/settings-pane'; import { PopupContext, PopupPipe } from '../popup'; -import { SettingField } from '@ali/lowcode-designer'; +import { isSettingField, SettingField } from '@ali/lowcode-designer'; import './style.less'; import { Title } from '@ali/lowcode-editor-core'; @@ -165,11 +165,17 @@ class FormSetter extends Component { super(props); const { config, field } = props; const { extraProps } = field; - this.items = (config?.items || []).map((conf) => field.createField({ - ...conf, - setValue: extraProps?.setValue, - })); - + field.items.forEach((item: SettingField | CustomView) => { + if (isSettingField(item)) { + const originalSetValue = item.extraProps.setValue; + item.extraProps.setValue = (...args) => { + // 调用子字段本身的 setValue + originalSetValue?.apply(null, args); + // 调用父字段本身的 setValue + extraProps.setValue?.apply(null, args); + }; + } + }); // TODO: extraConfig for custom fields } @@ -181,7 +187,7 @@ class FormSetter extends Component { const { field } = this.props; return (
- {this.items.map((item, index) => createSettingFieldView(item, field, index))} + {field.items.map((item, index) => createSettingFieldView(item, field, index))}
); } diff --git a/packages/editor-skeleton/src/components/settings/main.ts b/packages/editor-skeleton/src/components/settings/main.ts index 60a20c2bf..66e78bc3d 100644 --- a/packages/editor-skeleton/src/components/settings/main.ts +++ b/packages/editor-skeleton/src/components/settings/main.ts @@ -69,13 +69,13 @@ export class SettingsMain { if (!this.designer) { this.designer = nodes[0].document.designer; } - - let lastSettings = this._settings; - // obx 的一些响应式计算会延迟到下一个时钟周期,导致 prop.parent 获取不到,这里也做一个延迟 - executePendingFn(() => { - lastSettings?.purge(); - }, 2000); - this._settings = this.designer.createSettingEntry(nodes); + // 当节点只有一个时,复用 node 上挂载的 settingEntry,不会产生平行的两个实例,这样在整个系统中对 + // 某个节点操作的 SettingTopEntry 只有一个实例,后续的 getProp() 也会拿到相同的 SettingField 实例 + if (nodes.length === 1) { + this._settings = nodes[0].settingEntry; + } else { + this._settings = this.designer.createSettingEntry(nodes); + } } purge() { From d46efaadd4fe3a4ecc8a8fa383b49ff83e9af9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Wed, 9 Jun 2021 14:57:52 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20valueChange=20?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=9B=A0=E4=B8=BA=E5=AD=90=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E8=80=8C=E9=80=9A=E7=9F=A5=E7=88=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=BA=8B=E4=BB=B6=E7=9B=91=E5=90=AC,=20=E8=80=83?= =?UTF-8?q?=E8=99=91=E5=88=B0=E5=90=8E=E7=BB=AD=E6=8E=A8=E8=8D=90=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E4=BD=BF=E7=94=A8=20setValue,=20=E4=B9=9F=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E4=BA=86=20valueChange=20=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/designer/setting/setting-field.ts | 12 ++++++--- .../designer/setting/setting-prop-entry.ts | 25 ++++++++++--------- packages/designer/src/types/index.ts | 19 +++++++++++++- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/packages/designer/src/designer/setting/setting-field.ts b/packages/designer/src/designer/setting/setting-field.ts index 0bedf77c3..6f2a935d8 100644 --- a/packages/designer/src/designer/setting/setting-field.ts +++ b/packages/designer/src/designer/setting/setting-field.ts @@ -4,6 +4,7 @@ import { SettingPropEntry } from './setting-prop-entry'; import { SettingEntry } from './setting-entry'; import { computed, obx } from '@ali/lowcode-editor-core'; import { cloneDeep } from '@ali/lowcode-utils'; +import { ISetValueOptions } from '../../types'; function getSettingFieldCollectorKey(parent: SettingEntry, config: FieldConfig) { let cur = parent; @@ -140,7 +141,7 @@ export class SettingField extends SettingPropEntry implements SettingEntry { private hotValue: any; - setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) { + setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: ISetValueOptions) { if (isHotValue) { this.setHotValue(val, extraOptions); return; @@ -172,9 +173,14 @@ export class SettingField extends SettingPropEntry implements SettingEntry { this.valueChange(); } - setHotValue(data: any, options?: any) { + setHotValue(data: any, options?: ISetValueOptions) { this.hotValue = data; const value = this.transducer.toNative(data); + if (options) { + options.fromSetHotValue = true; + } else { + options = { fromSetHotValue: true }; + } if (this.isUseVariable()) { const oldValue = this.getValue(); this.setValue({ @@ -191,7 +197,7 @@ export class SettingField extends SettingPropEntry implements SettingEntry { return; } - this.valueChange(); + this.valueChange(options); } onEffect(action: () => void): () => void { diff --git a/packages/designer/src/designer/setting/setting-prop-entry.ts b/packages/designer/src/designer/setting/setting-prop-entry.ts index 3ec65bd4e..351af3cfe 100644 --- a/packages/designer/src/designer/setting/setting-prop-entry.ts +++ b/packages/designer/src/designer/setting/setting-prop-entry.ts @@ -6,6 +6,8 @@ import { Node } from '../../document'; import { ComponentMeta } from '../../component-meta'; import { Designer } from '../designer'; import { EventEmitter } from 'events'; +import { ISetValueOptions } from '../../types'; +import { isSettingField } from './setting-field'; export class SettingPropEntry implements SettingEntry { // === static properties === @@ -162,7 +164,7 @@ export class SettingPropEntry implements SettingEntry { /** * 设置当前属性值 */ - setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) { + setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: ISetValueOptions) { const oldValue = this.getValue(); if (this.type === 'field') { this.parent.setPropValue(this.name, val); @@ -178,6 +180,10 @@ export class SettingPropEntry implements SettingEntry { } } this.notifyValueChange(oldValue, val); + // 如果 fromSetHotValue,那么在 setHotValue 中已经调用过 valueChange 了 + if (!extraOptions?.fromSetHotValue) { + this.valueChange(extraOptions); + } } /** @@ -272,8 +278,12 @@ export class SettingPropEntry implements SettingEntry { /** * @deprecated */ - valueChange() { - this.emitter.emit('valuechange'); + valueChange(options: ISetValueOptions = {}) { + this.emitter.emit('valuechange', options); + + if (this.parent && isSettingField(this.parent)) { + this.parent.valueChange(options); + } } notifyValueChange(oldValue: any, newValue:any) { @@ -288,15 +298,6 @@ export class SettingPropEntry implements SettingEntry { return false; } - /* - getConfig(configName?: K): IPropConfig[K] | IPropConfig { - if (configName) { - return this.config[configName]; - } - - return this.config; - } - */ getVariableValue() { const v = this.getValue(); if (isJSExpression(v)) { diff --git a/packages/designer/src/types/index.ts b/packages/designer/src/types/index.ts index e079964b0..97cf60c6a 100644 --- a/packages/designer/src/types/index.ts +++ b/packages/designer/src/types/index.ts @@ -18,4 +18,21 @@ const utils = { compatibleLegaoSchema, getNodeSchemaById, }; -export type Utils = typeof utils; \ No newline at end of file +export type Utils = typeof utils; + +export enum PROP_VALUE_CHANGED_TYPE { + /** + * normal set value + */ + SET_VALUE = 'SET_VALUE', + /** + * value changed caused by sub-prop value change + */ + SUB_VALUE_CHANGE = 'SUB_VALUE_CHANGE', +} + +export interface ISetValueOptions { + disableMutator?: boolean; + type?: PROP_VALUE_CHANGED_TYPE; + fromSetHotValue?: boolean; +} \ No newline at end of file From 8fd8e7d45ae1e8494211a7e43363a284bfd14cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Thu, 10 Jun 2021 15:43:15 +0800 Subject: [PATCH 4/6] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E5=A2=9E?= =?UTF-8?q?=E9=87=8F=E6=9B=B4=E6=96=B0=E6=9C=BA=E5=88=B6=E7=9A=84=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6,=20=E5=B9=B6?= =?UTF-8?q?=E5=B0=86=E9=97=A8=E6=A7=9B=E8=B0=83=E6=95=B4=E5=88=B0=20200=20?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react-simulator-renderer/src/renderer.ts | 6 ++--- .../src/utils/misc.ts | 23 +++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/react-simulator-renderer/src/renderer.ts b/packages/react-simulator-renderer/src/renderer.ts index 92b8ff08e..c70800190 100644 --- a/packages/react-simulator-renderer/src/renderer.ts +++ b/packages/react-simulator-renderer/src/renderer.ts @@ -48,8 +48,8 @@ export class DocumentInstance { this.disposeFunctions.push(host.onActivityEvent((data: ActivityData, ctx: any) => { if (host.mutedActivityEvent || (ctx && ctx.doc !== this.document)) return; - // 当节点数小数 300 个时,不走入增量更新逻辑,后面优化、细化逻辑后逐步放开限制 - if (this.document.nodesMap.size < 300) return; + // 当节点数小数 200 个时,不走入增量更新逻辑,后面优化、细化逻辑后逐步放开限制 + if (this.document.nodesMap.size < 200) return; if (tid) clearTimeout(tid); // 临时关闭全量计算 schema 的逻辑,在增量计算结束后,来一次全量计算 @@ -59,7 +59,7 @@ export class DocumentInstance { if (supportsQuickPropSetting(data, this)) { setInstancesProp(data, this); } else { - this._schema = applyActivities(this._schema!, data); + // this._schema = applyActivities(this._schema!, data); } } else if (data.type === ActivityType.ADDED) { // FIXME: 待补充 节点增加 逻辑 diff --git a/packages/react-simulator-renderer/src/utils/misc.ts b/packages/react-simulator-renderer/src/utils/misc.ts index 9777c4047..a4cd86848 100644 --- a/packages/react-simulator-renderer/src/utils/misc.ts +++ b/packages/react-simulator-renderer/src/utils/misc.ts @@ -1,6 +1,7 @@ import { ReactInstance } from 'react'; import { ActivityData, isJSSlot } from '@ali/lowcode-types'; import { DocumentInstance } from '../renderer'; +import { isReactClass } from '@ali/lowcode-utils'; interface UtilsMetadata { name: string; @@ -55,9 +56,9 @@ function haveForceUpdate(instances: any[]): boolean { export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstance) { const { payload } = data; const { schema, prop } = payload; - const nodeId = schema.id!; + const { componentName, id: nodeId } = schema; // const key = data.payload.prop.key; - const instances = doc.instancesMap.get(nodeId); + const instances = doc.instancesMap.get(nodeId!); const propKey = getUppermostPropKey(prop); let value = (schema.props as any)[propKey]; @@ -65,14 +66,28 @@ export function supportsQuickPropSetting(data: ActivityData, doc: DocumentInstan nodeId && Array.isArray(instances) && instances.length > 0 && - haveForceUpdate(instances) && propKey && // 不是 extraProp !propKey.startsWith('___') && - !isJSSlot(value) + !isJSSlot(value) && + // functional component 不支持 ref.props 直接设值,是 readonly 的 + isReactClass((doc.container?.components as any)[componentName]) && + haveForceUpdate(instances) && + // 黑名单组件通常会把 schema / children 魔改,导致直接设置 props 失效 + isAllowedComponent(componentName) ); } +// 不允许走快捷设置的组件黑名单 +const DISABLED__QUICK_SETTING_COMPONENT_NAMES = [ + 'Filter', // 查询组件 + 'Filter2', // 查询组件 + 'TableField', // 明细组件 +]; +function isAllowedComponent(name: string): boolean { + return !DISABLED__QUICK_SETTING_COMPONENT_NAMES.includes(name); +} + /** * 设置属性值 * @param data From c8e2f9d8efcb482321d15b15ab1f280387951411 Mon Sep 17 00:00:00 2001 From: "wuyue.xht" Date: Thu, 10 Jun 2021 14:36:19 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E4=BB=A5=E8=8A=82=E7=82=B9id?= =?UTF-8?q?=E4=BD=9C=E4=B8=BAkey=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E3=80=81=E5=A2=9E=E5=88=A0=E6=97=B6=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=A2=91=E7=B9=81=E5=8D=B8=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/renderer-core/src/renderer/base.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/renderer-core/src/renderer/base.tsx b/packages/renderer-core/src/renderer/base.tsx index 1d81ac6d8..745e71796 100644 --- a/packages/renderer-core/src/renderer/base.tsx +++ b/packages/renderer-core/src/renderer/base.tsx @@ -372,7 +372,7 @@ export default function baseRenererFactory() { } if (Array.isArray(schema)) { if (schema.length === 1) return this.__createVirtualDom(schema[0], self, parentInfo); - return schema.map((item, idy) => this.__createVirtualDom(item, self, parentInfo, item?.__ctx?.lceKey ? '' : idy)); + return schema.map((item, idy) => this.__createVirtualDom(item, self, parentInfo, item?.__ctx?.lceKey ? '' : String(idy))); } // FIXME const _children = this.getSchemaChildren(schema); @@ -484,6 +484,7 @@ export default function baseRenererFactory() { } props.key = props.key || `${schema.__ctx.lceKey}_${schema.__ctx.idx || 0}_${idx !== undefined ? idx : ''}`; } else if (typeof idx === 'number' && !props.key) { + // 仅当循环场景走这里 props.key = idx; } From f5e8239c4d80674cddc85e016d7de039e5b79315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Thu, 10 Jun 2021 16:05:24 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=98=AF=E5=90=A6=E5=85=81=E8=AE=B8=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E4=BA=8B=E4=BB=B6=E7=9A=84=E5=86=92=E6=B3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/builtin-simulator/host.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/designer/src/builtin-simulator/host.ts b/packages/designer/src/builtin-simulator/host.ts index 0eb5c2429..4cb8199df 100644 --- a/packages/designer/src/builtin-simulator/host.ts +++ b/packages/designer/src/builtin-simulator/host.ts @@ -641,14 +641,16 @@ export class BuiltinSimulatorHost implements ISimulatorHost { if (!detecting.enable || this.designMode !== 'design') { return; } const nodeInst = this.getNodeInstanceFromElement(e.target as Element); detecting.capture(nodeInst?.node || null); - e.stopPropagation(); + if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) { + e.stopPropagation(); + } }; const leave = () => detecting.leave(this.project.currentDocument); @@ -659,7 +661,9 @@ export class BuiltinSimulatorHost implements ISimulatorHost { - e.stopPropagation(); + if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) { + e.stopPropagation(); + } }, true, );