Component fundamentals in Vue

How to create components // 1.1 use Vue.extend to create a global Vue component var com1 = Vue.extend({ // Through the template attribute, the HTML structure to be displayed by the component is specified template:'<h3>This is used. Vue.extend Components created ...

Posted by JimStrosky on Sat, 18 Jan 2020 09:20:35 +0100

vscode code format

1, Install three vscode plug-ins: 1.ESLint 2.Prettier - Code formatter 3.Vetur As shown in the figure below: 2, Open profile File - > Preferences - > Settings Now you see the configuration interface. Click the button in the upper right corner (as shown below) to open the settings.json file. 3, Add ...

Posted by kanenas.net on Thu, 16 Jan 2020 12:32:29 +0100

http request parameter mode type Query String Parameters, Form Data, Request Payload usage record and qs usage

Article directory The origin of the article Request parameter type introduction Query String Parameters Form Data Request Payload Introduction to the use of qs qs.parse() qs.stringify() The difference between qs.parse() qs.stringify() and JSON.stringify() JSON.parse(): The difference between para ...

Posted by vladibo on Mon, 13 Jan 2020 10:05:34 +0100

The most common function set of vue.js code development

1: Click the new button to jump out of the new page <span class="inquire" @click="addNew">Newly added</span> In method, add this method addNew() { this.$router.push({ name: "newMember" }); }, Complete code <template> <span class="inquire" @click="addNew">Newly added ...

Posted by dcooper on Fri, 10 Jan 2020 17:49:43 +0100

Wechat opens static page to share with friends

First of all, we need to add a share button in the upper right corner of the original homepage, and then we need to click it to pop up wechat's own function of sharing to friends. At first glance, it seems not difficult. There was no wechat related development experience before, but it took three days to do well. Let's start w ...

Posted by jonstu on Tue, 07 Jan 2020 05:00:32 +0100

The src of VUE dynamic binding audio/video/img cannot be played or displayed

Write a project. It is required to transmit audio and video locally to the server, and then echo it for playback. The current project uses elementUI+Vue Upload the image, request the interface, submit the image or audio file to the background, and the background returns the ID of the stored image or audio. Because the background is stored in th ...

Posted by Carolyn on Mon, 06 Jan 2020 20:15:55 +0100

When vue encounters applet (3)

Next [when vue encounters applet (1)) 1.5 nested loop · Vue.js <!-- App.vue --> <template> <div id="app"> <div v-for="item in address"> <p>{{item.province}}</p> <div> <span v-for="grandItem in item.cities">{{grandItem}}</span> ...

Posted by kbdrand on Sat, 04 Jan 2020 22:27:50 +0100

Vue core technology-17, component data validation through props

I. Preface The previous article introduced how to implement parameter passing through the props option of components This section will introduce the data verification of parameters through props 2, Use of props data validation The value of component props option can be array type or object type The object type of props o ...

Posted by crochk on Sat, 04 Jan 2020 18:23:26 +0100

nginx configures multiple front-end projects

Recently, a server needs to configure multiple front-end projects. Of course, nginx is needed to configure the front-end and back-end separation. The individual projects are as follows Modify nginx.conf configuration file of nginx #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log ...

Posted by AceE on Sat, 04 Jan 2020 05:42:00 +0100

Notes on key attribute in v-for loop of Vue

When Vue is updating the rendered element list with v-for, it defaults to the in place reuse policy. If the order of data items is changed, Vue will not move DOM elements to match the change of data items, but simply reuse each element here, and ensure that it displays each element that has been rendered under a specific index. ...

Posted by hansman on Fri, 03 Jan 2020 19:44:48 +0100