Design patterns used to improve extensibility in excellent framework source code

Why to improve code extensibility The code we write serves certain requirements, but these requirements are not immutable. When the requirements change, if our code has good expansibility, we may simply add or delete modules. If the expansibility is not good, all the codes need to be rewritten, which is a disaster. Therefore, to improve the ex ...

Posted on Sat, 30 May 2020 00:35:53 -0400 by hadingrh

Get data + play source through QQ music interface

Recently, I am learning to make a web mobile music player. Because I don't want to make a database to store data, I am learning to get some data from the QQ music interface If other data is normal, but can't play, you can try this I found two useful sources yesterday. I hope they can give some help to like-minded friends It's used here songmi ...

Posted on Tue, 05 May 2020 06:21:53 -0400 by 9902468

You may not know how to use Axios

In the daily development of the front-end, in addition to purely static display pages, it is necessary to make some interface requests, from XMLHttpRequest, to jQuery ajax, to later Fetch and Axios. Why choose Axios Create XMLHttpRequests from the browser Create http request from node.js Support Promise API Intercept requests and r ...

Posted on Sun, 03 May 2020 13:16:58 -0400 by Stryves

Problems when using the Vue aplayer plug-in

Just contacted Vue aplayer and found the usage from github. First, NPM install Vue aplayer – save is needed. Then import VueAplayer from 'Vue aplayer' is introduced into the component. Don't forget to register the components: { 'a-player': VueAplayer  }  There is another problem here. Use v-if instead of v-show. Because it is an asynchro ...

Posted on Thu, 30 Apr 2020 13:44:32 -0400 by shatner

This summer, the road to front-end performance optimization

Optimization is actually a very interesting thing.. Take my project for example, dist file from 20M to 2M 1, Use tools to view the size of each package of the project First of all, you need to install a webpack plug-in, webpack bundle analyzer, to analyze the dependency of each package and view the volume of the package. npm intall webpack-bun ...

Posted on Wed, 29 Apr 2020 02:45:46 -0400 by pc-coholic

axios use memo

Installation and use Install with npm: $ npm install axios Using CDN: <script src="https://unpkg.com/axios/dist/axios.min.js"></script> get and post examples Execute GET request: // For given ID Of user Create request axios.get('/user?ID=12345') .then(function (response) { console.log(response); }) .ca ...

Posted on Tue, 21 Apr 2020 21:58:15 -0400 by czs

React news website -- Header component split and style layout

First, a head assembly     index.js import React,{Component} from 'react'; import ReactDom from 'react-dom'; import { Layout } from 'antd'; import 'antd/dist/antd.css'; import './style.css'; import AppHeader from './components/AppHeader/'; const { Header, Footer, Content } = Layout; class App extends Component{ render(){ return( ...

Posted on Wed, 15 Apr 2020 15:10:10 -0400 by Grizzzzzzzzzz

Implementation and modularization of vuex state management in vue.js

The front-end component used in this paper is element UI, so it is necessary to build the front-end project with vuecli, then continue to install NPM install element UI, and introduce it into main.js main.js Code: import Element from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; Vue.use(ElementUI) The ...

Posted on Sun, 05 Apr 2020 21:33:14 -0400 by btoles

We chat app platform

We chat app platform A huge project.... Take your time. Technology stack 1,vue 2,vue-router 3,vuex 4,axios 5,iview 6,element-ui 7,moment 8,babel-polyfill Introduction to relevant functions 1, Interface call 1. get call this.get('/type/list', params).then(res => { console.log(res); }); You can use this.get() method directly ...

Posted on Fri, 03 Apr 2020 18:35:24 -0400 by mickfitz

Using wechat jssdk with vux in Vue application

Instructions for sharing wechat in vux The sharing interface is only authorized by the official account. The domain name must be filed and set up in the background of WeChat. Confirm that the requirements of using jssdk have been met before development. Introduce Global import in main.js: import { WechatPlugin } from 'vux' ...

Posted on Fri, 03 Apr 2020 05:42:00 -0400 by pontiac007