Category: 【front end】

Vue cli3 production environment packaging and compressing Gzip 0

Vue cli3 production environment packaging and compressing Gzip

Hits: 0 Install the packaging tool: npm install –save-dev compression- [webpack] – plugin Configure the vue.config.js file const CompressionWebpackPlugin = require("compression-webpack-plugin"); const productionGzipExtensions = ["js", "css"]; module.exports = { productionSourceMap: false, devServer: { disableHostCheck:...

vue-binding class style 0

vue-binding class style

Hits: 01. Array syntax We can do this with the help of the v-bind instruction: HTML: <div id="app"> <div v-bind:class="activeClass"></div> <div v-bind:class="errorClass"></div> <div v-bind:class="[activeClass, errorClass]"></div> </div> <script src="./node_modules/vue/dist/vue.js"></script> <script type="text/javascript"> var app = new...

ES6 – var, let and const 0

ES6 – var, let and const

Hits: 0 1、was Before, js defined variables with only one keyword: var A problem with var is that the defined variable sometimes becomes a global variable inexplicably. For example a piece of code like...