Value transfer between vue components (personal)
1. Transfer value from parent component to child component
1. Parameter name to be passed for the label binding of subcomponent
2. Use props to receive parameters on the sub component page
2. Transfer value from child component to parent component
Use $emit to trigger a custom event and pass a parameter
2. Listen to the custom e ...
Posted by neostrife on Sat, 30 Nov 2019 12:34:12 -0800
JS daily question: how to understand Proxy in es6?
20190124 question:
How to understand Proxy in es6?
Test question analysis: the understanding of proxy may extend to the two-way binding of vue
Proxy definition
It can be understood that a layer of interception is set up for the target object, through which external access to the object must be intercepted
Simple example:
const obj = new Proxy( ...
Posted by sonnieboy on Sat, 30 Nov 2019 08:15:14 -0800
Learning front-end routing and Vue router notes
The essence of front-end routing principle is to monitor the change of URL, then match the routing rules and display the corresponding page without refreshing. At present, there are only two ways to implement single page routing
hash
history
www.test.com / 3535; / is the Hash URL. When the hash value after ා, the data will not be requested fr ...
Posted by Texan on Sat, 30 Nov 2019 07:37:31 -0800
this problem in the implementation of vue list sorting
Recently I was looking at the knowledge of vue framework, and then I was puzzled by the writing method of this in one example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
&l ...
Posted by jscofield on Sat, 30 Nov 2019 03:49:46 -0800
How to implement the custom button in vue
In the actual development projects, sometimes we use the custom button. Because in a project, many pages, in order to unify the style, we will repeatedly use many of the same or similar buttons. At this time, the custom button component is of great use. We export the defined button component, and use it in the global reference, so that it can b ...
Posted by MerMer on Sat, 30 Nov 2019 01:58:13 -0800
Vue source notes data driven createElement
Vue version: 2.5.17-beta.0
<Vue source notes - data driven - render >It is recorded in, and the vnode data return is created by the vm.$createElement function. The following records the implementation process of creating vnode by the common node of vm.$createElement.
new Vue({
el: '#app',
render: createElement => createElement('div ...
Posted by badboy1245 on Fri, 29 Nov 2019 02:12:26 -0800
Four ways to lazy load react components
Lazy load: why?
Solve page fake dead state
Single page vue and react, only one HTML, slow loading of the first screen, fast switching in the later stage, which is not conducive to search engine optimization (SU), and the front-end rendering is not conducive to
500kb for the first screen is good for user experience, and the maxim ...
Posted by feidakila on Thu, 28 Nov 2019 14:18:13 -0800
vue-cli3.0 source code analysis @ vue/cli-----add and invoke
The create command was mentioned in the previous article;Let's take a look at the command add and invoke in this article. The reason why we put it together is that when add executes, it will also execute invoke
add
vue add vue-cli-plugin-xxx or vue add @vue/xxx
In this form, it is a plug-in that can be recognized inside vue-cli 3.0Let's first l ...
Posted by steveswt on Thu, 28 Nov 2019 08:14:56 -0800
What is a constructor
What is a constructor
vue
react
You can get a new object through new. It's the constructor
The introduction of this
<script>
// In the function, whoever this represents calls this function points to
function add(){
var a=10;
var b=20;
console.log('this On behalf of:',this);//this here ...
Posted by ghurty on Wed, 27 Nov 2019 13:11:09 -0800
Solve the asynchronous communication between vue and axios
In a project, it is often necessary to get data content from the back end. Especially when the front end and the back end are separated, the front end is deployed in an engineering way, and cross domain request becomes a necessary skill point of the front end. Fortunately, there are many solutions.
In vue, currently, axios is widely used for cr ...
Posted by decodv on Wed, 27 Nov 2019 07:09:09 -0800