Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Commit

Permalink
fix: NFT item display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhe819 committed Sep 7, 2021
1 parent 01dc20c commit 0ce9ef5
Showing 1 changed file with 38 additions and 31 deletions.
69 changes: 38 additions & 31 deletions src/components/NFT/NFTItem.vue
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
<template>
<video
v-if="imageUrl?.endsWith('mp4') || imageUrl?.endsWith('mov')"
<div
:style="{
width: size + 'px',
height: size + 'px',
}"
:src="imageUrl"
class="nft-item"
autoplay
loop
muted
/>
<model-viewer
v-else-if="imageUrl?.endsWith('glb')"
:style="{
width: size + 'px',
height: size + 'px',
}"
:src="imageUrl"
class="nft-item"
ar
ar-modes="webxr scene-viewer quick-look"
environment-image="neutral"
auto-rotate
camera-controls
/>
<img
v-else
:style="{
width: size + 'px',
height: size + 'px',
}"
:src="imageUrl"
class="nft-item"
/>
>
<video
v-if="imageUrl?.endsWith('mp4') || imageUrl?.endsWith('mov')"
:src="imageUrl"
class="nft-item"
:style="{
width: size + 'px',
height: size + 'px',
}"
autoplay
loop
muted
/>
<model-viewer
v-else-if="imageUrl?.endsWith('glb')"
:src="imageUrl"
class="nft-item"
:style="{
width: size + 'px',
height: size + 'px',
}"
ar
ar-modes="webxr scene-viewer quick-look"
environment-image="neutral"
auto-rotate
camera-controls
/>
<img
v-else
:src="imageUrl"
class="nft-item"
:style="{
width: size + 'px',
height: size + 'px',
}"
/>
</div>
</template>

<script lang="ts">
Expand Down

0 comments on commit 0ce9ef5

Please sign in to comment.