File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
web/src/js/view/newhome/module/workspace Expand file tree Collapse file tree 2 files changed +4
-4
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,6 +162,7 @@ export default {
162162 videosClick: 1 ,
163163 videosMaxClick: null ,
164164 listWrap: 0 ,// 屏幕宽度
165+ workspaceItemWidth: 252 , // workspaceItem 宽度
165166 }
166167 },
167168 created () {
@@ -170,7 +171,6 @@ export default {
170171 },
171172 mounted (){
172173 this .listWrap = this .$refs .row .$el && this .$refs .row .$el .offsetWidth ;
173- this .initWorkspace ();
174174 window .onresize = () => {
175175 const that = this
176176 return (() => {
@@ -183,7 +183,7 @@ export default {
183183 },
184184 watch: {
185185 ' listWrap ' : function (val ){ // 监听容器宽度变化
186- this .pageSize = Math .floor (val / 252 )
186+ this .pageSize = Math .floor (val / this . workspaceItemWidth )
187187 this .initWorkspace ();
188188 },
189189 },
@@ -192,7 +192,7 @@ export default {
192192 // 获取工作空间数据
193193 this .loading = true ;
194194 api .fetch (' dss/workspaces' , {}, ' get' ).then ((res ) => {
195- this .filteredData = this .cacheData = res .workspaces ;
195+ this .originWorkspaceData = this . filteredData = this .cacheData = res .workspaces ;
196196 this .initWorkspace ();
197197 this .loading = false ;
198198 }).catch (() => {
You can’t perform that action at this time.
0 commit comments