Vue တွင် data object ၏ properties များကို လွှဲပြောင်းခြင်း
ထို့အပြင် ကလေး components များဆီသို့
data object ၏ properties များကိုလည်း
လွှဲပြောင်းနိုင်ပါသည်။
ဥပမာတစ်ခုဖြင့် ကြည့်ရှုကြပါစို့။
ကျွန်ုပ်တို့တွင် အောက်ပါ properties များရှိသည်ဆိုပါစို့။
data() {
return {
name: 'john',
surn: 'smit',
}
}
၎င်းတို့၏ တန်ဖိုးများကို component အတွင်းသို့ လွှဲပြောင်းကြပါစို့။
<template>
<User :name="name" :surn="surn" />
</template>
မိဘ component ၏ properties များတွင်
ဝန်ထမ်း၏ အမည်၊ လစာနှင့် အသက်အရွယ်တို့ သိမ်းဆည်းထားသည်ဆိုပါစို့။
ထိုဒေတာများကို Employee component အတွင်းသို့ လွှဲပြောင်းပေးပါ။