Blame view

src/models/count.ts 337 Bytes
柏杨 authored
1
2
3
4
// 全局共享数据示例
import { useState } from 'react';

const useOpenModal = () => {
柏杨 authored
5
  const [openCount, setOpenCount] = useState(0);
6
  const [deliveryOpenCount, setDeliveryOpenCount] = useState(0);
柏杨 authored
7
8
9
  return {
    openCount,
    setOpenCount,
10
11
    deliveryOpenCount,
    setDeliveryOpenCount,
柏杨 authored
12
13
14
15
  };
};

export default useOpenModal;