vue 和 uniapp 刪除 數組對象中的某個指定屬性 this.$delete


實例方法:
that.$delete(data,"dateTime")

代碼:
getDocSource: function(data) {
    var that = this;
    //刪除數組對象中的undefined,防止接口報錯
    if (data.dateTime == undefined) {
        // data 是數組名 dateTime 是屬性
        that.$delete(data,"dateTime")
    }
    that.$request.HttpData("/applet/scheduling/opSch", data, "POST",
        true, '加載中',
        function(res) {
            console.info(res)
            if (res.data.code == 1) {
                that.docSource = res.data.data;
                that.isloading = false;
            }
        },
        function(err) {

        })

}

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM