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>