(e)
| 1313 | const { onCreated, beforeCreat, onMounted, beforeMount } = options || {}; |
| 1314 | // 订阅 |
| 1315 | const subscribe = (e) => { |
| 1316 | const { onMounted, beforeMount } = e; |
| 1317 | if (beforeMount) { |
| 1318 | watch(beforemount, () => { |
| 1319 | if (beforemount.value) { |
| 1320 | beforeMount(); |
| 1321 | return; |
| 1322 | } |
| 1323 | }, true); |
| 1324 | } |
| 1325 | if (onMounted) { |
| 1326 | watch(mounted, () => { |
| 1327 | if (mounted.value) { |
| 1328 | onMounted(); |
| 1329 | return; |
| 1330 | } |
| 1331 | }, true); |
| 1332 | } |
| 1333 | }; |
| 1334 | // 取消订阅 |
| 1335 | const unsubscribe = (e) => { |
| 1336 | //懒得写 |
no test coverage detected