How to use the antd-mobile.ActionSheet.showActionSheetWithOptions 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 smalltide / react-native-antd / index.ios.js View on Github external
() => {
            ActionSheet.showActionSheetWithOptions({
              options: BUTTONS,
              cancelButtonIndex: BUTTONS.length - 1,
              destructiveButtonIndex: BUTTONS.length - 2,
              // title: '标题',
              message: '我是描述我是描述',
              maskClosable: true,
              'data-seed': 'logId',
            },
              (buttonIndex) => {
                this.setState({ actionSheet: BUTTONS[buttonIndex] });
              });
          }
        }
github zhouatie / wechat / wechat / src / views / login / Login.js View on Github external
showActionSheet = () => {
    const BUTTONS = ['切换账号', '找回密码', '注册', '关闭', '取消'];
    ActionSheet.showActionSheetWithOptions({
      options: BUTTONS,
      cancelButtonIndex: BUTTONS.length - 1,
      destructiveButtonIndex: BUTTONS.length - 2,
      // title: 'title',
      maskClosable: true,
      'data-seed': 'logId',
      wrapProps,
    },
      (buttonIndex) => {
        if (buttonIndex === 2) {
          this.props.history.replace("/register")
        }
      });
  }
  render() {
github zhouatie / wechat / wechat / src / views / register / Register.js View on Github external
showActionSheet = () => {
    const BUTTONS = ['登录', '关闭', '取消'];
    ActionSheet.showActionSheetWithOptions({
      options: BUTTONS,
      cancelButtonIndex: BUTTONS.length - 1,
      destructiveButtonIndex: BUTTONS.length - 2,
      // title: 'title',
      maskClosable: true,
      'data-seed': 'logId',
      wrapProps,
    },
      (buttonIndex) => {
        if (buttonIndex === 0) {
          this.props.history.replace("/login")
        }
      });
  }
github remaxjs / remax / packages / remax / src / adapters / h5 / api / interactive / showActionSheet.ts View on Github external
return new Promise(resolve => {
    ActionSheet.showActionSheetWithOptions(
      {
        options: [...params.items, params.cancelButtonText || '取消'],
        cancelButtonIndex: params.items.length - 1,
        destructiveButtonIndex: params.destructiveBtnIndex,
        message: params.title,
        maskClosable: false,
      },
      index => {
        const result = { index };
        if (params.success) {
          params.success(result);
        } else {
          resolve(result);
        }
        if (params.complete) {
          params.complete();
github leer0911 / myConsole / src / console / log / index.tsx View on Github external
showFilter() {
    const BUTTONS = ['All', 'Log', 'Info', 'Warn', 'Error'];
    ActionSheet.showActionSheetWithOptions({
      options: BUTTONS
    }, (i) => {
      if (!BUTTONS[i]) {
        return
      }
      logStore.changeLogType(BUTTONS[i])
    });
  }
  renderLogList() {
github ant-design / ant-design-mobile / components / action-sheet / demo / basic.native.tsx View on Github external
showActionSheet = () => {
    const BUTTONS = [
      'Operation1',
      'Operation2',
      'Operation3',
      'Delete',
      'Cancel',
    ];
    ActionSheet.showActionSheetWithOptions(
      {
        title: 'Title',
        message: 'Description',
        options: BUTTONS,
        cancelButtonIndex: 4,
        destructiveButtonIndex: 3,
      },
      (buttonIndex: any) => {
        this.setState({ clicked: BUTTONS[buttonIndex] });
      },
    );
  }
  showShareActionSheet = () => {