How to use the antd-mobile/lib/toast.info function in antd-mobile

To help you get started, we’ve selected a few antd-mobile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1ibrary / 1ibrary-front-end / js / pages / BookCollectAdd.js View on Github external
async rightOnPress() {
    if (!this.state.list_name.trim()) {
      Toast.info('请输入书单的名字噢!', 1)
      return
    }
    if (!this.state.list_content.trim()) {
      Toast.info('请输入书单的描述内容噢!', 1)
      return
    }
    let array = await Storage.get('book_list', [])
    let item = {
      list_name: this.state.list_name,
      list_content: this.state.list_content
    }
    let flag = false
    if (array && array.length > 0) {
      flag = array.some(d => {
        if (d.list_name === item.list_name) {
          Toast.info('你已经创建过同名书单啦!', 1)
github 1ibrary / 1ibrary-front-end / js / pages / profile / FeedBack.js View on Github external
onPost = async () => {

    const {
      content,
      contact
    } = this.state

    if (!contact.trim()) {
      Toast.info('请输入您的联系方式哦~', 1)
      return
    }

    if (!content.trim()) {
      Toast.info('请输入您的反馈内容哦~', 1)
      return
    }

    let params = {
      content,
      contact
    }

    let response = (await HttpUtils.post(URL, params)) || {}

    if (response.status !== 0) {
github 1ibrary / 1ibrary-front-end / js / pages / BookCollectAdd.js View on Github external
async rightOnPress() {
    if (!this.state.list_name.trim()) {
      Toast.info('请输入书单的名字噢!', 1)
      return
    }
    if (!this.state.list_content.trim()) {
      Toast.info('请输入书单的描述内容噢!', 1)
      return
    }
    let array = await Storage.get('book_list', [])
    let item = {
      list_name: this.state.list_name,
      list_content: this.state.list_content
    }
    let flag = false
    if (array && array.length > 0) {
      flag = array.some(d => {
        if (d.list_name === item.list_name) {
          Toast.info('你已经创建过同名书单啦!', 1)
          Actions.pop()
          flag = true
          return true
        }
github 1ibrary / 1ibrary-front-end / js / pages / profile / FeedBack.js View on Github external
onPost = async () => {

    const {
      content,
      contact
    } = this.state

    if (!contact.trim()) {
      Toast.info('请输入您的联系方式哦~', 1)
      return
    }

    if (!content.trim()) {
      Toast.info('请输入您的反馈内容哦~', 1)
      return
    }

    let params = {
      content,
      contact
    }

    let response = (await HttpUtils.post(URL, params)) || {}

    if (response.status !== 0) {
      Toast.fail(response.msg, '1')
      return
    }

    Toast.success('反馈成功', 1, () => {
github 1ibrary / 1ibrary-front-end / js / pages / BookCollectAdd.js View on Github external
flag = array.some(d => {
        if (d.list_name === item.list_name) {
          Toast.info('你已经创建过同名书单啦!', 1)
          Actions.pop()
          flag = true
          return true
        }
      })
      if (flag) {