zarte
V2EX  ›  问与答

使用 elementui 的时候遇到个奇怪的问题百思不得七姐

  •  
  •   zarte · Jul 3, 2018 · 1063 views
    This topic created in 2902 days ago, the information mentioned may be changed or developed.

    temp={ .. project : "" ..

    this.$refs['dataForm'].validate((valid) => { if (valid) { console.log(this.temp) console.log(11) //异步请求创建 createGroup(this.temp).then(() => { //异步请求获取信息 getProjectInfo(this.temp.project).then(res => { //删掉下面的赋值上面打印出来的就正常了 this.temp.project = { name: res.name, id: res.id } console.log(44) ... 代码截取如上

    现在遇到个问题就是 temp.projec 打印出来会是后面的对象结构有 id 和 name,控制态输出的顺序是 temp 11 44 按道理 temp 结构应该还没变才对呀

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   896 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 21:39 · PVG 05:39 · LAX 14:39 · JFK 17:39
    ♥ Do have faith in what you're doing.