react short book project

Header For fear of style conflicts among components, install the following for management npm install styled-components First, change index.css to style.js. If you want to set global variables, such as reset, then import {injectGlobal} from 'styled-components'; injectGlobal` html, body, div, span, applet, object, ...

Posted by comicrage on Sat, 04 Jan 2020 02:42:24 -0800

Vue.js+axios get service

First of all, what Xiaguan said on the Internet Execute GET request // Make a request for a user with a given ID axios.get('/user?ID=12345') .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); // Optionally the request above could also be done as axios.get( ...

Posted by nickholas on Fri, 03 Jan 2020 06:45:51 -0800

13 automatic processing of CSS3 property prefixes

Prefixing css3 with postcss loader Install two packages, postcss loader and autoprefixer, in the terminal npm install –save-dev postcss-loader autoprefixer If the installation fails, delete the node ﹣ modules folder. npm install reinstalls the folder and then reinstalls the above two packages 2. Create a postcss-con ...

Posted by pcbytes on Thu, 02 Jan 2020 01:33:37 -0800

weex 04 custom components and Text components

Customize a general header component, which contains a text component. In this way, other modules can directly import registration references when using header. Custom components Create a new top header.vue file Complete the following code in top_header.vue <template> <div class="topheader"> <t ...

Posted by igorlopez on Wed, 01 Jan 2020 03:06:44 -0800

Vue core technology-45,Axios introduction and simple use

I. Preface In vue1.x, the official recommended HTTP request tool is Vue resource, but vue2.0 changed the recommended tool to axios After Vue 2.0 is added, Vue resource will not be updated any more, so HTTP request is introduced to axios axios and Vue resource are used in a similar way, Note: res returned by axios interface i ...

Posted by reloj_alfred on Tue, 31 Dec 2019 23:18:00 -0800

2 basic steps of writing vue

Basic steps of vue The code of Vue is placed in the generated src. Under the src, App.vue is the root component, main.js and components (other components are placed inside) First, define a component name in components, and write content in it. Take HelloWorld.vue as an example: <template> <div class="hello"> ...

Posted by possiblyB9 on Tue, 31 Dec 2019 13:16:05 -0800

Vue + element El table uses sortable to drag and drop table sort to realize row sort and column sort

Sortable.js is a lightweight JS plug-in for drag and drop sorting lists (although it is small in size, it is powerful)   The requirement of the project is that the table in the element can be dragged and sorted sorttable is used here Sortable.js is a lightweight JS plug-in for drag and drop sorting lists (although it is small in size, it is po ...

Posted by sandingmachine on Tue, 24 Dec 2019 09:36:14 -0800

This article helps you to solve the problems encountered in using axios data request in vue.js

Words written in the front: In the development process of using vue environment, using axios to request data interface has become the first choice, and it is also an officially recommended scheme of vuejs. This article mainly introduces the use of axios from the following two examples, in order to let you understand how to use a ...

Posted by shareaweb on Fri, 20 Dec 2019 06:36:56 -0800

[The Way of Xiuxian] Golden Dan by React-Redux

Author: Shui TaoPursue technology, but not lose the fun of life, live the life you want Introduction to React-Redux React-Redux enables your React project to have global data, allows multiple React components to read global data, and allows them to modify it. React-Redux can be interpreted as Vuex in a Vue, but it is also a global state ...

Posted by IanMartins on Thu, 19 Dec 2019 18:43:27 -0800

Request and upload files, Session introduction, Restful API, Nodemon

By Jeskson Source: front end tavern of dada Request and upload files GET and POST requests const express = require('express'); const app = express(); app.set('view', 'pug'); app.get('/', function(req,res){ // Output response message req.send('hello') }); app.get('/users/:gender', function(req,res){ // Get route parameters let gender = ...

Posted by yodasan000 on Tue, 17 Dec 2019 21:59:38 -0800