()
| 16 | const { current } = ref; |
| 17 | |
| 18 | const trigger = () => { |
| 19 | const currentPre = current.querySelector('pre'); |
| 20 | |
| 21 | if (!currentPre) return; |
| 22 | |
| 23 | const hasOverflow = currentPre.scrollHeight > currentPre.clientHeight; |
| 24 | setIsOverflow(hasOverflow); |
| 25 | |
| 26 | if (callback) callback(hasOverflow); |
| 27 | }; |
| 28 | |
| 29 | if (current) { |
| 30 | trigger(); |