template/packages-user/client-modules/src/render/utils/use.ts
2026-02-28 20:23:34 +08:00

13 lines
266 B
TypeScript

import { onUnmounted } from 'vue';
import { WeatherController } from '../weather';
export function useWeather(): [WeatherController] {
const weather = new WeatherController();
onUnmounted(() => {
weather.destroy();
});
return [weather];
}