diff --git a/src/components/Global.vue b/src/components/Global.vue
index 24bfecf49e1..83facd2e877 100644
--- a/src/components/Global.vue
+++ b/src/components/Global.vue
@@ -18,6 +18,12 @@
"doc-prefix": DOC_URL_PREFIX,
'text': "V0.8.0",
'content': '0-Content.md'
+ },
+ "latest": {
+ "branch": "master",
+ "doc-prefix": DOC_URL_PREFIX,
+ 'text': "Latest",
+ 'content': '0-Content.md'
}
};
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index 352b339ef87..b3954b1b694 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -57,8 +57,15 @@
-
- Development
+
+ Development
+
+
Example
@@ -120,6 +127,12 @@
{"url": "/Tools/Hadoop", "content": "Hadoop Connector"},
{"url": "/Tools/Spark", "content": "Spark Connector"}
],
+ "Development": [
+ {"url": "/Development/Contributing", "content": "Questions and Contributing"},
+ {"url": "/Development/IDE", "content": "Developing in IDE"},
+ {"url": "/Development/Tsfile", "content": "Changelist of Tsfile"},
+ {"url": "/Development/RPC", "content": "Changelist of RPC"}
+ ]
}
},
}
diff --git a/src/router/index.js b/src/router/index.js
index 1a73ba5f697..f4497f25c3e 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -34,7 +34,7 @@ export default new Router({
},
{
path: '/Documents/:version/:chapter?/:section?',
- name: 'Documents',
+ name: 'UserGuideDocuments',
component: Documents
},
{
@@ -44,7 +44,7 @@ export default new Router({
},
{
path: '/Materials/:doc',
- name: 'Materials',
+ name: 'SingleMaterial',
component: SingleMaterials
},
{
@@ -63,7 +63,7 @@ export default new Router({
component: Community
},
{
- path: '/Development',
+ path: '/Development/:content',
name: 'Development',
component: Development
},
diff --git a/src/views/Development.vue b/src/views/Development.vue
index b5f1943692e..34dfbcc3f7f 100644
--- a/src/views/Development.vue
+++ b/src/views/Development.vue
@@ -22,7 +22,7 @@
import SideBar from '../components/SideBar'
import markdown from 'vue-markdown'
import axios from 'axios'
- import Golbal from '../components/Global'
+ import Global from '../components/Global'
import LoadingBar from '../components/Loading'
export default {
@@ -53,10 +53,24 @@
return this.$route.params.content
},
fetchData() {
- let url = Golbal.SUPPORT_VERSION[Golbal.DEFAULT_VERSION]['doc-prefix'] +
- Golbal.SUPPORT_VERSION[Golbal.DEFAULT_VERSION]['branch'] +
- "/docs/Development.md";
- let pointer = this;
+ const dict = {
+ "Contributing": Global.SUPPORT_VERSION[Global.LATEST_STR]['doc-prefix'] +
+ Global.SUPPORT_VERSION[Global.LATEST_STR]['branch'] + "/docs/Development-Contributing.md",
+ "IDE": Global.SUPPORT_VERSION[Global.LATEST_STR]['doc-prefix'] +
+ Global.SUPPORT_VERSION[Global.LATEST_STR]['branch'] + "/docs/Development-IDE.md",
+ "Tsfile": Global.SUPPORT_VERSION[Global.LATEST_STR]['doc-prefix'] +
+ Global.SUPPORT_VERSION[Global.LATEST_STR]['branch'] + "/tsfile/format-changelist.md",
+ "RPC": Global.SUPPORT_VERSION[Global.LATEST_STR]['doc-prefix'] +
+ Global.SUPPORT_VERSION[Global.LATEST_STR]['branch'] + "/service-rpc/rpc-changelist.md",
+ };
+ const content = this.content();
+ let url = null;
+ if (content in dict) {
+ url = dict[content];
+ } else {
+ this.$router.push('/404');
+ }
+ const pointer = this;
this.seen = true;
axios.get(url).then(function (response) {
pointer.md = response.data;
@@ -64,7 +78,7 @@
})
},
parse(html){
- return Golbal.isReadyForPrerender(html)
+ return Global.isReadyForPrerender(html)
}
}
}
diff --git a/src/views/Documents.vue b/src/views/Documents.vue
index 19861b37fd7..6d74c5fb145 100644
--- a/src/views/Documents.vue
+++ b/src/views/Documents.vue
@@ -132,7 +132,10 @@
return this.$route.params.section;
},
updateDocument(){
- this.text = this.getVersionString();
+ if (this.text !== this.getVersionString()) {
+ this.text = this.getVersionString();
+ location.reload();
+ }
},
switchLanguage() {
this.eng = this.eng !== true;