v2.5.2
Giriş yap

Vuejs v-model Optional Chaining

trsherlock
314 defa görüntülendi ve 1 kişi tarafından değerlendirildi
<input type="text" v-model="invoices?.[0]?.invoiceID">
<input type="text" v-model="invoices?.[0]?.date">
<input type="text" v-model="invoices?.[0]?.userID">

Herkese merhaba. Vue js ile Optional Chaining nasıl kullanabilirim?
Xml dosyalarından veri çekiyorum.
Dizi boş olduğu zaman inputlar da boş olsun.

qplot
509 gün önce
<template>
  <form>
    <input v-model="user?.name" type="text" />
  </form>
</template>

<script>
export default {
  data() {
    return {
      user: {
        name: 'John',
      },
    };
  },
};
</script>