> For the complete documentation index, see [llms.txt](https://attr.view-js.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://attr.view-js.com/data-view-default.md).

# data-view-default

**声明位置：**

视图骨架 DOM 元素，例如：

```markup
<section data-view-id="myView" data-view-default="true">
    视图内容
</section>
```

**是否必须：**

否。

{% hint style="info" %}
如果开发者没有主动声明任何视图为默认视图，View\.js 将自动采取视图容器下的第一个视图为默认视图。
{% endhint %}

**属性取值：**

`true` 。

{% hint style="warning" %}
仅当属性取值为 `true` 时，才能有效设置视图为默认视图。
{% endhint %}
