🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fengui

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fengui - npm Package Compare versions

Comparing version

to
0.6.8

33

component/nav/Tab.jsx

@@ -8,27 +8,34 @@ import React from "react";

onTabTitle(data, index) {
let {onSelect} = this.props;
getInitialState() {
return {
tabIndex: this.props.selected || 0
};
},
componentDidUpdate(preProps) {
if (preProps.selected !== this.props.selected) {
this.onTabTitle(this.props.selected);
}
},
onTabTitle(index) {
let {tabs, onSelect} = this.props;
this.setState({
tabIndex: index
});
onSelect(data, index);
onSelect(tabs[index], index);
},
getInitialState() {
return {
tabIndex: this.props.selected || 0
};
},
render() {
let {data, activeClass}=this.props;
let {tabs, activeClass}=this.props;
let {tabIndex}=this.state;
return (
<FixedContent className={styles.this}>
<FixedContent className={styles.this} width={750}>
<div className={styles.tabBox}>
<ul className={styles.tabTitle}>
{
data.map((n, index)=> {
tabs.map((tab, index)=> {
return (
<li key={index} style={{width:100/data.length + "%"}} onClick={()=>this.onTabTitle(n,index)}
className={(tabIndex === index) && (activeClass || styles.on)}>{n.title}</li>
<li key={index} style={{width:100/tabs.length + "%"}} onClick={()=>this.onTabTitle(index)}
className={(tabIndex === index) && (activeClass || styles.on)}>{tab.title}</li>
)

@@ -35,0 +42,0 @@ })}

{
"name": "fengui",
"version": "0.6.7",
"version": "0.6.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/fengjr",