結果 (Result)
一連の操作タスクの結果をフィードバックするために使用されます。
いつ使うか
- 重要な操作が結果を処理するためにユーザーに通知する必要があり、フィードバックがより複雑な場合に使用します。
成功結果
成功した結果を表示します。
Successfully Purchased Cloud Server ECS!
Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait.
astro
---
import Result from '@/components/feedback/Result.astro';
import Button from '@/components/general/Button.astro';
---
<Result
status="success"
title="Successfully Purchased Cloud Server ECS!"
subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
>
<div slot="extra">
<Button variant="outline">Back to Orders</Button>
<Button>Buy Again</Button>
</div>
</Result> ステータスバリアント
状況に応じた異なるステータス。
Your operation has been executed
There are some problems with your operation.
Submission Failed
Please check and modify the following information before resubmitting.
astro
---
import Result from '@/components/feedback/Result.astro';
---
<Result status="info" title="Your operation has been executed" />
<Result status="warning" title="There are some problems with your operation." />
<Result status="error" title="Submission Failed" subTitle="Please check and modify the following information before resubmitting." /> HTTPステータスページ
`status` プロパティは、アイコンの代わりに大きなタイポグラフィをレンダリングする一般的なHTTPエラーコード(403、404、500)をサポートします。
404
404
Sorry, the page you visited does not exist.
astro
---
import Result from '@/components/feedback/Result.astro';
import Button from '@/components/general/Button.astro';
---
<Result status="404" title="404" subTitle="Sorry, the page you visited does not exist.">
<Button slot="extra">Back Home</Button>
</Result> API Reference
| プロパティ | 説明 | タイプ | デフォルト |
|---|---|---|---|
| status | アイコンと色を決定する結果のステータス(success、error、info、warning、403、404、500)。 | 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500' | 'info' |
| title | 結果のメインタイトルテキスト。 | string | - |
| subTitle | セカンダリのサブタイトルまたは説明テキスト。 | string | - |