problem description nowadays, the mainstream organization of JS is modular development, but there is a scenario in common development: for example, in a project, the file name of a module is changed , for example: ModuleA.js-> ModuleB.js this wil...
the code is as follows export class SHost_Room{ constructor(rooms){ } } let rooms = [...] let shRooms = new SHost_Room(rooms); I m not good at object-oriented, and I feel like I don t have a train of thought. ...
solution: defines a temporary variable, but it needs to be hidden, otherwise it will be displayed <span v-show="false"> {{message = chat.messages[chat.messages.length-1]}} < span> {{message.content}} similar...
there is a class A , SubA inherits A, but the console reports an error Class constructor xxx cannot be invoked without new how to solve it? A class A{ constructor() {} }; export default A A import A from xxx class SubA extends A{ co...
look at the plug-in source code and stumble upon this writing: type Axis = both | x | none ; import type {Element as ReactElement, Node as ReactNode} from react ; what does type mean? import React from react ; import PropTypes f...
for example, now use the module.exports export module in a test.js file test.js module.exports = { funcA(){ }, funcB(){ this.funcA(); } } two methods, funcA and funcB, are defined internally. Now you want to call the funcA met...
let patentListDefault={ list:[], count:0, isLoading: false, } export const patentDatas = (state=patentListDefault, action = {}) => { let imuDataList; let imuItem; switch(action.type){ case SAVEPATENTLIST : ...
I hope in userLogin : `http: ${ws.url} api login` can introduce url, of ws. How do you write it? var ENV = (function(){ var defaultPage = ; return { pageTitleCustom: , defaultPage: defa...
The directory structure is as follows Code profile.js function showMsg(msg) { alert(msg); } export default {showMsg}; import.js import {showMsg} from ". profile.js"; showMsg("hello world"); .babelrc { "presets...
I want to initialize this.detailImgUrls with concatImgUrls () when initializing the object. Which of the following methods should I use? function concatImgUrls() { return haha ; } export default class Car{ constructor(data){ this.ad...
799 windy version of the infinite horizon of the empty mountain I m done here now. I don t know how to go on. I d like to ask you to help me write a simple demo . let values = item.split( ); let valuesContent = values.join(`keyWord`); I don...
the following code, I used to read the database many times, and the data I got was looped, and after the loop, the database was queried. Finally, after resolve, the result I got was only a small part of the data, and the rest of the data was not resolve...
I, a rookie, recently added some output statements when learning vue-router, to look at the source code as shown below. index.js and install.js are in the same directory, and install.js is referenced in index.js. index.js console.log( index line 2 ...
problem description in the process of developing with react, write components with ES6 syntax as follows const Name = (props) => { this.state = { data: null, visible: false }; const open = (data) => { th...
reducer in redux performs a minus one operation export default (state = initialState, action) => { const {total} = state switch(action.type){ case ActionTypes.ADD: return {...state, total: total + 1} case ActionTypes.SUBT...
<div className={ video }> <div className={ allTasks fl } style = { this.state.current === 0 ? changeColor : changeColor02 ...
Both then and catch in promise can handle exceptions, so what s the difference between them in handling exceptions? Promise.reject( error ).then(()=> {}, val=> { console.log(val); }); Promise.reject( error ).catch(val=> { console...
as shown in the figure above, what is not clear is: why then uses dot syntax, while catch and finally use [] syntax because catch and finally are keywords in js? I don t know what I don t know about this. this is the github address of this polyfi...
THANKS FOR YOUR time! parent component <!--tab swiper--> <li class="tab-item" v-for="(item,index) in processItems" @click="tabProcess(index)" :class="{active: processTabActiveIndex === index}"> ...
problem description for example, the following code: @one() class FaqDetail extends Component {} What does this mean by asking for a detailed explanation? What does it do? why should there be a comment on the class? ...
table < el-table :data="timeTable.courses" border style="width: 100%; margin-top: 20px" > <el-table-column prop ="time" **prop** label="" width="180"> < el...
Where is the App variable defined in components: {App}? isn t there only one App.vue file name? No App variable found! In vue s todo-list example, the b of components is written like this: components: { signature : variable name}, such as components:...
what I want to do is to enter a set of data in the TextCtrl space in the pop-up dialog box. check whether to enter after clicking the OK button (ShowModal () = = wx.ID_OK): if TextCtrl is empty, the dialog box does not close, waiting for user input; ...
problem description vim in an environment where ctags is not installed, why you can still use jump in the help file to jump to the appropriate tag. how do we use the tag function of vim without ctags ...
<template> <div class="ticket-content"> <div class="ticket-content-left"> <h1>{{title}}< h1> <h3>{{limit}}< h3> <h3 style="color: -sharp999;">{{conditio...