vue3 most complete routing tutorial

Introduction to routing. I've released the basic use of vue2 before. You can go there if you want to know vue2 routing tutorial Let's start routing Know Vue router At present, the three popular front-end frameworks have their own routing implementation: ngRouter of AngularReactRouter of ReactVue router of Vue Vue router is based on Routing ...

Posted by Gulsaes on Sat, 05 Mar 2022 18:03:08 +0100

vue3. New features of version 2

Vue version 3.2 includes many important new features and performance improvements, but does not include major changes. Vue 3.2 original link The main updates are as follows: 1. New single file component function < script setup > is a compile time syntax sugar, which can greatly improve work efficiency when using Composition API in S ...

Posted by interactive on Sat, 05 Mar 2022 17:43:06 +0100

Handwritten simple Promise

Promise, as a new function in ES6, helps us solve the problem of callback hell and makes our asynchronous code clearer and simpler. As a front-end programmer, handwritten simple promise should be a necessary skill. Next, I won't say much. I'll go directly to the code. class Commitment { static PENDING = 'undetermined'; static FULFILLED = ...

Posted by kritikia on Sat, 05 Mar 2022 17:07:16 +0100

Interaction between JavaScript and css

Style sheet basic syntax tag chooser input{ width:120px; border:solid 1px #ff0000; } ID Selector #flow{color:#ff0000} Class selector .center{ text-align:center; font-weight:bold; } Common styles Style sheet type Internal style sheet style between < head > and < / head > labels <html> <head> ...

Posted by iron999mike on Sat, 05 Mar 2022 16:24:30 +0100

Call api interface

How do we usually call the interface? In Vue, we usually call the interface through the library of axios, but when developing in uniapp, we need to borrow the library of uniapp for development. Next, let's explore it together. I uni.request(OBJECT) Function: send network request Description of OBJECT parameters: 1.url Type: String Requi ...

Posted by phpisawesome on Sat, 05 Mar 2022 16:18:27 +0100

Simple and powerful assertion library power assert

power-assertWhat is power assertAnswer in official termsIt is the implementation of the concept of "Power Assert" in JavaScript.Descriptive assertion messages are provided through the standard assertion interface.No API is the best API. With power assert, you don't need to learn many assertion library APIs (in most cases, all you need ...

Posted by aldernon on Sat, 05 Mar 2022 15:42:17 +0100

js array and object

array What is an array? The index starts from 0, and the collection composed of the same data type is called array. Why do you need arrays (what problems do arrays solve)? For the unified management of the same type of data. What are the characteristics of arrays? Index value;The elements in the array are of the same data type;It is order ...

Posted by Zay on Sat, 05 Mar 2022 08:49:42 +0100

angular content projection

1, Ng content for content projection 1.1 ng-content The ng content element is a placeholder for inserting external or dynamic content. The parent component passes the external content to the child component. When Angular parses the template, it will insert the external content where ng content appears in the child component template. We can ...

Posted by zzlong on Sat, 05 Mar 2022 05:32:51 +0100

Vue projects are rendered using SSR servers

Note: This is an article used by the author to record his own learning of SSR and sort out the process of server rendering of a project. This article is only the understanding of the reader according to the demo. If you want to learn how to deploy SSR through this article, the author suggests you consult other more authoritative materials for l ...

Posted by MelbourneFL on Sat, 05 Mar 2022 03:29:15 +0100

Card assembly packaging

1. Implementation process of component library 1.1 component: Reusable Vue instances 1.2 Vue component library: a third-party UI Library Based on vue and independent of business, such as element and ant design 2. Implement your own component library 2.1 scaffold generation vue project 2.2 revised project catalogue 2.2.1 m ...

Posted by Brakanjan on Fri, 04 Mar 2022 20:12:15 +0100