国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - vue中json格式的props強(qiáng)制調(diào)用了toString變?yōu)?quot;[object Object]"
巴扎黑
巴扎黑 2017-05-19 10:24:32
0
2
737
<template>
  <AboutConfirm :projects="projects"/>
</template>

<script>
  import AboutConfirm from '../../components/HomePage/AboutConfirm.vue'
  export default{
    data(){
      return {
        projects:[],
        projectsStr:''
      }
    },
    components: {
      AboutConfirm
    },
    created: function () {
      this.projects = this.$route.query
      this.projectsStr = JSON.stringify(this.$route.query)
    },
    beforeMount(){
      console.log('beforeMount');
      console.log('this.projects--------------');
      console.log(this.projects);
//      console.log(JSON.this.projectsStr);
      let url = SERVER.api.getMyProject
      PM.fnRequestAjax(url, null, 'get', (data) => {
//        this.projects = data.data.not_process
//        console.log('data.data.not_process');
//        console.log(data.data.not_process);
      })
    },
    mounted(){

    },
    updated(){
      console.log('updated');
    },
    activated(){
      console.log('activated');
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>

當(dāng)跳轉(zhuǎn)到其他頁面,再調(diào)用window.history.go(-1),在beforeMount中的讀到的數(shù)據(jù)變?yōu)?[object Object]"

巴扎黑
巴扎黑

全部回復(fù)(2)
漂亮男人

[object object] 是 對象 toString() 方法的默認(rèn)返回值
你應(yīng)該用 JSON.stringify(obj) ;

漂亮男人

沒有人知道projects經(jīng)歷了什么

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板