chaint-render
v0.1.3
Published
Chaint runtime renderer package.
Readme
chaint-render
Runtime renderer for Chaint page documents.
Install
pnpm add chaint-render vue element-plus @element-plus/icons-vue @vueuse/core json5Usage
import { ChaintPreviewStatic } from 'chaint-render';<template>
<ChaintPreviewStatic
:document="pageDocument"
:api-definitions="apiDefinitions"
mode="preview"
/>
</template>For advanced control (custom runtime state/API bridge), you can still use ChaintPreviewRoot with your own ChaintPreviewRuntimeHost.
Events: route navigation
In DSL event handlers, the second argument supports chaint.navigateTo(...):
- String path or full URL:
chaint.navigateTo('/orders'),chaint.navigateTo('https://example.com') - Object:
chaint.navigateTo({ path: '/list', query: { page: 1 } })
By default this uses window.location (full page load). For Vue Router router.push, implement host.navigateTo(to, options) and call your router there.
