1.0.2 • Published 5 months ago

tnuiv3p-tn-slideshow v1.0.2

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
5 months ago

图鸟 UI vue3 uniapp Plugins - 幻灯片

TuniaoUI vue3 uniapp

Tuniao UI vue3官方仓库

该组件一般用于展示图片。

组件安装

npm install tnuiv3p-tn-slideshow

组件位置

import TnSlideShow from 'tnuiv3p-tn-slideshow/index.vue'

平台差异说明

App(vue)H5微信小程序支付宝小程序...
适配中

基础使用

  • 将图片地址数组传入组件的data属性中即可。
<script lang="ts" setup>
import { ref } from 'vue'

const imageData = ref<string[]>([
  'https://resource.tuniaokj.com/images/avatar/xiong/x1.jpg',
  'https://resource.tuniaokj.com/images/avatar/xiong/x2.jpg',
  'https://resource.tuniaokj.com/images/avatar/xiong/x3.jpg',
  'https://resource.tuniaokj.com/images/avatar/xiong/x4.jpg',
  'https://resource.tuniaokj.com/images/avatar/xiong/x5.jpg',
])
</script>

<template>
  <view class="wrapper">
    <TnSlideShow :data="imageData" />
  </view>
</template>

<style lang="scss" scoped>
.wrapper {
  width: 100vw;
  height: 100vh;
}
</style>

API

Props

属性名说明类型默认值可选值
data图片地址数据Array\<String>[]-
width容器的宽度,默认单位rpx,也可以传递指定单位的值String100%-
height容器的高度,默认单位rpx,也可以传递指定单位的值String100%-
interval幻灯片切换间隔,单位msNumber4000-

Emits

事件名说明类型
change幻灯片切换事件(index: number) => void
click幻灯片点击事件(index: number) => void
1.0.2

5 months ago

1.0.2-beta.1

5 months ago

1.0.1

6 months ago

1.0.0

6 months ago