Skip to content

Commit bc4cb01

Browse files
author
weilei
committed
fix(docs): 更新多个组件文档,修正示例代码格式为 HTML,优化代码结构
1 parent b8ec1d7 commit bc4cb01

File tree

20 files changed

+1788
-1784
lines changed

20 files changed

+1788
-1784
lines changed

docs/components/typewriter.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
## 使用示例
5656

57-
```vue
57+
```html
5858
<template>
5959
<div>
6060
<el-x-typewriter
@@ -78,28 +78,28 @@
7878
</template>
7979

8080
<script>
81-
export default {
82-
data() {
83-
return {
84-
contentText: `# 完整功能演示
81+
export default {
82+
data() {
83+
return {
84+
contentText: `# 完整功能演示
8585
- 支持**Markdown**渲染
8686
- 代码高亮: \`const example = true\`
8787
- 可配置的打字效果`,
88-
typingSpeed: 40,
89-
progress: 0,
90-
};
91-
},
92-
methods: {
93-
handleStart() {
94-
console.log("打字开始");
88+
typingSpeed: 40,
89+
progress: 0,
90+
};
9591
},
96-
handleTyping({ progress }) {
97-
this.progress = progress;
92+
methods: {
93+
handleStart() {
94+
console.log("打字开始");
95+
},
96+
handleTyping({ progress }) {
97+
this.progress = progress;
98+
},
99+
handleFinish(instance) {
100+
console.log("打字完成", instance);
101+
},
98102
},
99-
handleFinish(instance) {
100-
console.log("打字完成", instance);
101-
},
102-
},
103-
};
103+
};
104104
</script>
105105
```

docs/src/.vuepress/styles/index.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ $accentColor = #409EFF
8585
}
8686

8787
// Element UI 文档风格的代码块样式
88+
.theme-default-content pre code, .theme-default-content pre[class*="language-"] code {
89+
color:#000000;
90+
}
8891
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string {
8992
background:none;
9093
}

docs/src/components/attachments.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@
3131

3232
:::demo
3333

34-
```vue
34+
```html
3535
<template>
3636
<div>
3737
<!-- 示例代码 -->
3838
</div>
3939
</template>
4040

4141
<script>
42-
export default {
43-
data() {
44-
return {
45-
// 数据
46-
};
47-
},
48-
methods: {
49-
// 方法
50-
},
51-
};
42+
export default {
43+
data() {
44+
return {
45+
// 数据
46+
};
47+
},
48+
methods: {
49+
// 方法
50+
},
51+
};
5252
</script>
5353
```
5454

0 commit comments

Comments
 (0)