greenlet icon indicating copy to clipboard operation
greenlet copied to clipboard

_ref is not defined

Open bbhxwl opened this issue 2 years ago • 0 comments

vue2 ,

  methods: {
    async btnTest() {
      let getName = greenlet( async username => {
        let url = `https://api.github.com/users/${username}`
        let res = await fetch(url)
        let profile = await res.json()
        return profile.name
      })
      console.log(await getName('developit'))
    },
  },

bbhxwl avatar Oct 09 '23 07:10 bbhxwl