lusaxweb / vuesax-next

Vuesax v4: framework components for Vuejs
https://vuesax.com/
GNU General Public License v3.0
1.81k stars 201 forks source link

Using vue-sidebar doesn't work, issues Unknown custom element errors #208

Open OfirD1 opened 3 years ago

OfirD1 commented 3 years ago

In the following codepen, I use the js and css files provided on the Getting Started page and the sidebar template, but get errors:

Unknown custom element: <vs-sidebar> - did you register the component correctly? Unknown custom element: <vs-sidebar-item> - did you register the component correctly? Unknown custom element: <vs-sidebar-group> - did you register the component correctly?

Note that this codepen has a vs-button, which works fine - it's only the vs-sidebar components that seem to not work.

What should be done to fix it?

adamrifau commented 2 years ago

same here ,

tan-zhuo commented 2 years ago

一样的

VampireAchao commented 3 months ago

dtto

VampireAchao commented 3 months ago

solution:

<!DOCTYPE html>
<html>
<head>
    <link
            href="https://unpkg.com/vuesax-alpha/theme-chalk/index.css"
            rel="stylesheet"
    />
    <meta
            name="viewport"
            content="initial-scale=1, maximum-scale=1, user-scalable=no"
    />
</head>
<body>
<div id="app">
    <vs-button>Hello World</vs-button>
</div>

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://unpkg.com/vuesax-alpha/dist/index.full.min.js"></script>

<script>
    const {createApp} = Vue
    const {VsButton, VsCard} = VuesaxAlpha

    createApp({
        components: {VsButton, VsCard}
    }).mount('#app')
</script>
</body>
</html>