core
    正在准备搜索索引...

    接口 YmxUiInteraction

    界面-互动

    interface YmxUiInteraction {
        hideLoading(): Promise<void>;
        hideToast(): Promise<void>;
        showActionSheet(data: ShowActionSheetData): Promise<ShowActionSheetResult>;
        showLoading(data: ShowLoadingData): Promise<void>;
        showModal(data: ShowModalData): Promise<ShowModalResult>;
        showToast(data: ShowToastData): Promise<void>;
    }

    层级 (查看层级一览)

    索引

    方法

    • 隐藏 loading 提示

      返回 Promise<void>

      ymx.hideLoading();
      
    • 隐藏吐司提示

      返回 Promise<void>

      ymx.hideToast();
      
    • 显示 loading 提示

      参数

      返回 Promise<void>

      ymx.showLoading({
      title: '加载中...',
      mask: true
      });
    • 显示模态弹框

      参数

      返回 Promise<ShowModalResult>

      ymx.showModal({
      title: '确认',
      content: '确实退出吗?',
      confirmText: '退出',
      cancelText: '取消'
      }).then(res => {
      alert(JSON.stringify(res));
      });
    • 吐司提示

      参数

      返回 Promise<void>

      ymx.showToast({
      title: 'hello world',
      duration: 2000
      });