async onConfirm() {
      this.$toast.loading({
        message: '保存中...',
        forbidClick: true, // 禁止背景点击
        duration: 0 // 持续展示
      })

      try {
        const localGender = this.localGender

        await updateUserprofile({
          gender: localGender
        })

        // 更新视图
        this.$emit('input', localGender)

        // 关闭弹层
        this.$emit('close')

        // 提示成功
        this.$toast.success('更新成功')
      } catch (err) {
        this.$toast.fail('更新失败')
      }
    },

    onPickerChange(picker, value, index) {
      this.localGender = index
    }
  }
}

 

相关文章:

  • 2022-12-23
  • 2021-04-04
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2022-12-23
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2021-11-27
  • 2021-07-16
  • 2022-12-23
  • 2021-12-19
  • 2021-12-26
  • 2022-01-02
相关资源
相似解决方案