code has more than 3, 000 lines, and many if else are careful and error-prone every time they make a version judgment. Are there any optimization ideas and methods? The code cannot be copied and the smart photo is taken
.
code has more than 3, 000 lines, and many if else are careful and error-prone every time they make a version judgment. Are there any optimization ideas and methods? The code cannot be copied and the smart photo is taken
.
how about a different way of thinking?
I feel that the code needs to be refactored, and it doesn't make much sense to simplify simply on this basis
data cannot be returned when using a jsonp request. Because the site has made restrictions, you can only request under this domain name to get the data. could you tell me how to solve this problem? or there are other cross-domain methods that can solve...
primeNG uses chart.js as a chart, and a separate chart.js can use a mixed chart. I would like to ask primeNG how to use a mixed chart. template < p-chart type= "scatter " [data] = "data " [options] = "options " > < p-chart > I write as chart.j...
encountered some problems when encapsulating Echarts with Angular4, the train of thought is not clear enough, have you tried it, or corresponding examples? ...
[1,1],[2,2],[3,3],[4,4] ...
function duplicates(arr) { var obj = {}; var newArr = []; for (var i in arr){ if(obj[arr[i]]){ obj[arr[i]]PP; } else{ obj[arr[i]]=1; } } ...
create a react project with create-react-app. If you want to use ant-design, the UI library, the official website describes loading on demand as follows: http: ant.design docs react . how exactly does this "load on demand " use Tendt ...
RT for example: const demo = [ { a:1, b:4 }, { a:2, b:4 }, { a:3, b:5 }, ] now you want to drop {acode 1, bazaar 4} or {acode 2, bazaar 4} in demo, just leave one of them and return a new array. Is there any quick way for ES6 to get back to...
data: function () { class baseObj{ constructor(src){ this.flag=true, this.mapvLayer=null, this.data=null, this.total=0, this.src=require(src) } } ...
1. Because of the need of the project, we need a video playback function. After Baidu, many people recommend using videogular2, but report errors when using it . paste my code: training-start.Module.ts code: import {NgModule} from @ angular core ;...
the use of iview, in which I want to register the component with a upload upload button, but with the render function, I can t write. I haven t written it after trying for a long time. Boss, take a look at it . { align: center , title: , render...
$(this).parent().parent().parent().clone(true).appendTo($(".f-top>.f-content")) Clone a data according to the requirement page. The original data is hidden, but the original data will change. At this time, the cloned data also needs to be...
The code is as follows: $(".password").on("keydown", function(e) { if (e.keyCode === 13 && !e.ctrlKey) { e.preventDefault(); $( .loading-btn ).click(denlu()); } }) $(&q...
Element ui time range selector, how to set the maximum time gap to 2 hours. For example, if I choose the start time at 18:00 and the end time at 24:00, I automatically change the 4 start time to 22:00. I have implemented this function on my own before, b...
that is, if the value bound on the page changes, the value in data can also be changed accordingly, now I mainly don t want to write about input events. want it to change automatically, is there any way, bosses? ...
problem description React does not recognize the htmlType prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase htmltype instead. If you accidentally passed it from a parent component...