Skip to content

Commit

Permalink
feature: 全局变量支持批量编辑 TencentBlueKing#43
Browse files Browse the repository at this point in the history
  • Loading branch information
hailinxiao committed Jul 9, 2021
1 parent ee8957c commit 12b4d29
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
6 changes: 1 addition & 5 deletions src/frontend/src/components/jb-edit/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,9 @@
.jb-edit-input {
&.block {
position: relative;
margin-left: -10px;
cursor: pointer;
.render-value-box,
.edit-value-box {
margin-left: -10px;
}
.render-value-box {
padding-left: 10px;
Expand Down
29 changes: 15 additions & 14 deletions src/frontend/src/components/jb-sideslider/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,28 @@
/**
* @desc 计算响应式宽度
*/
getMediaWidth () {
getMediaWidth: _.throttle(function () {
if (!this.media.length) {
return;
}
let index = 0;
const queryRange = [
1366, 1680, 1920, 2560,
// 1366,
1680,
1920,
2560,
];
const windowHeight = window.innerWidth;
while (index < 3) {
const current = queryRange[index];
if (current < windowHeight) index += 1;
else break;
}
if (index > this.media.length - 1) {
this.mediaWidth = this.media[this.media.length - 1];
return;
}
let index = 0;
queryRange.forEach((mediaWidth) => {
if (mediaWidth < windowHeight) {
// eslint-disable-next-line no-plusplus
index++;
}
});
this.mediaWidth = this.media[index];
},
}, 60),
/**
* @desc 计算footer的位置
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,10 @@
cursor: pointer;
}
}
.bk-form-control {
display: block;
width: auto;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
<batch-operation
v-if="isShowBatchOperation"
:variable="variable"
:data="currentData"
@on-change="handleBatchOperationSubmit" />
</jb-sideslider>
</template>
Expand Down

0 comments on commit 12b4d29

Please sign in to comment.