1- import { computed , defineComponent , h , ref , unref } from 'vue'
2- import type { Ref , VNode } from 'vue'
3- import type { SchemaNode , SchemaOrgClient } from '../types'
4- import { injectSchemaOrg , useSchemaOrg } from '../useSchemaOrg'
1+ import { computed , defineComponent , h , ref , unref } from 'vue-demi '
2+ import type { Ref , VNode } from 'vue-demi '
3+ import type { SchemaNode } from '../types'
4+ import { useSchemaOrg } from '../useSchemaOrg'
55import { shallowVNodesToText } from '../utils'
66
77export interface SchemaOrgComponentProps {
@@ -26,20 +26,14 @@ const ignoreKey = (s: string) => {
2626 return [ 'class' , 'style' ] . includes ( s )
2727}
2828
29- export const defineSchemaOrgComponent = ( name : string , defineFn : ( data : any ) => any ) => {
29+ export const defineSchemaOrgComponent = ( name : string , defineFn ? : ( data : any ) => any ) => {
3030 return defineComponent < SchemaOrgComponentProps > ( {
3131 name,
3232 props : {
3333 as : String ,
3434 renderScopedSlots : Boolean ,
3535 } as unknown as any ,
3636 setup ( props , { slots, attrs } ) {
37- let schemaApi : SchemaOrgClient | null = null
38- try {
39- schemaApi = injectSchemaOrg ( )
40- }
41- catch ( e ) { }
42-
4337 const node : Ref < SchemaNode | null > = ref ( null )
4438
4539 const nodePartial = computed ( ( ) => {
0 commit comments