Được TopGit lập chỉ mục từ metadata GitHub: shipshapecode/vue-shepherd có 340 sao, viết chủ yếu bằng Vue. A Vue wrapper for the site tour library Shepherd
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
vue-shepherd is built and maintained by Ship Shape. Contact us for web app consulting, development, and training for your project.
This is a Vue wrapper for the Shepherd, site tour, library.
npm install vue-shepherd shepherd.js
Install shepherd.js alongside vue-shepherd so you can import its stylesheet (pnpm and Yarn PnP
only let you import packages you depend on directly).
vue-shepherd works with Vue 3 and Nuxt, and is written in TypeScript. Every Shepherd type
(Tour, TourOptions, StepOptions, and so on) is re-exported from vue-shepherd.
Usage
Import Shepherd's styles once, in your main.ts:
import 'shepherd.js/dist/css/shepherd.css';
Composition API (suggested)
<script setup>
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { useShepherd } from 'vue-shepherd';
const el = ref(null);
const tour = useShepherd({
useModalOverlay: true
});
onMounted(() => {
tour.addStep({
attachTo: { element: el.value, on: 'top' },
buttons: [{ action: 'next', text: 'Next' }],
text: 'Test'
});
tour.start();
});
// The steps point at this component's elements, so end the tour with it.
onBeforeUnmount(() => {
if (tour.isActive()) {
tour.cancel();
}
});
</script>
<template>
<div ref="el">Testing</div>
</template>
useShepherd(options) returns a new Shepherd Tour. Everything
else, such as steps, buttons, events, and the modal overlay, is Shepherd's own API.
Options API
Install the plugin to add this.$shepherd to every component:
import { createApp } from 'vue';
import VueShepherdPlugin from 'vue-shepherd';
import 'shepherd.js/dist/css/shepherd.css';
import App from './App.vue';
createApp(App).use(VueShepherdPlugin).mount('#app');
useShepherd works as shown above. It is safe during server rendering: on the server, Shepherd
returns a tour whose methods do nothing, and the real tour is created when the component runs in
the browser. Start tours in onMounted, which only runs in the browser.
For this.$shepherd, register the plugin in plugins/shepherd.ts:
Callbacks such as beforeShowPromise, showOn, and button actions are plain functions, so they
can use anything in the scope where the tour is created. In <script setup>, that includes your
refs, stores, and router:
To keep steps in their own file, export a function that takes what the steps need and returns
them, then call it from your component: tour.addSteps(createSteps({ router, refetch })). In the
Options API, use arrow functions so this stays the component.
Listen to tour events
Tour events, such as complete and cancel, are on the tour, not on its steps:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/shipshapecode/vue-shepherd là nguồn chính thức.
shipshapecode/vue-shepherd có bao nhiêu sao?
shipshapecode/vue-shepherd có 340 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/shipshapecode/vue-shepherd. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
shipshapecode/vue-shepherd có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho shipshapecode/vue-shepherd. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
shipshapecode/vue-shepherd có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho shipshapecode/vue-shepherd. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
shipshapecode/vue-shepherd có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho shipshapecode/vue-shepherd. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
shipshapecode/vue-shepherd còn đang phát triển không?
Commit gần nhất trên shipshapecode/vue-shepherd là 5 ngày trước (theo timestamp GitHub). Repo có 24 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về vue-shepherd?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về vue-shepherd.