emptygif
భాష: తెలుగు

అన్ని భాషలు, ఫ్రేమ్‌వర్క్‌లు

Vue single-file component Vue

/pixel.gif కు వచ్చే రిక్వెస్ట్‌లకు empty GIF తో జవాబిచ్చే, Vue single-file component కోసం Vue స్నిపెట్. GIF స్టార్టప్‌లో ఒక్కసారే డీకోడ్ అవుతుంది.

Vue single-file component Vue

ఫైల్
Spacer.vue
<script setup>
const EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';

defineProps({
  width: { type: Number, default: 1 },
  height: { type: Number, default: 1 },
});
</script>

<template>
  <img :src="EMPTY_GIF" :width="width" :height="height" alt="" aria-hidden="true">
</template>

మేము ఈ స్నిపెట్‌ను రన్ చేసి, అది తిరిగి ఇచ్చిన బైట్‌లను పోల్చి చూశాం.

అధికారిక సైట్: Vue single-file component