-
Vue routing configuration child routing paths cannot be switched later, as shown in the code below
{
path: song ,
component: Song,
children: [
{
path: :id ,
component: Songditail
},
{
path: getNewsList ,
component: newslist
}
]
}
this.$router.push({ path: song getNews })
newslist
...
-
How do create react app-packaged applications come with service worker, to update applications?
the application packaged with create react app comes with service worker, which causes it to be redeployed and cannot be updated. How to update the application? ...
-
Why is the obtained ref undefined?
import React from react
import . style.less
import HomeList from .. .. .. components List
import HomeMore from .. .. .. components LoadMore
import { getListData } from .. .. .. fetch home home
class List extends React.Component {
...
-
ClassName cannot be added to the pop-up box of the calendar component in antd
add className, to the pop-up box of the calendar component in antd and add dropdownClassName, according to his api, but it has no effect. I took a look at the source code and there is no dropdownClassName attribute. Ask the boss to answer
.
...
-
React adding a key value to a node does not take effect
effect description: each time you add the + button, you can add a new row of new columns, and click the following to delete the row.
:,.
:
cause analysis: react s diff algorithm needs to add key values to nodes to recognize different nodes, so add...
-
How does redux trigger a callback function after an dispatch asynchronous operation is completed?
Is rt redux-thunk used to handle this ...
-
React simulates mock
I used mock to simulate a piece of data let list = Mock.mock ( " pie ", {)
moni:{
salesTypeData:[
{
x: 0,
y: 2018-5-10 ,
},
{
x: 20,
y: 2018-5-11 ,
},
{
...
-
Management of whether ui components are visible in mobx?
there is a problem with using mobx:
obtain the backend interface data through @ action, then assign a value to @ observable data, and then calculate whether the modal needs to be displayed from data through @ computed modalVisiable. How can I change t...
-
What does it mean not to mutate the value of (mutate) props or state
I don t quite understand what I saw when I was learning react by myself. Can you explain. this can be a problem if the props and state properties have more complex data structures. For example, let s write a ListOfWords component to show a comma-sepa...
-
How to insert a newline symbol when a string is output
in the string given to me by the background, if a newline is n r, how can I insert a newline symbol such as br when I use it? it is not good for me to write it directly in the string, just as the string is output to me .
<div >
{state.list[c...
-
What's the problem with react's setState in the timer?
state= {
val:0
} put on the timer to execute setState twice in a row
setState
what I see is that the setState twice put in the timer is Synchronize , and the twice setState is asynchronous without a timer. Can you help me explain this?
...
-
React has five bottom navigation, which will lead to a white screen when you quickly switch between the home page and my click.
recently did a react project and found a bug, that shows normal when you click on the bottom navigation, and when you click quickly, when you switch between the home page and my module, my module will turn white. ...
-
How does the front end know when the download is successful by pointing the URL to the download address?
point to the download address through window.location.href to download the file. How to get the time after the download is successful? ...
-
How to encapsulate a diagram plug-in similar to Echarts force map
Let me encapsulate a component and an echarts-like diagram plug-in this morning. Like this in the figure, there is also a timeline function at the bottom, where nodes can click, click events, support nodes to add pictures, and replace them with user ava...
-
Adding thermal effects to timeline of echarts
just started to encapsulate a diagram plug-in, with the timeline that is the kind of timeline, I found that echarts has timeline, but also requires the addition of thermal effects on the timeline. is the thermal effect of 24 hours to be reflected in the...
-
Guide diagram of echarts force can two nodes connect multiple lines?
echarts diagram (force guide diagram) can multiple lines be connected between two nodes? Something like this in the picture? ...
-
The local picture upload server is transferred to base64.
choose the picture locally and upload it to the server through ajax. Do not want to use the form form, use the fileReader of h5 to report an error, how to solve
converted code
convertToBase64() {
let fileReader = new FileReader()
2m
con...
-
Setting img.src in componentDidUpdate cannot trigger img.onload event callback
componentDidUpdate(prevProps, prevState, snapImg){
if(this.props.bookImg!=null && this.props.bookImg!==prevProps.bookImg){
var canvas= document.createElement( canvas );
var ctx= canvas.getContext( 2d );
var img= ne...
-
Problems related to React multi-page application!
the default program entry for projects created using create-react-app is index.js,. The default home page is public index.html. But I want to do multiple web pages in the project, how can I associate index.js and index.html in the about directory?
...
-
What are the disadvantages of using relative paths for all spa single-page application resources?
vue-cli or create-react-app default that the resource reference path after build is an absolute path, which needs to be run in the root directory of the server. What are the disadvantages of this method by changing the reference path to a relative path, ...