Skip to content

Commit

Permalink
完成markdown文法和mermaid语法测试
Browse files Browse the repository at this point in the history
  • Loading branch information
iguoya committed Oct 10, 2020
1 parent 18c1c33 commit 756342c
Show file tree
Hide file tree
Showing 18 changed files with 409 additions and 6 deletions.
27 changes: 27 additions & 0 deletions docs/.vuepress/components/customer-component.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div class="customer-component">
todoList:
<div v-for="item in list" :key="item.id">
项目:{{item.text}},状态:{{item.done ? '完成': '进行中'}}
</div>
</div>
</template>
<script>
export default {
name: 'CustomerComponent',
data () {
return {
list: []
}
},
created () {
this.list = [
{ id: 1, text: 'JavaScript', done: false },
{ id: 2, text: 'HTML', done: false },
{ id: 3, text: 'CSS', done: true },
{ id: 4, text: 'Vue.js', done: true },
{ id: 5, text: 'VuePress', done: true }
]
}
}
</script>
29 changes: 29 additions & 0 deletions docs/.vuepress/components/hello.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div id="hello">
<br/>
{{ message }} ---- {{name}}
<p>
{{ school.name }} {{school.mobile}}
</p>
<ul>
<li></li>
</ul>
</div>
</template>

<script>
export default {
el: 'hello',
data () {
return {
message: "Hello 雪虎 !!!",
school: {
name: "黑马程序员",
mobile: "112334343434"
},
campus:["北京校区", "上海校区", "深圳校区"]
}
}
}
</script>
6 changes: 6 additions & 0 deletions docs/.vuepress/components/my-component.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
Hello this is <demo-1>
</div>
</template>

20 changes: 20 additions & 0 deletions docs/.vuepress/components/tpl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div id="app">
<br/>
<h3 v-text="message">是是是</h3>
<h3 v-text="info">试试</h3>
<input type="button" value="事件绑定" v-on:click="方法">
</div>
</template>

<script>
export default {
el: 'app',
data () {
return {
message: "Hello 雪虎 !!!" ,
info:"一些介绍"
}
}
}
</script>
46 changes: 46 additions & 0 deletions docs/0-书写规范/10-甘特图.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# 甘特图

```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d
```

```mermaid
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes weekends
%% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
```
41 changes: 41 additions & 0 deletions docs/0-书写规范/11-实体关系图.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 实体关系图

```mermaid
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
```

## 用户行为图

```mermaid
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
```

## 饼图

```mermaid
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
```

```mermaid
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
```

2 changes: 1 addition & 1 deletion docs/0-书写规范/3-代码.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(document).ready(function () {
alert('RUNOOB');
});
```
```c++
```cpp
int main() {
cout<<"Hello World!"<<endl;
}
Expand Down
Binary file not shown.
Binary file not shown.
13 changes: 8 additions & 5 deletions docs/0-书写规范/4-图片.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 图片

## 网络图库

![RUNOOB 图标](http://static.runoob.com/images/runoob-logo.png)

![RUNOOB 图标](http://static.runoob.com/images/runoob-logo.png "RUNOOB")
Expand All @@ -9,18 +11,19 @@

[1]: http://static.runoob.com/images/runoob-logo.png

是是是
## 当前目录

![](./hero.png)

测试

![](./4-图片.assets/hero-1602315159093.png)

## html语法

![](4-图片.assets/hero-1602315159093.png)



使用 <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd> 重启电脑
**文本加粗**
\*\* 正常显示星号 \*\*



Expand Down
10 changes: 10 additions & 0 deletions docs/0-书写规范/5-数学公式.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 数学公式

$$
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\
\end{vmatrix}
${$tep1}{\style{visibility:hidden}{(x+1)(x+1)}}
$$
54 changes: 54 additions & 0 deletions docs/0-书写规范/6-流程图.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 流程图

## 基本用法

```mermaid
graph LR
A[方形] -->B(圆角)
B --> C{条件a}
C -->|a=1| D[结果1]
C -->|a=2| E[结果2]
F[横向流程图]
```

```mermaid
graph TD
A[方形]-->B(圆角)
B -->C{条件a}
C -->|yes|D[结果1]
C -->|no| E[结果2]
F[竖向流程图]
```




## 类图

```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```
<bar-chart :data="[['Assignments', 10], ['Midterm', 35], ['Final', 55]]"></bar-chart>
45 changes: 45 additions & 0 deletions docs/0-书写规范/7-时序图.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# 时序图

```mermaid
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
```

```mermaid
sequenceDiagram
Title: 标题:复杂使用
对象A->对象B: 对象B你好吗?(请求)
Note right of 对象B: 对象B的描述
Note left of 对象A: 对象A的描述(提示)
对象B-->对象A: 我很好(响应)
对象B->小三: 你好吗
小三-->>对象A: 对象B找我了
对象A->对象B: 你真的好吗?
Note over 小三,对象B: 我们是朋友
participant C
Note right of C: 没人陪我玩
```

```mermaid
%% 时序图例子,-> 直线,-->虚线,->>实线箭头
sequenceDiagram
participant 张三
participant 李四
张三->王五: 王五你好吗?
loop 健康检查
王五->王五: 与疾病战斗
end
Note right of 王五: 合理 食物 <br/>看医生...
李四-->>张三: 很好!
王五->李四: 你怎么样?
李四-->王五: 很好!
```
34 changes: 34 additions & 0 deletions docs/0-书写规范/8-状态图.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 状态图



```mermaid
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```

```mermaid
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvCapsLockPressed
ScrollLockOn --> ScrollLockOff : EvCapsLockPressed
}
```


26 changes: 26 additions & 0 deletions docs/0-动态书写/1-模板语法.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 模板语法

```jinja2
{{ 1 + 1 }}
```

{{ 1 + 1}}

```
<span v-for="i in 3">{{ i }} </span>
```

<span v-for="i in 10">{{ i }} </span>



```jinja2
{{ $page }}
```

{{ $page }}

::: v-pre
`{{ This will be displayed as-is }}`
:::

Loading

0 comments on commit 756342c

Please sign in to comment.