diff --git a/src/components/FeedCard/FeedCard.vue b/src/components/FeedCard/FeedCard.vue index 1059e999..8433b9e5 100644 --- a/src/components/FeedCard/FeedCard.vue +++ b/src/components/FeedCard/FeedCard.vue @@ -15,10 +15,12 @@ {{ time | time2tips }} -
-
- - 付费节点,购买后方可查看原文详情 +
+
+

{ +export default Vue => { const listenList = []; const imageFileCatch = []; const imageCatcheList = []; @@ -46,10 +46,11 @@ export default (Vue, options = {}) => { ); }; const isCanShow = item => { - const { el, src, file, q = 40 } = item; + const { el, file, q = 40 } = item; const isIMG = el.nodeName === "IMG"; if (checkInView(el)) { let image = new Image(); + el.classList.add("loading"); http.get(`/files/${file}?q=${q}&json=true`).then(({ data: { url } }) => { image.src = url; image.onload = () => { @@ -58,9 +59,11 @@ export default (Vue, options = {}) => { imageFileCatch.push(file); imageCatcheList.push(url); image = null; + el.classList.remove("loading"); }; image.onerror = () => { listenList.remove(item); + el.classList.remove("loading"); }; }); return true; diff --git a/src/components/common/svgIcon.vue b/src/components/common/svgIcon.vue index 90ad64f5..7467f3a7 100644 --- a/src/components/common/svgIcon.vue +++ b/src/components/common/svgIcon.vue @@ -51,6 +51,12 @@ + + + + + + diff --git a/src/components/loadMore.vue b/src/components/loadMore.vue index 2d56dfa8..5df7a258 100644 --- a/src/components/loadMore.vue +++ b/src/components/loadMore.vue @@ -1,6 +1,6 @@