From 1240db977b19c980ba5b030ecb962806ed8c02e8 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 2 Feb 2020 21:15:00 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E9=9B=86=E6=88=90=E5=88=B0site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/article/Index.vue | 5 +- admin/src/views/topic/Index.vue | 4 +- site/layouts/admin.vue | 80 +++++ site/nuxt.config.js | 3 +- site/package-lock.json | 77 +++++ site/package.json | 4 +- site/pages/admin/articles/index.vue | 244 +++++++++++++++ site/pages/admin/index.vue | 18 ++ site/pages/admin/nodes/index.vue | 254 +++++++++++++++ site/pages/admin/settings/index.vue | 224 +++++++++++++ site/pages/admin/topics/index.vue | 470 ++++++++++++++++++++++++++++ site/pages/admin/users/index.vue | 344 ++++++++++++++++++++ site/plugins/element-ui.js | 8 + 13 files changed, 1728 insertions(+), 7 deletions(-) create mode 100644 site/layouts/admin.vue create mode 100644 site/pages/admin/articles/index.vue create mode 100644 site/pages/admin/index.vue create mode 100644 site/pages/admin/nodes/index.vue create mode 100644 site/pages/admin/settings/index.vue create mode 100644 site/pages/admin/topics/index.vue create mode 100644 site/pages/admin/users/index.vue create mode 100644 site/plugins/element-ui.js diff --git a/admin/src/views/article/Index.vue b/admin/src/views/article/Index.vue index bda2e5f1..65304a53 100644 --- a/admin/src/views/article/Index.vue +++ b/admin/src/views/article/Index.vue @@ -80,7 +80,7 @@ import HttpClient from '@/apis/HttpClient' export default { - name: 'List', + layout: 'admin', data() { return { results: [], @@ -89,8 +89,7 @@ export default { filters: { title: '', status: '' - }, - tagOptions: [] + } } }, mounted() { diff --git a/admin/src/views/topic/Index.vue b/admin/src/views/topic/Index.vue index d99c5c1a..3e378854 100644 --- a/admin/src/views/topic/Index.vue +++ b/admin/src/views/topic/Index.vue @@ -331,7 +331,7 @@ export default { this.$message({ message: '推荐成功', type: 'success' }) this.list() } catch (e) { - this.$notify.error({ title: '错误', message: rsp.message }) + this.$notify.error({ title: '错误', message: e.message }) } }, async cancelRecommend(id) { @@ -342,7 +342,7 @@ export default { this.$message({ message: '取消推荐成功', type: 'success' }) this.list() } catch (e) { - this.$notify.error({ title: '错误', message: rsp.message }) + this.$notify.error({ title: '错误', message: e.message }) } }, handleSelectionChange(val) { diff --git a/site/layouts/admin.vue b/site/layouts/admin.vue new file mode 100644 index 00000000..8558c823 --- /dev/null +++ b/site/layouts/admin.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/site/nuxt.config.js b/site/nuxt.config.js index 17063d59..88181914 100644 --- a/site/nuxt.config.js +++ b/site/nuxt.config.js @@ -66,7 +66,8 @@ export default { '~/plugins/filters', '~/plugins/axios', '~/plugins/bbs-go', - { src: '~/plugins/infinite-scroll', ssr: false } + { src: '~/plugins/infinite-scroll', ssr: false }, + { src: '~/plugins/element-ui', ssr: true } ], /* ** Nuxt.js dev-modules diff --git a/site/package-lock.json b/site/package-lock.json index 7253889a..187c3000 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -3231,6 +3231,14 @@ "resolved": "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz?cache=0&sync_timestamp=1574271725892&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-limiter%2Fdownload%2Fasync-limiter-1.0.1.tgz", "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=" }, + "async-validator": { + "version": "1.8.5", + "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1575620590760&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz", + "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=", + "requires": { + "babel-runtime": "6.x" + } + }, "asynckit": { "version": "0.4.0", "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", @@ -3327,6 +3335,11 @@ "resolve": "^1.12.0" } }, + "babel-helper-vue-jsx-merge-props": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz", + "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=" + }, "babel-loader": { "version": "8.0.6", "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.0.6.tgz", @@ -3346,6 +3359,22 @@ "object.assign": "^4.1.0" } }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" + } + } + }, "balanced-match": { "version": "1.0.0", "resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", @@ -5073,6 +5102,26 @@ "resolved": "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.332.tgz?cache=0&sync_timestamp=1578795354180&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.332.tgz", "integrity": "sha1-KD3wLYJp4l2eL0JOEekJyXMKioI=" }, + "element-ui": { + "version": "2.13.0", + "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.13.0.tgz", + "integrity": "sha1-9rsE5bCnbqX2JGYES3dEB7pOvS0=", + "requires": { + "async-validator": "~1.8.1", + "babel-helper-vue-jsx-merge-props": "^2.0.0", + "deepmerge": "^1.2.0", + "normalize-wheel": "^1.0.1", + "resize-observer-polyfill": "^1.5.0", + "throttle-debounce": "^1.0.1" + }, + "dependencies": { + "deepmerge": { + "version": "1.5.2", + "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1572279720382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz", + "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=" + } + } + }, "elliptic": { "version": "6.5.2", "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.2.tgz?cache=0&sync_timestamp=1574449990666&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.2.tgz", @@ -8520,6 +8569,11 @@ "resolved": "https://registry.npm.taobao.org/normalize-url/download/normalize-url-3.3.0.tgz", "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=" }, + "normalize-wheel": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz", + "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-4.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-run-path%2Fdownload%2Fnpm-run-path-4.0.1.tgz", @@ -10641,6 +10695,11 @@ "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", "dev": true }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "http://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=" + }, "resolve": { "version": "1.12.0", "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.12.0.tgz?cache=0&sync_timestamp=1564641434608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.12.0.tgz", @@ -11120,6 +11179,11 @@ "is-plain-obj": "^1.0.0" } }, + "sortablejs": { + "version": "1.10.2", + "resolved": "https://registry.npm.taobao.org/sortablejs/download/sortablejs-1.10.2.tgz", + "integrity": "sha1-bkA2TZE/mLhaFPZnj5K1wSIfUpA=" + }, "source-list-map": { "version": "2.0.1", "resolved": "http://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", @@ -11748,6 +11812,11 @@ "neo-async": "^2.6.0" } }, + "throttle-debounce": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz", + "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0=" + }, "through": { "version": "2.3.8", "resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz", @@ -12420,6 +12489,14 @@ "resolved": "https://registry.npm.taobao.org/vue-toasted/download/vue-toasted-1.1.27.tgz", "integrity": "sha1-zgp0uHX5DC5KnhY8zm1fw314oHw=" }, + "vuedraggable": { + "version": "2.23.2", + "resolved": "https://registry.npm.taobao.org/vuedraggable/download/vuedraggable-2.23.2.tgz?cache=0&sync_timestamp=1569987518331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvuedraggable%2Fdownload%2Fvuedraggable-2.23.2.tgz", + "integrity": "sha1-DZXX/fTwL1Z1Wiazydylx8qc+nI=", + "requires": { + "sortablejs": "^1.10.1" + } + }, "vuex": { "version": "3.1.2", "resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.1.2.tgz", diff --git a/site/package.json b/site/package.json index e38189f3..ecd80969 100644 --- a/site/package.json +++ b/site/package.json @@ -19,9 +19,11 @@ "@nuxtjs/google-adsense": "^1.1.3", "@nuxtjs/toast": "^3.2.1", "cookie-universal-nuxt": "^2.0.18", + "element-ui": "^2.13.0", "nuxt": "^2.11.0", "qs": "^6.9.0", - "vue-infinite-scroll": "^2.0.2" + "vue-infinite-scroll": "^2.0.2", + "vuedraggable": "^2.23.2" }, "devDependencies": { "@nuxtjs/eslint-config": "^1.0.1", diff --git a/site/pages/admin/articles/index.vue b/site/pages/admin/articles/index.vue new file mode 100644 index 00000000..ac73b331 --- /dev/null +++ b/site/pages/admin/articles/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/site/pages/admin/index.vue b/site/pages/admin/index.vue new file mode 100644 index 00000000..a8295e73 --- /dev/null +++ b/site/pages/admin/index.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/site/pages/admin/nodes/index.vue b/site/pages/admin/nodes/index.vue new file mode 100644 index 00000000..be6c5f3d --- /dev/null +++ b/site/pages/admin/nodes/index.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/site/pages/admin/settings/index.vue b/site/pages/admin/settings/index.vue new file mode 100644 index 00000000..ec7231b3 --- /dev/null +++ b/site/pages/admin/settings/index.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/site/pages/admin/topics/index.vue b/site/pages/admin/topics/index.vue new file mode 100644 index 00000000..5165de3a --- /dev/null +++ b/site/pages/admin/topics/index.vue @@ -0,0 +1,470 @@ + + + + + diff --git a/site/pages/admin/users/index.vue b/site/pages/admin/users/index.vue new file mode 100644 index 00000000..f6703bc0 --- /dev/null +++ b/site/pages/admin/users/index.vue @@ -0,0 +1,344 @@ + + + + + diff --git a/site/plugins/element-ui.js b/site/plugins/element-ui.js new file mode 100644 index 00000000..848705c9 --- /dev/null +++ b/site/plugins/element-ui.js @@ -0,0 +1,8 @@ +import Vue from 'vue' +import Element from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' + +// 按需引用 +// import { Button } from 'element-ui' +// Vue.component(Button.name, Button) +Vue.use(Element) -- Gitee From fa71763080392ced4b5a019b507e76ecada68bbc Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 2 Feb 2020 21:24:02 +0800 Subject: [PATCH 02/15] bugfix --- site/pages/admin/articles/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/pages/admin/articles/index.vue b/site/pages/admin/articles/index.vue index ac73b331..e2ba9162 100644 --- a/site/pages/admin/articles/index.vue +++ b/site/pages/admin/articles/index.vue @@ -78,7 +78,7 @@ + + diff --git a/site/pages/admin/nodes/index.vue b/site/pages/admin/nodes/index.vue index be6c5f3d..4e1e6868 100644 --- a/site/pages/admin/nodes/index.vue +++ b/site/pages/admin/nodes/index.vue @@ -48,7 +48,7 @@ - +
- +
diff --git a/site/pages/admin/users/index.vue b/site/pages/admin/users/index.vue index f6703bc0..128e2905 100644 --- a/site/pages/admin/users/index.vue +++ b/site/pages/admin/users/index.vue @@ -104,7 +104,6 @@ :page-size="page.limit" :total="page.total" layout="total, sizes, prev, pager, next, jumper" - style="float:right;" >
-- Gitee From 7859a55f5cb935fdcc6c71c0f371483cb2b19653 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 2 Feb 2020 21:33:57 +0800 Subject: [PATCH 04/15] admin loading --- site/pages/admin/articles/index.vue | 2 +- site/pages/admin/comments/index.vue | 2 +- site/pages/admin/topics/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/pages/admin/articles/index.vue b/site/pages/admin/articles/index.vue index a31fc609..4722c028 100644 --- a/site/pages/admin/articles/index.vue +++ b/site/pages/admin/articles/index.vue @@ -1,5 +1,5 @@