2.9.0 • Published 2 years ago

@alitajs/tabs-layout v2.9.0

Weekly downloads
255
License
MIT
Repository
github
Last release
2 years ago

@alitajs/tabs-layout

请不要和 keep alive 插件一起使用,两者功能上相似

安装

yarn add @alitajs/tabs-layout

配置

export default {
  plugins: ['@alitajs/tabs-layout'],
  tabsLayout: [/./], // 这里表示所有的页面
};

tabsLayout 是一个数组,写明需要使用 tabs 的页面,支持字符串和正则表达式,如需要全部匹配,可以设置 tabsLayout: [/./]

使用

需要使用 TabsLayout 替换 children

import React from 'react';
import { TabsLayout } from 'alita';

const BasicLayout: React.FC = (props) => {
  return (
    <div>
      - {props.children}
      + <TabsLayout {...props} />
    </div>
  );
};

export default BasicLayout;

如果你的 props 有其他用途,那至少需要传给 TabsLayout 两个属性 location,children

import React from 'react';
import { TabsLayout } from 'umi';

const BasicLayout: React.FC = ({ location, children }) => {
  return (
    <div>
      <TabsLayout location={location}>{children}</TabsLayout>
    </div>
  );
};

export default BasicLayout;
2.8.37

2 years ago

2.9.0

2 years ago

2.8.32

3 years ago

2.8.36

3 years ago

2.8.35

3 years ago

2.8.33-beta.0

3 years ago

2.8.30

3 years ago

2.8.31

3 years ago

2.8.27-beta.0

3 years ago

2.8.27-beta.1

3 years ago

2.8.27-beta.2

3 years ago

2.8.27-beta.3

3 years ago

2.8.26-beta.2

3 years ago

2.8.29

3 years ago

2.8.28

3 years ago

2.8.27

3 years ago

2.8.25

3 years ago

2.8.23

3 years ago

2.8.21

3 years ago

2.8.20

3 years ago

2.8.24

3 years ago

2.8.19

3 years ago

2.8.18

3 years ago

2.8.16

3 years ago

2.8.15-alpha.3

3 years ago

2.8.15

3 years ago

2.8.15-alpha.0

3 years ago

2.8.15-alpha.2

3 years ago

2.8.15-alpha.1

3 years ago

2.8.14

3 years ago

2.8.13-alpha.1

3 years ago

2.8.13

3 years ago

2.8.12

3 years ago

2.8.11

3 years ago

2.8.10

3 years ago

2.8.12-alpha.0

3 years ago

2.8.10-alpha.0

3 years ago

2.8.9

3 years ago

2.8.7-alpha.3

3 years ago

2.8.8

3 years ago

2.8.7

3 years ago

2.8.7-alpha.0

3 years ago

2.8.7-alpha.1

3 years ago

2.8.7-alpha.2

3 years ago

2.8.6

3 years ago

2.8.5-bate.1

3 years ago

2.8.4-beta.2

3 years ago

2.8.5

3 years ago

2.8.4

3 years ago

2.8.3-alpha.1

3 years ago

2.8.3-alpha.0

3 years ago

2.8.3

3 years ago

2.8.2

4 years ago

2.8.2-bate.2

4 years ago

2.8.2-beta.1

4 years ago

2.8.1

4 years ago

2.8.0

4 years ago

2.7.9

4 years ago

2.7.6

4 years ago

2.7.5

4 years ago

2.7.4

4 years ago

2.7.3

4 years ago

2.7.0

4 years ago

2.6.15

4 years ago

2.6.16

4 years ago

2.6.14

4 years ago

2.6.10

4 years ago

2.6.7

4 years ago

2.6.8

4 years ago

2.6.6

4 years ago

2.6.5

4 years ago

2.6.3

4 years ago

2.6.2-beta.8

4 years ago

2.6.2-beta.7

4 years ago

2.6.2-beta.6

4 years ago

2.6.2-beta.3

4 years ago

2.6.2-beta.4

4 years ago

2.6.2-beta.2

4 years ago

2.6.2

4 years ago

2.6.1

4 years ago

2.5.20

4 years ago

2.5.17-beta.3

4 years ago

2.5.16-beta.2

4 years ago

2.5.16-beta.1

4 years ago

2.5.16-beta.0

4 years ago

2.5.14

4 years ago

2.5.13

4 years ago

2.5.12

4 years ago

2.5.11

4 years ago

2.5.10

4 years ago

2.5.9

4 years ago

2.5.7

4 years ago

2.5.6-beta.1

4 years ago

2.5.6-beta.0

4 years ago

2.5.4

4 years ago

2.5.5

4 years ago

2.5.3

4 years ago

2.5.3-beta.0

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.16

4 years ago

2.3.16-beta.0

4 years ago

2.3.14

5 years ago

2.3.13

5 years ago

2.3.12

5 years ago

2.3.11

5 years ago

2.3.10

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.3.7-beta.1

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.2.9

5 years ago

2.3.0

5 years ago

2.3.0-beta.1

5 years ago

2.3.1

5 years ago

2.2.8

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.10

5 years ago

2.1.8

5 years ago

2.0.0

5 years ago