doc(carousel): using getImgUrl function in customPaging demo (#5679)

Co-authored-by: dingyihui <dingyihui@cmss.chinamobile.com>
pull/5702/head
dyh333 2022-06-13 09:20:18 +08:00 committed by GitHub
parent c87ecd7ffc
commit 09cb907bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -24,7 +24,7 @@ Custom paging display
</a>
</template>
<div v-for="item in 4" :key="item">
<img :src="baseUrl + 'abstract0' + item + '.jpg'" />
<img :src="getImgUrl(item - 1)" />
</div>
</a-carousel>
</template>
@ -39,7 +39,6 @@ export default defineComponent({
return `${baseUrl}abstract0${i + 1}.jpg`;
};
return {
baseUrl,
getImgUrl,
};
},