replacePage.d.ts 702 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * 替换页面
  3. *
  4. * \ **API目录**:导航
  5. *
  6. * @apiName 替换页面
  7. *
  8. * @param url string 是 替换页面的url
  9. *
  10. * @support
  11. * - IOS v1.3.2
  12. * - Android v1.3.2
  13. *
  14. * @example
  15. * ```typescript
  16. * replacePage({
  17. * url: 'https://www.dg-work.cn'
  18. * })
  19. * .then(res => {
  20. * console.log(res);
  21. * })
  22. * .catch(err => {
  23. * console.log(err);
  24. * });
  25. * ```
  26. */
  27. export interface ReplacePageParams {
  28. url: string;
  29. onSuccess?: () => void;
  30. onFail?: () => void;
  31. }
  32. declare function replacePage(params: ReplacePageParams): Promise<{}>;
  33. declare namespace replacePage {
  34. var version: {
  35. android: string;
  36. ios: string;
  37. };
  38. }
  39. export default replacePage;