封装artTemplate 中 this的问题
生活随笔
收集整理的這篇文章主要介紹了
封装artTemplate 中 this的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
ps: 你自己寫的artTamplate,是故意把里面那個e寫成a的么= =
首先,你的模板里 {{ each images as value i }},你這個images變量,你傳一個this.images,arttemplate找不到images變量在哪里吧。
但你如果傳this,那這個this里面是不是有images這個屬性啦,這樣arttemplate才能對號入座填充數(shù)據(jù)嘛。
首先,你的模板里 {{ each images as value i }},你這個images變量,你傳一個this.images,arttemplate找不到images變量在哪里吧。
但你如果傳this,那這個this里面是不是有images這個屬性啦,這樣arttemplate才能對號入座填充數(shù)據(jù)嘛。
總結(jié)
以上是生活随笔為你收集整理的封装artTemplate 中 this的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 全球首款六代机首飞?隐含信息量超大,中国
- 下一篇: 南瓜奶油浓汤的做法?