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 78
78
position : relative ;
79
79
background : url (" ../../images/workspace.png" ) center center no-repeat ;
80
80
background-size : cover ;
81
- min- width : 222px ;
81
+ width : 222px ;
82
82
.name {
83
83
display : block ;
84
84
font-size : 16px ;
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ export default {
162
162
videosClick: 1 ,
163
163
videosMaxClick: null ,
164
164
listWrap: 0 ,// 屏幕宽度
165
+ workspaceItemWidth: 252 , // workspaceItem 宽度
165
166
}
166
167
},
167
168
created () {
@@ -170,7 +171,6 @@ export default {
170
171
},
171
172
mounted (){
172
173
this .listWrap = this .$refs .row .$el && this .$refs .row .$el .offsetWidth ;
173
- this .initWorkspace ();
174
174
window .onresize = () => {
175
175
const that = this
176
176
return (() => {
@@ -183,7 +183,7 @@ export default {
183
183
},
184
184
watch: {
185
185
' listWrap ' : function (val ){ // 监听容器宽度变化
186
- this .pageSize = Math .floor (val / 252 )
186
+ this .pageSize = Math .floor (val / this . workspaceItemWidth )
187
187
this .initWorkspace ();
188
188
},
189
189
},
@@ -192,7 +192,7 @@ export default {
192
192
// 获取工作空间数据
193
193
this .loading = true ;
194
194
api .fetch (' dss/workspaces' , {}, ' get' ).then ((res ) => {
195
- this .filteredData = this .cacheData = res .workspaces ;
195
+ this .originWorkspaceData = this . filteredData = this .cacheData = res .workspaces ;
196
196
this .initWorkspace ();
197
197
this .loading = false ;
198
198
}).catch (() => {
You can’t perform that action at this time.
0 commit comments