How to use the antd-mobile-rn.Modal.alert function in antd-mobile-rn

To help you get started, we’ve selected a few antd-mobile-rn 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 gyxing / react-native-book / app / containers / Read.js View on Github external
this.setState({
                book,
                chapter,
                chapterList
              });
              this.scrollToTop();
              this.drawer.closeDrawer();
              // 自动缓存后5章
              this.onCache(5);
            } else {
              this.setState({
                book,
                chapter,
                chapterList
              });
              Modal.alert("缺少资源", JSON.stringify(chapter, null, 2));
            }
          }
        })
github gyxing / react-native-book / app / containers / Account.js View on Github external
onReset = () => {
    Modal.alert(
      '还原阅读设置',
      '字体大小、纸张模式等还原到默认模式,是否确定?',
      [
        { text: '取消' },
        {
          text: '确定',
          onPress: () => {
            Storage.remove('readSetup')
          },
        },
      ]
    )
  }
github gyxing / react-native-book / app / containers / Switching.js View on Github external
submitExchange = () => {
        const { originType, originUrl } = this.state;
        if (!originType || !originUrl) {
            Modal.alert('请将数据请写完整');
            return false;
        }
        Modal.alert('确定使用此数据源?', '', [
            { text: '再想想' },
            {
                text: '确定使用',
                onPress: () => {
                    this.setState({ visible: false });
                    Toast.loading("加载中...", 0);
                    this.props.dispatch(createAction("book/customizeOrigin")({
                        book: this.book,
                        dlWay: this.state.dlWay,
                        origin: originType,
                        url: originUrl,
                        ...this.afterCallback()
                    }))
github gyxing / react-native-book / app / containers / Home.js View on Github external
onError: () => {
                        Modal.alert("此来源缺少数据", "是否切换下载源?", [
                            { text: "不用", style: "cancel" },
                            {
                                text: "切换",
                                onPress: () => {
                                    this.props.dispatch(
                                        NavigationActions.navigate({ routeName: "Switching", params: { book: item, dlWay: "all" } })
                                    );
                                }
                            }
                        ]);
                    }
                })
github gyxing / react-native-book / app / containers / Switching.js View on Github external
submitExchange = () => {
        const { originType, originUrl } = this.state;
        if (!originType || !originUrl) {
            Modal.alert('请将数据请写完整');
            return false;
        }
        Modal.alert('确定使用此数据源?', '', [
            { text: '再想想' },
            {
                text: '确定使用',
                onPress: () => {
                    this.setState({ visible: false });
                    Toast.loading("加载中...", 0);
                    this.props.dispatch(createAction("book/customizeOrigin")({
                        book: this.book,
                        dlWay: this.state.dlWay,
                        origin: originType,
                        url: originUrl,
                        ...this.afterCallback()
                    }))
                }
            },
        ]);
github gyxing / react-native-book / app / containers / Account.js View on Github external
onClearData = () => {
    Modal.alert(
      '清空书架',
      '删除书架里的所有书本,包括章节、内容等,是否确定?',
      [
        { text: '取消' },
        {
          text: '确定',
          onPress: () => {
            this.props.dispatch(createAction('book/clear')({}))
          },
        },
      ]
    )
  }

antd-mobile-rn

基于蚂蚁金服移动设计规范的 React Native 组件库

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis