easy-drag-tabs
使用 React
实现的 Tabs 标签页组件。
Install
$ npm i easy-drag-tabs
Demo
App.js
import React Component from "react";import Tabs from "../src";import "./my-easy-tabs.css"; const TabPane = TabsTabPane;const TabsHelper = TabsTabsHelper; state = activeKey: "1" panes: key: "1" title: "tab 1" content: <div>content 1</div> key: "2" title: "tab 2" content: <div>content 2</div> key: "3" title: "tab 3" content: <div>content 3</div> key: "4" title: "tab 4" content: <div>content 4</div> ; { ; thisaddTab = thisaddTab thisonTabsChange = thisonTabsChange; thisonTabsClose = thisonTabsClose; thisonSequenceChange = thisonSequenceChange; } { return <div> <button =>添加tab</button> <Tabs = = = = ="my-easy-tabs"> this </Tabs> </div> } { const panes = thisstate; const list = ; for let i = 0; i < paneslength; i++ const title key content = panesi; list return list; } { console this } { console const newState = TabsHelper; this; } { console TabsHelper; this; } { console const tabs = thisstatepanes; tabs; const maxTab = tabs0; let tabKey; if maxTab tabKey = + 1; else tabKey = 1; thisstatepanes; this; }
my-easy-tabs.css
Update
版本 | 更新内容 |
---|---|
0.1.0 | 基本功能 |