From 5e3b290ff5b97c7d75f148899cc43c527fecfcb7 Mon Sep 17 00:00:00 2001 From: Ming Sun Date: Tue, 5 May 2020 22:08:14 +0800 Subject: [PATCH] add lazyload & infinite-loading --- .vscode/settings.json | 1 + package.json | 2 + src/components/app.vue | 5 +- src/components/discounts.vue | 129 ++++++++++++++++++++++++----------- src/components/report.vue | 2 +- src/content_script.js | 1 + src/popup.js | 3 + static/style/popup.css | 10 ++- static/style/style.css | 7 ++ yarn.lock | 10 +++ 10 files changed, 120 insertions(+), 50 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 56d7d3c..30b6e07 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "cSpell.words": [ + "Lazyload", "fliggy", "metatit", "tmall" diff --git a/package.json b/package.json index e0bc66d..656dbbd 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "microtip": "^0.2.2", "parcel-bundler": "^1.12.3", "vue": "^2.6.11", + "vue-infinite-loading": "^2.4.5", + "vue-lazyload": "^1.3.3", "weui": "^2.3.0", "weui.js": "^1.2.1", "zepto": "^1.2.0" diff --git a/src/components/app.vue b/src/components/app.vue index 11c92b9..a8a2634 100644 --- a/src/components/app.vue +++ b/src/components/app.vue @@ -626,11 +626,12 @@ export default { display: flex; justify-content: space-between; } -.messages, -.discounts { +.messages, .discounts { overflow: hidden; height: 515px; + background: #f9f9f9; } + .message-items { margin-top: 10px; height: 504px; diff --git a/src/components/discounts.vue b/src/components/discounts.vue index b759f81..e9eb2d3 100644 --- a/src/components/discounts.vue +++ b/src/components/discounts.vue @@ -27,16 +27,16 @@
{{selectTag.name}}
- 取消 - 取消 +