Mpvue Matters needing attention

Source: Internet
Author: User
1, page jump, note is the normal jump navigateto or bottom navigation jump switchtab starquestion () {Const URL = '. /subject/main '//Switchtab NavigateTo WX. Switchtab ({URL})},

2, variable picture text introduction component < Img:src= "item. Ad_url "alt=" > < toast:message= "msg": visible.sync= "visible" position= "center" ></Toast > 3, template attention settings Props template Name < template > < div class= "userinfo" > < img class= "Userinfo-avatar": src= ' Avatarurl ' back Ground-size= "Cover"/> < div class= "Userinfo-nickname" > < P >{{Nickname}} </p > </div > & lt;/div > </template >
< script >//Avatar Information Template export default {name: ' Inform ', props: {nickname: ' String ', Avatarurl: ' String '} </SCR IPT >

4, about Formid button to change formsubmit to @submit such as bindchange= "EventName" event, need to write @change = "EventName" <!--<form Report-submit = "true" bindsubmit= "Formsubmit" class= "Formsubmit" >--> < form report-submit= "true" @submit = "Formsubmit" class= "Formsubmit" > < button class= "Starbutton" formtype= "submit" > Start quiz </button > </form >

Small program Components

Mpvue can support the native components of small programs, such as: Picker,map, you need to note that the original component of the event binding, need to vue the event binding syntax to bind, such as bindchange= "EventName" event, need to write @change = " EventName "

Sample code:

<picker mode= "date": value= "date" start= "2015-09-01" end= "2017-09-01" @change = "Binddatechange" >
    <view class= "Picker" >
      current selection: {{date}}}
    </view>
</picker>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.