You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.9 KiB

11 months ago
11 months ago
11 months ago
11 months ago
  1. import { createStyles } from '@/theme'
  2. export const useStyle = createStyles(({ token, css, cx, prefixCls }) => {
  3. const prefix = `${prefixCls}-${token?.proPrefix}-category-page`
  4. const tree = css`
  5. .ant-tree {
  6. overflow: auto;
  7. height: 100%;
  8. border-right: 1px solid ${token.colorBorder};
  9. background: ${token.colorBgContainer};
  10. }
  11. .ant-tree-directory .ant-tree-treenode-selected::before {
  12. background: ${token.colorBgTextHover};
  13. }
  14. .ant-tree-treenode:before {
  15. border-radius: ${token.borderRadius}px;
  16. }
  17. `
  18. const treeNode = css`
  19. display: flex;
  20. justify-content: space-between;
  21. align-items: center;
  22. .actions {
  23. display: none;
  24. padding: 0 10px;
  25. }
  26. &:hover .actions {
  27. {
  28. display: flex;
  29. }
  30. `
  31. const treeActions = css`
  32. padding: 0 24px 16px;
  33. display: flex;
  34. flex-direction: column;
  35. position: sticky;
  36. bottom: 0;
  37. z-index: 10;
  38. background: ${token.colorBgContainer};
  39. `
  40. const box = css`
  41. flex: 1;
  42. background: ${token.colorBgContainer};
  43. `
  44. const form = css`
  45. //display: flex;
  46. //flex-wrap: wrap;
  47. min-width: 300px;
  48. //max-width: 800px;
  49. .ant-form-item-label{
  50. width: 100px;
  51. }
  52. `
  53. const emptyForm = css`
  54. `
  55. const authHeight = css`
  56. min-height: calc(100vh - 122px);
  57. background-color: ${token.colorBgContainer};
  58. `
  59. const card = css`
  60. .ant-pro-card-body{
  61. height: calc(100% - 115px)!important;
  62. min-height: calc(100% - 115px)!important;
  63. }
  64. `
  65. return {
  66. container: cx(prefix),
  67. authHeight,
  68. box,
  69. form,
  70. emptyForm,
  71. tree,
  72. treeNode,
  73. treeActions,
  74. card,
  75. }
  76. })