You are viewing a single comment's thread from:

RE: Nuxt开发指南

in #starnote3 days ago

参考

//页面自动加载,会自动执行。
//在前端推荐使用,不推荐 process.client 
onMounted(() => {
    console.log(699, "moundted")
    function x (){
      console.log(722, "moundted")
    }
    x()
})

onMounted(() => {
  console.log('1123, mounted')
  let s = localStorage.getItem('farcasterid') //farcasterid
  if(s != null){
    // 读取数据
    farcasterid.value = s
  } else{
    console.log("115, null")
  }
})

//beforeMount mounted