Vue cli simple use of axios and cross domain development environment
Official: Axios is a promise based HTTP library that can be used in browsers and node.js
Here is English document And found on kancloud Chinese document
Install under the vue project (here is a simple example of using the project created by vue CLI)
$ npm i axios
Enter src/main.js to import axios
import axios f ...
Posted by misterph on Thu, 02 Apr 2020 06:17:36 -0700
Vue Router: nested route
Template extraction
We've learned about the other definition forms of Vue templates, using < template > < template >.
<!-- Template is pulled out -->
<template id="home">
<div>home page</div>
</template>
<template id="news">
<div>Jour ...
Posted by mellis95 on Thu, 02 Apr 2020 06:13:38 -0700
vue+axios+php+mysql to realize dynamic update of front-end interface data
vue implements dynamic data mainly by vue resource and axios. However, vue resource has not been updated since vue 2.0. Therefore, this paper mainly uses axios to operate.
1. Install axios
npm install axios --save
2. Writing components in components of Vue cli
<span style="font-size:14px;"><template>
<di ...
Posted by killerofet on Thu, 02 Apr 2020 02:44:23 -0700
Declaration of vue components
Declaration of vue components
1. How to register components
Global registration
Partial registration
// Component registration method1. Global registration
// Vue.component('CompOne', component)
new Vue({
// Component registration method 2. Internal registration
components: {
CompOne: component
},
el: ...
Posted by Gary Tactic on Wed, 01 Apr 2020 16:54:21 -0700
Using Express to build Node.js server
Express: a fast, open and simple web development framework based on Node.js platform.
Explain
install
Build Express
Test success
Call server method: Vue Resource & Axios
The difference between Vue resource and axios
axios reference: https://www.awesomes.cn/repo/axios/axios
Installation:
Third party npm is used here
Install express ...
Posted by mattyj10 on Wed, 01 Apr 2020 11:04:38 -0700
ESlint configuration description under Vue cli
1. Close eslint
This is just the way to close the Vue cli scaffold. In fact, it is very simple to build/webpack.base.conf.js
Just comment out the eslint rules in the configuration file.
module: {
rules: [
// {
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// enforce: 'pre',
...
Posted by mosherben on Tue, 31 Mar 2020 20:45:55 -0700
vue2 learning note 1
Preface
It's a bit awkward to see some background management systems can't be implemented by themselves.
So I have made up for the front-end knowledge.
Choose a vue framework for learning.
Here are some learning ideas
thinking
1. Learn the properties and methods of Vue objects
2. Learning two-way binding
3. Use of lea ...
Posted by gladiator83x on Tue, 31 Mar 2020 19:09:48 -0700
Page Jump: build a general management system based on Vue and PHP with front-end and back-end separation (6)
Most of Vue router is used in the jump of Vue single page application. To understand the principle of Vue router, you first need to know the < component > element of Vue.The usage of < component > is very simple. As long as its is feature is dynamically bound, < component > switches to multiple components dynamica ...
Posted by lilleman on Tue, 31 Mar 2020 18:17:00 -0700
vue sub component transfers data to parent component (example of adding and subtracting)
Here's a common way for a subcomponent to pass values to its parent. Here is an example of addition and subtraction to explain the principle.
As shown in the figure below:
The value of the parent component is 0 when there is no operation
When the plus sign is clicked, the value of the parent component is 1
When you ...
Posted by sinbad on Tue, 31 Mar 2020 00:31:29 -0700
On the value passing problem of parent-child components of vue
Create three Vue components - index.vue (parent component), son1.vue (child component), son2.vue (child component)
Set the path of the parent component in the router file (the child component does not need to set the route);
Page conversions between parent and child components are not routed
The parent component passes the d ...
Posted by ElectricShaka on Tue, 31 Mar 2020 00:25:28 -0700