Category:WEB Front End

  • Packaging Optimization of electronic playground series

    Time:2021-4-23

    Author:Liang Bangbang brief introduction There are two electronic packaging toolselectron-builder,electron-packagerThe official saidelectron-forgeIn fact, it is not a packaging tool, but a tool set similar to cli, which aims to simplify the whole process from development to packagingelectron-packager。 electron-builderAndelectron-packagerEach has its own advantages and disadvantages,electron-builderMore configuration items, more flexible, relatively small packaging volume, and difficult to […]

  • Front end micro service solution 2 – necessity of use

    Time:2021-4-23

    A series of articles: Front end micro service solution 1 – Introduction Front end micro service solution 2 – necessity of use Front end micro service solution 3 – engineering design pattern Front end micro service solution 4 – new module construction User stories A team of Muse uses vue2.0 framework to develop front-end pages. […]

  • Using vant component area in Vue

    Time:2021-4-23

    1. Download the official area data file,area.jsarea.tsIfarea.jsIf it does not exist, download itarea.ts, and then converted to JS filehold.tsChange the file name to.jsAnd thenexport const areaList = {}Change toexport default {} 2. Then it is introduced into Vue component of area componentimport areaList from ‘../../assets/js/area.js’ 3. Basic use < van area: area list = “arealist” […]

  • JavaScript functions

    Time:2021-4-23

    1. Essence:Encapsulate a sectionCan be called repeatedlyCode block executed 2. Statement Named function(also known as custom function)Function function name () {}Anonymous function (also known as function expression)Var variable name = function () {} 3. CallFunctions can be separatedCall each other, function name followed by () 4. ParametersFormal parameter (default undefined)Function function name (parameter 1, parameter […]

  • Graphics processing: filling canvas text with linear gradients

    Time:2021-4-23

    Author: barrior In canvas, it is easy to fill the text with horizontal or vertical linear gradients, while the gradients with angles are much more complex. As shown below, suppose the width of the text rectangle isW, Gao WeiHThe coordinates of the upper left corner areX, Y。 Guess and answer Give two answers: The correct […]

  • Use ajax technology to complete the home page login function through XMLHttpRequest object

    Time:2021-4-23

    Recently, AJAX technology is used to complete the login function of a home page through the XMLHttpRequest object! The code is as follows: <script type=”text/javascript”> //Creating an XMLHttpRequest object function createXMLHttpRequest(){ if(window.XMLHttpRequest){ return xmlhttprequest=new XMLHttpRequest(); }else{ return xmlhttprequest=new ActiveXObject(“Microsoft.XMLHTTP”); } } //How to execute the login button function doStart(){ var logname=document.getElementById(“loginName”).value; var logpass=document.getElementById(“loginPsw”).value; var userinfo=”inAccount=”+logname+”&inPsw=”+logpass; […]

  • CSS box hide / show after the top layer of the implementation code

    Time:2021-4-23

    .imgbox{ width: 1200px; height: 612px; margin-right: auto; margin-left: auto; margin-top: 60px; } .m1{ border: solid; border-width: 1px; height: 300px; width: 227px; } #m1img{ text-align:center; padding-top: 55px; } #img2{ margin-bottom: 35px; } p>span { text-decoration:line-through; } #where1{ position: absolute; left:412px; top: 60px; } #where2{ position: absolute; left:651px; top: 60px; } #where3{ position: absolute; left:890px; top: 60px; […]

  • HTML5 canvas drawing rectangle and circle instance code

    Time:2021-4-23

    HTML5 canvas drawing rectangle and circle instance code JavaScript CodeCopy content to clipboard <!DOCTYPE html>    <html>        <head>            <meta charset=“UTF-8”>            <title></title>        </head>        <body onload=“draw(),drawarc()”>    <! — drawing steps: get canvas element, get context, fill and draw border, set drawing style <! — to draw other complex graphics, you need to use paths: […]

  • A simple comparison of meta tags in HTML

    Time:2021-4-23

    Meta tag is used to define file information and describe Web page files, which is convenient for search engines to find. Placed between < head > < / head > Set Keywords:< meta name = “Keywords” content = “value” > multiple keyword contents can be separated by “,”Setting Description: < meta name = “description” content […]

  • Wechat app to upload pictures to qiniu in batch (recommended)

    Time:2021-4-23

    1、 Introduction of seven cattle SDK See the document for details https://github.com/gpake/qiniu-wxapp-sdk/blob/master/README.md 2、 Encapsulation upload method upload.js /** *Upload function */ const qiniuUploader = require(“qiniuUploader”); const request = require(“./request.js”) //Initialization of 7n related parameters function initQiniu() { var options = { uploadURL: ‘https://up.qiniup.com’, region: ‘ECN’, // uptokenURL: request.URL + ‘qiniu-token?token=’ + getApp().globalData.token, // uptoken: ‘xxxx’, […]

  • Front end micro service solution 1 – Introduction

    Time:2021-4-22

    A series of articles: Front end micro service solution 1 – Introduction Front end micro service solution 2 – necessity of use Front end micro service solution 3 – engineering design pattern Front end micro service solution 4 – new module construction vue-module-pro Front end micro service solution introduce Vue module Pro is a front-end […]

  • Six common inheritance methods of JavaScript

    Time:2021-4-22

    preface An important aspect of object-oriented programming is object inheritance.A object can directly own all the properties and methods of B object by inheriting B object. This is very useful for code reuse. Most object-oriented programming languages implement object inheritance through class. Traditionally, the inheritance of JavaScript language is not implemented through class (ES6 introduces […]