Detailed description of project-related configuration files extracted during vue-cli packaging, vue-cli configuration file
When using vue-cli for development, you often need to dynamically configure some settings, such as the request address of the interface (axios. defaults. baseURL), these settings may need to be set after the project compilation, so in
Vue. js nested loop, if judgment, dynamically deleted instance, vue. js nested
Vue. js is currently a popular JavaScript MVVM library, which is built based on data-driven and componentized ideas. Compared with Angular. js, Vue. js provides APIs that are simpler and easier to understand.
App.html
Differences between v
Solve the problem that the DOM operation on the vue page does not take effect. The dom operation on the vue page takes effect.
Symptom:
The Element UI is used to render a tree structure. The operation button is displayed when you move the mouse over each node. The effect is as follows:
The error section is as follows:
After adding a node, move it to the vicinity of the new node (in the figure, move it
Solve the problem of failure after vue. js routing, vue. js Routing
A simple routing example (From vue-router 2), But after clicking, only the address bar changes, and the content remains unchanged. some of the effects previously written with jquery are also invalid. the final reason is that the same id was started twice (the first was started when the
I. Lazy Loading
It is also called delayed loading or on-demand loading, that is, loading as needed,
Ii. Why should I use lazy loading?
For single-page applications such as Vue, if there is no application, the files packaged with webpack will be abnormally large, resulting in too much content to be loaded when you enter the home page, which takes a long time, A long white screen is displayed. Even if loading is performed, It is not conducive to the us
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
I. Basic settings Ii. Packaging NPM run build 3. Create a repository on GitHub 1. upload files to the repository 2. Click repository settings. 3. Select the code to upload to the master 4. Click the address to preview 5. Common skills A. If the value of productionsourcemap in build code in config-> index. JS is set to false, the file size can be reduced by 80% after packaging. B. if you add hash: trueto the configuration parameters of the htmlwebpackplugin plug-in w
//what to do when initializing a page//What to do when you click on it//events such as mouse, keyboard, bubbling, default behavior, and so on//The front-end calling interface is showing the data on demand//created and mounted inside can do data processing, the only difference is that the created Dom is not completed mount, mounted has completed the mount. Created () { This. $htttp. Get (Url,getdata). Then (function(RES) {},function(RES) {})//equivalent to the resolve and reject inside the ES6.
One, [email protected] InstallationIi. introduction of [email protected]1 import vuei18n from ' vue-i18n '2 vue.use (vuei18n)Third, introduced the use of the Component language Pack (for example: Elementui)1 import enlocale from ' element-ui/lib/locale/lang/en '2 import Zhlocale from ' element-ui/lib/locale/ LANG/ZH-CN '3 import elementlocale from ' Element-ui/lib/locale 'Iv. creating a custom language pack, merging with the component language pack1 C
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
Example of Vue. js to achieve drag-and-drop effect, vue. js drag-and-drop instance
The page effect is as follows:
For the code, see Dangdang:
Html:
In this line of code, When Xiao Ying binds a dragstart event, the drag ($ event) Write method and js write method are different. If you want to upload 'event' when binding an event in vue ', you cannot write in js f
Vue. js uses bootstrap to implement paging controls. vue. jsbootstrap
This article shares with you the paging control developed using vue. js and bootstrap for your reference. The details are as follows:
The effect is as follows:
Implementation Code:
Source code download: bootstrap paging Control
Reference: official website of
Vue implements demo code for adding tags, and vue sample code
This article mainly introduces how to add vue labels. The code below is not enough.
The effect is as follows:
Html
Js
New Vue ({el: '# app', data: {selectedItems: [{name: 'nodejs'}], isShowDropmenu: false, inputItem: '', cataName: [{name: 'Development synt
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.