()
| 11 | const flag = useRef(true) |
| 12 | |
| 13 | const handleClick = () => { |
| 14 | if (target === 'hidden') { |
| 15 | if (flag.current) { |
| 16 | editGlobalObj('style.display', 'none') |
| 17 | } else { |
| 18 | editGlobalObj('style.display', 'block') |
| 19 | } |
| 20 | flag.current = !flag.current |
| 21 | } |
| 22 | } |
| 23 | return ( |
| 24 | <button className='e-button' onClick={handleClick} {...data}> |
| 25 | {data.children ? data.children : '修改'}</button> |
nothing calls this directly
no test coverage detected