UNPKG

vue-weather-ui

Version:

A beautiful Vue 3 weather UI components library with mini mode support and QWeather integration

124 lines (123 loc) 2.81 kB
export interface WeatherNow { fxTime: string; temp: string; icon: string; text: string; wind360: string; windDir: string; windScale: string; windSpeed: string; humidity: string; precip: string; pressure: string; vis: string; cloud: string; dew: string; } export interface WeatherHourly { fxTime: string; temp: string; icon: string; text: string; wind360: string; windDir: string; windScale: string; windSpeed: string; humidity: string; pop: string; precip: string; pressure: string; cloud: string; } export interface WeatherDaily { fxDate: string; sunrise: string; sunset: string; moonrise: string; moonset: string; moonPhase: string; tempMax: string; tempMin: string; iconDay: string; textDay: string; iconNight: string; textNight: string; wind360Day: string; windDirDay: string; windScaleDay: string; windSpeedDay: string; wind360Night: string; windDirNight: string; windScaleNight: string; windSpeedNight: string; humidity: string; precip: string; pressure: string; vis: string; cloud: string; uvIndex: string; } export interface HistoricalWeather { date: string; tempMax: string; tempMin: string; iconDay: string; textDay: string; iconNight: string; textNight: string; windDirDay: string; windScaleDay: string; humidity: string; precip: string; pressure: string; vis: string; } export interface Location { name: string; country: string; adm1: string; adm2: string; lat: string; lon: string; tz: string; } export interface WeatherData { location: Location; now: WeatherNow; hourly: WeatherHourly[]; daily: WeatherDaily[]; historical: HistoricalWeather[]; } export interface TimelineStyle { backgroundColor: string; textColor: string; selectedColor: string; hoverColor: string; borderColor: string; fontSize: string; height: string; } export interface WeatherComponentProps { data: WeatherData; theme?: 'light' | 'dark'; locale?: 'zh' | 'en'; mini?: boolean; showTitle?: boolean; } export interface WeatherCardProps extends WeatherComponentProps { showDetails?: boolean; } export interface HourlyForecastProps extends WeatherComponentProps { hours?: number; } export interface DailyForecastProps extends WeatherComponentProps { days?: number; } export interface HistoricalTimelineProps extends WeatherComponentProps { style?: TimelineStyle; autoPlay?: boolean; autoPlayInterval?: number; showControls?: boolean; onDaySelect?: (day: HistoricalWeather) => void; onDayChange?: (day: HistoricalWeather) => void; }