specificationa. The page file follows the vue single file component specification<!-- Template block --> <template> <view class="main"> {{msg}} </view> </template> <!-- Script Block --> <script> export default { data(){ return { msg:'Hello' } } } </script> <!-- Style block --> <style> .main{ background-color:#ccc; } </style> b. Component labels are close to the mini-program specifications<template> <view>hello</view> <text> wang </view> </template> c. Interface capabilities (JS API) are close to WeChat Mini Program specifications//Get location informationuni.getLocation({ type:'wgs84', success:function(res){ console.log('Current location longitude: '+res.longitude); console.log('Current location latitude: '+res.latitude); } }); e. Data binding and event handling use Vue.js specifications<template> <view @click="changeMsg"> {{msg}} </view> </template> <script> export default{ data(){ return { msg:'hello' } }, methods:{ changeMsg(){ this.msg:'world' } } } </scrip> featurea. Conditional compilation#ifdef APP-PLUS Code that only appears on the APP platform#endif #ifndef H5 Except for the H5 platform, the code that exists on other platforms#endif #ifdef H5 || MP-WEIXION Code that exists on the H5 platform or WeChat Mini Program platform#endif b. Nvue development on the App side The uni-app App has a built-in native rendering engine based on Weex, which provides native rendering capabilities. On the App side, if you use the vue page, use webview rendering; if you use the nvue page, use native rendering. c. HTML5+The uni-app App has a built-in HTML5+ engine, allowing js to directly call on rich native capabilities. Some more complex functions can be implemented by directly calling the App's native plug-ins. Can only be used on the App side, not on H5 and mini programs SummarizeThis article ends here. I hope it can be helpful to you. I also hope that you can pay more attention to more content on 123WORDPRESS.COM! You may also be interested in:
|
<<: XHTML introductory tutorial: Use of list tags
>>: How to use Docker to package and deploy images locally
The innodb_autoinc_lock_mode parameter controls t...
Preface The author has always felt that it would ...
This article example shares the specific code of ...
1. The use of or syntax in MySQL, and the points ...
The span tag is often used when making HTML web pa...
The problem that MYSQL5.7.17 cannot connect under...
Table of contents Axios Request Qs processing dat...
[LeetCode] 196.Delete Duplicate Emails Write a SQ...
The <base> tag specifies the default address...
Table of contents 1. Routing animation 2. Group Q...
Today I installed the MySQL database on my comput...
Table of contents When to use Structural branches...
Overview Backup is the basis of disaster recovery...
1. Introduction The requirement is to obtain the ...
Table of contents 1. Component bloat 2. Change th...