From ae1939cffa8115cb60e615029ad5b90eca4784e0 Mon Sep 17 00:00:00 2001 From: imcuttle Date: Wed, 19 Jan 2022 12:19:48 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8F=AA=E8=AF=BB=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E4=B9=9F=E6=94=AF=E6=8C=81=E7=89=A9=E6=96=99?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E7=BC=96=E8=BE=91=20&=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=E4=BB=B6=E6=8B=96=E6=8B=BD=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 2 +- README.md | 5 +++++ lerna.json | 3 +++ package.json | 1 + .../src/module/render/components/material-panel/index.tsx | 2 +- packages/editor/src/mometa/runtime/dnd.tsx | 6 ------ packages/editor/src/mometa/runtime/floating-ui.tsx | 7 ++++--- pnpm-lock.yaml | 2 ++ 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c228c5..6622175 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: - name: Install pnpm@6 run: npm i -g pnpm@6 - - run: pnpm i + - run: pnpm i --no-frozen-lockfile - run: pnpm run build --if-present - run: pnpm test -- --coverage - name: Codecov diff --git a/README.md b/README.md index d0fcd91..588ba4d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,11 @@ mometa 不是传统主流的低代码平台(如 amis/云凤蝶),mometa 是 - 同时支持所见即所得的可视编辑,用于提效,提升开发体验 - 提供物料生态,可自定义物料,提升物料使用体验,提升复用率 +mometa 定位更多是 基于程序员本地开发的模式,新增了可视化编码的能力(修改的也是本地的代码文件本身);\ +它更像是辅助编码工具,而不是 No-Code (amis/云凤蝶) 的平台方案; +所以不建议在远端服务起一个本地开发环境,所以没有做在线部署。 +目前的实现依赖 webpack dev 开发模式,后续会考虑兼容 vite。 +

diff --git a/lerna.json b/lerna.json index cf7ba01..80c5c24 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,9 @@ "extendCommands": ["lerna-command-toc"], "command": { "publish": { + "changelogPreset": { + "name": "conventional-changelog-conventionalcommits" + }, "conventionalCommits": true, "message": "chore(release): publish" }, diff --git a/package.json b/package.json index 7ae0d7c..6a8b386 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "change-case": "^4.1.2", "commander": "^8.3.0", "concurrently": "^6.4.0", + "conventional-changelog-conventionalcommits": "^4.6.3", "edam-cli": "^3.4.15", "human-format": "^0.11.0", "husky": "^4.3.8", diff --git a/packages/editor/src/module/render/components/material-panel/index.tsx b/packages/editor/src/module/render/components/material-panel/index.tsx index 5e23ef6..714286d 100644 --- a/packages/editor/src/module/render/components/material-panel/index.tsx +++ b/packages/editor/src/module/render/components/material-panel/index.tsx @@ -158,7 +158,7 @@ const MaterialUi = ({ mat }: any) => { className={c('__search')} placeholder={'输入关键字过滤物料'} /> - {canSelect && 请选择以下物料拖入「页面」中} + 请选择以下物料拖入「页面」中
{assetGroups?.map((group, index) => ( diff --git a/packages/editor/src/mometa/runtime/dnd.tsx b/packages/editor/src/mometa/runtime/dnd.tsx index 4a4a646..b79da04 100644 --- a/packages/editor/src/mometa/runtime/dnd.tsx +++ b/packages/editor/src/mometa/runtime/dnd.tsx @@ -183,12 +183,6 @@ export const DndDropableNode = React.memo(({ dom }: { dom: MometaHTMLElement }) } }, collect: (monitor) => { - if (!canSelect) { - return JSON.stringify({ - isOverCurrent: false, - isOver: false - }) - } const itemType = monitor.getItemType() const item = monitor.getItem() as any diff --git a/packages/editor/src/mometa/runtime/floating-ui.tsx b/packages/editor/src/mometa/runtime/floating-ui.tsx index e56530d..05bca02 100644 --- a/packages/editor/src/mometa/runtime/floating-ui.tsx +++ b/packages/editor/src/mometa/runtime/floating-ui.tsx @@ -277,6 +277,7 @@ export const OveringFloat = React.forwardRef( ` const widthGte = true //rect.width >= rect.height + const widthSm = rect.width <= 120 const flagElem = (
@@ -393,7 +394,7 @@ export const OveringFloat = React.forwardRef( ` )} > - 放置在上 + {widthSm ? '' : '放置在上'}
{!data.selfClosed && (
( ` )} > - 放置在这 + {widthSm ? '' : '放置在这'}
)}
( ` )} > - 放置在下 + {widthSm ? '' : '放置在下'}
)} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d096e23..824724a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,6 +12,7 @@ importers: change-case: ^4.1.2 commander: ^8.3.0 concurrently: ^6.4.0 + conventional-changelog-conventionalcommits: ^4.6.3 edam-cli: ^3.4.15 human-format: ^0.11.0 husky: ^4.3.8 @@ -35,6 +36,7 @@ importers: change-case: 4.1.2 commander: 8.3.0 concurrently: 6.5.1 + conventional-changelog-conventionalcommits: 4.6.3 edam-cli: 3.4.15 human-format: 0.11.0 husky: 4.3.8