---
name: "WebviewContext.reload"
mode: "api"
versionRequirements:
  - { name: "基础库", version: "2.21.8" }
title: "WebviewContext.reload - 重新加载 web-view 组件"
---

## WebviewContext.reload

> [VERSION] 基础库 >= 2.21.8

### 描述

重新加载 web-view 组件

### 参数

`Params`

| 参数 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| `options` | `WebviewCallbackOption` | 是 | 回调配置 |

### 返回值

无


### 引用对象

##### `interface` WebviewCallbackOption

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `success` | `() => void` | 接口调用成功的回调函数 |
| `fail` | `() => void` | 接口调用失败的回调函数 |
| `complete` | `() => void` | 接口调用结束的回调函数（调用成功、失败都会执行） |


### 示例代码

#### 重新加载页面

```ts
const webviewCtx = ty.createWebviewContext('myWebview');
webviewCtx.reload({
  success() {
    console.log('重新加载成功');
  },
});
```
