Use of uniapp conditional compilation

What is conditional compilation Conditional compilation uses special comments as markers to compile the code in the comments to different platforms according to these special comments during compilation. I. writing method: start with #ifdef or #ifndef plus% PLATFORM% and end with #endif. #ifdef: if defined exists only on a certain platf ...

Posted by loveitandhateit on Thu, 06 Jan 2022 01:40:37 +0100

Introduction to FileReader of JavaScript and examples of how native and uniapp convert files into base64 encoded strings

Use the FileReader object to view the MDN official description for details click here . Introduction to FileReader object Method of FileReader object: methodparameterbrief introductionexplainFileReader.readAsBinaryString(blob)Blob or File object to be readRead file as binary encodingThe specified Blob or File object will be read. When the r ...

Posted by Dargrotek on Wed, 29 Dec 2021 11:41:38 +0100

Uni app configuration eslint + commitlint + editorconfig + husky

I am proud, and welcome to my official account, the self-knowledge of front-end engineers, search f2ef2e, update every day. uniapp is an excellent cross end framework, but the official creation project does not provide eslint, which is not friendly for our multi person collaborative development. Many articles and tutorials on the Internet no ...

Posted by Klojum on Sun, 19 Dec 2021 00:15:35 +0100

uniApp knowledge and projects

Chapter 1 implementation of indexCateList 1, Implementation of background data Home page paging list data to achieve simple cors processing // Home navigation page data let indexCateList = require('./datas/indexCateList.json') router.get('/getindexCateList', async (ctx, next) => { // The generated H5 application has cross domain problems ...

Posted by jennatar on Sat, 18 Dec 2021 02:39:55 +0100

Record various pits encountered in a uniapp project

Recently, uniapp has made a project: the effect is shown in the figure: the applet and h5 effect are basically the same                                              It mainly involves the following functions: 1 waterfall flow layout, 2 pull up to load more 3. Click picture preview ui framework -: uview ----------------------------- ...

Posted by Ghettobusta on Fri, 17 Dec 2021 15:38:29 +0100

Embrace concise code: the strongest parsing of script setup in vue3

In addition to the bright spot of Composition API, vue3 has brought us a brand-new gadget - script setup. I believe everyone is familiar with setup, but some students say it is difficult to understand script setup. From now on, this article will let you understand it at a glance.ref and reactiveIn setup, we have two APIs, ref and reactive, to c ...

Posted by Blulagoon on Sun, 12 Dec 2021 08:30:10 +0100