antoniandre / splitpanes

A Vue 3 (and 2) reliable, simple and touch-ready panes splitter / resizer.
https://antoniandre.github.io/splitpanes
MIT License
1.91k stars 171 forks source link

Installation #46

Closed glebov21 closed 5 years ago

glebov21 commented 5 years ago

Hello. How can i use this in my project? By tutorial i was add this to header:

<script src="https://unpkg.com/splitpanes"></script>
<link href="https://unpkg.com/splitpanes/dist/splitpanes.css" rel="stylesheet">

And trying using in my code:

"use strict"
let AGTest = {
    components: { },
    template: `
<div>
<splitpanes class="default-theme">
  <div v-for="i in 3" :key="i">{{ i }}</div>
</splitpanes>
</div>`
};
Vue.component('ag-test', AGTest)

But this not working:

Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

glebov21 commented 5 years ago

https://jsfiddle.net/mrgjLdnh/ this is also not working

antoniandre commented 5 years ago

Hi @GLeBaTi, Simple, you need to mount Vue on a tag first. Have a look here: https://codepen.io/antoniandre/pen/XybPKP