import JsonVue , { Rule } from "./core" ; import Vue , { ComponentOptions , VNode } from "vue" ; import { Render } from "./render" ; export default function component ( jv ) { let jsonRender ; return < ComponentOptions < Vue > > { mixins : [ jv . config ] , data ( ) { return < { jv_$rule : Rule ; } > { jv_$rule : jv . config . rule } ; } , beforeCreate ( ) { jsonRender = new Render ( jv , this ) ; } , render ( ) { return jsonRender . render ( ) ; } } ; }