Skip to content

Commit 36a69bd

Browse files
authored
Merge pull request #7 from WeBankFinTech/dev-0.9.0
Dev 0.9.0
2 parents a7650dd + faf9171 commit 36a69bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/src/js/view/newhome/module/workspace/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
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;

web/src/js/view/newhome/module/workspace/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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(() => {

0 commit comments

Comments
 (0)