---
title: 高德天气
order: 5
---

## 文本类-高德天气 Weather

````jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Text, STYLE_PREFIX } from '@linkdesign/screen';

const { Weather } = Text;

const App = () => {
  return (
    <div data-theme="dark" className={`container ${STYLE_PREFIX}main-body`}>
      <Weather
        params={{
          key: '56a763fbaeb1992f6f00a7c4eed3cc82',
          city: '110101',
        }}
      />
    </div>
  );
}

ReactDOM.render((
  <App />
), mountNode);
````

````css
.container {
  position: relative;
  background-color: #1f3b6d;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: flex-end;
}
````
