Skip to content

Commit

Permalink
fix(insert-footer-button):设计器页面设置-输入设置中,保存取消按钮顺序错误,格式化按钮样式错误,应与UI保持一直…
Browse files Browse the repository at this point in the history
…;大纲书导航中,眼睛图标,建议改为睁开就是可见,闭眼就是不可见;提示框样式修改 (opentiny#94)

* fix(insert-footer-button):
设计器页面设置-输入设置中,保存取消按钮顺序错误,格式化按钮样式错误,应与UI保持一致;
大纲树导航中,眼睛图标,建议改为睁开就是可见,闭眼就是不可见;
提示框样式修改
  • Loading branch information
Xppp0217 authored Nov 22, 2023
1 parent f6981fd commit 68addea
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 27 deletions.
4 changes: 2 additions & 2 deletions packages/common/component/MetaCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
</div>
<template #footer>
<div class="btn-box">
<tiny-button type="danger" v-if="language === 'json' && showFormatBtn" @click="formatCode">
<tiny-button plain type="danger" v-if="language === 'json' && showFormatBtn" @click="formatCode">
{{ $t('common.format') }}
</tiny-button>
<div>
<tiny-button @click="close">{{ $t('common.cancel') }}</tiny-button>
<tiny-button type="primary" @click="save">{{ $t('common.save') }}</tiny-button>
<tiny-button @click="close">{{ $t('common.close') }}</tiny-button>
</div>
</div>
</template>
Expand Down
4 changes: 3 additions & 1 deletion packages/controller/src/useModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ const confirm = ({ title, status, message, exec, cancel, showFooter = true }) =>
})
}

const message = ({ title, status, message, exec }) => {
const message = ({ title, status, message, exec, width = '400' }) => {
Modal.alert({
title,
status,
'confirm-btn-props': { text: '确定' },
width: width,
message() {
return (
<div div class="modal-content" >
Expand Down
38 changes: 18 additions & 20 deletions packages/plugins/block/src/js/blockSetting.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

import { reactive, readonly, onMounted } from 'vue'
import { extend } from '@opentiny/vue-renderless/common/object'
Expand Down Expand Up @@ -534,16 +534,14 @@ export const getDeployProgress = (taskId, block) => {
getDeployProgress(taskId, block)
}, INTERVAL_PROGRESS)
} else if (block.deployStatus === DEPLOY_STATUS.Stopped) {
const title = '异常提示'
const status = 'error'
const messagePub = {
render: () => <span style="max-height:540px;overflow:auto;">{`区块发布失败: ${block.taskResult}`}</span>
}
const exec = () => {
getDeployProgress(taskId, block)
}

confirm({ title, status, messagePub, exec })
message({
title: '异常提示',
status: 'error',
message: {
render: () => <span style="max-height:276px;overflow:auto;">{`区块发布失败: ${block.taskResult}`}</span>
},
width: '550'
})
setDeployFailed(block)
} else {
setDeployFinished(block)
Expand Down
12 changes: 10 additions & 2 deletions packages/plugins/materials/src/block/BlockGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
class="confirm-btn"
size="small"
type="primary"
@click="handleConfirmDeleteGroup(item.value.groupId)"
@click="handleConfirmDeleteGroup(item.value)"
>
确定
</tiny-button>
Expand Down Expand Up @@ -145,6 +145,7 @@ import {
DialogBox,
Button,
Tooltip,
Notify,
Popover
} from '@opentiny/vue'
import { iconYes, iconClose, iconError } from '@opentiny/vue-icon'
Expand Down Expand Up @@ -319,7 +320,9 @@ export default {
})
}
const handleConfirmDeleteGroup = (groupId) => {
const handleConfirmDeleteGroup = (group) => {
const { groupId, groupName } = group
const messageSuccess = `${groupName}分组删除成功!`
requestDeleteGroup(groupId)
.then(() => {
state.currentDeleteGroupId = null
Expand All @@ -330,6 +333,11 @@ export default {
setBlockPanelVisible(false)
}
})
Notify({
type: 'success',
message: messageSuccess,
position: 'top-right'
})
})
.catch((error) => {
message({ message: `删除区块分组失败: ${error.message || error}`, status: 'error' })
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/tree/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<span>{{ data.row.componentName }}</span>
</span>
<span v-show="!data.row.show" class="tree-handle" @mouseup="showNode(data.row)">
<icon-eyeopen v-show="!data.row.show"></icon-eyeopen>
<icon-eyeclose v-show="data.row.show"></icon-eyeclose>
<icon-eyeopen v-show="data.row.show"></icon-eyeopen>
<icon-eyeclose v-show="!data.row.show"></icon-eyeclose>
</span>
</span>
</template>
Expand Down

0 comments on commit 68addea

Please sign in to comment.