From d31041454031394dab059e7c2b6be0daf8f86300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B9=B3=E5=B7=9D?= <228939628@qq.com> Date: Fri, 31 Oct 2025 20:10:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E6=B6=88=E6=81=AF=E6=A0=8F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=BB=9F=E4=B8=80=E8=B0=83=E6=95=B4=EF=BC=8C?= =?UTF-8?q?=E7=94=B1=E4=B8=BB=E9=A2=98=E5=8C=85=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/common/rawitem/rawitem.scss | 27 ++++------------------ src/common/rawitem/rawitem.tsx | 1 + src/common/view-message/view-message.scss | 28 ----------------------- src/common/view-message/view-message.tsx | 7 ++---- 5 files changed, 9 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd17b256a7a..a9e2bac93d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,7 @@ - 将标准菜单定制按钮的处理逻辑调整为通用的定制按钮点击事件 - 优化标准菜单、图标菜单、列表菜单等组件样式,根据主题调整原则优化 - 适配图标菜单、列表菜单在分组项无数据时呈现内容 +- 消息栏样式统一调整,由主题包控制 ### Fixed diff --git a/src/common/rawitem/rawitem.scss b/src/common/rawitem/rawitem.scss index 80eb4d59b74..1c3ea619f1e 100644 --- a/src/common/rawitem/rawitem.scss +++ b/src/common/rawitem/rawitem.scss @@ -1,17 +1,14 @@ $rawitem: ( - // 颜色 - text-color: getCssVar(editor, default, text-color), - - // 字体大小 - font-size: getCssVar(editor, default, font-size), + 'color-rawitem-color':getCssVar(editor, default, text-color), + 'font-rawitem-fontSize': getCssVar(editor, default, font-size), ); @include b(rawitem) { @include set-component-css-var('rawitem', $rawitem); width: 100%; height: 100%; - font-size: getCssVar(rawitem, font-size); - color: getCssVar(rawitem, text-color); + font-size: getCssVar(rawitem, font-rawitem-fontSize); + color: getCssVar(rawitem, color-rawitem-color); @include e('video'){ video{ @@ -23,18 +20,4 @@ $rawitem: ( width: 100%; height: 100%; } - - .van-notice-bar.info { - --van-notice-bar-text-color: #{getCssVar(color, primary)}; - --van-notice-bar-background: #{getCssVar(color, primary, light, default)}; - } - - .van-notice-bar.warning { - --van-notice-bar-text-color: #{getCssVar(color, warning)}; - } - - .van-notice-bar.error { - --van-notice-bar-text-color: #{getCssVar(color, danger)}; - --van-notice-bar-background: #{getCssVar(color, danger, light, default)}; - } -} +} \ No newline at end of file diff --git a/src/common/rawitem/rawitem.tsx b/src/common/rawitem/rawitem.tsx index acd8f52d6ce..f016ad0703c 100644 --- a/src/common/rawitem/rawitem.tsx +++ b/src/common/rawitem/rawitem.tsx @@ -334,6 +334,7 @@ export const IBizRawItem = defineComponent({ text={this.alertParams.title} show-icon={this.alertParams.showIcon} class={this.alertParams.class} + type={this.rawItemType.toLowerCase()} wrapable={this.alertParams.wrapable} left-icon={ this.alertParams.showIcon ? this.alertParams['left-icon'] : '' diff --git a/src/common/view-message/view-message.scss b/src/common/view-message/view-message.scss index c5b78a9c345..e69de29bb2d 100644 --- a/src/common/view-message/view-message.scss +++ b/src/common/view-message/view-message.scss @@ -1,28 +0,0 @@ -$view-message: ( - info-bg: getCssVar(color, info, light, default), - info-color: getCssVar(color, info), - warn-bg: getCssVar(color, warning, light, default), - warn-color: getCssVar(color, warning), - error-bg: getCssVar(color, danger, light, default), - error-color: getCssVar(color, danger), - margin: getCssVar(spacing, tight) getCssVar(spacing, base), -); - -@include b(view-message) { - @include set-component-css-var('view-message', $view-message); - @include m(info) { - background-color: getCssVar(view-message, info-bg); - color: getCssVar(view-message, info-color); - } - @include m(warn) { - background-color: getCssVar(view-message, warn-bg); - color: getCssVar(view-message, warn-color); - } - @include m(error) { - background-color: getCssVar(view-message, error-bg); - color: getCssVar(view-message, error-color); - } - .van-notice-bar { - margin: getCssVar(view-message, margin); - } -} \ No newline at end of file diff --git a/src/common/view-message/view-message.tsx b/src/common/view-message/view-message.tsx index 15698668069..2518d352557 100644 --- a/src/common/view-message/view-message.tsx +++ b/src/common/view-message/view-message.tsx @@ -135,11 +135,8 @@ export const ViewMessage = defineComponent({ {this.items.map((item: IViewMessage, index: number) => { return ( Date: Fri, 31 Oct 2025 20:11:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E5=A4=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A8=A1=E5=BC=8F=E6=94=AF=E6=8C=81=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/control/list/md-ctrl/md-ctrl.scss | 6 ------ src/util/list-util/list-render-util.tsx | 8 ++++++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9e2bac93d0..bd7de7416a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ - 优化标准菜单、图标菜单、列表菜单等组件样式,根据主题调整原则优化 - 适配图标菜单、列表菜单在分组项无数据时呈现内容 - 消息栏样式统一调整,由主题包控制 +- 多数据选择模式支持分割线 ### Fixed diff --git a/src/control/list/md-ctrl/md-ctrl.scss b/src/control/list/md-ctrl/md-ctrl.scss index 9a01c116c29..8b9abac19ee 100644 --- a/src/control/list/md-ctrl/md-ctrl.scss +++ b/src/control/list/md-ctrl/md-ctrl.scss @@ -2,7 +2,6 @@ $control-mobmdctrl: ( // Color color-text: getCssVar(color, text, 0), color-active-bg: getCssVar(color, primary, light, default), - color-item-bg: getCssVar(color, bg, 2), color-group-bg: getCssVar(color, bg, 0), color-group-text: getCssVar(color, text, 1), // Width/Height @@ -82,7 +81,6 @@ $control-mobmdctrl: ( // 增加权重,避免ui组件本身样式影响 &.#{bem(control-mobmdctrl-item)} { - background-color: getCssVar(control-mobmdctrl, color-item-bg); color: getCssVar(control-mobmdctrl, color-text); height: auto; font-size: getCssVar(control-mobmdctrl, font-fontSize); @@ -140,10 +138,6 @@ $control-mobmdctrl: ( flex: 1; padding: 0; width: auto; - // 隐藏边框 - &.#{bem(control-mobmdctrl-item)}::after { - display: none; - } } } diff --git a/src/util/list-util/list-render-util.tsx b/src/util/list-util/list-render-util.tsx index bdc82f78fbb..a9fbd7359e1 100644 --- a/src/util/list-util/list-render-util.tsx +++ b/src/util/list-util/list-render-util.tsx @@ -150,7 +150,7 @@ export function useListRender( const { context, params } = c; const itemClass = calcItemClass(item); const itemStyle = calcItemStyle(item); - if (controlStyle !== 'EXTVIEW1') { + if (props.mode !== 'SELECT' && controlStyle !== 'EXTVIEW1') { itemClass.push('van-hairline--bottom'); } @@ -167,8 +167,12 @@ export function useListRender( ); if (props.mode === 'SELECT') { + const classNames = [ns.b('select-item'), ns.is('active', isSelect(item))]; + if (controlStyle !== 'EXTVIEW1') { + classNames.push('van-hairline--bottom') + } return ( -
+
Date: Fri, 31 Oct 2025 20:12:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?style:=20=E6=A8=A1=E6=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F=E4=B8=8E=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/util/modal-util/modal-util.ts | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7de7416a2..d23cf9b6120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,7 @@ - 适配图标菜单、列表菜单在分组项无数据时呈现内容 - 消息栏样式统一调整,由主题包控制 - 多数据选择模式支持分割线 +- 模态消息弹框样式与主题保持一致 ### Fixed diff --git a/src/util/modal-util/modal-util.ts b/src/util/modal-util/modal-util.ts index a24ae77caed..dabd42bd3da 100644 --- a/src/util/modal-util/modal-util.ts +++ b/src/util/modal-util/modal-util.ts @@ -1,5 +1,6 @@ import { IModalUtil, ModalParams } from '@ibiz-template/runtime'; import { showConfirmDialog, showDialog } from 'vant'; +import { useNamespace } from '@ibiz-template/vue3-util'; /** * 简洁确认操作框 @@ -11,6 +12,22 @@ import { showConfirmDialog, showDialog } from 'vant'; * @implements {IModalUtil} */ export class ModalUtil implements IModalUtil { + /** + * 获取根节点样式变量 + * + * @protected + * @param {string} name + * @return {*} {(string | undefined)} + * @memberof ModalUtil + */ + protected getRootCssVar(name: string): string | undefined { + const root = document.documentElement; + const styles = window.getComputedStyle(root); + if (styles) { + return styles.getPropertyValue(name); + } + } + async info(params: ModalParams): Promise { const { confirmButtonText, cancelButtonText } = params; await showDialog({ @@ -23,10 +40,12 @@ export class ModalUtil implements IModalUtil { async success(params: ModalParams): Promise { const { confirmButtonText, cancelButtonText } = params; + const ns = useNamespace(); + const color = this.getRootCssVar(ns.cssVarName('color-success')); await showDialog({ title: params.title, message: params.desc, - confirmButtonColor: '#07c160', + confirmButtonColor: color, confirmButtonText, cancelButtonText, }); @@ -34,10 +53,12 @@ export class ModalUtil implements IModalUtil { async warning(params: ModalParams): Promise { const { confirmButtonText, cancelButtonText } = params; + const ns = useNamespace(); + const color = this.getRootCssVar(ns.cssVarName('color-warning')); await showDialog({ title: params.title, message: params.desc, - confirmButtonColor: '#faab0c', + confirmButtonColor: color, confirmButtonText, cancelButtonText, }); @@ -45,9 +66,12 @@ export class ModalUtil implements IModalUtil { async error(params: ModalParams): Promise { const { confirmButtonText, cancelButtonText } = params; + const ns = useNamespace(); + const color = this.getRootCssVar(ns.cssVarName('color-danger')); await showDialog({ title: params.title, message: params.desc, + confirmButtonColor: color, theme: 'round-button', confirmButtonText, cancelButtonText, -- Gitee