全部产品

PageResult 异常页

异常页面。

扫码体验

image.png

示例代码

// API-DEMO page/component/page-result/page-result.json
{
  "defaultTitle": "异常反馈",
  "usingComponents": {
    "page-result": "mini-antui/es/page-result/index"
  }
}

<!-- API-DEMO page/component/page-result/page-result.axml -->
<page-result
  type="network"
  title="网络不给力"
  brief="世界上最遥远的距离莫过于此"
/>
<page-result
  type="network"
  title="网络不给力"
  brief="世界上最遥远的距离莫过于此"
>
  <view class="am-page-result-btns">
    <view onTap="backHome">回到首页</view>
    <view>示例按钮</view>
  </view>
</page-result>

// API-DEMO page/component/page-result/page-result.js
Page({
  backHome() {
    my.navigateBack();
  }
});

.am-page-result {
  display: flex;
  flex-direction: column;
}
.am-page-result-btns {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-content: center;
  padding-bottom: 100rpx;
}
.am-page-result-btns > view {
  color: #108EE9;
  font-size: 40rpx;
  margin-top: 52rpx;
  text-align: center;
}

属性

属性名描述类型默认值必填
type异常页面类型,网络异常 network,服务繁忙 busy,服务异常 error,空状态 empty,用户注销 logoff。Stringnetwork
local是否是局部异常内容。Booleanfalse
title错误提示标题。String-
brief错误提示简要。String-