Asciinema 播放器
安装
运行以下命令,将 @nolebase/ui
和 asciinema-player
安装到项目依赖项中:
shell
ni @nolebase/ui asciinema-player
shell
pnpm add @nolebase/ui asciinema-player
shell
npm install @nolebase/ui asciinema-player
shell
yarn add @nolebase/ui asciinema-player
用法
vue
<script setup>
import { NuAsciinemaPlayer } from '@nolebase/ui'
import 'asciinema-player/dist/bundle/asciinema-player.css'
</script>
<template>
<NuAsciinemaPlayer
src="/asciinema/test-nyancat.cast"
:preload="true"
:cols="400"
:rows="40"
:auto-play="true"
:controls="true"
:terminal-font-size="'12px'"
:loop="true"
/>
</template>
致谢
- NARKOZ/go-nyancat: Nyancat in your terminal
- klange/nyancat: Nyancat in your terminal, rendered through ANSI escape sequences. This is the source for the Debian package
nyancat
. - 休息一下,看看彩虹貓囉! Take a break at the Linux command line with Nyan Cat - HackMD