Home Common Problem What does the vue.js family bucket include?

What does the vue.js family bucket include?

Jun 13, 2023 pm 04:01 PM
vue.js

Vue.js family bucket includes scaffolding vue-cli, routing vue-router, state management mode vuex, axios, and UI framework. Vue is a JavaScript framework for building user interfaces. It is built based on standard HTML, CSS and JavaScript, and provides a set of declarative and component-based programming models to help developers develop user interfaces efficiently.

What does the vue.js family bucket include?

The operating system of this tutorial: Windows 10 system, vue version 3.0, Dell G3 computer.

Vue.js family bucket is composed of scaffolding vue-cli, routing vue-router, state management mode vuex, axios, and UI framework. Vue (pronounced /vjuː/, similar to view) is a JavaScript framework for building user interfaces. It is built based on standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model to help developers develop user interfaces efficiently.

1. Project construction tool: vue-cli

vue-cli is also called scaffolding and is officially defined as a standard tool for Vue.js development. Vue-cli is a complete system for rapid development based on Vue.js, which can automatically generate Vue.js webpack project templates. Vue cli provides powerful features for customizing new projects, configuring prototypes, adding plugins and inspecting webpack configurations. @vue/cli 3.x version can quickly create the scaffolding of a new project through the vue create command. It does not need to rely on webpack to build the project like vue 2.x.

Compared with the introduction of scirpt tags, vue-cli scaffolding has the following characteristics:

1) Rich functions

Supports Babel, TypeScript, ESLint, PostCSS, PWA, unit testing and End-to-end testing is supported out of the box.

2) Easy to Expand

Its plug-in system allows the community to build and share reusable solutions based on common needs.

3) No Eject required

Vue CLI is completely configurable, no eject required. This way your project can be kept updated for a long time.

4) Graphical interface on CLI

Create, develop and manage your projects through the supporting graphical interface.

5) Instantly create prototypes

Use a single Vue file to instantly implement new inspirations.

6) Future-proof

Easily produce native ES2015 code for modern browsers, or build your Vue components as native Web Components.

Installation

npm install -g @vue/cli
# OR
yarn global add @vue/cli

//安装完成后创建一个项目,vue ui为图形化构建,相对简单(推荐)
vue create my-project
# OR
vue ui
Copy after login

2. Routing manager: vue-router

vue-router is the official routing manager launched by Vue. It is mainly used to manage URLs, realize the correspondence between URLs and components, and switch between components through URLs, making it easier to build single-page applications. It mainly has the following features:

1) Nested routing/view table

2) Modular, component-based routing configuration

3) Routing parameters, queries, Wildcard

4) View transition effect based on Vue.js transition system

5) Fine-grained navigation control

6) Links with automatically activated CSS classes

7)HTML5 history mode or hash mode, automatically downgraded in IE9

8)Customized scroll bar behavior

vue Router installation code

npm install vue-router
//安装后在mainjs引入
import VueRouter from 'vue-router'

Vue.use(VueRouter)
Copy after login

3. State management mode: vuex

In some large projects, sometimes we encounter a single page that contains a large number of components and complex data structures, and may be different. Components also affect each other's state, in which case the flow of events in the component tree can quickly become very complex, making debugging extremely difficult. In order to solve this problem, the state management model of Vuex was introduced. Vuex is an implementation library of the state management model. It is mainly used in conjunction with Vue.js in the form of a plug-in, which allows us to manage complex tasks in Vue.js. Component event flow.

vuex installation method

npm install vuex --save
Copy after login

4. axios

##Axios is a promise-based HTTP library. Simply put, it can send get , post request.

Axios Features

1) Create XMLHttpRequests from the browser

2) Create http requests from node.js

3) Support Promise API

4) Intercept requests and responses

5) Convert request data and response data

6) Ability to cancel requests

7) Automatically convert JSON data

8) The client supports defense against XSRF

Installation method

