export function postMethod(data) { const baseURL = process.env.BASE_API axios({ method: post , url: baseURL + img_upload , timeout: 50000, data: data, headers: { loginToken : getLoginToken() } }).then(res =&g...
case: when I need to render the corresponding component according to certain conditions, if I exceed the number of ternary operators, I usually choose to use & & , but if there are too many, I don t think it is beautiful enough. Excuse me, is there a...
an item of react, the function of deleting a photo. After clicking to delete a photo, you need to update the component and get the value of the list again. The two function body requests carry different id, and the request is an asynchronous function. I...
if I enter annual salary above 30K the length judged by the length attribute is 7 . my database code is utf8mb4, and the length of a Chinese character is equivalent to 4 , but if this field is stored in the database, it is equivalent to 19 . add m...
I have a txt file there are 10,000 lines the first line is as follows 27466726----6837605--------398705040011----7605----60664----qq what I want to extract is 27466726 6837605 398705040011 7605 60664 qq the second line is as follows zaistarm---...
recently there are many delete methods used, which always feel strange. Apart from affecting the original array, is there any harm to delete? let a = true; let obj = { name: xiaobi , age: 22 } if(a === true) { delete obj.age } console.log(obj...
case: there is a variable a whose initial value is {} , then a will be a function: console.log as follows a: f (xxx) { xxx } how can I judge the difference between the above two? Thank you ...
Ruan Yifeng tutorial: http: es6.ruanyifeng.com -sharpdo... a.mjs import {bar} from . b ; console.log( a.mjs ); console.log(bar); export let foo = foo ; b.mjs import {foo} from . a ; console.log( b.mjs ); console.log(foo); export l...
for example, get a variable a , and this variable a may be an object returned by the server. a: { name: xiaobe , age: 22, title: xxx } I want to assign name and age of a to b (actually want to take out more attributes) is the...
looking at the introduction to ES6 written by Ruan Yifeng, I found that there was a contradiction in the content. As mentioned in , tail call optimization is only enabled in strict mode, but I use it to call optimized code to run normally without str...
what are the two types of attribute names of an object? ask for guidance. Isn t the previous string a type? there can be many attributes and names in an object. ...
is learning the contents of ES6. I am reading a book published by teacher Ruan Yifeng. I see the contents of the variable declaration about the temporary dead zone. Here is an example: var tmp = 123; if (true) { tmp = abc ; ReferenceError:tmp ...
I don t have much time to contact nodejs. I use nodejs to write the server. Now I write all the interfaces in one file. How to write these interfaces separately in different files, and finally introduce all the interface files into a main file all my...
const scrollTop = document.documentElement.scrollTop scroll bar event, drag the scroll bar to print the scrollTop with different values each time! Didn t you say the value can t be changed? Why is this okay? ...
in the book written by ES6 Ruan Yifeng, there are several times the word "proposal ". I want to know what it means. Does it mean that ES6, which is not yet formal, is just something that someone may do after it is put forward? can the content be ignor...
how many ways can you tell that this object is empty? ...
function pro(){ return new Promise(resolve=>{ resolve() }) } function a(){ return pro().then(res=>{ setTimeout(()=>{ console.log(1) },2000) }) } function b(){ return pro().then(res=>{ ...
now I have two projects, one of which does not consider compatibility, so configure it casually const path = require( path ); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const getConfig = require( . build getConfig )...
there is a solution for react performance optimization in "going deep into the React technology stack ". The original text is as follows (P106-P107 2.6 component performance optimization): as mentioned earlier, shouldComponentUpdate is the most comm...
I instantiated a vue object in a js file, including two local components, and then I exported the objects of these two components with export (note that I am mounting a div of id=app at this time) as follows: const search_input = { props:[..] ...
for dva, I can only use it at present, but I don t quite understand many key words, such as the word dispatch. I don t know where it comes from. I only know that it is a method to print it out with console.log. ...
url (r ^ login $ ,login, { template_name : user login.html }, name= login ), TypeError: login () got an unexpected keyword argument template_name , I used python3.7 and Django2.0, at the beginning, but django2.0 does not support the login ()...
regular source: https: github.com anran758 F. ** * * * @param {Number} num - * @returns * function numberWithCommas(num) { : B(), ( d{3})+(?! d) ( d{3})+ (?! d) , . , (?=), B .. return num.toString().r...
Today, write a mobile page, using a pop-up drop-down box, and the contents of the drop-down box can be scrollable. The problem is that when you scroll the drop-down box, the underlying body scrolls along with it. I looked up the method on the Internet, a...
scenario: htmlpc vue pc question: ...