diff --git a/Web/public/doc-code/api/queue.js b/Web/public/doc-code/api/queue.js new file mode 100644 index 0000000..5551ab8 --- /dev/null +++ b/Web/public/doc-code/api/queue.js @@ -0,0 +1,15 @@ +/* 使用关键字await */ +async function doc() { + const res1 = await this.$api.apiName1(params1) + const res2 = await this.$api.apiName2(params2) +} + +/* 使用$queue */ +this.$api + .$queue([ + this.$api.apiName1Await(params1), + this.$api.apiName2Await(params2), + ]) + .then(([_res1, _res2]) => { + /* ... */ + }) \ No newline at end of file diff --git a/Web/public/doc-code/api/setting.js b/Web/public/doc-code/api/setting.js new file mode 100644 index 0000000..81bf4f8 --- /dev/null +++ b/Web/public/doc-code/api/setting.js @@ -0,0 +1,14 @@ +export default { + /* 自定义的接口名称 */ + apiName: [ + /* 接口地址 */ + url, + /* 请求类型 [get | post] */ + 'get', + /* axios所需的设置参数 */ + options, + ], + + /* 默认为post的接口 */ + apiPostName: postUrl +} \ No newline at end of file diff --git a/Web/public/doc-code/api/usage.js b/Web/public/doc-code/api/usage.js new file mode 100644 index 0000000..158c948 --- /dev/null +++ b/Web/public/doc-code/api/usage.js @@ -0,0 +1,11 @@ +this.$api + .apiName(params) + .then((res) => { + /* ... */ + }) + .catch((error) => { + /* catch */ + }) + .finally(() => { + /* finally */ + }) \ No newline at end of file diff --git a/Web/public/doc-code/auth/index.vue b/Web/public/doc-code/auth/index.vue new file mode 100644 index 0000000..075a52a --- /dev/null +++ b/Web/public/doc-code/auth/index.vue @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/Web/src/common/login/index.js b/Web/src/common/login/index.js index ca4f285..f2f3473 100644 --- a/Web/src/common/login/index.js +++ b/Web/src/common/login/index.js @@ -70,21 +70,9 @@ const doLogout = () => { }) } -const doCheck = () => { - return new Promise((resolve, reject) => { - api.checkLogin().then(({ result }) => { - setGlobal(result) - resolve() - }).catch(() => { - reject() - }) - }) -} - export { doLogin, doLogout, - doCheck, setGlobal, getGlobal diff --git a/Web/src/main.js b/Web/src/main.js index 731d3a5..75a1e97 100644 --- a/Web/src/main.js +++ b/Web/src/main.js @@ -26,7 +26,7 @@ SwiperClass.use([Pagination, Mousewheel, Autoplay, Scrollbar]) Vue.use(getAwesomeSwiper(SwiperClass)) import hljs from 'highlight.js' -import 'highlight.js/styles/vs2015.css' +import 'highlight.js/styles/monokai-sublime.css' Vue.use(hljs.vuePlugin); /** diff --git a/Web/src/pages/system/doc/api/index.vue b/Web/src/pages/system/doc/api/index.vue new file mode 100644 index 0000000..98ad48b --- /dev/null +++ b/Web/src/pages/system/doc/api/index.vue @@ -0,0 +1,5 @@ + diff --git a/Web/src/pages/system/doc/api/queue.vue b/Web/src/pages/system/doc/api/queue.vue new file mode 100644 index 0000000..974aed8 --- /dev/null +++ b/Web/src/pages/system/doc/api/queue.vue @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/api/setting.vue b/Web/src/pages/system/doc/api/setting.vue new file mode 100644 index 0000000..c5c937a --- /dev/null +++ b/Web/src/pages/system/doc/api/setting.vue @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/api/usage.vue b/Web/src/pages/system/doc/api/usage.vue new file mode 100644 index 0000000..9e0018b --- /dev/null +++ b/Web/src/pages/system/doc/api/usage.vue @@ -0,0 +1,21 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/auth/index.vue b/Web/src/pages/system/doc/auth/index.vue new file mode 100644 index 0000000..510e9dc --- /dev/null +++ b/Web/src/pages/system/doc/auth/index.vue @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/database/index.vue b/Web/src/pages/system/doc/database/index.vue new file mode 100644 index 0000000..e5e6a79 --- /dev/null +++ b/Web/src/pages/system/doc/database/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/Web/src/pages/system/doc/database/migrations.vue b/Web/src/pages/system/doc/database/migrations.vue new file mode 100644 index 0000000..ed59bc0 --- /dev/null +++ b/Web/src/pages/system/doc/database/migrations.vue @@ -0,0 +1,77 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/functions/index.vue b/Web/src/pages/system/doc/functions/index.vue new file mode 100644 index 0000000..018e4a1 --- /dev/null +++ b/Web/src/pages/system/doc/functions/index.vue @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/Web/src/pages/system/doc/globalinfo/index.vue b/Web/src/pages/system/doc/globalinfo/index.vue new file mode 100644 index 0000000..17f8b41 --- /dev/null +++ b/Web/src/pages/system/doc/globalinfo/index.vue @@ -0,0 +1,122 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/index.vue b/Web/src/pages/system/doc/index.vue index aa6ca76..c31f41f 100644 --- a/Web/src/pages/system/doc/index.vue +++ b/Web/src/pages/system/doc/index.vue @@ -3,10 +3,15 @@ - -
+ +

{{ doc.title }}

- +
+
@@ -48,59 +54,126 @@ \ No newline at end of file diff --git a/Web/src/pages/system/doc/window/index.vue b/Web/src/pages/system/doc/window/index.vue new file mode 100644 index 0000000..4a5705b --- /dev/null +++ b/Web/src/pages/system/doc/window/index.vue @@ -0,0 +1,27 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/window/open.vue b/Web/src/pages/system/doc/window/open.vue new file mode 100644 index 0000000..ad4fab2 --- /dev/null +++ b/Web/src/pages/system/doc/window/open.vue @@ -0,0 +1,59 @@ + + \ No newline at end of file diff --git a/Web/src/views/main/index.vue b/Web/src/views/main/index.vue index b58603f..fad068b 100644 --- a/Web/src/views/main/index.vue +++ b/Web/src/views/main/index.vue @@ -144,7 +144,7 @@ export default { onCloseContentWindow(key) { key = key || this.tabActived; - const i = this.$_.findIndex(this.panes, (p) => p.key === key && p.closable); + const i = this.$_.findIndex(this.panes, (p) => p.key === key); this.panes.splice(i, 1); if (this.panes.length) {