From acc83243cd4ad427bb2a4bc74d5bb6399ad09293 Mon Sep 17 00:00:00 2001 From: Ubugeeei Date: Sun, 31 Mar 2024 16:29:17 +0900 Subject: [PATCH] feat(runtime-vapor): setup helpers --- .../__tests__/apiSetupHelpers.spec.ts | 87 +++++++++++++++++++ packages/runtime-vapor/src/apiSetupHelpers.ts | 24 +++++ packages/runtime-vapor/src/index.ts | 1 + playground/src/sub-comp.vue | 16 ++-- 4 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 packages/runtime-vapor/__tests__/apiSetupHelpers.spec.ts create mode 100644 packages/runtime-vapor/src/apiSetupHelpers.ts diff --git a/packages/runtime-vapor/__tests__/apiSetupHelpers.spec.ts b/packages/runtime-vapor/__tests__/apiSetupHelpers.spec.ts new file mode 100644 index 000000000..31b9cb391 --- /dev/null +++ b/packages/runtime-vapor/__tests__/apiSetupHelpers.spec.ts @@ -0,0 +1,87 @@ +import type { SetupContext } from '../src/component' +import { + createComponent, + defineComponent, + ref, + template, + useAttrs, + useSlots, +} from '../src' +import { makeRender } from './_utils' + +const define = makeRender() + +describe('SFC