diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index a2fbb14..d1f3302 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -1,3 +1,4 @@ export { queuePreFlushCb } from './scheduler' export { watch } from './apiWatch' export { h } from './h' +export { Fragment, Text, Comment } from './vnode' diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 5ce3b7d..2acd86b 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -6,6 +6,10 @@ import { ShapeFlags } from '@vue/shared' +export const Fragment = Symbol('Fragment') +export const Text = Symbol('Text') +export const Comment = Symbol('Comment') + export interface VNode { __v_isVNode: true type: any diff --git a/packages/vue/examples/runtime/h-component-video-test.html b/packages/vue/examples/runtime/h-component-ym-test.html similarity index 100% rename from packages/vue/examples/runtime/h-component-video-test.html rename to packages/vue/examples/runtime/h-component-ym-test.html diff --git a/packages/vue/examples/runtime/h-other-ym-test.html b/packages/vue/examples/runtime/h-other-ym-test.html new file mode 100644 index 0000000..b0744d7 --- /dev/null +++ b/packages/vue/examples/runtime/h-other-ym-test.html @@ -0,0 +1,27 @@ + + + + + Document + + + +
+ + + \ No newline at end of file diff --git a/packages/vue/examples/runtime/h-other.html b/packages/vue/examples/runtime/h-other.html new file mode 100644 index 0000000..512f16d --- /dev/null +++ b/packages/vue/examples/runtime/h-other.html @@ -0,0 +1,24 @@ + + + + + Document + + + +
+ + + \ No newline at end of file diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index e7d54e3..48d17df 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -1,2 +1,9 @@ export { reactive, effect, ref, computed } from '@vue/reactivity' -export { queuePreFlushCb, watch, h } from '@vue/runtime-core' +export { + queuePreFlushCb, + watch, + h, + Fragment, + Text, + Comment +} from '@vue/runtime-core'