ElementPlus Result 結(jié)果

2021-09-26 16:15 更新

Result 結(jié)果

用于對(duì)用戶的操作結(jié)果或者異常狀態(tài)做反饋。

基礎(chǔ)用法


<template>
  <el-row>
  <el-col :sm="12" :lg="6">
    <el-result icon="success" title="成功提示" subTitle="請(qǐng)根據(jù)提示進(jìn)行操作">
      <template #extra>
        <el-button type="primary" size="medium">返回</el-button>
      </template>
    </el-result>
  </el-col>
  <el-col :sm="12" :lg="6">
    <el-result icon="warning" title="警告提示" subTitle="請(qǐng)根據(jù)提示進(jìn)行操作">
      <template #extra>
        <el-button type="primary" size="medium">返回</el-button>
      </template>
    </el-result>
  </el-col>
  <el-col :sm="12" :lg="6">
    <el-result icon="error" title="錯(cuò)誤提示" subTitle="請(qǐng)根據(jù)提示進(jìn)行操作">
      <template #extra>
        <el-button type="primary" size="medium">返回</el-button>
      </template>
    </el-result>
  </el-col>
  <el-col :sm="12" :lg="6">
    <el-result icon="info" title="信息提示" subTitle="請(qǐng)根據(jù)提示進(jìn)行操作">
      <template #extra>
        <el-button type="primary" size="medium">返回</el-button>
      </template>
    </el-result>
  </el-col>
</el-row>
</template>

自定義內(nèi)容


<template>
  <el-result title="404" subTitle="抱歉,請(qǐng)求錯(cuò)誤">
  <template #icon>
    <el-image
      src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" rel="external nofollow" 
    ></el-image>
  </template>
  <template #extra>
    <el-button type="primary" size="medium">返回</el-button>
  </template>
</el-result>
</template>

Result Attributes

參數(shù)說(shuō)明類(lèi)型可選值默認(rèn)值
title標(biāo)題string
sub-title二級(jí)標(biāo)題string
icon圖標(biāo)類(lèi)型stringsuccess / warning / info / errorinfo

Result Slots

Name說(shuō)明
icon自定義圖標(biāo)
title自定義標(biāo)題
subTitle自定義二級(jí)標(biāo)題
extra自定義底部額外區(qū)域


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)