diff --git a/CHANGELOG.md b/CHANGELOG.md index bf96588e8f7871a4e6d1bfaa615e40e45058795a..974175332cd35f9eae9ff99c198c10fdf75a6335 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Added - 补充表单设计移动端编辑器的预览呈现 +- 更新添加主要按钮样式 ## [0.7.38-alpha.61] - 2025-02-24 diff --git a/src/common/button-list/button-list.tsx b/src/common/button-list/button-list.tsx index e1e2ee45a0ac3ccecf10896b620880e054abc549..34457ebf032c4833f42309427fa46284282a58d6 100644 --- a/src/common/button-list/button-list.tsx +++ b/src/common/button-list/button-list.tsx @@ -186,11 +186,13 @@ export const IBizButtonList = defineComponent({ * * @param {IAppDEUIActionGroupDetail} item * @param {boolean} [disabled=false] + * @param {string} [type=''] * @return {*} {(JSX.Element | null)} */ const renderButton = ( item: IAppDEUIActionGroupDetail, disabled: boolean = false, + type: string = '', ): JSX.Element | null => { if (props.buttonsState[item.id!].visible) { return ( @@ -200,6 +202,7 @@ export const IBizButtonList = defineComponent({ ns.em('item', `${item.id?.toLowerCase()}`), `${item.sysCss?.cssName || ''}`, ]} + type={type} title={item.tooltip || item.caption} disabled={props.buttonsState[item.id!].disabled || disabled} onClick={(event: MouseEvent) => handleClick(event, item)} @@ -267,11 +270,12 @@ export const IBizButtonList = defineComponent({ {actionGroupExtractMode === 'ITEMX' && item && - renderButton(item, props.disabled)} + renderButton(item, props.disabled, 'primary')} {(actionGroupExtractMode !== 'ITEMX' || item) && ( .el-button:nth-child(1) .el-button { + color: currentcolor; + background-color: transparent; + border: none; + } + &>.el-button:nth-child(2):focus-visible { outline: none; outline-offset: 0; diff --git a/src/control/toolbar/toolbar.tsx b/src/control/toolbar/toolbar.tsx index 8b143be20d20e3e472fd55f16632a41e7cc6284b..46b10864039a3b98b68ed446849dc5ace651706c 100644 --- a/src/control/toolbar/toolbar.tsx +++ b/src/control/toolbar/toolbar.tsx @@ -277,7 +277,11 @@ export const ToolbarControl = defineComponent({ }, title: () => { return ( - + {btnContent(item, c.state)} ); @@ -290,9 +294,11 @@ export const ToolbarControl = defineComponent({ // 绘制行为项按钮 const renderActionButton = (detail: IAppDEUIActionGroupDetail) => { if (c.state.buttonsState[detail.id!].visible) { + const buttonStyle = (detail as IParams).buttonStyle?.toLowerCase(); return [ {ibiz.i18n.t('editor.upload.uploadFiles')}