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"
@@ -147,13 +148,30 @@ export default {
147148 pageSize: 4 ,
148149 pageNum: 1 ,
149150 videosClick: 1 ,
150- videosMaxClick: null
151+ videosMaxClick: null ,
152+ listWrap: 0 ,// 屏幕宽度
151153 }
152154 },
153155 created () {
154156 this .getWorkspaces ();
155157 this .getVideos ();
156158 },
159+ mounted (){
160+ this .listWrap = this .$refs .row .$el .offsetWidth ;
161+ this .initWorkspace ();
162+ window .onresize = () => {
163+ const that = this
164+ return (() => {
165+ that .listWrap = this .$refs .row .$el .offsetWidth ;
166+ })()
167+ }
168+ },
169+ watch: {
170+ ' listWrap ' : function (val ){ // 监听容器宽度变化
171+ this .pageSize = Math .floor (val / 252 )
172+ this .initWorkspace ();
173+ },
174+ },
157175 methods: {
158176 getWorkspaces () {
159177 // 获取工作空间数据
You can’t perform that action at this time.
0 commit comments