In the absence of the use of Webpack+vue router development, want to get the Rul pass the parameter address, directly through a function can be obtained.For example, in a www.test.com/test.html?sign=test address, to get the value of sign, the usual method is to use a function,var geturlstr = function (name) {var reg = new RegExp ("(^|)" + name + "= ([^]*) (|$)");var r = window.location.search.substr (1). Match (REG);if (r! = null) return unescape (r[2
Original addressObjectiveThis period of time to catch the project, need to use a multi-file upload, with Vue for front-end project development. On the internet to find a lot of plug-ins, are not very satisfied, some use cumbersome, and some can not adapt to the project. Just want to toss a bit, write a Vue upload plugin, once and for all, can be used directly later.vue-easy-uploaderhas been uploaded to GitH
The Vue project uses the socket development message reminder.
The message server side is developed with node Socket.io.
Vue Use Vue-socket.io Development
Address: Https://github.com/MetinSeylan/Vue-Socket.io
Configuration:
Note that the link is HTTP because Socket.io supports HTTP
If the WebSocket link with the b
Vue with the use of hand-foot racks generated by the project directly modified. vue file, save the compilation on the report of a lot of errors, solution: a problem:
Because set the Eslint, if you do not want to have the specification of JS code, can be reinitialized to turn off the eslint. Use Eslint to lint your code? (y/n) This step select No
If you want to have good specifications, in fact, the error ha
The difference between common and custom
Vue-resource is the Vue plug-in that I use to interact with the interface, and the header provided by Vue-resource has the following two ways:
vue.http.headers.common[' Token ']vue.http.headers.custom[' Token ']
What is the difference between them? Let's look at the following source code (
Describes Vue methods and events and Vue method events.
One vue method implementation
Method 2 passing Parameters
3. vue accessing native DOM events
Use $ event to get
Four event Modifiers
Download: vue-click_jb51.rar
The above is all the content of this article. I hope
What is Virtual DOM in Vue. js 2.0 ?, Vue. jsdom
What is Virtual DOM?
Previously, React and Ember began to use virtual DOM technology to speed up page updates. If you want to know how it works, you must first recognize these concepts:
1. Updating DOM is very expensive.
When we use Javascript to modify our page, the browser has done some work to find the DOM node for modification, for example:
document.getEl
Detailed description of the proxyTable cross-domain problem summary in the vue-cli project, vue-cliproxytable
What is cross-origin?
The same-origin policy specifies that the two URLs are considered cross-origin if there is any difference between the Protocol, domain name, and port.
What are the cross-origin solutions?
1. JSONP is short for JSON with padding (filling JSON or parameter JSON.
The principle of
Vue implements forward and backward refresh without refreshing effect, and vue performs backward refresh
Recently, vue is used to create a mobile project. We hope to achieve the effect of refreshing forward and backward without refreshing. That is, the loaded interface can be cached (the returned interface does not need to be reloaded), and the closed interface c
Add Baidu statistics code to a single-page vue application (for test purposes) and vue code
In this way, the ingress file is inserted globally, and each page is available. This involves a problem, Vue. the js Project is a single-page application. Every time a user browses a website, the page will not be refreshed when accessing the inner page, which means that B
Talking about reusing requests based on axios in Vue-cli, vue-cliaxios
This article introduces how to reuse requests based on axios encapsulation in Vue-cli and shares them with you as follows:
Install
You only need to install one axios.
npm install axios --save
Interface proxy settings
To ensure that requests can be sent normally, we usually need to configure an
Based on the implementation method of clicking the external component in Vue to close the component, vue component
Vue defines the global click function. The parameter is the click callback function.
Vue. prototype. globalClick = function (callback) {// global click $ (document). click (callback );}
Monitor global c
1, build a vue-cli to build a project(1) Installation vue-cliNPM Install Vue-cli-g(2) Vue init webpack project nameSelect Settings as needed(3) NPM InstallInstall the configuration (be aware that the current location is in the project if the configuration is installed, otherwise it will be error: Configuration file Pac
Vue-resource1.CNPM Install Vue-resource--save2. Import Vueresource from ' Vue-resource ' in Main.js3. Vue.use (Vueresource) in Main.js4. Use this in the component $http. Get (URL). Then ((response) =>{}, (Err) =>{})"app"> "Htmlvalue"> Vue Vue-resource sending an HTTP request
Extremely scary, when using the Vue-simple-upload plugin to do file upload, encountered always access to the background of the interface.I thought I use plug-ins have problems, various changes, because unfamiliar, false change several times.Emmmm~~ originally is my action parameter to the lowercase post, start console error, gave so obvious hint,I can't believe I don't understand.OK, first step, downloadNPM Install
Laravel first recognized Vue. js and Laravel first recognized Vue. js.
I am also studying the laravel box recently. Since I have learned the tp framework before, laravel is the most elegant framework, so after school, I couldn't help but try this framework that is already popular outside China.In general, after learning the tp framework, I think tp is written by Chinese people, so many ideas are quite accep
Vue-router post 404 problem with history mode refresh, vue-router404
Because our application is a single-page client application, when using the history mode, the URL is like a normal url and can be directly accessedhttp://www.xxx.com/user/idBut because the path set by vue-router is not a real path, the 404 error will be returned when you refresh the page.
If you
Vue. js object conversion instance and vue. js object instance
If you don't talk much about it, You can directly post code to everyone. The Code is as follows:
Var app = new Vue ({el: "# app", data: {login: {name: "", psd: "" }}, methods: {submit: function () {// convert to the desired object var obj = JSON. stringify (this. login); console. log (obj); axios. p
Vue. js table paging ajax asynchronously loads data, vue. jsajax
Vue. js is a lightweight, high-performance, componentized MVVM library with easy-to-use APIs.
Paging is generally used together with a table. A paging link is used as a part of a table. It is reasonable to encapsulate a paging link into an independent component and then embed it into a table compone
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.