// 全局共享数据示例 import { useState } from 'react'; const useOpenModal = () => { const [openCount, setOpenCount] = useState(0); return { openCount, setOpenCount, }; }; export default useOpenModal;