当前位置:网站首页>2021.6.14 notes

2021.6.14 notes

2022-06-25 04:25:00 Robin Luo Bing

1、const {app} = require('electron')    Deconstruction and assignment of variables     deconstruction Destructuring Look at Derrida's Deconstruction

const obj = {
  name: "Fred",
  age: 42,
  id: 1
}

//simple destructuring
const { name } = obj;
console.log("name", name);

//assigning multiple variables at one time
const { age, id } = obj;
console.log("age", age);
console.log("id", id);

//using different names for the properties
const { name: personName } = obj;
console.log("personName", personName);

https://stackoverflow.com/questions/41058569/what-is-the-difference-between-const-and-const-in-javascript/41058622

2、route routes  router difference :route, It's a route ,routes, It's a set of routes .router It can be understood as a container , Or a mechanism , It manages a set of route. Simply speaking ,route It's just going on URL Mapping of sum function , And when you receive a URL after , Find the corresponding function in the routing mapping table , This process is driven by router To deal with .https://segmentfault.com/a/1190000016662929

3、 Automatically build routing tables :https://hhyang.cn/v2/tutorial/rgRoutes.html#%E5%AE%89%E8%A3%85

4、uni-app Development app :https://www.cnblogs.com/sunnyeve/p/12567778.html

5、App.mpType = 'app'  : App.vue Components are src/main.js Introduced and set up a mpType The attribute value , Its value is app. This value is to distinguish it from the widget page component that I'll talk about later , Because of the applet page component and this App.vue The writing and introduction of components are consistent , To distinguish between the two , Need to set up mpType value .

6、Vue.prototype.$myHttp = MyHttp  : Definition Vue The prototype of the , Make in Vue This method can be used in the example of (this.$myHttp) Get component data and tools .

7、vue.config.js  Is an optional configuration file , If the ( and  package.json  Of the same rank ) This file exists in the root directory , Then it will be  @vue/cli-service  Automatic loading . You can also use  package.json  Medium  vue  Field , But pay attention to this way of writing, you need to strictly follow JSON To write .

8、Vue.config.productionTip :  Under development environment ,Vue It will provide a lot of warnings to help you deal with common mistakes and traps . And in a production environment , These warnings don't work , Instead, it will increase the volume of the application . Besides , Some warning checks have some small runtime overhead , This can be avoided in the production environment mode .( Description on the official website ) The general meaning should be , Environment configuration of message prompt , Set as development environment or production environment  https://segmentfault.com/a/1190000014542373

原网站

版权声明
本文为[Robin Luo Bing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202210534569225.html