Skip to content

Commit 47b057e

Browse files
committed
fix(vue-xrender): vue-xrender x-jsx component props type error in vue2
1 parent e2f8d66 commit 47b057e

File tree

1 file changed

+3
-3
lines changed
  • packages/vue-xrender/src/components

1 file changed

+3
-3
lines changed

packages/vue-xrender/src/components/x-jsx.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import {FunctionComponent, JsxFn, JsxNode} from '@/utils/types-helper'
3-
import {defineComponent, VNode, h, PropType} from 'vue-demi'
3+
import {defineComponent, VNode, h} from 'vue-demi'
44

55
const valueIsFunctionComponent = (value: any): value is FunctionComponent => {
66
return typeof value === 'object' && value.functional && typeof value.render === 'function'
@@ -23,12 +23,12 @@ const vm = defineComponent({
2323
name: 'XJsx',
2424
props: {
2525
jsx: {
26-
type: [Function, Object, Array, String, Number, Boolean] as PropType<JsxNode | JsxFn | FunctionComponent>
26+
type: [Function, Object, Array, String, Number, Boolean]
2727
}
2828
},
2929
render(): VNode {
3030
const {$slots, $attrs, $props} = this as InstanceType<typeof vm>
31-
const {jsx} = $props
31+
const jsx = $props.jsx as JsxNode | JsxFn | FunctionComponent
3232

3333
const children = typeof $slots.default === 'function' ? $slots.default() : $slots.default
3434
const props = {...$attrs, children}

0 commit comments

Comments
 (0)