npm install axios
Copy after login
Or directly introduce

5. UI framework: iview, vant, elementUI

iview A set of high-quality UI component libraries based on Vue (divided into Different versions such as mini program and PC version);

vant is a lightweight and reliable mobile Vue component library. It is a set of mobile component libraries based on Vue 2.0 open sourced by Youzan, aiming to be faster and simpler. Develop beautiful and easy-to-use mobile sites based on Vue.

Ant Design Vue is the Vue implementation of Ant Design, which develops and serves enterprise-level backend products.

elementUI is based on the Vue 2.0 desktop middle and backend component library.

The above is the detailed content of What does the vue.js family bucket include?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1676
14
PHP Tutorial
1278
29
C# Tutorial
1257
24
In-depth discussion of how vite parses .env files In-depth discussion of how vite parses .env files Jan 24, 2023 am 05:30 AM

When using the Vue framework to develop front-end projects, we will deploy multiple environments when deploying. Often the interface domain names called by development, testing and online environments are different. How can we make the distinction? That is using environment variables and patterns.

Detailed graphic explanation of how to integrate the Ace code editor in a Vue project Detailed graphic explanation of how to integrate the Ace code editor in a Vue project Apr 24, 2023 am 10:52 AM

Ace is an embeddable code editor written in JavaScript. It matches the functionality and performance of native editors like Sublime, Vim, and TextMate. It can be easily embedded into any web page and JavaScript application. Ace is maintained as the main editor for the Cloud9 IDE and is the successor to the Mozilla Skywriter (Bespin) project.

What is the difference between componentization and modularization in vue What is the difference between componentization and modularization in vue Dec 15, 2022 pm 12:54 PM

The difference between componentization and modularization: Modularization is divided from the perspective of code logic; it facilitates code layered development and ensures that the functions of each functional module are consistent. Componentization is planning from the perspective of UI interface; componentization of the front end facilitates the reuse of UI components.

Let's talk about how to use the Amap API in vue3 Let's talk about how to use the Amap API in vue3 Mar 09, 2023 pm 07:22 PM

When we used Amap, the official recommended many cases and demos to us, but these cases all used native methods to access and did not provide demos of vue or react. Many people have written about vue2 access on the Internet. However, in this article, we will take a look at how vue3 uses the commonly used Amap API. I hope it will be helpful to everyone!

Explore how to write unit tests in Vue3 Explore how to write unit tests in Vue3 Apr 25, 2023 pm 07:41 PM

Vue.js has become a very popular framework in front-end development today. As Vue.js continues to evolve, unit testing is becoming more and more important. Today we’ll explore how to write unit tests in Vue.js 3 and provide some best practices and common problems and solutions.

How to query the current vue version How to query the current vue version Dec 19, 2022 pm 04:55 PM

There are two ways to query the current Vue version: 1. In the cmd console, execute the "npm list vue" command to query the version. The output result is the version number information of Vue; 2. Find and open the package.json file in the project and search You can see the version information of vue in the "dependencies" item.

Analyze the principle of Vue2 implementing composition API Analyze the principle of Vue2 implementing composition API Jan 13, 2023 am 08:30 AM

Since the release of Vue3, the word composition API has entered the field of vision of students who write Vue. I believe everyone has always heard how much better the composition API is than the previous options API. Now, due to the release of the @vue/composition-api plug-in, Vue2 Students can also get on the bus. Next, we will mainly use responsive ref and reactive to conduct an in-depth analysis of how this plug-in achieves this.

A brief analysis of how vue implements file slicing upload A brief analysis of how vue implements file slicing upload Mar 24, 2023 pm 07:40 PM

In the actual development project process, sometimes it is necessary to upload relatively large files, and then the upload will be relatively slow, so the background may require the front-end to upload file slices. It is very simple. For example, 1 A gigabyte file stream is cut into several small file streams, and then the interface is requested to deliver the small file streams respectively.