no msg
This commit is contained in:
parent
6d026bbf42
commit
7d8856e4bc
@ -45,11 +45,11 @@ export default {
|
||||
//
|
||||
setInterval(this.searchEnter, 1000);
|
||||
//
|
||||
window.addEventListener('resize', this.windowMax768Listener);
|
||||
window.addEventListener('resize', this.windowSizeListener);
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.windowMax768Listener);
|
||||
window.removeEventListener('resize', this.windowSizeListener);
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -168,7 +168,8 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
windowMax768Listener() {
|
||||
windowSizeListener() {
|
||||
this.$store.state.windowWidth = window.innerWidth
|
||||
this.$store.state.windowMax768 = window.innerWidth <= 768
|
||||
},
|
||||
|
||||
|
@ -15,12 +15,14 @@
|
||||
<p>{{$L('项目负责人')}}</p>
|
||||
</UserAvatar>
|
||||
</li>
|
||||
<template v-if="projectUser.length > 0">
|
||||
<template v-if="projectUser.length > 0 && windowWidth > 980">
|
||||
<li v-for="(item, index) in projectUser" :key="index" v-if="index < projectUserShowNum">
|
||||
<UserAvatar :userid="item.userid" :size="36" :borderWitdh="2" :openDelay="0"/>
|
||||
</li>
|
||||
<li v-if="projectUser.length > projectUserShowNum" class="more">
|
||||
<Icon type="ios-more"/>
|
||||
<ETooltip :content="$L('共' + (projectUser.length + 1) + '个成员')">
|
||||
<Icon type="ios-more"/>
|
||||
</ETooltip>
|
||||
</li>
|
||||
<li class="add">
|
||||
<Icon type="md-person-add"/>
|
||||
@ -536,6 +538,7 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'windowWidth',
|
||||
'windowMax768',
|
||||
|
||||
'userId',
|
||||
@ -597,7 +600,7 @@ export default {
|
||||
},
|
||||
|
||||
projectUserShowNum() {
|
||||
return this.windowMax768 ? 3 : 10;
|
||||
return this.windowWidth > 1200 ? 8 : 3;
|
||||
},
|
||||
|
||||
columnList() {
|
||||
|
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -1,5 +1,8 @@
|
||||
const state = {};
|
||||
|
||||
// 浏览器宽度
|
||||
state.windowWidth = window.innerWidth;
|
||||
|
||||
// 浏览器宽度≤768返回true
|
||||
state.windowMax768 = window.innerWidth <= 768;
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
}
|
||||
}
|
||||
&.more {
|
||||
width: 30px;
|
||||
width: 36px;
|
||||
transform: translateX(-1px);
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user