let obj = { time: 2017-7-20 , name: set , _r: 123 }; let daili = new Proxy (obj, { has(target,key){ if (key=== name ){ return target[key]; ...
recently, when writing React, to define a class method, I saw the following two writing methods: fun1 and fun2, both of which are not problematic to use. After reading the introduction guide of Master Ruan, I found that they are all written in fun1, so ...
I want to use the value of the child component in the computed of the parent component. Is there anything I can do? ...
when I read the book introduction to ES6, I introduced the arrow function this . The immobilization of this is not because there is a mechanism for binding this inside the arrow function, but because the arrow function does not have its own this, at al...
function getPromise(url, method = GET , data = {}, header = {}) { return new Promise((resolve, reject) => { wx.request({ url: url, header: header, success: function (res) { resolve(res...
recently read es6 (Ruan Yifeng s introduction to es6)-ECMAScript 6 introduction to the data structure of the Map chapter here do not know how to ask the boss for advice. { [ a ]:555 } ...
in the course of learning "Es6 Lottery Project ", I encountered a Uncaught (in promise) error error pointing to this.getState (). Then. This sentence, moreover, get state reported 404 interface.js ** * * @param {string} issue [] * @...
Lazing( Garry ) hello Garray Lazing( Garry ).sleep(10).eat( rice ) hello Garray 10... eating rice Lazing( Garry ).eat( rice ).eat( bread ) eating rice eating bread Lazing( Garry ).sleepFirst(5)....
arr = [ {id:1,name: }, {id:2,name: , children:[ {id:4,name: } ]}, {id:3,name: } ]; how do you reorder the array above into the following format? newArr = [ {id:1,name: ...
< H2 > "getting started with ECMAScript 6 "-in the inheritance chapter of sharp-sharp Class < H2 > the original case code is as follows: class A { constructor() { this.x = 1; } } class B extends A { constructor() { super(); this.x...
get a list of roles const request = { p: [ get, roles ], r: cid => { return instance.get(`${preUrlPath} ${cid} period_times`, { cid }) } } as shown in the picture, a method of writing the definition r can be understood i...
as the title Why is test in {test () {}} recognized as a function? ...
...
...
...
let p1 = new Promise(resolve => { resolve( promise1 resolved ); }) var p2 = p1.then(function(res){}); console.log( promise2: ,p2); chrome: {} shows pending, while [[PromiseStatus]] below shows resolved firefox : p2 is the i...
can you help me write a small demo to implement the example above ...
see such a way to write, such as introducing an object Obj, and then assigning gConfig to that object. The code is as follows Setting.js export default { type:4, city:3, doman: .baidu.com ip: 10.40.3.20 } Config.js import S...
as follows, I have two functions written in promis form function one verifyGA(type){ let that = this; return new Promise((resolve,reject) => { that.$post( user verifyGA ,{ gaCode:that.gaCode, captchaType:...
in the project of Vue let __this = this; let pro = function () { return new Promise((resolve, reject) => { let urlGetCarList = domain + app carStatusList.action ; __this.$http.get(urlGetCarList, { params: { ...
for(let i=0;i<this.collectionList.length;iPP){ this.$post("", { token: this.token, Id: this.collectionList[i].Id }).then(res => { this.OpenTime = res.info this.setIntervalForTime() }); } this.OpenTime = res.info how to w...
I found that the mobile phone CAPTCHA sent when registering on the Internet is usually a 4-digit, 6-digit pure digital verification. But this kind of user experience is not good, if it is very long and easy to type wrong, it is usually a random number be...
previously, custom token was used to distinguish realm login operations, but now there is a need that the exits of the two realm do not affect each other. However, when both realm login operations are performed, no matter which realm performs the exit op...
I want to inject a piece of my own js, when loading an iframe third-party web page to provide a method that can be accessed within the iframe. Can it be realized? -sharp-sharp-sharp problem description ...
Hello everyone, the latest project needs to be docked with the interface of a mall, simply to call their various interfaces, such as ordering, commodity inquiry, freight and so on. in accordance with the previous practice, in order to facilitate stati...