docs(carousel): add draggable="false" to image elements (#1297)

This commit is contained in:
Jake
2024-01-31 20:04:19 +08:00
committed by GitHub
parent 5b008b789b
commit 89e15b90b1
13 changed files with 13 additions and 13 deletions

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items"> <UCarousel v-slot="{ item }" :items="items">
<img :src="item" width="300" height="400"> <img :src="item" width="300" height="400" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden" arrows> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden" arrows>
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -30,6 +30,6 @@ const items = [
arrows arrows
class="w-64 mx-auto" class="w-64 mx-auto"
> >
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden" indicators> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden" indicators>
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full md:basis-1/2 lg:basis-1/3' }" indicators class="rounded-lg overflow-hidden"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full md:basis-1/2 lg:basis-1/3' }" indicators class="rounded-lg overflow-hidden">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full md:basis-1/2 lg:basis-1/3' }"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full md:basis-1/2 lg:basis-1/3' }">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="w-64 mx-auto rounded-lg overflow-hidden"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="w-64 mx-auto rounded-lg overflow-hidden">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="rounded-lg overflow-hidden">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -22,7 +22,7 @@ const items = [{
<UCarousel :items="items" :ui="{ item: 'w-full' }"> <UCarousel :items="items" :ui="{ item: 'w-full' }">
<template #default="{ item, index }"> <template #default="{ item, index }">
<div class="text-center mx-auto"> <div class="text-center mx-auto">
<img :src="item.avatar.src" :alt="item.name" class="rounded-full w-48 h-48 mb-2"> <img :src="item.avatar.src" :alt="item.name" class="rounded-full w-48 h-48 mb-2" draggable="false">
<p class="font-semibold"> <p class="font-semibold">
{{ index + 1 }}. {{ item.name }} {{ index + 1 }}. {{ item.name }}

View File

@@ -23,7 +23,7 @@ const items = [
class="w-64 mx-auto" class="w-64 mx-auto"
> >
<template #default="{ item }"> <template #default="{ item }">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</template> </template>
<template #indicator="{ onClick, index, active }"> <template #indicator="{ onClick, index, active }">

View File

@@ -20,7 +20,7 @@ const items = [
class="w-64 mx-auto" class="w-64 mx-auto"
> >
<template #default="{ item }"> <template #default="{ item }">
<img :src="item" class="w-full"> <img :src="item" class="w-full" draggable="false">
</template> </template>
<template #prev="{ onClick, disabled }"> <template #prev="{ onClick, disabled }">

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'snap-end' }"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'snap-end' }">
<img :src="item" width="200" height="300"> <img :src="item" width="200" height="300" draggable="false">
</UCarousel> </UCarousel>
</template> </template>

View File

@@ -11,6 +11,6 @@ const items = [
<template> <template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'snap-start' }"> <UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'snap-start' }">
<img :src="item" width="200" height="300"> <img :src="item" width="200" height="300" draggable="false">
</UCarousel> </UCarousel>
</template> </template>