From 21c4a88fba865ee651d47c5173593b47e72f2318 Mon Sep 17 00:00:00 2001 From: 2214962083 <2214962083@qq.com> Date: Fri, 22 Apr 2022 07:36:14 +0800 Subject: [PATCH] fix(vue-xrender): x-tpl render error in vue3 --- packages/vue-xrender/CHANGELOG.md | 70 +------------------- packages/vue-xrender/src/components/x-tpl.ts | 2 +- scripts/utils.ts | 2 +- 3 files changed, 5 insertions(+), 69 deletions(-) diff --git a/packages/vue-xrender/CHANGELOG.md b/packages/vue-xrender/CHANGELOG.md index 46e2165..530f6dd 100644 --- a/packages/vue-xrender/CHANGELOG.md +++ b/packages/vue-xrender/CHANGELOG.md @@ -1,4 +1,6 @@ -## 0.0.9 (2022-04-21) +## 0.1.1 (2022-04-21) + +## 0.1.1 (2022-04-21) ### Bug Fixes @@ -31,69 +33,3 @@ - add vue-xrender useJsx example ([e6d3a54](https://github.com/2214962083/vue-superman/commit/e6d3a54cdd55ddcddf21630737417f5906660477)) - add vue2 and vue3 playgrounds, add vitest for test ([62ef8d6](https://github.com/2214962083/vue-superman/commit/62ef8d6ab55520b2e39d00837613fa3d6c772e0c)) - init project, create vue-xrender package ([8b3f883](https://github.com/2214962083/vue-superman/commit/8b3f883ddb4f6dba3bc3889f39b867735c7e2b69)) - -## 0.0.9-beta.1 (2022-04-21) - -# 0.1.0 (2022-04-21) - -### Features - -- add x-jsx x-tpl components ([ce906b5](https://github.com/2214962083/vue-superman/commit/ce906b52ee35fbfcb6ff159590591ef420ceee84)) - -## 0.0.9-beta.1 (2022-04-20) - -## 0.0.8 (2022-04-20) - -## 0.0.7 (2022-04-19) - -## 0.0.6 (2022-04-19) - -## 0.0.5 (2022-04-19) - -### Bug Fixes - -- fix vue-xrender vite build empty bug ([ce019c5](https://github.com/2214962083/vue-superman/commit/ce019c582e99dc88924dd046393283f90f63ba2b)) - -### Features - -- add vue-xrender useJsx example ([e6d3a54](https://github.com/2214962083/vue-superman/commit/e6d3a54cdd55ddcddf21630737417f5906660477)) -- add vue2 and vue3 playgrounds, add vitest for test ([62ef8d6](https://github.com/2214962083/vue-superman/commit/62ef8d6ab55520b2e39d00837613fa3d6c772e0c)) -- init project, create vue-xrender package ([8b3f883](https://github.com/2214962083/vue-superman/commit/8b3f883ddb4f6dba3bc3889f39b867735c7e2b69)) - -## 0.0.8 (2022-04-20) - -## 0.0.8 (2022-04-20) - -## 0.0.7 (2022-04-19) - -## 0.0.6 (2022-04-19) - -## 0.0.5 (2022-04-19) - -### Bug Fixes - -- fix vue-xrender vite build empty bug ([ce019c5](https://github.com/2214962083/vue-superman/commit/ce019c582e99dc88924dd046393283f90f63ba2b)) - -### Features - -- add vue-xrender useJsx example ([e6d3a54](https://github.com/2214962083/vue-superman/commit/e6d3a54cdd55ddcddf21630737417f5906660477)) -- add vue2 and vue3 playgrounds, add vitest for test ([62ef8d6](https://github.com/2214962083/vue-superman/commit/62ef8d6ab55520b2e39d00837613fa3d6c772e0c)) -- init project, create vue-xrender package ([8b3f883](https://github.com/2214962083/vue-superman/commit/8b3f883ddb4f6dba3bc3889f39b867735c7e2b69)) - -## 0.0.7 (2022-04-20) - -## 0.0.7 (2022-04-19) - -## 0.0.6 (2022-04-19) - -## 0.0.5 (2022-04-19) - -### Bug Fixes - -- fix vue-xrender vite build empty bug ([ce019c5](https://github.com/2214962083/vue-superman/commit/ce019c582e99dc88924dd046393283f90f63ba2b)) - -### Features - -- add vue-xrender useJsx example ([e6d3a54](https://github.com/2214962083/vue-superman/commit/e6d3a54cdd55ddcddf21630737417f5906660477)) -- add vue2 and vue3 playgrounds, add vitest for test ([62ef8d6](https://github.com/2214962083/vue-superman/commit/62ef8d6ab55520b2e39d00837613fa3d6c772e0c)) -- init project, create vue-xrender package ([8b3f883](https://github.com/2214962083/vue-superman/commit/8b3f883ddb4f6dba3bc3889f39b867735c7e2b69)) diff --git a/packages/vue-xrender/src/components/x-tpl.ts b/packages/vue-xrender/src/components/x-tpl.ts index 44e5023..a1037dd 100644 --- a/packages/vue-xrender/src/components/x-tpl.ts +++ b/packages/vue-xrender/src/components/x-tpl.ts @@ -68,7 +68,7 @@ const vm = defineComponent({ if (!tpl) return null const renderFunc = compile(tpl, _ctx) - const result = isVue2 ? renderFunc(h) : renderFunc(ctx) + const result = isVue2 ? renderFunc(h) : renderFunc(_ctx) return result as VNode } diff --git a/scripts/utils.ts b/scripts/utils.ts index c7ef121..73bb98c 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -50,7 +50,7 @@ export function generateChangelog() { const pkgNames = getPackagesName('all') for (const pkgName of pkgNames) { - const cmd = `pnpm exec conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l ${pkgName} -r 1` + const cmd = `pnpm exec conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l ${pkgName} -r 0` console.log('start run command: ', cmd) execSync(cmd, {stdio: 'inherit', cwd: pathResolve('../packages', pkgName)}) }