New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tlylt/vue-tree

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tlylt/vue-tree

A simple Vue component to beautify tree-like visualizations.

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

Vue Tree

A simple Vue component to beautify tree-like visualizations.

Features

  • Render tree-like structures in a visually appealing way.
  • Fully customizable and lightweight.
  • Supports scoped styles for seamless integration.

Installation

Install the package via npm:

npm install @tlylt/vue-tree

or yarn:

yarn add @tlylt/vue-tree

Usage

Basic Usage

Import and register the component in your Vue application:

import { createApp } from 'vue';
import App from './App.vue';
import { VueTree } from '@tlylt/vue-tree';

const app = createApp(App);
app.use(VueTree);
app.mount('#app');

Example

Use indentation (2 spaces) to indicate the level of nesting:

<template>
  <VueTree>
  C:/course/
    textbook/
      index.md
    index.md
    reading.md
    site.json
  </VueTree>
</template>

Expected:

C:/course/
├── textbook/
│   └── index.md
├── index.md
├── reading.md
└── site.json

Important Notes

To use this component, you must configure whitespace: 'preserve' in the Vue compiler options. This ensures that the tree structure is rendered correctly.

Vite Configuration

Add the following to your vite.config.ts:

plugins: [vue(
  {
    template: {
      compilerOptions: {
        whitespace: "preserve",
      },
    }
  }
)],

Vue Configuration

If you are using Vue programmatically, configure the compiler options as follows:

const app = Vue.createApp({
  compilerOptions: {
    whitespace: 'preserve'
  }
});

Props

WIP

Add details about the props supported by the component.

Events

WIP

Document any events emitted by the component.

Slots

WIP

Explain the slots available for customization.

Customization

WIP

Provide details on how to customize the component, such as styles or additional options.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Keywords

vue

FAQs

Package last updated on 02 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts