账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue params传值
    24
    0

    handleEdit(index, row) {

       // let id = row._id
        this.$router.push({name: 'news-edit', params : {
          new : row
        }, query: {id: row._id, type: 'edit'}})
      },
    

    让 let id = row._id ,显示id=undefined 但是row._id是有值得 不知道为啥

    mounted() {

      debugger
      console.log(this.$route.query.type)
      if ( "edit" == this.$route.query.type ){
        let old = this.$route.params.new
        this.title = old.title
        this.author = old.author
        this.content = old.content
        this.abstract = old.abstract
        this.coverImage = old.coverImage
      }
      console.log(this.title)
    },
    
    

    old也是同样问题 导致下面的title啥的都获取不到

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部