Socket
Book a DemoInstallSign in
Socket

@antdp/layout-tabs

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antdp/layout-tabs

用于主框架选项卡组件。

latest
Source
npmnpm
Version
2.1.2
Version published
Weekly downloads
115
5650%
Maintainers
2
Weekly downloads
 
Created
Source

@antdp/layout-tabs

npm version npm download

用于主框架选项卡组件。解决 antd 组件 Tabs 切换性能慢的问题。

Tab 选项卡技术实现

测试项页面切换重新渲染页面切换 “隐藏”iframe src 嵌入页面iframe 组件生成
性能✅💯⚠️(还需优化)✅💯✅💯
页面状态⚠️(有代码量)
路由使用❌(浏览器地址栏无变化)
antd 组件❌(大量弹出类组件位置错乱)
主框架交互⚠️(局限以内,父页面交互复杂)
样式加载⚠️(还需优化)

Installation

npm i @antdp/layout-tabs --save # yarn add @antdp/layout-tabs

基本使用

import React from 'react';
import LayoutTabs from '@antdp/layout-tabs';

const Demo = ()=>{
  return (
    <LayoutTabs
      // 菜单路由信息
      dataSource={[]}
    />
  )
}

export default Demo;

API

参数说明类型默认值
dataSource菜单路由数据LayoutTabsRouterProps[]-
bodyPadding内容边距`stringnumber`

LayoutTabsRouterProps

参数说明类型默认值
iconlogostring-
keykey健string-
name名称string-
path路径string-
exact是否匹配路由boolean-
location路由信息any-
match匹配信息any-
element渲染内容React.ReactNode-

通过配置 @antdp/config,来解决是否重新渲染或者 iframe 展示页面等功能

Keywords

layout-tabs

FAQs

Package last updated on 11 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts