From 7ef4b3e6079a202347febc0f56a4c6558e71f417 Mon Sep 17 00:00:00 2001 From: "bypanghu@163.com" Date: Fri, 11 Jun 2021 21:37:07 +0800 Subject: [PATCH 01/12] =?UTF-8?q?'=E6=B7=BB=E5=8A=A0gin-vue-admin=E7=9A=84?= =?UTF-8?q?web=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E5=85=B7?= =?UTF-8?q?=E4=BD=93=E6=96=87=E4=BB=B6=E8=AF=B7=E7=9C=8Bcore/config?= =?UTF-8?q?=E6=96=87=E4=BB=B6'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/core/config.js | 15 + web/src/core/gin-vue-admin.js | 4 + web/src/utils/page.js | 7 +- web/src/view/layout/bottomInfo/bottomInfo.vue | 2 +- web/src/view/layout/index.vue | 6 +- web/src/view/layout/search/search.vue | 31 +- web/src/view/login/index.vue | 2 +- web/yarn.lock | 501 ++---------------- 8 files changed, 103 insertions(+), 465 deletions(-) create mode 100644 web/src/core/config.js diff --git a/web/src/core/config.js b/web/src/core/config.js new file mode 100644 index 00000000..08d58028 --- /dev/null +++ b/web/src/core/config.js @@ -0,0 +1,15 @@ +/* +* 网站配置文件 +* */ + + + +const config ={ + + appName : 'Gin-Vue-Admin', + + appLogo : 'https://www.gin-vue-admin.com/img/logo.png' + +} + +export default config \ No newline at end of file diff --git a/web/src/core/gin-vue-admin.js b/web/src/core/gin-vue-admin.js index 2b5f178c..5163ebfd 100644 --- a/web/src/core/gin-vue-admin.js +++ b/web/src/core/gin-vue-admin.js @@ -10,6 +10,10 @@ import APlayer from '@moefe/vue-aplayer' import '../../node_modules/timeline-vuejs/dist/timeline-vuejs.css' // 路由守卫 import Bus from '@/utils/bus' +//加载网站配置文件夹 +import config from './config' +Vue.prototype.$GIN_VUE_ADMIN = config +console.log(config) Vue.use(Bus) Vue.use(APlayer, { defaultCover: 'https://github.com/u3u.png', diff --git a/web/src/utils/page.js b/web/src/utils/page.js index 8c07b9fd..42e4a65f 100644 --- a/web/src/utils/page.js +++ b/web/src/utils/page.js @@ -1,8 +1,7 @@ -const title = 'GIN-VUE-ADMIN' - +import config from '@/core/config' export default function getPageTitle(pageTitle) { if (pageTitle) { - return `${pageTitle} - ${title}` + return `${pageTitle} - ${config.appName}` } - return `${title}` + return `${config.appName}` } diff --git a/web/src/view/layout/bottomInfo/bottomInfo.vue b/web/src/view/layout/bottomInfo/bottomInfo.vue index 64f1488f..9be35600 100644 --- a/web/src/view/layout/bottomInfo/bottomInfo.vue +++ b/web/src/view/layout/bottomInfo/bottomInfo.vue @@ -3,7 +3,7 @@
Powered by - gin-vue-admin + {{$GIN_VUE_ADMIN.appName}} Copyright diff --git a/web/src/view/layout/index.vue b/web/src/view/layout/index.vue index 1908e5a9..7251a41e 100644 --- a/web/src/view/layout/index.vue +++ b/web/src/view/layout/index.vue @@ -4,8 +4,8 @@
- -

Gin-Vue-Admin

+ +

{{ $GIN_VUE_ADMIN.appName }}

@@ -39,7 +39,8 @@ export default { data() { return { value: '', - show: false + show: false, + reload: false } }, computed: { @@ -58,7 +59,33 @@ export default { this.$nextTick(() => { this.$refs['search-input'].focus() }) + }, + handleReload() { + this.reload = true + this.$bus.$emit('reload') + setTimeout(() => { + this.reload = false + }, 500) } } } + diff --git a/web/src/view/login/index.vue b/web/src/view/login/index.vue index 87bc1f0e..bf0f810d 100644 --- a/web/src/view/login/index.vue +++ b/web/src/view/login/index.vue @@ -3,7 +3,7 @@