Documentation Index
Fetch the complete documentation index at: https://omer-914cc1c6.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
使用 CodeGroup 组件在带有标签页的界面中展示多个代码块,方便用户对比不同编程语言的实现,或查看同一任务的替代实现。
console.log("Hello World");
要创建代码组,请用 <CodeGroup> 标签包裹多个代码块。每个代码块必须包含一个标题,该标题将作为选项卡的标签显示。
<CodeGroup>
```javascript helloWorld.js
console.log("你好,世界");
```
```python hello_world.py
print('你好,世界!')
```
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("你好,世界!");
}
}
```
</CodeGroup>
你可以使用 dropdown 属性将代码组中的标签页替换为下拉菜单,以在不同语言间切换。
console.log("Hello World");
<CodeGroup dropdown>
```javascript helloWorld.js
console.log("你好,世界");
```
```python hello_world.py
print('你好,世界!')
```
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("你好,世界!");
}
}
```
</CodeGroup>