npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

replay-view-component

v0.0.0

Published

A Vue 3 component library for replay view functionality

Readme

Replay View Component

一个基于 Vue 3 的回放视图组件库,提供强大的数据回放和可视化功能。

特性

  • 🎯 基于 Vue 3 + TypeScript
  • 🎨 支持 Element Plus UI 组件库
  • 📊 集成 ECharts 图表功能
  • 🗺️ 支持地图可视化
  • 📱 响应式设计
  • 🎮 支持拖拽操作
  • 🔄 数据回放功能

安装

NPM 安装

npm install replay-view-component

CDN 引入

<!-- 引入依赖 -->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://unpkg.com/pinia@2/dist/pinia.iife.js"></script>
<script src="https://unpkg.com/vue-demi@latest/lib/index.iife.js"></script>
<script src="https://unpkg.com/element-plus@2/dist/index.full.js"></script>
<script src="https://unpkg.com/lodash@4/lodash.min.js"></script>
<script src="https://unpkg.com/echarts@5/dist/echarts.min.js"></script>

<!-- 引入组件库 -->
<script src="https://unpkg.com/replay-view-component/dist/replay-view.umd.js"></script>
<link rel="stylesheet" href="https://unpkg.com/replay-view-component/dist/replay-view.css">

使用方法

方式一:Vue 应用中使用

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import ReplayView from 'replay-view-component'

const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
app.use(ElementPlus)
app.use(ReplayView)

app.mount('#app')

方式二:全局注册(CDN)

<!DOCTYPE html>
<html>
<head>
  <title>Replay View Demo</title>
  <!-- 引入依赖 -->
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <script src="https://unpkg.com/pinia@2/dist/pinia.iife.js"></script>
  <script src="https://unpkg.com/vue-demi@latest/lib/index.iife.js"></script>
  <script src="https://unpkg.com/element-plus@2/dist/index.full.js"></script>
  <script src="https://unpkg.com/lodash@4/lodash.min.js"></script>
  <script src="https://unpkg.com/echarts@5/dist/echarts.min.js"></script>
  
  <!-- 引入组件库 -->
  <script src="https://unpkg.com/replay-view-component/dist/replay-view.umd.js"></script>
  <link rel="stylesheet" href="https://unpkg.com/replay-view-component/dist/replay-view.css">
</head>
<body>
  <div id="app">
    <replay-view></replay-view>
  </div>
  
  <script>
    const { createApp } = Vue
    const { createPinia } = Pinia
    
    const app = createApp({
      template: '<replay-view></replay-view>'
    })
    
    const pinia = createPinia()
    app.use(pinia)
    app.use(ElementPlus)
    app.use(ReplayView.install)
    
    app.mount('#app')
  </script>
</body>
</html>

方式三:单个组件使用

<template>
  <div>
    <replay-view 
      :config="config"
      @data-change="handleDataChange"
    />
  </div>
</template>

<script>
import { ReplayView } from 'replay-view-component'

export default {
  components: {
    ReplayView
  },
  data() {
    return {
      config: {
        // 配置选项
      }
    }
  },
  methods: {
    handleDataChange(data) {
      console.log('数据变化:', data)
    }
  }
}
</script>

组件属性

| 属性名 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | config | Object | {} | 组件配置对象 | | data | Array | [] | 回放数据 | | autoPlay | Boolean | false | 是否自动播放 |

事件

| 事件名 | 参数 | 说明 | |--------|------|------| | data-change | data | 数据变化时触发 | | play-start | - | 开始播放时触发 | | play-pause | - | 暂停播放时触发 | | play-end | - | 播放结束时触发 |

依赖

  • Vue 3.x
  • Element Plus 2.x
  • Pinia 2.x
  • ECharts 5.x
  • Lodash 4.x

浏览器支持

  • Chrome >= 87
  • Firefox >= 78
  • Safari >= 14
  • Edge >= 88

许可证

MIT License

更新日志

v1.0.0

  • 初始版本发布
  • 支持基础回放功能
  • 集成地图可视化
  • 支持图表展示