@oyyy/slider-img-verify
v2.1.0
Published
图片滑块组件
Downloads
4
Readme
使用包管理器
# 选择一个你喜欢的包管理器
# NPM
$ npm i @oyyy/slider-img-verify --save
# Yarn
$ yarn add @oyyy/slider-img-verify
# pnpm
$ pnpm add @oyyy/slider-img-verify
<script setup lang="ts">
import { YoungImgSlider } from '@oyyy/slider-img-verify';
const slider = new YoungImgSlider(() => {
console.log('验证通过!')
});
</script>
<template>
<div>
<button @click="slider.show()">开始</button>
</div>
</template>
浏览器直接引入
<!-- 国内推荐使用 jsdelivr -->
<script src="//cdn.jsdelivr.net/npm/@oyyy/slider-img-verify"></script>
<!-- or -->
<script src="//unpkg.com/@oyyy/slider-img-verify"></script>
<script>
const { YoungImgSlider } = window.YoungSlideVerify;
const slide = new YoungImgSlider();
slide.show();
</script>
开发环境
node: 16.13.1
pnpm: 7.1.9