您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

actions.js 899B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import {
  3. SET_SIDEBAR_VISIBLE,
  4. SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE
  5. } from './actionTypes';
  6. /**
  7. * Sets the visibility of {@link WelcomePageSideBar}.
  8. *
  9. * @param {boolean} visible - If the {@code WelcomePageSideBar} is to be made
  10. * visible, {@code true}; otherwise, {@code false}.
  11. * @returns {{
  12. * type: SET_SIDEBAR_VISIBLE,
  13. * visible: boolean
  14. * }}
  15. */
  16. export function setSideBarVisible(visible: boolean) {
  17. return {
  18. type: SET_SIDEBAR_VISIBLE,
  19. visible
  20. };
  21. }
  22. /**
  23. * Sets the default page index of {@link WelcomePageLists}.
  24. *
  25. * @param {number} pageIndex - The index of the default page.
  26. * @returns {{
  27. * type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
  28. * pageIndex: number
  29. * }}
  30. */
  31. export function setWelcomePageListsDefaultPage(pageIndex: number) {
  32. return {
  33. type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
  34. pageIndex
  35. };
  36. }