diff --git a/admin/src/App.vue b/admin/src/App.vue
index b8db038..866b4d9 100644
--- a/admin/src/App.vue
+++ b/admin/src/App.vue
@@ -94,7 +94,6 @@
@@ -249,7 +248,7 @@
let move = e.targetTouches[0].clientY - this.startY;
if (move > 0) {
e.preventDefault();
- this.moveDistance = Math.pow(move, 0.8);
+ this.moveDistance = Math.pow(move, 0.7);
if (this.moveDistance > 50) {
if (this.moveState === 1) return;
this.moveState = 1;
@@ -265,9 +264,9 @@
//下拉刷新逻辑
{
if (this.moveDistance > 50) {
- this.moveState = 2;
this.moveDistance = 50;
- window.location.reload();
+ this.$EventBus.$emit(glob.eventNames.globRefreshEventName);
+ this.moveState = 0;
} else {
this.moveDistance = 0;
}
diff --git a/admin/src/assets/js/glob.js b/admin/src/assets/js/glob.js
index fcc2eeb..407baff 100644
--- a/admin/src/assets/js/glob.js
+++ b/admin/src/assets/js/glob.js
@@ -8,6 +8,8 @@ const glob = {
eventNames: {
//全局搜索事件名称
globSearchEventName: 'globSearch',
+ //全局刷新事件名称
+ globRefreshEventName: 'globRefresh',
},
//初始化
inti() {
diff --git a/admin/src/components/artice/main.vue b/admin/src/components/artice/main.vue
index c609267..dedd4b9 100644
--- a/admin/src/components/artice/main.vue
+++ b/admin/src/components/artice/main.vue
@@ -23,11 +23,17 @@
},
activated() {
this.$EventBus.$on(glob.eventNames.globSearchEventName, this.globSearchHandle);
+ this.$EventBus.$on(glob.eventNames.globRefreshEventName, this.globRefreshHandle);
},
deactivated() {
this.$EventBus.$off(glob.eventNames.globSearchEventName);
+ this.$EventBus.$off(glob.eventNames.globRefreshEventName);
},
methods: {
+ //全局刷新
+ globRefreshHandle() {
+ window.location.reload();
+ },
//全局搜索事件处理器
globSearchHandle(searchText) {
console.log(searchText);
diff --git a/admin/src/components/home.vue b/admin/src/components/home.vue
index 104cd3e..5ce89b8 100644
--- a/admin/src/components/home.vue
+++ b/admin/src/components/home.vue
@@ -7,8 +7,22 @@