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