diff --git a/package.json b/package.json
index 26f5cbe..74a07ef 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,11 @@
"jquery": "^1.12.4",
"js-cookie": "2.2.0",
"lib-flexible": "^0.3.2",
+ "mavon-editor": "^2.7.7",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
+ "showdown": "^1.9.1",
"sortablejs": "^1.10.2",
"spark-md5": "^3.0.0",
"vant": "^2.5.0",
diff --git a/src/api/markdown-api.js b/src/api/markdown-api.js
new file mode 100644
index 0000000..58ae579
--- /dev/null
+++ b/src/api/markdown-api.js
@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+// const qs = require('qs')
+
+export default {
+ getMarkdown: function(params) {
+ return request({
+ url: 'public/p',
+ method: 'get',
+ params
+ })
+ },
+}
diff --git a/src/components/popover/MenuPopover.vue b/src/components/popover/MenuPopover.vue
index 986a037..4e2583f 100644
--- a/src/components/popover/MenuPopover.vue
+++ b/src/components/popover/MenuPopover.vue
@@ -76,7 +76,6 @@ export default {
Bus.$emit('clickMore', selects)
},
test() {
- console.log(8769)
}
}
}
diff --git a/src/layout/index.vue b/src/layout/index.vue
index 3876e65..315f247 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -14,6 +14,7 @@
-
diff --git a/src/views/form/index.vue b/src/views/form/index.vue
index f4d66d3..3028867 100644
--- a/src/views/form/index.vue
+++ b/src/views/form/index.vue
@@ -1,85 +1,63 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create
- Cancel
-
-
-
+
-
-
-
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 8a08c88..8ef1d70 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -24,6 +24,10 @@
+
+
+
@@ -625,6 +629,10 @@ export default {
this.getFileList()
}
console.log("this.pathList:", this.pathList)
+ },
+ // 新建文档
+ newDocument() {
+
},
newFolder() {
this.newFolderName = '新建文件夹'
@@ -1390,10 +1398,14 @@ export default {
this.getFileList()
}
} else {
- // 打开文件
- const fileIds = [row.id]
- const url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
- window.open(url, '_blank')
+ if(row.contentType === 'text/markdown'){
+ this.$router.push(`/public/p?mark=${row.id}`)
+ }else{
+ // 打开文件
+ const fileIds = [row.id]
+ const url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds
+ window.open(url, '_blank')
+ }
}
}
}
diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue
new file mode 100644
index 0000000..11a8912
--- /dev/null
+++ b/src/views/markdown/index.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/public/p/index.vue b/src/views/public/p/index.vue
new file mode 100644
index 0000000..096976b
--- /dev/null
+++ b/src/views/public/p/index.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
diff --git a/src/views/recently/index.vue b/src/views/recently/index.vue
index 1d19cd7..499d818 100644
--- a/src/views/recently/index.vue
+++ b/src/views/recently/index.vue
@@ -1,58 +1,81 @@
-
+
-
-
diff --git a/src/views/recently/index_m.vue b/src/views/recently/index_m.vue
new file mode 100644
index 0000000..8558a62
--- /dev/null
+++ b/src/views/recently/index_m.vue
@@ -0,0 +1,661 @@
+
+
+
+
+
+
+
diff --git a/src/views/table/index.vue b/src/views/table/index.vue
index a1ed847..3f00243 100644
--- a/src/views/table/index.vue
+++ b/src/views/table/index.vue
@@ -1,79 +1,23 @@
-
-
-
-
- {{ scope.$index }}
-
-
-
-
- {{ scope.row.title }}
-
-
-
-
- {{ scope.row.author }}
-
-
-
-
- {{ scope.row.pageviews }}
-
-
-
-
- {{ scope.row.status }}
-
-
-
-
-
- {{ scope.row.display_time }}
-
-
-
-
+