# Suggestion 组件使用示例

以下为片段，实际页面请自行布局。

---

## 基础用法

```tsx
import { Suggestion } from '@alipay/agentic-design-mobile';
import { Copy } from '@alipay/sofa-icons';

const items = [
  { icon: <Copy />, text: '绩优债券基金有哪些？' },
  { icon: <Copy />, text: '杭州的国补政策是什么？' },
  {
    icon: <Copy />,
    text: '关税对消费类基金的影响关税对消费类基金的影响关税对消费类基金的影响',
  },
];

export function SuggestionBasic() {
  return (
    <Suggestion
      title="继续问"
      onClick={(item) => {
        console.log(item);
      }}
      items={items}
    />
  );
}
```

---

## 自定义右侧动作图标/箭头

```tsx
import { Suggestion } from '@alipay/agentic-design-mobile';

export function SuggestionActionIcon() {
  return (
    <Suggestion
      items={[
        {
          text: '关税对消费类基金的影响关税对消费类基金的影响关税对消费类基金的影响',
          actionIcon: 'Copy',
        },
        {
          text: '关税对消费类基金的影响关税对消费类基金的影响关税对消费类基金的影响',
          actionIcon: <a href="#demo">点我</a>,
        },
      ]}
    />
  );
}
```

---

## 禁用状态

```tsx
import { Suggestion } from '@alipay/agentic-design-mobile';
import { Copy } from '@alipay/sofa-icons';

const items = [
  { icon: <Copy />, text: '第一项' },
  { icon: <Copy />, text: '第二项' },
  { icon: <Copy />, text: '第三项' },
];

export function SuggestionDisabled() {
  return <Suggestion items={items.map((item, index) => ({ ...item, disabled: index % 2 === 1 }))} />;
}
```

---

## 省略配置

```tsx
import { Suggestion } from '@alipay/agentic-design-mobile';

export function SuggestionEllipsis() {
  return (
    <Suggestion
      items={[
        {
          text: '关税对消费类基金的影响关税对消费类基金的影响关税对消费类基金的影响',
          ellipsis: { rows: 2 },
        },
      ]}
    />
  );
}
```
