移除Preact框架、引入react-hook检查

This commit is contained in:
tangly1024
2022-11-30 22:08:15 +08:00
parent c527673b84
commit 2f76a7314c
12 changed files with 54 additions and 171 deletions

View File

@@ -6,6 +6,8 @@ import React, { useState } from 'react'
* @returns
*/
const Tabs = ({ className, children }) => {
const [currentTab, setCurrentTab] = useState(0)
if (!children) {
return <></>
}
@@ -29,8 +31,6 @@ const Tabs = ({ className, children }) => {
</section>
}
const [currentTab, setCurrentTab] = useState(0)
function tabClickHandle (i) {
setCurrentTab(i)
}