@globalhive/vuejs-tour

中文文档
3.0.1发布于 2026/03/19MITTypeScriptESM + CJS近 30 天下载 1.1万

VueJS Tour is a lightweight, simple and customizable tour plugin. It provides a quick and easy way to guide your users through your application.

原始使用文档
文档目录7 节
  1. Table of Contents
  2. Prerequisites
  3. Installation
  4. Create a tour
  5. Start the tour
  6. Documentation
  7. Something Missing?

VueJS Tour

license docs build open issues Codacy Badge
version downloads producthunt codecov

VueJS Tour is a lightweight, simple and customizable tour plugin. It provides a quick and easy way to guide your users through your application.

Table of Contents

Prerequisites

Installation

[!TIP] Looking for a nuxt version? Nuxt version (Special thanks to BayBreezy)

Create a tour

Add the VueJS Tour component anywhere in your app. It is recommended to add it to App.vue and create the required steps using <script setup> syntax.

<template>
  <div>
    <div id="selectByID">Selected by its id 'selectByID'</div>
    <p class="selectByClass">Telected by its class 'selectByClass'</p>
    <button data-step="3">Selected by the 'data-step="3"' attribute</button>

    <VTour :steps="steps"/>
  </div>
</template>

<script setup>
const steps = [
  {
    target: '#selectByID',
    content: 'This is the first step',
  },
  {
    target: '.selectByClass',
    content: 'This is the second step, placed on the bottom of the target',
    placement: 'bottom',
  },
  {
    target: '[data-step="3"]',
    content: 'This is the third step',
  }
];
</script>

Start the tour

To start the tour, you can use the autoStart prop...

<template>
  <div>
    <div id="selectByID">Selected by its id 'selectByID'</div>
    <p class="selectByClass">Telected by its class 'selectByClass'</p>
    <button data-step="3">Selected by the 'data-step="3"' attribute</button>

    <VTour :steps="steps" autoStart/>
  </div>
</template>

<script setup>
const steps = [...];
</script>

...or call the startTour() method on the component instance.

<template>
  <div>
    <div id="selectByID">Selected by its id 'selectByID'</div>
    <p class="selectByClass">Telected by its class 'selectByClass'</p>
    <button data-step="3">Selected by the 'data-step="3"' attribute</button>

    <VTour ref="tour" :steps="steps"/>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
const tour = ref(null);

const steps = [...];

onMounted(() => {
  tour.value.startTour();
});
</script>

The target property of the step object can be any valid CSS selector.

Documentation

For more information about the available props and methods, check out the documentation.

Something Missing?

If you have a feature request or found a bug, let us know by submitting an issue.

版本与发布记录

@globalhive/vuejs-tour 共发布 54 个版本,首次发布于 2022/12/08;过去 12 个月发布了 4 个版本。

版本发布日期距今
3.0.1latest2026/03/197 个月前
3.0.02026/01/319 个月前
2.6.22026/01/179 个月前
2.6.12025/12/1810 个月前
2.6.02025/11/161 年前
2.5.02025/11/061 年前

关于 @globalhive/vuejs-tour 的常见问题

@globalhive/vuejs-tour 是什么?

VueJS Tour is a lightweight, simple and customizable tour plugin. It provides a quick and easy way to guide your users through your application.

如何安装 @globalhive/vuejs-tour?

在项目目录运行 npm install @globalhive/vuejs-tour,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.22)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@globalhive/vuejs-tour 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@globalhive/vuejs-tour 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@globalhive/vuejs-tour 可以商用吗?

@globalhive/vuejs-tour 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@globalhive/vuejs-tour 的下载量有多少?

根据 npm 官方下载统计,@globalhive/vuejs-tour 在 2026/10/17 – 2026/11/15 这 30 天内被下载 11,418 次,日均约 381 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@globalhive/vuejs-tour 还在维护吗?

最新版本 3.0.1 发布于 2026/03/19(7 个月前);至今共发布 54 个版本,其中过去 12 个月发布了 4 个;首次发布于 2022/12/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。