当前位置:网站首页>uniapp project construction
uniapp project construction
2022-08-09 18:05:00 【51CTO】
uni-app is actually one of the many products launched by DCloud, of course I only study the ones that can be used at present
uni-app is a front-end framework for developing cross-platform applications using Vue.js. The developer writes a set of code that can be compiled toiOS, Android, H5, applet and other platforms.
1. Initial stage:
The company wants to combine several existing front-end projects into one, and also wants to take into account h5 and small programs (currently), there may be apps in the future, let me investigate,In short, a set of codes, compatible with multiple terminals, I found this comparison in online research, which is very detailed:

image
Source address: https://juejin.im/post/5c4ec383f265da613e229a67, you can take a look if you are interested
After I went to the official website and joined the official QQ group, I felt pretty good. In fact, there are only a few multi-terminal compatible platforms for Vue...
2. Use uni-app
After choosing, write a demo first, see the difficulty level, and find that developers who know Vue can easily get started, and those who have written small programs at the same time are even easier.The api and life cycle are exactly the same as the applet, and follow the vue2.0 specification in custom components and programming.
3. Project construction
(1) Download the official recommended editor: hbuilderx download address
Click the upper right corner of the page to download the APP development version

image
It is also very convenient to create a new project directly on the editor.
(2) Click Tools-Plugin Installation in the HBuilderX interface, and install
NPM, built-in browser, UniApp compilation, js-beautify, js compression, css compression, lessCompilation, scss/sass compilation, es6 compilation, etc.
(3) Click Tools - Settings - Run Configuration,
Set the Chrome installation path in the browser's run configuration to the real Chrome installation path of this machine
For example: C:/Users/yeyiqing/AppData/Local/Google/Chrome/Application/chrome.exe
Set the WeChat developer installation path in the applet running configuration to the local real WeChat developer installation path
For example: E:/warespace/WeChat web developer tools
Set the node path in the node running configuration to the real node installation path of this machine
For example: C:/Program Files/nodejs/node.exe
(4) Find the WeChat applet configuration in manifest.json in the project, and change the applet AppID
(5) First open the WeChat developer tool, click Settings - Proxy Settings, select No proxy to apply...
To run:
First in BuilderXOpen the login.vue page under pages
Select the HBuilderX interface: Run - Run to Browser - Chrome
Run - Run to Mini Program - WeChat Developer Tools
To package:
Click; Release- H5 Mobile Version Release- Release
Release- Mini Program WeChat- Release
Information will be printed to the console below...
Finally, look at the official documentation...
边栏推荐
猜你喜欢
随机推荐
C语言三子棋详解
【科普】关于平板电脑的那些事
2. Creating Interactive Maps
4. Using Local Geospatial Data
学习编程的第九天
开始记录自己的学习过程和目标
3. Using Earth Engine Data
Two ways to find the factorial of n
自定义过滤器和拦截器实现ThreadLocal线程封闭
Detailed explanation of three pieces in C language
初识C语言(1)
Redis learning (1. Data structure in redis)
Nacos Jaspyt配置加密设置
5G NR Paging 寻呼
2. Creating Interactive Maps
Heap series_0x0A: 3 methods to solve the heap overflow problem at once
C语言扫雷
C语言分支语句if,switch语句详细讲解
网络——IPV4地址(一)
转行做程序员,从月薪5k到30k,45岁测试员道出了一路的心酸









