You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

498 B

order title
0 [{zh-CN 受控模式} {en-US Controlled mode}]

zh-CN

受控的 Segmented。

en-US

Controlled Segmented.

import React, { useState } from 'react';
import { Segmented } from 'antd';

const Demo: React.FC = () => {
  const [value, setValue] = useState('Map');

  return (
    <Segmented
      options={['Map', 'Transit', 'Satellite']}
      value={value}
      onChange={e => setValue(e.target.value)}
    />
  );
};

ReactDOM.render(<Demo />, mountNode);