File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
web/src/js/view/newhome/module/workspace Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 7878 position : relative ;
7979 background : url (" ../../images/workspace.png" ) center center no-repeat ;
8080 background-size : cover ;
81- min- width : 222px ;
81+ width : 222px ;
8282 .name {
8383 display : block ;
8484 font-size : 16px ;
Original file line number Diff line number Diff line change @@ -162,8 +162,7 @@ export default {
162162 videosClick: 1 ,
163163 videosMaxClick: null ,
164164 listWrap: 0 ,// 屏幕宽度
165- workspaceItemWidth: 0 , // workspaceItem 宽度
166- workspaceItemMargin: 30
165+ workspaceItemWidth: 252 , // workspaceItem 宽度
167166 }
168167 },
169168 created () {
@@ -184,8 +183,7 @@ export default {
184183 },
185184 watch: {
186185 ' listWrap ' : function (val ){ // 监听容器宽度变化
187- this .listWrap = val;
188- this .pageSize = Math .floor (this .listWrap / this .workspaceItemWidth )
186+ this .pageSize = Math .floor (val / this .workspaceItemWidth )
189187 this .initWorkspace ();
190188 },
191189 },
@@ -195,12 +193,8 @@ export default {
195193 this .loading = true ;
196194 api .fetch (' dss/workspaces' , {}, ' get' ).then ((res ) => {
197195 this .originWorkspaceData = this .filteredData = this .cacheData = res .workspaces ;
198- this .$nextTick (() => {
199- this .workspaceItemWidth = this .$refs .col [0 ] && this .$refs .col [0 ].$el .offsetWidth ;
200- this .pageSize = Math .floor (this .listWrap / (this .workspaceItemWidth + this .workspaceItemMargin ))
201- this .initWorkspace ();
202- this .loading = false ;
203- })
196+ this .initWorkspace ();
197+ this .loading = false ;
204198 }).catch (() => {
205199 this .loading = false ;
206200 });
You can’t perform that action at this time.
0 commit comments