1. Create a new UI project First of all, our UI is based on ColorUI. When ColorUI does not have a style, it is based on the UI that comes with Uniapp. Therefore, these two UI frameworks should be introduced at the beginning of the project. Create another ColorUI project. If you need to see the effect of ColorUI so that you know which components you need to use, you can run it as follows. The same applies to uni-ui. In this way, any styles we need can be taken from these two UIs. 2. Build your own projectCreate a new uniapp project of your own and complete it. The project structure is as follows. Next, introduce the ColorUI style:
<style> /*Common CSS for each page */ @import "colorui/main.css"; @import "colorui/icon.css"; </style>
If the style you want is not available in ColorUI, you need to import the style of uni-ui:
Finally, App.vue is similar to: <style> /*Common CSS for each page */ @import "colorui/main.css"; @import "colorui/icon.css"; @import url("common/uni.css"); </style> Since then, the UI project import is completed 3. Some basic workUse tabbar: You can go to the uniapp official website to find the tabbar part and copy it for use. Page jump, initiate request: go to uniapp official website and use uniapp components If a page is too complex, it is recommended to divide it into multiple components. Create a new compoment directory under the page directory, and create multiple components (vue files) under the compoment directory, as shown in the following figure: Import components: As shown in the figure below, import components where needed, and even pass values. 4. Page LayoutHere are some practical suggestions for page layout.
SummarizeThis is the end of this article about the uniapp development mini program. For more relevant uniapp development mini program content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to deploy nodejs service using Dockerfile
>>: Mysql 5.6.37 winx64 installation dual version mysql notes
JS calculates the total price of goods in the sho...
Environment configuration 1: Install MySQL and ad...
1. Preparation 1.1 harbor download harbor downloa...
HTTP Header Explanation 1. Accept: Tells the web s...
Introduction In orm frameworks, such as hibernate...
1. Build the basic image of jmeter The Dockerfile...
As shown below: LOCATE(substr,str) Returns the fi...
Table of contents 1. Encapsulation API 2. Registe...
Preface In the Linux kernel, in order to be compa...
In addition to setting regulations for various ta...
This article example shares the specific code of ...
Automatic web page refresh: Add the following code...
When we open the source code of a regular website...
Today, CSS preprocessors are the standard for web...
I recently configured a server using Tencent Clou...