1. What is vuex
Vuex is designed for Vue The state management mode of JS application development is used to manage the data state of the page and provide an ecosystem of unified data operation. The data in the warehouse can be obtained arbitrarily in the component. Similar to vuex, redux is commonly used in react.
--- from official sample
...
Foundation component difference between component and module
Module: focus on function or data encapsulationComponent: it includes template, style and script, and its script can be composed of various modules
Basic - single page application (SPA)
In the traditional mode, each page and its content need to be requested from the server ...
object
There are two kinds of objects in js. Objects in js can dynamically add attributes and methods through point syntax.
Narrow object
Represented by {}; Narrow objects can have many properties and methods If the property value on the right is function, it is method. The no side is called an attribute. var obj = {
...
Posted by agriz on Thu, 14 Apr 2022 04:17:21 +0300
1, How to use Vue
1. Introduce Vue js
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../js/vue.js"></script>//Introduce Vue js
<title>Document</title>
</head>
2. Show in HTML
Function of {}}: render the dat ...
Posted by 44justin on Thu, 14 Apr 2022 02:01:36 +0300
As a vuer, he finally began to work on the vue source code. With an excited heart and trembling hands, it's better to roll up the line of code. The source code is based on the latest v2 The description of version 6.12 may lead to misunderstanding and discrepancy. Please correct it. In addition, only sort out the process without in-depth explana ...
Posted by thesimon on Wed, 13 Apr 2022 17:04:57 +0300
Source code acquisition: download from "resources" on the blog home page!
Classroom reservation system - background system
Project introduction:
This is a front-end and back-end classroom reservation and viewing system project, which can realize the reservation and cancellation of activities in the classroom as a unit, can b ...
Posted by aim25 on Wed, 13 Apr 2022 01:00:54 +0300
This is mainly about vue2's this access optimization. Some details that you don't normally notice, especially template for accessing array/object data, and computed accessing arrays/objects hanging in this in a loop, will trigger dependent collection, causing certain performance problems.As a whole, there is no particular complexity, depending ...
Posted by jenreb1 on Mon, 11 Apr 2022 20:25:41 +0300
Vue cli is based on Vue The complete system developed by JS is a scaffold for Vue official Kwai to build single page application. With this tool, the difficulty of using webpack can be greatly reduced.
Install Vue cli
1. node environment needs to be installed https://nodejs.org/en/download/ (node download address, click next to install, and che ...
Posted by amchargue on Mon, 11 Apr 2022 00:50:37 +0300
1.1 global components
The global component registration form is as follows:
// Declare global components
Vue.component(componentName,{
data: 'Component data',
template: 'Component template content'
})
In the above example, the first parameter of component() is the component name (in fact, it can be regarded as the name of HTML ...
Posted by earthlingzed on Sun, 10 Apr 2022 23:46:42 +0300
Reprint: https://www.cnblogs.com/qiujianmei/p/10824682.html , https://www.cnblogs.com/monsterooo/p/6815392.html
1, There are two main client storage methods: cookie and webStorage (localStorage and sessionStorage)
Cookie s are based on the HTTP specification and are used to identify users.
A Cookie is a small piece of data sent by the server t ...
Posted by alpinec on Sun, 10 Apr 2022 23:43:39 +0300