0.0.5 • Published 3 years ago
v3-gallery v0.0.5
English | 简体中文
Install
npm install v3-gallery
pnpm add v3-gallery
yarn add v3-gallery
Usage
<template>
<button @click="show = true">Open</button>
<VGaller v-model="show" :images="images" :index="index" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import VGaller from 'v3-gallery'
export default defineComponent({
name: 'App',
components: {
VGaller
},
setup() {
const show = ref(false)
const index = ref(0) // index, 0 ~ (images.length - 1)
const images = [
"https://xxxxx.jpg",
"https://xxxxxxxxx.jpg"
]
return { show, images, index }
}
})
</script>