当前位置:网站首页>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...
边栏推荐
猜你喜欢
随机推荐
【Web渗透】信息收集篇——Google搜索引擎(二)
网络——IPV4地址(一)
初始C语言(2) C生万物
Detailed explanation of three pieces in C language
线性表之顺序表
第四章:使用本地地理空间数据(4.6-4.14)
Excel相关处理工具类
动态内存管理,触及本质的最详解析
成为CTO,6个月被老板干死,我损失了1000万
Three ways to find prime numbers
第五章:可视化地理空间数据
Chapter 3: Use of GEE Data (3.4-3.11)
文字样式的常见属性的如何使用?
Heap series_0x09: Example of heap corruption (illegal access + uninitialized + heap handle mismatch)
Redis学习(一.redis中的数据结构)
转行做程序员,从月薪5k到30k,45岁测试员道出了一路的心酸
深究equals
Why does a four-byte float represent a wider range than an eight-byte long
时间日期格式工具类
网络——IPv6(一)









