How to use the antd-mobile.Modal.alert 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 neroneroffy / react-music-webapp / client / src / components / my-song-list / my-song-list.js View on Github external
deleteSongList(id){
        Modal.alert('确认删除歌单?', '歌单内的歌曲会一并删除', [
            { text: '取消', onPress: () => console.log('cancel') },
            { text: '确认', onPress: () => {
                this.props.delCollectSongList(id,this.state.userId)
            } },
        ])
    }
/*    onSelect = (opt) => {
github zxj963577494 / OverWatchTeams / src / containers / Account / MyTeams / index.js View on Github external
onCreateTeam() {
    if (!_.isEmpty(this.props.user)) {
      if (this.props.teams.length < this.props.user.teamLimit) {
        this.props.navigateTo('/account/myteams/create')
      } else {
        Modal.alert(
          '提示',
          '每位用户最多可创建一支战队,若想创建多支战队,请联系管理员963577494@qq.com',
          [
            { text: '确定', onPress: () => console.log('success') }
          ]
        )
      }
    } else {
      const currentUser = userService.getCurrentUser()
      if (this.props.teams.length < currentUser.get('teamLimit')) {
        this.props.navigateTo('/account/myteams/create')
      } else {
        Modal.alert(
          '提示',
          '每位用户最多可创建一支战队,若想创建多支战队,请联系管理员963577494@qq.com',
          [
github react-cross-platform / react-shop / src / modules / cart / RemoveCartItem / RemoveCartItem.tsx View on Github external
removeCartItem = () => {
    const { submit, id } = this.props;
    Modal.alert(
      <div style="{{">Удалить из корзины?</div>,
      "",
      [
        { text: "Нет", onPress: () =&gt; null },
        { text: "Да", onPress: () =&gt; submit(id) }
      ]
    );
  };
github react-cross-platform / react-native-shop / src / modules / cart / RemoveCartItem / RemoveCartItem.tsx View on Github external
removeCartItem = () => {
    const {
      submit,
      product: { id }
    } = this.props;
    Modal.alert("Удалить из корзины?", "", [
      { text: "Нет", onPress: () => null },
      { text: "Да", onPress: () => submit(id) }
    ]);
  };
github zxj963577494 / OverWatchTeams-React-Native-Expo / src / components / AccountGroupCard / index.js View on Github external
onRemove = objectId => e => {
    Modal.alert('警告', '是否删除该组队帖?', [
      { text: '取消', onPress: () => console.log('cancel') },
      {
        text: '确定',
        onPress: () => this.props.deleteGroupOrder({ objectId: objectId })
      }
    ])
  }
github Peroluo / easyMarketApp / src / page / address / index.js View on Github external
deleteAddress(id) {
    const alertInstance = Modal.alert('删除', '您确定删除该地址吗????', [
      {
        text: '否',
        onPress: () => {
          alertInstance.close()
        }
      },
      {
        text: '是',
        onPress: async () => {
          this.props.actions.startLoading()
          await http.postDelteAddress({ id })
          this.fetchData()
        }
      }
    ])
  }
github wuchujiang / react-lol-spa / src / Component / hero.jsx View on Github external
addDefault() {
        let {qquin, icon_id, name, area, level} = this.props.actions.searchClick;
        let userData = {
            qquin,
            area,
            vaid: this.props.actions.searchClick.area_id
        }
         Modal.alert('默认角色', '确定要设为默认吗???', [
            { text: '取消'},
            {
                text: '确定', onPress: () => { 
                    Tool.setLocationObj('userData', userData);
                    this.setState({
                        checkRightContent: true
                    })
            }, style: { fontWeight: 'bold' } },
        ])
    }
github zxj963577494 / OverWatchTeams-React-Native-Expo / src / screens / Account / index.js View on Github external
onPress={() => {
              if (logined) {
                Modal.alert('提示', '是否重置密码?', [
                  { text: '取消', onPress: () => null },
                  {
                    text: '确定',
                    onPress: () => {
                      const isVerify = this.props.user.emailVerified
                      if (isVerify) {
                        const email = this.props.user.email
                        this.props.sendPasswordReset({ email: email })
                      } else {
                        Toast.info('邮箱未验证,无法重置密码', 1.5)
                      }
                    }
                  }
                ])
              } else {
                Toast.info('请先登录', 1)
github ZevenFang / react-native-web / src / components / TodoList.js View on Github external
onDelete = (id) => {
    Modal.alert('Delete', 'Are you sure?', [
      { text: 'Cancel' },
      { text: 'OK',
        onPress: () => {
          this.props.dispatch({
            type: 'todo/del', id,
          });
          Toast.success('Deleted!', 1);
        } },
    ]);
  };