Skip to content

Commit

Permalink
fix: 非编辑页面切换Code方式时提示保存 TencentBlueKing#10933
Browse files Browse the repository at this point in the history
  • Loading branch information
lockiechen committed Sep 29, 2024
1 parent b48d2a0 commit d6cf541
Show file tree
Hide file tree
Showing 8 changed files with 348 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@
'resetHistoryFilterCondition'
]),
updateTableHeight () {
this.tableHeight = this.$refs.tableBox.offsetHeight
this.tableHeight = this.$refs.tableBox?.offsetHeight
},
handleColumnChange (columns) {
this.tableColumnKeys = columns
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<span>
<span class="version-diff-entry-wrapper">
<bk-button
:text="text"
:outline="outline"
:theme="theme"
:disabled="disabled"
:size="size"
@click="initDiff"
>
<slot>
Expand All @@ -23,7 +25,10 @@
class="diff-version-dialog-content"
v-bkloading="{ isLoading: isLoadYaml, color: '#1d1d1d' }"
>
<header class="diff-version-header">
<header
class="diff-version-header"
v-if="showButton"
>
<VersionSelector
ext-cls="dark-theme-select-trigger"
ext-popover-cls="dark-theme-select-menu"
Expand Down Expand Up @@ -82,6 +87,10 @@
type: String,
default: 'primary'
},
size: {
type: String,
default: 'normal'
},
version: {
type: Number,
required: true
Expand All @@ -93,6 +102,14 @@
canSwitchVersion: {
type: Boolean,
default: true
},
showButton: {
type: Boolean,
default: true
},
disabled: {
type: Boolean,
default: false
}
},
data () {
Expand Down Expand Up @@ -167,6 +184,11 @@
<style lang="scss">
@import "@/scss/select-dark-theme.scss";
.version-diff-entry-wrapper {
.bk-button-text.bk-button-small {
padding: 0;
}
}
.diff-version-dialog.bk-dialog-wrapper {
transition: none;
.bk-dialog {
Expand Down
Loading

0 comments on commit d6cf541

Please sign in to comment.