search

Home  >  Q&A  >  body text

javascript - How do data in vue data access each other?

How can the value pointed by the arrow below be obtained from inside the function pointed by the arrow above

PHP中文网PHP中文网2716 days ago1056

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-06-26 11:00:09

    Separate data and control, do not do this kind of operation in data.

    reply
    0
  • 世界只因有你

    世界只因有你2017-06-26 11:00:09

    onSlideChangeEnd: (swiper) => {
        console.log(swiper.activeIndex, this.myNum);
    }

    reply
    0
  • 高洛峰

    高洛峰2017-06-26 11:00:09

    If the attributes in your data have dependencies, it is recommended to use calculated attributes directly, and it is best to handle your function logic by creating a new method yourself, so that your entire component will be clearer. Some personal suggestions.

    reply
    0
  • Cancelreply