Git Product home page Git Product logo

vue3-router-tree's Issues

Error: Can't resolve '.vue3-router-tree'

Hello thanks for your great project, but im new to vuejs and i cant make it work on my project.

I have installed your project and import it, but it says not found
this what my code look like
<template><vue3-router-tree :items="routes"> </vue3-router-tree></template>
`<script>
import Vue3RouterTree from '.vue3-router-tree';
export default {
name: 'categoryProduct',
components: {
Vue3RouterTree
// Loading
},
data: function(){
return {
routes: [
{
path: '/',
name: 'Home',
hasIcon: true,
},
{
path: '/dashboard',
name: 'Dashboard',
hasIcon: true,
},
{
path: '/component',
name: 'Components',
hasIcon: true,
children: [
{
path: '/alerts',
name: 'Alerts',
},
{
path: '/avatars',
name: 'Avatars',
},
{
path: '/buttons',
name: 'Buttons',
},
{
path: '/forms',
name: 'Forms',
children: [
{
path: '/autocompletes',
name: 'Autocompletes',
},
{
path: '/checkboxes',
name: 'Checkboxes',
},
],
},
],
},
],
}
},
}

<script>` and when i remove the dot in import `import Vue3RouterTree from 'vue3-router-tree';` it shows error TypeError: Object(...) is not a function Please help me solve this, thank you

No Tree is Rendered

I have a warning in my console and not sure if it is the cause of there being no tree rendered:

[Vue warn]: inject() can only be used inside setup() or functional components.

The warning relates to line 54 in index.tsx?d1dd:54 which if I follow the link to the source is the following line in your package:

const router = useRouter()

As far as I can tell my routes object is as required and I see the items in the VueJs Dev tools when inspecting the component.

Any ideas?

OnClick function for the tree

Is there a way I can add an onclick function on the tree items?
I am looking to utilize this as a File tree for in browser editing, and I want to be able to select the file in the list, and have it run a function that will open the file in the text editor.

How would I define the function ran on selecting an item?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.