Simply understand the e, template, and replace elements in vue

... el Type: String | HTMLElement | Function Limit: Only functions can be defined in the component definition. 详细: Provides a mount element for the instance. The value can be a CSS selector, or an actual HTML element, or a function that returns an HTML element. Note that the element is only...


Scaffolding vue-cli Series 2: vue-cli project template and build tool

... 上篇 We mentioned the vue-cli project template. Here we will introduce in detail. The scaffolding provided by vue-cli is only one of the most basic, and can be said to be a best practice of the engineering structure that the Vue team believes. For beginners or users who have previously...


Java study notes

... 移操作操作 Public class HelloJava { public static void main(String[] args) { // TODO Auto-generated method stub Int a = 24; System.out.println(a+" shifts two bits to the right: "+ (a>>2)); Int b = -16; The result of System.out.println(b+" shifting three digits to the left is: "+(b>...


Front-end html+css+JavaScript Need to master the word

... 前端html+css+JavaScript Need to master the word broswer Browser (client) Html hypertext markup language Css cascading style sheet Javascript language name (similar to python/php/c...) Title title Body Head head Div box (similar to storage box) Font font Width wide Height Background...


Sorting algorithm - bubble sorting

... programming language: JavaScript Algorithm core idea: 1. Compare adjacent elements, if the first one is larger than the second one, exchange them two 2. Do the same for each pair of adjacent elements Array . prototype . bubbleSort = function ( ) { for ( var i = 0 ; i < this . length ...


Tutorial: Learning React starts with JSX

... Although JSX is an XML syntax that extends to ECMAScript, it does not define any semantics. This means that it is not within the scope of the ECMAScript standard. It is also not directly executed by the engine or browser. A very compiler preprocessor is often used to convert these JSXs...


String templates, template strings, templates in Vue, and more.

... 1: Template string Traditional JS language, the output template is written like this: $('#result').append( 'There are <b>' + basket.count + '</b> ' + 'items in your basket, ' + '<em>' + basket.onSale + '</em> are on sale!' ); is more complicated. ES6 introduces a...


Written test questions | Insert 1000 li in ul, click li to display the serial number of li

... 题干 as shown in the title, use the closure in the process of clicking li to display the serial number, this method does not consider the optimization problem, if Li increase page loading will be very slow. I will modify it later. <ul class="campus-test"></ul> window.onload =...


Vue2 life cycle lifecycle

... <! DOCTYPE html > < html > < head > < title > Welcome to Vue </ title > < script src ="https://unpkg.com/vue" ></ script > </ head > < body >< div id ="app" > {{msg}} </ div > < script > var app = new Vue({ el: ' ...


JS's understanding of this

... JavaScript:this是什么? 定义:this是包含它的函数作为方法被调用时所属的对象。 看定义有点懵…… 先来看一个题目: //What does the following code output? why? Var number = 50; Var obj = { Number: 60, getNum: function () { Var number = 70; Return this.number; } }; Console.log(obj.getNum()); //60 Console.log(obj.getNum.call()); //<=...