principle:
local logic, re-render
step:
1. Install the plugin: Tampermonkey
Dial: https://pan.baidu.com/s/1bpBVVT9
2. Settings:
Click Plugins --> Dashboard
add script
Copy the script in this text document to the script edit box and save it with Ctrl+S
Click Settings to set the script
The loading location and top-level page only run settings are as follows
3. Debug:
Open the quasi-live web page you want to debug,
For example: http://wap.cmread.com/nap/t/search.jsp?vt=3&kw=1
You will see at the console
If you want to debug one of the components in the current page
to see the pageIndex array (list of components currently loaded on the page),
I debug the first component and add the parameter pageIndex = 2714 to the current url
Then add the parameter pageName=your local page name
If this is my local page address, then pageName =search_select
(Premise: local gulp and tomcat should be opened)
The local debugging page is:
http://wap.cmread.com/nap/t/search.jsp?vt=3&kw=1&pageIndex=2714&pageName=search_select
The corresponding script is: (Refresh the page directly after saving the code locally)
If you don't want to debug, you can turn off script injection
or
Remove the pageIndex and pageName parameters of the url
Disadvantages or shortcomings of the method:
After 2 renderings, some events may be executed 2 times, such as the ajax request to load the second page