store.state多值怎么获取?
发布于 7 年前 作者 ltjzwfy 5406 次浏览 来自
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

现在我想获取/depgroup/list的列表信息 goroupData:[] 要这么改啊 export default { name: ‘userprofileadd’, data() { return { depData: [], goroupData:[]

        }
    },
    created: function () {
        this.$store.commit("setNav", "添加新用户");
               let self = this;
        fetch(self.$store.state.apiBase + '/department/list')
            .then(response => response.json())
            .then(data => self.depData = data.list)
    },
回到顶部