Authored by yyq

Merge branch 'feature/scroll'

... ... @@ -76,6 +76,7 @@ export default {
overflow: hidden;
display: flex;
align-items: stretch;
box-sizing: border-box;
&.theme-white {
background-color: #fff;
... ...
... ... @@ -2,7 +2,10 @@
<Layout class="author-page">
<LayoutHeader slot='header' theme="white">
<div ref="headerAuthor" class="header-author">
<div class="h-name flex">{{baseData.nickName}}</div>
<div class="h-name flex">
<span class="h-name-b">{{baseData.nickName}}</span>
<span v-if="baseData.sex" class="iconfont icon-women author-sex-icon" :class="`icon-${baseData.sex}`"></span>
</div>
<div class="h-more">
<div class="flex">
<WidgetAvatar v-if="baseData.headIco" class="h-headico" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
... ... @@ -13,45 +16,45 @@
</div>
</div>
</LayoutHeader>
<cube-sticky :pos="scrollY">
<cube-scroll
class="main-container"
:scroll-events="scrollEvents"
@scroll="scrollHandler">
<div ref="authorProfile" class="author-profile">
<span class="avatar-box">
<WidgetAvatar v-if="baseData.headIco" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
</span>
<div class="author-section">
<ul class="author-fans">
<li v-for="(item, key) in fansList" :key="key">
<span class="num">{{baseData[key] || 0}}</span>
<p class="name"><span>{{item}}</span></p>
</li>
</ul>
<div class="operate-wrap">
<a v-if="isOwner" class="operate-btn btn-user-edit" href="//m.yohobuy.com/home/mydetails?openby:yohobuy={'action':'go.mineinfo'}">编辑个人资料</a>
<WidgetFollow v-else class="operate-btn" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</div>
</div>
<p v-if="baseData.signature" class="author-desc">{{baseData.signature}}</p>
<cube-sticky-ele ele-key="11">
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
</cube-sticky-ele>
<div class="contant-list">
<WaterFall class="pannel-wrap" :list="list" :pos="scrollY" :query="linkQueryString"></WaterFall>
</div>
<div v-if="loadStatus" class="loading">
<Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
<p v-else class="load-text">没有更多了</p>
<div class="fixed-tab">
<FavTabBlock v-if="tabFixed" :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
</div>
<cube-scroll
class="main-container"
ref="scroll"
:scroll-events="['scroll', 'scroll-end']"
@scroll="onScrollHandle"
@scroll-end="onScrollEndHandle">
<div ref="authorProfile" class="author-profile">
<span class="avatar-box">
<WidgetAvatar v-if="baseData.headIco" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
</span>
<div class="author-section">
<ul class="author-fans">
<li v-for="(item, key) in fansList" :key="key">
<span class="num">{{baseData[key] || 0}}</span>
<p class="name"><span>{{item}}</span></p>
</li>
</ul>
<div class="operate-wrap">
<router-link v-if="isOwner" class="operate-btn btn-user-edit" :to="mineInfoUrl">编辑个人资料</router-link>
<WidgetFollow v-else class="operate-btn" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</cube-scroll>
<template slot="fixed" slot-scope="props">
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
</template>
</cube-sticky>
</div>
</div>
<p v-if="baseData.signature" class="author-desc">{{baseData.signature}}</p>
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
<div ref="contantList" class="contant-list">
<WaterFall class="pannel-wrap" :list="list" :query="linkQueryString"></WaterFall>
</div>
<div v-if="loadStatus" class="loading">
<Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
<p v-else class="load-text">没有更多了</p>
</div>
</cube-scroll>
</Layout>
</template>
... ... @@ -60,7 +63,7 @@
import {Scroll, Sticky, Loading} from 'cube-ui';
import CubeStickyEle from 'cube-ui/src/components/sticky/sticky-ele.vue';
import FavTabBlock from './components/fav-tab-block';
import WaterFall from './components/water-fall';
import WaterFall from './components/scroll-reveal';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('user');
... ... @@ -69,9 +72,9 @@
name: 'userpage',
data() {
return {
autherInfo: {},
scrollEvents: ['scroll'],
scrollY: 0,
mineInfoUrl: '//m.yohobuy.com/home/mydetails?openby:yohobuy={"action":"go.mineinfo"}',
autherInfo: {},
fansList: {
attCount: '关注',
fansCount: '粉丝',
... ... @@ -80,6 +83,7 @@
baseData: {},
isAttention: false,
isOwner: false,
tabFixed: false,
tabsNum: [0, 0],
activeIndex: 0,
fetchInfo: {},
... ... @@ -89,20 +93,6 @@
mounted() {
let $dom = this.$refs.headerAuthor;
if (!this.$route.params.id) {
try {
this.$sdk.getUser().then(res => {
if (get(res, 'uid') > 0) {
this.init({id: res.uid})
} else {
this.$sdk.goLogin();
}
});
} catch(e){
console.log(e);
}
}
if ($dom.offsetHeight) {
this._animeDuration = 300;
import('animejs').then(({default: anime}) => {
... ... @@ -117,23 +107,66 @@
}
},
activated() {
console.log('activated');
if (this.$route.params.id !== this.autherInfo.authorUid) {
if (this.$route.params.id && this.$route.params.id !== this.autherInfo.authorUid) {
this.init(this.$route.params);
}
},
beforeRouteUpdate(to, from, next) {
console.log('beforeRouteUpdate');
if (this.$route.params.id !== to.params.labelId) {
if (this.$route.params.id !== to.params.authorUid) {
this.init(to.params);
}
next();
},
watch: {
scrollY(top) {
computed: {
list() {
return get(this.fetchInfo, `${this.activeIndex}.list`) || [];
},
linkQueryString() {
return assign({}, this.autherInfo, {
type: ['publish', 'fav'][this.activeIndex]
})
}
},
methods: {
...mapActions(['autherBaseInfo', 'autherAritcleNum', 'autherPubList', 'autherFavList', 'autherMineBaseInfo', 'autherMineAritcleNum', 'autherMinePubList', 'autherMineFavList']),
init(params) {
params = params || {};
this._apiNamePre = 'auther';
this.isOwner = !params.id;
this.tabFixed = false;
this.tabsNum = [0, 0];
this.activeIndex = 0;
this.fetchInfo = {};
if (!params.id) {
this._apiNamePre += 'Mine';
try {
this.$sdk.getUser().then(res => {
if (get(res, 'uid') > 0) {
this.fetchData(res.uid, 1);
} else {
this.$sdk.goLogin();
}
});
} catch(e){
console.log(e);
}
} else {
this.fetchData(params.id, params.type || 1);
}
},
fetchData(authorUid, authorType) {
this.autherInfo = {authorUid, authorType};
this.fetchBaseInfo();
this.fetchList();
},
onScrollHandle({y}) {
this.scrollY = -y;
let animePlayed = false;
if (top > this.$refs.authorProfile.offsetHeight) {
if (this.scrollY > this.$refs.authorProfile.offsetHeight) {
animePlayed = true;
}
... ... @@ -141,6 +174,8 @@
return;
}
this.tabFixed = animePlayed;
let start;
let self = this;
... ... @@ -161,60 +196,33 @@
window.requestAnimationFrame(step);
this._animePlayed = animePlayed;
}
},
computed: {
list() {
return get(this.fetchInfo, `${this.activeIndex}.list`) || [];
},
linkQueryString() {
return assign({}, this.autherInfo, {
type: ['publish', 'fav'][this.activeIndex]
})
},
linkTpl() {
return `/grass/article/{articleId}?authorUid=${this.autherInfo.authorUid}&authorType=${this.autherInfo.authorType}&type=${['publish', 'fav'][this.activeIndex]}`;
},
waterFallType() {
return ['publish', 'fav'][this.activeIndex];
}
},
methods: {
...mapActions(['autherBaseInfo', 'autherAritcleNum', 'autherPubList', 'autherFavList', 'autherMineBaseInfo', 'autherMineAritcleNum', 'autherMinePubList', 'autherMineFavList']),
init(params) {
params = params || {};
this._apiNamePre = 'auther';
if (!params.id) {
this._apiNamePre += 'Mine';
}
this.autherInfo = {
authorUid: params.id,
authorType: params.type || 1
};
if (!params.id) {
return;
}
this.fetchBaseInfo();
this.fetchList();
},
scrollHandler({ y }) {
this.scrollY = -y;
if (this.scrollY + 1000 > this.$el.offsetHeight) {
onScrollEndHandle(scroll) {
if (1000 - scroll.y > this.$refs.contantList.offsetHeight) {
this._listTimer && clearTimeout(this._listTimer);
this._listTimer = setTimeout(() => {
this.fetchList();
}, 100);
}, 50);
}
},
changeTab(index) {
if (this.activeIndex !== index) {
this.activeIndex = index;
let info = this.fetchInfo[index] || {};
info.page = 1;
info.lastedTime = '';
this.fetchList();
let top = this.$refs.authorProfile.offsetHeight;
if (this.scrollY > top) {
this.$nextTick(() => {
this.$refs.scroll.scrollTo(0, -top, 0);
});
}
}
},
fetchBaseInfo() {
... ... @@ -243,6 +251,7 @@
info.page = info.page || 1;
if (info.page > info.totalPage) {
this.loadStatus = 2;
return;
}
... ... @@ -257,6 +266,7 @@
if (this[syncServiceName]) {
this.syncing = true;
result = await this[syncServiceName](assign({
limit: 20,
page: info.page,
lastedTime: info.lastedTime || ''
}, this.autherInfo));
... ... @@ -264,6 +274,10 @@
}
if (result.code === 200) {
if (info.page === 1) {
info.list = [];
}
info.list = (info.list || []).concat(result.data.list || []);
info.page++;
info.totalPage = result.data.totalPage;
... ... @@ -279,10 +293,13 @@
} else {
this.loadStatus = 1;
}
this.fetchInfo[this.activeIndex] = info;
this.fetchInfo = {...this.fetchInfo};
setTimeout(() => {
this.$refs.scroll.refresh();
}, 100);
},
goUserInfoEdit() {
if (this.$yoho.isYohoBuy) {
... ... @@ -311,6 +328,12 @@
color: #4a4a4a;
}
.fixed-tab {
width: 100%;
position: absolute;
z-index: 2;
}
.header-author {
position: absolute;
left: 0;
... ... @@ -328,6 +351,28 @@
.h-name {
font-size: 36px;
font-weight: 500;
.h-name-b {
max-width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
.author-sex-icon {
font-size: 28px;
padding-left: 10px;
padding-right: 0;
}
.icon-man {
color: #96d8f3;
}
.icon-women {
color: #f7c3e1;
}
}
.h-more {
... ... @@ -361,6 +406,7 @@
padding: 24px 30px;
display: flex;
justify-content: space-between;
overflow: hidden;
.avatar-box {
width: 150px;
... ... @@ -425,9 +471,11 @@
.operate-btn {
width: calc(100% - 20px);
height: 50px;
font-size: 23px;
line-height: 48px;
line-height: 50px;
display: inline-block;
box-sizing: border-box;
}
.btn-user-edit {
... ...
<template>
<div class="author-page">
<LayoutHeader class="fix-header" theme="white">
<div ref="headerAuthor" class="header-author">
<div class="h-name flex">{{baseData.nickName}}</div>
<div class="h-more">
<div class="flex">
<WidgetAvatar v-if="baseData.headIco" class="h-headico" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
</div>
<div v-if="!isOwner" class="h-follow flex">
<WidgetFollow class="widget-follow" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</div>
</div>
</LayoutHeader>
<div class="fixed-tab" :class="`${tabFixed ? '' : 'hide'}`">
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
</div>
<div ref="mainContent" class="main-content">
<div ref="authorProfile" class="author-profile">
<span class="avatar-box">
<WidgetAvatar v-if="baseData.headIco" :src="baseData.headIco" :width="100" :height="100"></WidgetAvatar>
</span>
<div class="author-section">
<ul class="author-fans">
<li v-for="(item, key) in fansList" :key="key">
<span class="num">{{baseData[key] || 0}}</span>
<p class="name"><span>{{item}}</span></p>
</li>
</ul>
<div class="operate-wrap">
<router-link v-if="isOwner" class="operate-btn btn-user-edit" to="//m.yohobuy.com/home/mydetails?openby:yohobuy={'action':'go.mineinfo'}">编辑个人资料</router-link>
<WidgetFollow v-else class="operate-btn" :author-uid="autherInfo.authorUid" :follow="isAttention" @on-follow="follow => onFollow(follow)"></WidgetFollow>
</div>
</div>
</div>
<p v-if="baseData.signature" class="author-desc">{{baseData.signature}}</p>
<FavTabBlock :tabs-num="tabsNum" :active-index="activeIndex" @change="changeTab"></FavTabBlock>
<div class="contant-list">
<WaterFall class="pannel-wrap" :list="list" :pos="scrollY" :query="linkQueryString"></WaterFall>
</div>
<div v-if="loadStatus" class="loading">
<Loading v-if="loadStatus === 1" class="load-icon" :size="20"></Loading>
<p v-else class="load-text">没有更多了</p>
</div>
</div>
</div>
</template>
<script>
import {assign, get} from 'lodash';
import {Scroll, Sticky, Loading} from 'cube-ui';
import CubeStickyEle from 'cube-ui/src/components/sticky/sticky-ele.vue';
import FavTabBlock from './components/fav-tab-block';
import WaterFall from './components/scroll-reveal';
import {createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('user');
export default {
name: 'userpage',
data() {
return {
autherInfo: {},
tabFixed: false,
scrollEvents: ['scroll'],
scrollY: 0,
fansList: {
attCount: '关注',
fansCount: '粉丝',
praiseAndfavorite: '获赞与收藏'
},
baseData: {},
isAttention: false,
isOwner: false,
tabsNum: [0, 0],
activeIndex: 0,
fetchInfo: {},
loadStatus: ''
}
},
mounted() {
let $dom = this.$refs.headerAuthor;
if (!this.$route.params.id) {
try {
this.$sdk.getUser().then(res => {
if (get(res, 'uid') > 0) {
this.$route.params.id = res.uid;
this.autherInfo = assign({}, this.autherInfo, {
authorUid: res.uid
});
} else {
this.$sdk.goLogin();
}
});
} catch(e){
console.log(e);
}
}
if ($dom.offsetHeight) {
this._animeDuration = 300;
import('animejs').then(({default: anime}) => {
this._animeEl = anime({
targets: $dom,
translateY: -$dom.offsetHeight,
easing: 'easeInOutSine',
duration: this._animeDuration,
autoplay: false
});
});
}
this.$el.onscroll = (e) => {
console.log(this.$el.scrollTop);
this.scrollHandler(this.$el.scrollTop);
}
},
activated() {
if (this.$route.params.id !== this.autherInfo.authorUid) {
this.init(this.$route.params);
}
},
beforeRouteUpdate(to, from, next) {
if (this.$route.params.id !== to.params.labelId) {
this.init(to.params);
}
next();
},
computed: {
list() {
return get(this.fetchInfo, `${this.activeIndex}.list`) || [];
},
linkQueryString() {
return assign({}, this.autherInfo, {
type: ['publish', 'fav'][this.activeIndex]
})
},
linkTpl() {
return `/grass/article/{articleId}?authorUid=${this.autherInfo.authorUid}&authorType=${this.autherInfo.authorType}&type=${['publish', 'fav'][this.activeIndex]}`;
},
waterFallType() {
return ['publish', 'fav'][this.activeIndex];
}
},
methods: {
...mapActions(['autherBaseInfo', 'autherAritcleNum', 'autherPubList', 'autherFavList', 'autherMineBaseInfo', 'autherMineAritcleNum', 'autherMinePubList', 'autherMineFavList']),
init(params) {
params = params || {};
this._apiNamePre = 'auther';
if (!params.id) {
this._apiNamePre += 'Mine';
}
this.autherInfo = {
authorUid: params.id,
authorType: params.type || 1
};
this.fetchBaseInfo();
this.fetchList();
},
scrollHandler(y) {
this.scrollY = y;
this.calcAnimate(y);
if (this.scrollY + 1000 > this.$refs.mainContent.offsetHeight) {
this._listTimer && clearTimeout(this._listTimer);
this._listTimer = setTimeout(() => {
this.fetchList();
}, 200);
}
},
calcAnimate(top) {
let animePlayed = false;
if (top > this.$refs.authorProfile.offsetHeight) {
animePlayed = true;
}
if (!this._animePlayed === !animePlayed) {
return;
}
this.tabFixed = animePlayed;
let start;
let self = this;
function step(timestamp) {
if (!start) {
start = timestamp
};
let progress = Math.floor(timestamp - start);
self._animeEl.seek(animePlayed ? progress : self._animeDuration - progress);
if (progress < self._animeDuration) {
window.requestAnimationFrame(step);
}
};
window.requestAnimationFrame(step);
this._animePlayed = animePlayed;
},
changeTab(index) {
if (this.activeIndex !== index) {
this.activeIndex = index;
let info = this.fetchInfo[index] || {};
info.page = 1;
info.lastedTime = '';
this.$refs.mainContent.scrollTop = this.$refs.authorProfile.offsetHeight;
this.fetchList();
}
},
fetchBaseInfo() {
this[this._apiNamePre + 'BaseInfo'](this.autherInfo).then(res => {
if (res.code === 200) {
this.baseData = res.data;
this.isOwner = +res.data.userType === 1;
this.isAttention = res.data.hasAttention === 'Y';
}
});
this[this._apiNamePre + 'AritcleNum'](this.autherInfo).then(res => {
this.tabsNum = [get(res, 'data.articleCount'), get(res, 'data.favoriteCount')];
});
},
async fetchList() {
this.fetchInfo = this.fetchInfo || [];
if (this.syncing) {
return;
}
let info = this.fetchInfo[this.activeIndex] || {};
let result;
info.page = info.page || 1;
if (info.page > info.totalPage) {
return;
}
let syncServiceName;
if (this.activeIndex === 1) {
syncServiceName = this._apiNamePre + 'FavList';
} else {
syncServiceName = this._apiNamePre + 'PubList';
}
if (this[syncServiceName]) {
this.syncing = true;
result = await this[syncServiceName](assign({
limit: 20,
page: info.page,
lastedTime: info.lastedTime || ''
}, this.autherInfo));
this.syncing = false;
}
if (result.code === 200) {
info.list = (info.list || []).concat(result.data.list || []);
info.page++;
info.totalPage = result.data.totalPage;
info.lastedTime = result.data.lastedTime;
if (info.list.length) {
info.list[0]._type = `${info.list[0].articleId}_${this.activeIndex}`;
}
}
if (info.page > info.totalPage) {
this.loadStatus = 2;
} else {
this.loadStatus = 1;
}
this.fetchInfo[this.activeIndex] = info;
this.fetchInfo = {...this.fetchInfo};
},
goUserInfoEdit() {
if (this.$yoho.isYohoBuy) {
this.$yoho.goMineInfo();
}
},
onFollow(follow) {
this.isAttention = follow;
}
},
components: {
CubeScroll: Scroll,
CubeSticky: Sticky,
CubeStickyEle,
Loading,
FavTabBlock,
WaterFall
}
};
</script>
<style lang="scss">
.author-page {
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
box-sizing: border-box;
color: #4a4a4a;
padding-top: 44PX;
overflow: scroll;
}
.fix-header {
position: fixed;
top: 0;
z-index: 2;
}
.hide {
display: none;
}
.fixed-tab {
width: 100%;
position: fixed;
z-index: 2;
}
.header-author {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
.flex {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.h-name {
font-size: 36px;
font-weight: 500;
}
.h-more {
width: 100%;
height: 100%;
position: absolute;
top: 100%;
left: 0;
}
.h-headico {
width: 60px;
height: 60px;
}
.h-follow {
position: absolute;
top: 0;
right: -130px;
}
}
.header-share {
margin-right: 26px;
color: #222;
font-weight: bold;
}
.author-profile {
padding: 24px 30px;
display: flex;
justify-content: space-between;
overflow: hidden;
.avatar-box {
width: 150px;
height: 150px;
overflow: hidden;
border-radius: 50%;
> img {
width: 100%;
height: 100%;
display: block;
}
}
}
.author-section {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.author-fans {
display: flex;
justify-content: flex-end;
padding-top: 4px;
padding-right: 54px;
li {
margin-left: 140px;
position: relative;
&:first-child {
margin-left: 0;
}
.num {
font-size: 28px;
font-weight: 500;
padding-bottom: 6px;
display: block;
}
.name {
position: absolute;
font-size: 20px;
font-weight: 300;
color: #9b9b9b;
margin-left: 50%;
word-break: keep-all;
white-space: nowrap;
> * {
position: relative;
left: -50%;
}
}
}
}
.operate-wrap {
text-align: right;
.operate-btn {
width: calc(100% - 20px);
font-size: 23px;
line-height: 48px;
display: inline-block;
}
.btn-user-edit {
color: #222;
border: 1px solid #4a4a4a;
border-radius: 8px;
text-align: center;
}
}
.author-desc {
margin: 20px 30px;
font-size: 24px;
font-weight: 300;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.loading {
padding: 20px 0;
.load-icon > span {
margin: auto;
}
.load-text {
text-align: center;
}
}
</style>
... ...
<template>
<div class="wf-item" :class="temporary ? 'wf-temp' : ''">
<div v-if="temporary"></div>
<div v-else class="wf-item-mid">
<div class="layer-image" @click="onClick" :style="`height: ${data.blockWidth * data.scale}px`">
<ImageFormat :mode="1" :src="data.coverImage" :width="imgWidth" :height="Math.floor(data.scale * imgWidth)"></ImageFormat>
</div>
<div v-if="data.content" class="description" @click="onClick">
<p>{{data.content}}</p>
</div>
<div class="attribution">
<div class="auther" @click="onClick">
<span class="avatar">
<WidgetAvatar :src="data.authorHeadIco" :width="70" :height="70"></WidgetAvatar>
</span>
<span class="name">{{data.authorName}}</span>
</div>
<div class="fav">
<WidgetFav :articleId="data.articleId" :num="data.praiseCount" :option="favOption"></WidgetFav>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
imgWidth: 350,
favOption: {
iconFontSize: 26,
textAlign: 'normal'
}
}
},
props: {
data: {
type: Object,
default() {
return {};
}
},
temporary: {
type: Boolean,
default: false
}
},
methods: {
onClick() {
this.$emit('click', this.data);
}
}
};
</script>
<style lang="css">
.wf-item {
width: 100%;
padding: 10px;
font-size: 24px;
.wf-item-mid {
border-radius: 8px;
box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.3);
overflow: hidden;
}
.layer-image {
background-color: #f4f4f4;
min-height: 100px;
> img {
width: 100%;
height: 100%;
display: block;
}
}
.description {
line-height: 1.5;
padding: 10px 20px;
> p {
word-break: break-all;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.attribution {
display: flex;
justify-content: space-between;
padding: 20px;
}
.avatar {
width: 60px;
height: 60px;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
overflow: hidden;
> img {
width: 100%;
height: 100%;
}
}
.name {
max-width: 170px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fav {
line-height: 60px;
}
}
.wf-temp {
height: 0;
overflow: hidden;
position: absolute;
}
</style>
... ...
<template>
<div class="sr-list">
<div class="sr-col" v-for="(col, index) in colsList" :key="index" :style="`width:${100/cols}%`">
<template v-if="col.length">
<ArticleItem v-for="item in col" :key="item.articleId" class="sr-item" :data="item" @click="toArticle"></ArticleItem>
</template>
<ArticleItem class="sr-temp" :temporary="true"></ArticleItem>
</div>
</div>
</template>
<script>
import ArticleItem from './author-article-item';
import {assign, get, forEach, fill} from 'lodash';
import {getArticleImageSize} from 'utils/image-handler';
export default {
data() {
return {
colsList: [],
loadedIndex: 0,
colsHeight: []
}
},
props: {
list: {
type: Array,
default: []
},
cols: {
type: Number,
default: 2
},
query: Object
},
created() {
this.reset();
},
mounted() {
this.$cols = this.$el.getElementsByClassName('sr-col');
this.getCoverImgWidth();
},
watch: {
list(newList, oldList) {
if (oldList.length > newList.length ||
get(oldList, '[0]._type') !== get(newList, '[0]._type')) {
this.reset();
}
this.$nextTick(() => {
this.calcListLayout();
});
}
},
methods: {
getCoverImgWidth() {
let imgWidth = this.$el.offsetWidth / this.cols;
let $item = this.$el.getElementsByClassName('sr-temp');
if ($item && $item.length) {
let _w = $item[0].offsetWidth;
let $img = $item[0].children;
(_w > 0) && (imgWidth = _w);
if ($img && $img.length) {
_w = $img[0].offsetWidth;
(_w > 0) && (imgWidth = _w);
}
}
this.imgBlockWidth = imgWidth;
},
calcListLayout(single) {
this.loadedIndex = this.loadedIndex || 0;
let num = this.list.length - this.loadedIndex;
if (num <= 0) {
return;
}
forEach(this.$cols, (col, index) => {
this.colsHeight[index] = col.offsetHeight;
});
let minHeight = Math.min.apply(null, this.colsHeight);
let minIndex = this.colsHeight.indexOf(minHeight);
let end = 1;
if (!single) {
end = Math.max.apply(null, [1, num - Math.floor(this.cols * 2)]);
}
for (let i = 0; i < end; i++) {
let item = this.list[this.loadedIndex + i];
if (item) {
let index = (minIndex + i) % this.cols;
this.colsList[index] = this.colsList[index] || [];
this.colsList[index].push(this.clacCoverSize(item));
}
}
this.colsList = [...this.colsList];
this.loadedIndex += end;
this.$nextTick(() => {
this.calcListLayout(true);
});
},
clacCoverSize(item) {
let {width, height} = getArticleImageSize({
width: item.imageWidth,
height: item.imageHeight
});
return assign(item, {
imageWidth: width,
imageHeight: height,
scale: height / width,
blockWidth: this.imgBlockWidth
});
},
reset() {
this.loadedIndex = 0;
let list = [];
for (let i = 0; i < this.cols; i++) {
list[i] = [];
}
this.colsList = list;
},
toArticle({articleId}) {
this.$router.push({
name: 'article',
params: {id: articleId},
query: this.query
});
}
},
components: {
ArticleItem
}
};
</script>
<style lang="css">
.sr-list {
padding: 0 20px;
display: flex;
align-items: flex-start;
.sr-col {
flex-grow: 1;
position: relative;
}
}
</style>
... ...
... ... @@ -14,5 +14,14 @@ export default [{
component: () => import(/* webpackChunkName: "author" */ './author'),
meta: {
keepAlive: true
},
},
{
path: '/author2/:type/:id',
alias: '/author2/:type/:id',
name: 'author2',
component: () => import(/* webpackChunkName: "author2" */ './author2'),
meta: {
keepAlive: true
}
}];
... ...
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1550210620344'); /* IE9 */
src: url('iconfont.eot?t=1550210620344#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAroAAsAAAAAFDQAAAqZAAEAAAAAAAA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bs8y2c6SgZpEUle2QqllJZ9f0dAMSMhuYMVKRoG0DiZo+SdJ2zjLb3iMFQ+9IUTsgUnWOiS9ZMxGaOHFbGJWgBf2BYKg4L0NOSfMb+kdSXNTFwf/INZTC0PbV6isW5GMcUZ9+FHHgmDJc1N0wJYKZ6Y5G2klkPnedazuyNZQXp8VjVBJGt0B/VIOh4haWU+3zb+gfSXFPvyvVf+Qa1g8Grd7B8ioWp36vpW19+pGI5MDvypTBRSRM1kxgbt/pjkZa0x7yfNbJeM5VbM+fkH8HInx8A5q3YhYUGoPF4QlEEpmCUGn0x/P1/nzbZmIcNj896iahky0HP8n6q8rB37FxIaVtnRTjKdyx0Yns1rOq9aTUvR6bKsIx0BT54x25NYkqbtAGWefqD75mx1YvyljWWVEhyi8WAAA=') format('woff2'),
url('iconfont.woff?t=1550210620344') format('woff'),
url('iconfont.ttf?t=1550210620344') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1550210620344#iconfont') format('svg'); /* iOS 4.1- */
src: url('iconfont.eot?t=1550836850597'); /* IE9 */
src: url('iconfont.eot?t=1550836850597#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAsYAAsAAAAAFDQAAArIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFMgqXbJMeATYCJANUCywABCAFhG0HgU4b8BAjEeaMtJbsrwpsY5bQ79BIB6taHNFFyU2dVDChY9AX5AbzEIi4PYbLDzF+iltgz4enbfX+/AGmiDQAK4DNxmisvNLtwm3cxu1ys5O71qsCBZnqqO8CQMsmvvny3jIfl5nfrj5U8bQwghrHlTLXzPYWlExhLYK3N10uW741xfiPwn2V1OqqZObKJpdPuZvNfnU0YatCOIR5jUNIEI6hAQIo/vcAQADw/1trVUySDp64Xmb3dHY/8vG9w2w5xC2KhkwiinhbCEkqDRqZUHiUHIGI1ZRZYsK5ELVX0t4OBICAEDhAklNdReD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IjemIgRmJCaUCKMCgONmNfNCCohEomVFgErurt2BHKmJJPAoR6sGMnNGlckhh4X1fqTo+iJ6Hma/L8/o4sRSb1UIRYUcF6WfXUGx5bsIErTVMLrkCBZAwAAAA=') format('woff2'),
url('iconfont.woff?t=1550836850597') format('woff'),
url('iconfont.ttf?t=1550836850597') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1550836850597#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -83,11 +83,11 @@
content: "\e7c3";
}
.icon-women:before {
.icon-man:before {
content: "\e7c4";
}
.icon-man:before {
.icon-women:before {
content: "\e7c5";
}
... ...
... ... @@ -71,10 +71,10 @@ Created by iconfont
<glyph glyph-name="msg-blod" unicode="&#59331;" d="M42.666667 392.704C42.666667 636.074667 253.44 832 512 832s469.333333-195.925333 469.333333-439.296c0-243.328-210.773333-439.253333-469.333333-439.253333-64.938667 0-128.085333 12.373333-186.453333 36.010666a276.394667 276.394667 0 0 1-13.013334-3.84c-13.098667-4.096-26.538667-8.789333-56.704-19.626666l-0.256-0.128c-35.626667-12.8-49.877333-17.792-65.152-22.442667a189.44 189.44 0 0 0-27.050666-6.613333c-6.784-1.024-12.842667-1.237333-19.712 0.042666-19.413333 3.584-36.992 18.56-36.992 43.733334 0 10.069333 2.304 18.133333 9.088 38.101333 2.901333 8.490667 16.213333 46.08 15.189333 43.136l2.645333 7.594667a636.16 636.16 0 0 1 14.549334 45.781333C80.512 192.76800000000003 42.666667 290.00533299999995 42.666667 392.704z m183.978666-346.538667l0.298667 0.085334a1544.106667 1544.106667 0 0 0 59.946667 20.778666c33.493333 10.581333 44.245333 12.842667 62.293333 5.034667a409.6 409.6 0 0 1 162.816-33.28c212.736 0 384 159.146667 384 353.92C896 587.52 724.736 746.666667 512 746.666667s-384-159.189333-384-353.962667c0-86.613333 33.877333-168.448 94.592-232.576 12.8-13.482667 14.336-26.282667 12.672-42.88a159.573333 159.573333 0 0 0-4.650667-23.978667c-3.541333-13.568-8.746667-29.866667-16.298666-51.541333l12.373333 4.437333zM298.666667 384m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM512 384m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0ZM725.333333 384m-64 0a64 64 0 1 1 128 0 64 64 0 1 1-128 0Z" horiz-adv-x="1024" />
<glyph glyph-name="women" unicode="&#59332;" d="M362.66666633 106.08639965999998a136.533333 136.533333 0 1 1 136.533334 236.475734 136.533333 136.533333 0 0 1-136.533334-236.475734z m-68.266666-118.237866A273.066667 273.066667 0 1 0 567.46666633 460.79999966a273.066667 273.066667 0 0 0-273.066666-472.951466zM707.07200033 566.06719966L626.58560033 426.66666666a68.266667 68.266667 0 1 0-118.237867 68.266667l82.944 143.633066-107.042133-28.672a68.266667 68.266667 0 0 0-35.293867 131.8912l263.714133 70.656a68.266667 68.266667 0 0 0 85.674667-59.528533l69.0176-257.570133a68.266667 68.266667 0 1 0-131.8912-35.362134l-28.398933 106.0864z" horiz-adv-x="1024" />
<glyph glyph-name="man" unicode="&#59332;" d="M362.66666633 84.75306633000002a136.533333 136.533333 0 1 1 136.533334 236.475734 136.533333 136.533333 0 0 1-136.533334-236.475734z m-68.266666-118.237866A273.066667 273.066667 0 1 0 567.46666633 439.46666633a273.066667 273.066667 0 0 0-273.066666-472.951466zM707.07200033 544.73386633L626.58560033 405.33333333a68.266667 68.266667 0 1 0-118.237867 68.266667l82.944 143.633066-107.042133-28.672a68.266667 68.266667 0 0 0-35.293867 131.8912l263.714133 70.656a68.266667 68.266667 0 0 0 85.674667-59.528533l69.0176-257.570133a68.266667 68.266667 0 1 0-131.8912-35.362134l-28.398933 106.0864z" horiz-adv-x="1024" />
<glyph glyph-name="man" unicode="&#59333;" d="M503.46666634 52.622221879999984a136.533333 136.533333 0 1 1 0 273.06666701 136.533333 136.533333 0 0 1 0-273.06666701z m0-136.53333299a273.066667 273.066667 0 1 0 0 546.13333299 273.066667 273.066667 0 0 0 0-546.13333299zM297.98400034 667.02222188m68.266666 0l273.066667 0q68.266667 0 68.266667-68.266666l0 0q0-68.266667-68.266667-68.26666699l-273.066667 0q-68.266667 0-68.266666 68.26666699l0 0q0 68.266667 68.266666 68.266666ZM571.73333334 871.82222188m0-68.266666l0-409.6q0-68.266667-68.266667-68.26666699l0 0q-68.266667 0-68.266666 68.26666699l0 409.6q0 68.266667 68.266666 68.266666l0 0q68.266667 0 68.266667-68.266666Z" horiz-adv-x="1024" />
<glyph glyph-name="women" unicode="&#59333;" d="M503.46666634 52.622221879999984a136.533333 136.533333 0 1 1 0 273.06666701 136.533333 136.533333 0 0 1 0-273.06666701z m0-136.53333299a273.066667 273.066667 0 1 0 0 546.13333299 273.066667 273.066667 0 0 0 0-546.13333299zM297.98400034 667.02222188m68.266666 0l273.066667 0q68.266667 0 68.266667-68.266666l0 0q0-68.266667-68.266667-68.26666699l-273.066667 0q-68.266667 0-68.266666 68.26666699l0 0q0 68.266667 68.266666 68.266666ZM571.73333334 871.82222188m0-68.266666l0-409.6q0-68.266667-68.266667-68.26666699l0 0q-68.266667 0-68.266666 68.26666699l0 409.6q0 68.266667 68.266666 68.266666l0 0q68.266667 0 68.266667-68.266666Z" horiz-adv-x="1024" />
<glyph glyph-name="tag" unicode="&#59307;" d="M784.404239 727.97187c-37.242909 13.682461-75.065872 15.815014-112.496445 6.482962a102.362552 102.362552 0 1 1 38.693045-96.971458c25.471215 2.047251 50.652403-7.335983 77.624935-27.791433 2.217855-1.671922 4.435711-3.292662 6.653566-4.879282l14.84257-174.306366c0.545934-6.517083-1.296592-13.051225-4.776919-18.510561l-0.699477-1.279532-267.456289-463.224671c-37.874144-65.614396-111.814028-93.815279-165.179039-63.004151L62.475278 62.93942800000002C9.127328 93.76761699999997-3.412085 171.90436499999998 34.462059 237.51876100000004l267.439229 463.22467 0.750658 1.245411a29.906926 29.906926 0 0 0 13.648341 13.392434L658.703024 876.039302c49.901744 23.406904 101.748377 0.631236 115.806168-50.874188 1.569559-5.732303 2.610245-11.686391 3.139118-17.811084l6.755929-79.38216zM612.059821 625.6604990000001c66.996291 57.783661 130.819342 61.246927 196.792007 11.22576 99.291676-75.321778 211.975786-44.988342 255.172783 29.821624a17.060425 17.060425 0 1 1-29.548657 17.060425c-33.404313-57.851903-122.937425-81.958284-205.015132-19.704791-79.058011 59.984456-160.743328 55.531685-239.698977-12.556473a17.060425 17.060425 0 0 1 22.297976-25.846545z" horiz-adv-x="1074" />
... ...
... ... @@ -58,20 +58,22 @@ export default {
return result;
},
async autherPubList(actions, {authorUid, authorType, page, lastedTime}) {
async autherPubList(actions, {authorUid, authorType, limit, page, lastedTime}) {
const result = await this.$api.get('/api/grass/userPublishedArticleList', {
authorUid,
authorType,
limit,
page,
lastedTime
});
return result;
},
async autherFavList(actions, {authorUid, authorType, page, lastedTime}) {
async autherFavList(actions, {authorUid, authorType, limit, page, lastedTime}) {
const result = await this.$api.get('/api/grass/userFavouriteArticleList', {
authorUid,
authorType,
limit,
page,
lastedTime
});
... ... @@ -92,18 +94,20 @@ export default {
return result;
},
async autherMinePubList(actions, {authorType, page, lastedTime}) {
async autherMinePubList(actions, {authorType, limit, page, lastedTime}) {
const result = await this.$api.get('/api/grass/minePublishedArticleList', {
authorType,
limit,
page,
lastedTime
});
return result;
},
async autherMineFavList(actions, {authorType, page, lastedTime}) {
async autherMineFavList(actions, {authorType, limit, page, lastedTime}) {
const result = await this.$api.get('/api/grass/mineFavouriteArticleList', {
authorType,
limit,
page,
lastedTime
});
... ...
... ... @@ -22,6 +22,7 @@ module.exports = {
params: {
authorUid: {type: Number, require: true},
authorType: {type: Number, require: true},
limit: {type: Number},
page: {type: Number},
lastedTime: {type: Number}
}
... ... @@ -32,6 +33,7 @@ module.exports = {
params: {
authorUid: {type: Number, require: true},
authorType: {type: Number, require: true},
limit: {type: Number},
page: {type: Number},
lastedTime: {type: Number}
}
... ... @@ -59,6 +61,7 @@ module.exports = {
params: {
authorUid: {type: Number, require: true, alias: 'uid'},
authorType: {type: Number, require: true},
limit: {type: Number},
page: {type: Number},
lastedTime: {type: Number}
}
... ... @@ -69,6 +72,7 @@ module.exports = {
params: {
authorUid: {type: Number, require: true, alias: 'uid'},
authorType: {type: Number, require: true},
limit: {type: Number},
page: {type: Number},
lastedTime: {type: Number}
}
... ...
... ... @@ -6128,6 +6128,19 @@
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
"dev": true
},
"is-dom-node": {
"version": "1.0.4",
"resolved": "http://npm.yohops.com/is-dom-node/-/is-dom-node-1.0.4.tgz",
"integrity": "sha1-q7GK9xM/Hmh2EM/rJ02hztNC8cU="
},
"is-dom-node-list": {
"version": "1.2.1",
"resolved": "http://npm.yohops.com/is-dom-node-list/-/is-dom-node-list-1.2.1.tgz",
"integrity": "sha1-FB3tDGbedZ0JdoANITcLuQjylQ8=",
"requires": {
"is-dom-node": "^1.0.4"
}
},
"is-extendable": {
"version": "0.1.1",
"resolved": "http://npm.yohops.com/is-extendable/-/is-extendable-0.1.1.tgz",
... ... @@ -7061,6 +7074,11 @@
"is-plain-obj": "^1.1.0"
}
},
"miniraf": {
"version": "1.0.0",
"resolved": "http://npm.yohops.com/miniraf/-/miniraf-1.0.0.tgz",
"integrity": "sha1-XYjhCLvctVtKL/PaM38koTozd+E="
},
"mississippi": {
"version": "3.0.0",
"resolved": "http://npm.yohops.com/mississippi/-/mississippi-3.0.0.tgz",
... ... @@ -8994,6 +9012,11 @@
"xtend": "^4.0.1"
}
},
"rematrix": {
"version": "0.3.0",
"resolved": "http://npm.yohops.com/rematrix/-/rematrix-0.3.0.tgz",
"integrity": "sha1-Tz+RVqqA3tioyiN4X0jGAStt6ko="
},
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "http://npm.yohops.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
... ... @@ -9502,6 +9525,16 @@
"ajv-keywords": "^3.1.0"
}
},
"scrollreveal": {
"version": "4.0.5",
"resolved": "http://npm.yohops.com/scrollreveal/-/scrollreveal-4.0.5.tgz",
"integrity": "sha1-z4PMXZh03A2S75yJqIlOV/P44DQ=",
"requires": {
"miniraf": "1.0.0",
"rematrix": "0.3.0",
"tealight": "0.3.6"
}
},
"scss-tokenizer": {
"version": "0.2.3",
"resolved": "http://npm.yohops.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",
... ... @@ -10841,6 +10874,15 @@
"inherits": "2"
}
},
"tealight": {
"version": "0.3.6",
"resolved": "http://npm.yohops.com/tealight/-/tealight-0.3.6.tgz",
"integrity": "sha1-FMgHHOPBiJcqXLfYpWaMooILQpI=",
"requires": {
"is-dom-node": "^1.0.4",
"is-dom-node-list": "^1.2.1"
}
},
"term-size": {
"version": "1.2.0",
"resolved": "http://npm.yohops.com/term-size/-/term-size-1.2.0.tgz",
... ...
... ... @@ -2060,7 +2060,6 @@ date-now@^0.1.4:
dayjs@^1.8.5:
version "1.8.5"
resolved "http://npm.yohops.com/dayjs/-/dayjs-1.8.5.tgz#0b066770f89a20022218544989f3d23e5e8db29a"
integrity sha1-CwZncPiaIAIiGFRJifPSPl6Nspo=
de-indent@^1.0.2:
version "1.0.2"
... ... @@ -3868,6 +3867,16 @@ is-directory@^0.3.1:
version "0.3.1"
resolved "http://npm.yohops.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"
is-dom-node-list@^1.2.1:
version "1.2.1"
resolved "http://npm.yohops.com/is-dom-node-list/-/is-dom-node-list-1.2.1.tgz#141ded0c66de759d0976800d21370bb908f2950f"
dependencies:
is-dom-node "^1.0.4"
is-dom-node@^1.0.4:
version "1.0.4"
resolved "http://npm.yohops.com/is-dom-node/-/is-dom-node-1.0.4.tgz#abb18af7133f1e687610cfeb274da1ced342f1c5"
is-extendable@^0.1.0, is-extendable@^0.1.1:
version "0.1.1"
resolved "http://npm.yohops.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
... ... @@ -4313,7 +4322,6 @@ lodash.debounce@^4.0.8:
lodash.findkey@^4.6.0:
version "4.6.0"
resolved "http://npm.yohops.com/lodash.findkey/-/lodash.findkey-4.6.0.tgz#83058e903b51cbb759d09ccf546dea3ea39c4718"
integrity sha1-gwWOkDtRy7dZ0JzPVG3qPqOcRxg=
lodash.kebabcase@^4.1.1:
version "4.1.1"
... ... @@ -4669,6 +4677,10 @@ minipass@^2.2.1, minipass@^2.3.4:
safe-buffer "^5.1.2"
yallist "^3.0.0"
miniraf@1.0.0:
version "1.0.0"
resolved "http://npm.yohops.com/miniraf/-/miniraf-1.0.0.tgz#5d88e108bbdcb55b4a2ff3da337f24a13a3377e1"
minizlib@^1.1.1:
version "1.2.1"
resolved "http://npm.yohops.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614"
... ... @@ -6056,6 +6068,10 @@ remark@^10.0.1:
remark-stringify "^6.0.0"
unified "^7.0.0"
rematrix@0.3.0:
version "0.3.0"
resolved "http://npm.yohops.com/rematrix/-/rematrix-0.3.0.tgz#4f3f9156aa80ded8a8ca23785f48c6012b6dea4a"
remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "http://npm.yohops.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
... ... @@ -6292,6 +6308,14 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
scrollreveal@^4.0.5:
version "4.0.5"
resolved "http://npm.yohops.com/scrollreveal/-/scrollreveal-4.0.5.tgz#cf83cc5d9874dc0d92ef9c89a8894e57f3f8e034"
dependencies:
miniraf "1.0.0"
rematrix "0.3.0"
tealight "0.3.6"
scss-tokenizer@^0.2.3:
version "0.2.3"
resolved "http://npm.yohops.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
... ... @@ -6980,6 +7004,13 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.2"
tealight@0.3.6:
version "0.3.6"
resolved "http://npm.yohops.com/tealight/-/tealight-0.3.6.tgz#14c8071ce3c188972a5cb7d8a5668ca2820b4292"
dependencies:
is-dom-node "^1.0.4"
is-dom-node-list "^1.2.1"
term-size@^1.2.0:
version "1.2.0"
resolved "http://npm.yohops.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
... ...