On the return value of vue filter

this is the packaged execution code

isleaf: function(l, t, a, n, B, A) {
                    console.log(Boolean(a), Boolean(l));
                    var e = this;
                    if (1 == t) {
                        var g = Number(a) + Number(n);
                        return e.$set(e.DateTb[B].data[A], "c2_chk", g),
                        a + "/" + g
                    }
                    return Boolean(a) && Boolean(l) ? a + "/" + l : ""
                }

this is the original code:

 isleaf: function(value, way, has, level0, index, key) {
                console.log(Boolean(has), Boolean(value));
                let _self = this;
                if (way == 1) { //
                    let _val = Number(has) + Number(level0);
                    _self.$set(_self.DateTb[index].data[key], "c2_chk", _val); //chk
                    
                    return (has + "/" + _val);
                } else if (!Boolean(has) || !Boolean(value)) {
                    return "";
                } else {
                    return (has + "/" + value);
                }
            }

ask for an explanation?

Mar.02,2021

finished reading, no problem.
Ternary Quadratic instead of else if and abbreviated code variables (the file lost weight again).

Menu