mirror of
https://github.com/motajs/template.git
synced 2026-04-14 16:41:12 +08:00
13 lines
266 B
TypeScript
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];
|
|
}
|