Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMLViewer is undefined when using <script setup> #4

Open
qwackididuck opened this issue Nov 14, 2022 · 0 comments
Open

XMLViewer is undefined when using <script setup> #4

qwackididuck opened this issue Nov 14, 2022 · 0 comments

Comments

@qwackididuck
Copy link

Hello,

I'm facing an issue with the component XMLViewer.

I'm using Vuejs 3.2.40 and vue3-xml-viewer 0.0.11

I'm using <script lang="ts" setup> ( cf. https://vuejs.org/api/sfc-script-setup.html#basic-syntax )

I import your component as so :

<script lang="ts" setup>
import XmlViewer from 'vue3-xml-viewer'

and I'm using it like that :

<template>
    [...]
        <XmlViewer :xml="output" />
    [...]

But, when it renders, it appears in the code like that :

<xmlelement node="[object HTMLHtmlElement]"></xmlelement>

with the following warning message :
[Vue warn]: resolveComponent can only be used in render() or setup().

Any idea what am I doing wrong ?

Is it compatible with setup?

Thank you very much for your component btw !
Can't wait to make it work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant