Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/vant/docs/markdown/faq.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ See [Adapt to PC Browsers](#/en-US/advanced-usage#adapt-to-pc-browsers).
### How do I implement mobile responsive adaptation?

See [Browser Adaptation](#/en-US/advanced-usage#browser-adaptation).

### Why are some components not compatible with Server-Side Rendering (SSR)?

See [SSR Compatibility Issues](#/en-US/ssr-issue).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the Chinese version of this file (faq.zh-CN.md), which links to a specific section, it would be better to add an anchor to this link to point to the "Intro" section of the SSR issues page. The Chinese version links to #jie-shao which corresponds to ### 介绍 (Intro).

Suggested change
See [SSR Compatibility Issues](#/en-US/ssr-issue).
See [SSR Compatibility Issues](#/en-US/ssr-issue#intro).

4 changes: 4 additions & 0 deletions packages/vant/docs/markdown/faq.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ Vant 所有组件都是基于 Vue 框架实现的,没有针对 uni-app 进行
### 如何进行移动端响应式适配?

参见[浏览器适配](#/zh-CN/advanced-usage#liu-lan-qi-gua-pei)。

### 部分组件无法兼容服务端渲染(SSR)场景?

参见[SSR兼容问题](#/zh-CN/ssr-issue#jie-shao)。
11 changes: 11 additions & 0 deletions packages/vant/docs/markdown/ssr-issue.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Server-Side Rendering (SSR) Compatibility

### Intro

Some components rely on DOM operations or browser APIs, which leads to compatibility issues in SSR scenarios, causing components to function incorrectly.

### Components

#### Tab

The Tab component does not render in SSR scenarios. See [Tab title cannot be SSR](https://github.com/youzan/vant/issues/5278).
11 changes: 11 additions & 0 deletions packages/vant/docs/markdown/ssr-issue.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 服务端渲染(SSR)兼容性问题

### 介绍

某些组件实现依赖于 DOM 操作或浏览器的API,SSR 场景下会存在兼容性问题,导致组件无法正常工作。

### 组件

#### Tab

Tab组件在SSR场景下不会渲染,见[tab 组件的title无法ssr](https://github.com/youzan/vant/issues/5278)。
2 changes: 2 additions & 0 deletions packages/vant/src/tab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Used to switch between different content areas.

> ⚠️ **Attention**: The Tab component has compatibility issues in SSR (Server-Side Rendering) scenarios. For details, see [SSR Compatibility Issues](#/en-US/ssr-issue#tab).

### Install

Register component globally via `app.use`, refer to [Component Registration](#/en-US/advanced-usage#zu-jian-zhu-ce) for more registration ways.
Expand Down
2 changes: 2 additions & 0 deletions packages/vant/src/tab/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

选项卡组件,用于在不同的内容区域之间进行切换。

> ⚠️ **注意**:Tab组件在SSR(服务端渲染)场景存在兼容性问题,详见[SSR兼容性问题](#/zh-CN/ssr-issue#tab)。

### 引入

通过以下方式来全局注册组件,更多注册方式请参考[组件注册](#/zh-CN/advanced-usage#zu-jian-zhu-ce)。
Expand Down
8 changes: 8 additions & 0 deletions packages/vant/vant.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'locale',
title: '国际化',
},
{
path: 'ssr-issue',
title: 'SSR兼容问题',
},
],
},
{
Expand Down Expand Up @@ -580,6 +584,10 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'locale',
title: 'Internationalization',
},
{
path: 'ssr-issue',
title: 'SSR Issues',
},
],
},
{
Expand Down
Loading