Vue. js learning example and vue. js learning example
This article will share with you a summary of Vuejs and a small example of webapi calling. At the end of the year, I will try to share more with you, hoping to help you; in thi
When a colleague uses Vue-pdf to browse a PDF, it's scary to find a bunch of scattered JS files after the build.Sure enough Google is behind it. Reference:vue-pdf Create 168 excess bundles in webpack. Solution:Install vue-
Vue. js imitation Metronic Advanced Table (2) Data Rendering, vue. jsmetronic
The previous article used Vue. js to create a Metronic-like Advanced Table (I). The static design introduced the requirements, prototype design, and sta
: this. isWarning, safe: this. isSafe }}, methods: {toggle: function () {this. isWarning =! This. isWarning; this. alert = this. isWarning? This. alertList [0]: this. alertList [1] ;}});
Bind an array
Html:
Remove class
Js
data: {classArray:["big",'red']}methods:{removeClass:function(){ this.classArray.pop();}}
Css:
.big{font-size:2rem;}.red{color:red;}
Effect: Click remove class. The removeClass function is called to remove the last entry of the
, try to only display and bind it, instead of adding logical operations.
2. Another advantage of using computed is that it will automatically change with changes to other data attributes.
For example, an example in the official document:
var vm = new Vue({ el: '#demo', data: { firstName: 'Foo', lastName: 'Bar', fullName: 'Foo Bar' }})vm.$watch('firstName', function (val) { this.fullName = val + ' ' + this.l
) define the thumbnail of the current page.AnnotsArray(Optional) Comments associated with the current page.MetadataStream(Optional) metadata contained on the current page.
A simple example:
3 0 OBJ
/Parent 4 0 r
/Mediabox [0 612 792]
/Resources
/F3 7 0 r/F5 9 0 r/F7 11 0 r
>
/Procset [/PDF]
>
/Contents 12 0 r
/Thumb 14 0 r
/Annots [23 0 r 24 0 r]
>
Endobj
(2) outlines Field
Outline is designed in
PDF. jsProblem One: ErrorNetwork.js:71 the provided value ' Moz-chunked-arraybuffer ' is not a valid enum value of type Xmlhttprequestresponsetype.Supportsmozchunkedclosure @ network.js:71l10n.js:326 no resource to load, early means out because Problem: The generated XLM table has no data.$ (". Table"). Tableexport ({Formats: ["xlsx"]}); In order to succeed in Ajax success, execute after rendering the page.PDF. js
JS learning travelogue 2. js learning travelogue
1. The scope of a variable is declared outside of all functions. It is called a global variable because it can be accessed by any other code in the current document. The variable declared in the function is called a local var
Node. js Learning (2)-routing function and form upload, node. js form
Today. getting started with js this book has learned some basic knowledge about node, including server creation, implementation of routing functions, form upload and data processing. some basic principles
Learning from scratch _ JavaScript _ series (8) -- js series (2) (event trigger sequence, text reading, js compiling ajax, input validation, and down menu)
(20) event trigger sequence
If there are multiple scripts in the document (for example, automatically executed scripts), they are executed in a certain order (in th
Npm is a module dependency management tool for Node. js. As a tool used by developers, it mainly solves problems encountered during Node. js development. Like RubyGems's importance to Ruby developers and Maven for Java developers, npm's importance to Node. js developers and communities is self-evident. NPM is a Node package management and distribution tool and ha
methods:
2. Notes are important
In JS, "// comment content" is used for single-line comments, and "/* Comment content */" is used for multi-line comments. The function of annotation is to improve the readability of the Code. It is not only convenient for later use, but also helps others to read and understand the JS code you have compiled. The content of the co
comment or not, by comparing the difference between the time, we can see that the parallel path is not parallel executionConsole.log (New Date ()-T);}, 1000);var T1 = new Date ();Heavycompute (50000);Console.log (' a ');Console.log (New Date ()-T1);It turns out that no one has moved it since the parallel process was created.Summing up, JS is a single-threaded execution, even if the parallel thread inside the function is completed, the callback functi
distinguished from the JavaScript Advanced programming) and the JavaScript design pattern, both of which are heavyweight books, Can make your JS technology a new step, the two books the former master cultivation drilling, the latter main cultivation of internal strength, a little want to the universe and the relationship between the nine Yang Martial.The advanced programming of JavaScript Dom first teaches you to build a library of jquery-like tools,
Node. js Learning (2) -- routing and form upload
Today. getting started with js this book has learned some basic knowledge about node, including server creation, implementation of routing functions, form upload and data processing. some basic principles of js. This book is v
JavaScript learning the first JS Foundation
1, javascript Character set:
JavaScript uses the Unicode character set encoding.
Why do you use this code?
The reason is simple, 16-bit Unicode encoding can represent any written language of the Earth people. This is an important feature of language internationalization. (You may have seen a script written in Chinese, such as: function my functions () {});
Each c
1, the conversion between the object and the basic type:
The object is not empty at any time, and is true in a Boolean environment.
As
New Boolean (FALSE);
New number (0);
New String ("");
New Array ();
Although the internal value is false, the value of the object is true;
Object?ValueOf ()? ToString ()
Where the date class is to perform the ToString () conversion first.
To manipulate a data value in 2,JS:
uninitialized and the output is undefined; the 5th row throws a reference exception because the variable has not been declared.
(4) You can use a single statement to define multiple variables, separated by commas. Such as:
Copy Code code as follows:
var name= ' Linjisong ',
Age=29,
work= ' it ';
(5) in the strict mode of ES5, you cannot define a variable named eval or arguments.
7, statements
(1) Statement: with a semicolon ";" At the end, if the semicolon is omitted
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.