vue sends ajax requests

1. vue-resource 1, introduction A Vue plug-in for processing ajax requests is widely used in vue1.x and is not maintained. 2. Use process step1: installation [Command Line Input] npm install vue-resource --save Step 2: Introduction [main.js] // Introducing vue-resource import VueResource from 'vue-resource' // Using vue-resou ...

Posted by john_6767 on Fri, 11 Oct 2019 11:46:58 -0700

vue converts DOM into images using HTML 2 canvas

I. Preface It is a common requirement to convert DOM into pictures in project development nowadays. So I decided to use html2 canvas as a plug-in. PS: There are many versions. Here is the latest version. Two, code 1. Installing plug-ins npm install html2canvas --save 2. Use (Picture class="pic" in this page is randomly selected, so t ...

Posted by Qnuts on Fri, 11 Oct 2019 04:15:58 -0700

ace Custom Online Editor Method and Tips

ace is an excellent open source online code editor github Download Address: https://github.com/ajaxorg/ace Download source > Open command line window - git clone https://github.com/ajaxorg/ace.git 2. Enter ace-demo directory, each html page has different functions, you can test and see for yourself. ...

Posted by ready2drum on Thu, 10 Oct 2019 01:35:18 -0700

[Front-end Blame Upgrade - LV.1] Basic Contents of Reaction

react usage tutorial Use of variables constructor(props) { super(props); this.state = { sliderSwiper: null, movies: [] }; this.handleStart = this.handleStart.bind(this); } if (!baseHref) { if (isPc) { window['location']['href'] = `${location.protocol}//${location.host}/demo/home`; return; } if (!isPc) { window['location']['href'] = `${location ...

Posted by skyriders on Wed, 09 Oct 2019 19:14:51 -0700

Automated deployment of front-end projects based on node.js (gospel of lazy people)

Why did you write this? There is only one truth => laziness!!! If you want to use it directly, github portal You don't have to look at the back - - remember to leave a star, the heart of your pen. At present, iot project is mainly done. Due to historical reasons, there are many pure H5 sub-projects of react/vue on the platform. These project ...

Posted by mcmuney on Wed, 09 Oct 2019 14:03:45 -0700

There's nothing trivial about the front end -- using ToolTipster in Webpack projects

Catalog Install ToolTipster Create prompt box components Use the prompt box component Reference articles Tooltipster is a simple, easy-to-use and powerful jQuery prompt box plug-in. It is used to provide cool prompt boxes for mouse events or other keyboard events such as dragging, moving, click ...

Posted by 3s2ng on Mon, 07 Oct 2019 11:51:35 -0700

Secondary packaging of axios in vue

First install axios npm install axios --save Create a new ajax.js file to encapsulate axios, expose encapsulated code functions, and call them on other pages import axios from 'axios' import qs from 'qs'//Serialized string import {MessageBox} from 'element-ui'//Introducing elementUI components imp ...

Posted by mdell on Sun, 06 Oct 2019 10:27:39 -0700

Talking about the Use of better-scroll and Notices

I. Use of better-scroll 1, installation npm install better-scroll -S 2, use <template> <div class="goods"> <div class="menu-wrapper" ref="menuWrapper"> <ul> <li v-for="(item,index) in goods" :key="index" class="menu-item"> <span class ...

Posted by daloss on Sat, 05 Oct 2019 05:00:38 -0700

PM2 running json file and pm2-web configuration

PM2 runs json file to start node project and pm2-web installation Define the run configuration file We can predefine a configuration file and then work out how to run it. For example, we can define a file app.json, which reads as follows: [root@jenkins-master linux]# cat app.json { "apps":[ { "name": "service-sk_platform_profession ...

Posted by dpluth on Sat, 05 Oct 2019 03:41:28 -0700

nodejs service, web pack packaged koa service

Preface At present, the iteration of front-end update is faster and faster, and the corresponding supporting services are also developing rapidly. node service koa uses web pack packaging scheme. install npm install npm run build New project package.json { "name": "koa2-blog", "version": "1.0.0", "description": "blog", "main": "main.js" ...

Posted by kavitam on Sat, 05 Oct 2019 01:52:50 -0700