> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# `__SetConfig`

## 介绍

设置 config 给特定的 Element 节点。

## 语法

```jsx
__SetConfig(element: Element, config: Record<string, any>) : void;
```

### 参数

|   Key   | 说明                                    |
| :-----: | ------------------------------------- |
| element | 任意的 Element 对象。                       |
|  config | 需要设置给 Element 对象的 config ，是一个 map 对象。 |

### 返回值

无返回值。

## 示例

前端框架可以按下如下的方法生成 render 指令。

```jsx
<view src="xxx" bindtap="onTap" />
```

```jsx
// main-thread.js
let element = __CreateElement('view', 0, {});
__SetAttribute(element, 'src', 'xx');

__SetConfig(element, { anyConfig: {} });
```
