Skip to content

Commit

Permalink
Merge pull request #1023 from terlinhe/fix_canvas
Browse files Browse the repository at this point in the history
fix: 最后一个元素marginbottom不生效、交互式组件内置block不展示复制粘贴按钮
  • Loading branch information
ielgnaw authored Jul 4, 2023
2 parents cfcf1f9 + 25d213a commit 14deaa1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default {
handler: self.handleCopyPaste,
icon: 'bk-drag-icon bk-drag-copy',
tips: self.$t('复制并粘贴到当前元素后面'),
condition: self.activeComponentData.componentId && !self.activeComponentData.isInteractiveComponent
condition: self.activeComponentData.componentId && !self.activeComponentData.isInteractiveComponent && !self.activeComponentData?.parentNode?.isInteractiveComponent
},
{
handler: self.handleRemove,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
// 输入框获得焦点画布不响应复制、粘贴、剪切操作
const isInputFocused = event.target.classList.contains('bk-form-input')
const isInputFocused = event.target.classList.contains('bk-form-input') || event.target.classList.contains('bk-form-textarea')
if (!isInputFocused) {
if (event.ctrlKey || event.metaKey) {
// 复制(Ctrl + C)
Expand Down
5 changes: 4 additions & 1 deletion lib/client/src/views/project/page-manage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@
</div>
</template>
<bk-exception v-else-if="!isLoading" class="exception-wrap-item" type="empty">
<span>{{ $t('暂无页面,请新建页面') }}</span>
<span>{{ $t('暂无页面') }}</span>
<div class="exception-desc">
<span class="text">{{ $t('请先通过左侧页面创建入口新建页面') }}</span>
</div>
</bk-exception>
</div>
<page-operate-dialog
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/page-code/style/page-setting-style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function (pageStyle = '', platform = 'PC') {

// 页面内置padding
const defaultPadding = platform === 'PC'
? { 'padding-left': '24px', 'padding-right': '24px', 'padding-top': '20px', 'padding-bottom': '0px' }
? { 'padding-left': '24px', 'padding-right': '24px', 'padding-top': '20px', 'padding-bottom': '0px', overflow: 'auto' }
: { 'padding': '0' }

const pageSetting = Object.assign({}, defaultPadding, styleSetting)
Expand Down

0 comments on commit 14deaa1

Please sign in to comment.