File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
view/newhome/module/workspace Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ export default {
209209 this .isNavMenuShow = false ;
210210 },
211211 mouseover () {
212- this .isNavMenuShow = this .$route .path != ' /project'
212+ this .isNavMenuShow = ( this .$route .path != ' /project' && this . $route . path != ' /newhome ' )
213213 },
214214 mouseleave () {
215215 this .isNavMenuShow = false
Original file line number Diff line number Diff line change 4545 <h3 class =" item-header" >
4646 <span >{{ $t('message.workspace.workspaceList') }}</span >
4747 </h3 >
48- <Row class =" content-item" v-show =" visual === 'card'" >
48+ <Row ref = " row " class =" content-item" v-show =" visual === 'card'" >
4949 <i-col
50+ ref =" col"
5051 class =" workspace-item"
5152 :xs =" 12" :sm =" 8" :md =" 4" :lg =" 4"
5253 v-for =" item in originWorkspaceData"
@@ -158,13 +159,30 @@ export default {
158159 pageSize: 4 ,
159160 pageNum: 1 ,
160161 videosClick: 1 ,
161- videosMaxClick: null
162+ videosMaxClick: null ,
163+ listWrap: 0 ,// 屏幕宽度
162164 }
163165 },
164166 created () {
165167 this .getWorkspaces ();
166168 this .getVideos ();
167169 },
170+ mounted (){
171+ this .listWrap = this .$refs .row .$el .offsetWidth ;
172+ this .initWorkspace ();
173+ window .onresize = () => {
174+ const that = this
175+ return (() => {
176+ that .listWrap = this .$refs .row .$el .offsetWidth ;
177+ })()
178+ }
179+ },
180+ watch: {
181+ ' listWrap ' : function (val ){ // 监听容器宽度变化
182+ this .pageSize = Math .floor (val / 252 )
183+ this .initWorkspace ();
184+ },
185+ },
168186 methods: {
169187 getWorkspaces () {
170188 // 获取工作空间数据
You can’t perform that action at this time.
0 commit comments