A: Recently encountered echarts line chart shows two kinds of data in the same room, if the difference between the two data calculation methods is large, there will be overlap, not as good as the percentage of 3% in the first line, the number of the second line is 4, then their Y axis is very dangerous when they share one, they will overlap together. The solution is to use two y-axes, each with a separate scale to pull the pair apart. 2: Click to enlarge the ios and double refers to the problem of amplification, in fact this problem I also met a lot of times, double refers to the scaling of the problem is complicated, because developers prohibit such behavior because double refers to put our pages damaged assembly, affect our user experience, but the browser vendors to allow this operation is to own the user experience, For example, small screen mobile phones may need to be enlarged, and there are also differences between native browsers and non-native browsers. For this problem, my approach is to ban us actively, and there is no other good way to do it. 1. Meta tag prohibition — No zooming

<meta content="Width = device - width, initial - scale = 1.0, the maximum - scale = 1.0, user - scalable = 0;" name="viewport" />
Copy the code

2. Listen to Touch — No zooming

window.onload=function () {

    document.addEventListener('touchstart'.function (event) {

        if(event.touches.length>1){

            event.preventDefault();

        }

    })

    var lastTouchEnd=0;

    document.addEventListener('touchend'.function (event) {

        var now=(new Date()).getTime();

        if(now-lastTouchEnd<=300){

            event.preventDefault();

        }

        lastTouchEnd=now;

    },false)}Copy the code

3. Listen for gesture gestures — Don’t zoom in

  document.addEventListener('gesturestart'.function (event) {

      event.preventDefault();

    });
Copy the code

The latest project is vue Family buckets +typescript. The home page of the project required a rotation map, so Swiper was introduced. NPM install swiper is pleasant, but the error starts when you pack. The error screen is not captured, but @types/swiper is missing, so we need to introduce swiper in the typescrip project.

Swiper-s NPM install @types/ swiper-s NPM install @types/ swiper-s And if you use vue-awesome-swiper this method is invalid, you can't use @types/vue-swesome-swiper.Copy the code

Five. There’s one more dot up there. The user of our project is an internal employee of the company. Yesterday, someone reported an error that a field was rendered as undefined. After various tests and the scene online, it was finally found that there was a problem with the iView dropdown: Let me reproduce the process of a dropdown option, below are reset and query buttons, and another button to export the results of the query.

private reportType:string="";
setting(){
    this.reportType="";
}
querymesssage(type:string){
    const result=await query(type); } this.querymessage(this.reportType); There won't be any problems with world query if you select it, but if you click reset on Query after selecting it, you'll find this.reportType="undefined"; The reason is actually iView encapsulation problem, is that her dropdown items are not. Use this. ReportType =""; Otherwise, the parameter changes to undefined. I don't have the ability to change the source code so what I did was. this.querymessage(this.reportType||""); Write an or operation. So you don't get an error.Copy the code

Six. I am so sad ah, only two broken pages I still draw out so many problems, I am not a qualified programmer. Wow (crying)… I was a pig in my last life. I was a pig. Well, don’t do that again. 7. Write the table must consider the problem of multiple data scrolling, must remember 8. I wish I could write out all the bugs, you know

Unexpected number inParse (<anonymous>) JSON Parse object string json. parse(objStr) error,Unexpected numberinJSON at position XXX because the string contains a number type starting with 0, the JSON parse error will be reported, so the returned data type will be string, which directly causes the number number starting with 0 to be unusable. There is no version to fix this, god knows how desperate I am.Copy the code