Is it still the problem of VUE template rendering data after being cheated for a whole day?

  new Vue({
            el: "-sharpindex",
            data: {
               UserSetting:null
            },
            mounted: function() {
                var _this = this;
                var IMEI = plus.device.imei;
                mui.ajax("http://..........", {
                    data: {
                        mac: IMEI,
                        device: 2
                    },
                    dataType: "json", //json
                    type: "post", //HTTP
                    timeout: 50000, //10;
                    success: function(res) {
                    _this.UserSetting = res;
                    }
                    error: function(xhr, type, errorThrown) {
                        console.log("");
                    }
                });
            }
        });




     :
     <div id="index">
        <div v-for="i in UserSetting">{{i.DEPT_NAME}}</div>    
     </div>


    
     

add the screenshot of the Great God
clipboard.png

clipboard.png

clipboard.png
tried a lot of methods what {} [] null""all tried con is [obj Obj]

     console.log(JSON.stringify(_this.UserSetting));

can also come out that the data is not assigned to the UserSetting. Ask the great god for an answer. Don"t tell me that the backstage is dead

Mar.28,2022

UserSetting should be an array.
success: function (res) {

_this.UserSetting = res;
console.log('res', res)

}
what data is the res you get here?

under show
Why don't you print this out and take a screenshot and talk about some useless

success: function(res) {
    console.log(res)
}

_this.$set(_this,'UserSetting',res);

it seems that your UserSetting is an array. It is recommended to take a good look at ide/list.html" rel=" nofollow noreferrer "> list rendering

.
Menu