diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c37189076f569710f97b1d6f4d92bc7024fc85..9603a3e13705142b6403fc3dc18f439a5737e49e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - 新增重复器表格组件 - 新增主题切换组件(直接内容项扩展,预置类型为THEME_TOGGLING) + ### Change - 更新公共组件,面板组件编辑器样式变量抽取 @@ -19,6 +20,10 @@ - 操作栏门户部件不显示标题区的操作按钮 - 优化树部件样式,增加面包屑样式权重 - 表单成员组件样式变量整理,并转换像素单位为rem +- 表单项、表单多数据部件样式整理 +- 应用菜单、列表菜单、图标菜单样式整理 +- 列表、卡片、多数据部件样式整理 +- 编辑器组件样式统一整理 ### Fixed diff --git a/src/control/app-menu-icon-view/app-menu-icon-view.scss b/src/control/app-menu-icon-view/app-menu-icon-view.scss index a3c83e2dd6252b295cd704d7dbf873e536410a87..e46a4aaece48cf5f699f1f6547a9160c0d674618 100644 --- a/src/control/app-menu-icon-view/app-menu-icon-view.scss +++ b/src/control/app-menu-icon-view/app-menu-icon-view.scss @@ -1,29 +1,20 @@ $control-appmenu-iconview: ( - // Color - 'color-bg': getCssVar('color', 'bg', 2), // 菜单背景色 - 'color-item-text': getCssVar('color', 'text', 0), // 菜单项文字颜色 - 'color-nodata-ph-item-text': getCssVar('color', 'text', 0), // 分组项无子数据时占位项文字颜色 - 'color-group-item-bg': getCssVar('color', 'bg', 0), // 菜单分组项背景色 - 'color-group-item-text': getCssVar('color', 'text', 1), // 菜单分组项文字颜色 - // Spacing - 'spacing-item-icon-margin': getCssVar('spacing', 'extra-tight'), // 菜单项图标间距 + 'color-bg': getCssVar('color', 'bg', 1), // 菜单背景色 + 'color-text': getCssVar('color', 'text', 0), // 菜单项文字颜色 + 'color-group-bg': getCssVar('color', 'bg', 0), // 菜单分组项背景色 + 'color-group-text': getCssVar('color', 'text', 1), // 菜单分组项文字颜色 + 'spacing-icon-gap': getCssVar('spacing', 'extra-tight'), // 菜单项图标间距 'spacing-item-padding': getCssVar('spacing', 'base-tight') getCssVar('spacing', 'base'), // 菜单项文字间距 - 'spacing-nodata-ph-item-padding': getCssVar('spacing', 'base-tight') - getCssVar('spacing', 'base'), // 菜单分组项无子数据时占位项文字间距 - 'spacing-group-item-padding': getCssVar('spacing', 'base'), // 菜单分组项文字间距 - 'spacing-group-item-icon-margin': 0 getCssVar('spacing', 'extra-tight') 0 0, // 菜单分组项图标间距 - 'spacing-group-item-counter-margin': 0 0 0 getCssVar('spacing', 'tight'), // 菜单分组项计数器间距 - // Font - 'font-item-text-font-size': getCssVar('font-size', 'small'), // 菜单项文字字体大小 - 'font-item-icon-font-size': getCssVar('height-control', 'default'), // 菜单项图标字体大小 - 'font-nodata-ph-item-font-size': getCssVar('font-size', 'regular'), // 菜单分组项无子数据时占位项文字字体大小 - 'font-group-item-font-size': getCssVar('font-size', 'header-6'), // 菜单分组项文字字体大小 - // Other - 'position-item-counter-left': calc(100% - getCssVar('spacing', 'tight')), // 项计数器左边距 - 'icon-group-item-icon-size': getCssVar('width-icon', 'medium'), // 分组项图标大小 + 'spacing-group-padding': getCssVar('spacing', 'base'), // 菜单分组项文字间距 + 'spacing-group-icon-gap': getCssVar('spacing', 'extra-tight'), // 菜单分组项图标间距 + 'spacing-group-counter-margin': 0 0 0 getCssVar('spacing', 'tight'), // 菜单分组项计数器间距 + 'font-text-fontSize': getCssVar('font-size', 'small'), // 菜单项文字字体大小 + 'font-icon-fontSize': getCssVar('height-control', 'default'), // 菜单项图标字体大小 + 'font-group-fontSize': getCssVar('font-size', 'header-6'), // 菜单分组项文字字体大小 + 'font-group-lineHeight': getCssVar('font-size', 'header-5'), // 菜单分组项文字字体大小 + 'icon-group-iconSize': getCssVar('width-icon', 'medium'), // 分组项图标大小 'line-clamp-item-caption': 2, // 项文字行数限制 - 'icon-item-icon-size': getCssVar('height-control', 'default'), // 菜单项图标大小 ); @include b(control-appmenu-iconview) { @@ -44,7 +35,7 @@ $control-appmenu-iconview: ( width: 100%; height: 100%; padding: getCssVar('control-appmenu-iconview', 'spacing-item-padding'); - color: getCssVar('control-appmenu-iconview', 'color-item-text'); + color: getCssVar('control-appmenu-iconview', 'color-text'); } @include m(icon) { @@ -52,9 +43,9 @@ $control-appmenu-iconview: ( display: flex; align-items: center; justify-content: center; - width: getCssVar('control-appmenu-iconview', 'icon-item-icon-size'); - margin-bottom: getCssVar('control-appmenu-iconview', 'spacing-item-icon-margin'); - font-size: getCssVar('control-appmenu-iconview', 'font-item-icon-font-size'); + width: getCssVar('control-appmenu-iconview', 'font-icon-fontSize'); + margin-bottom: getCssVar('control-appmenu-iconview', 'spacing-icon-gap'); + font-size: getCssVar('control-appmenu-iconview', 'font-icon-fontSize'); .#{bem(icon)} { width: 100%; @@ -79,8 +70,8 @@ $control-appmenu-iconview: ( @include m(counter) { position: absolute; top: 0; - left: getCssVar('control-appmenu-iconview', 'position-item-counter-left'); - transform: translateY(-50%); + right: 0; + transform: translate(80%, -50%); } @include m(caption) { @@ -88,7 +79,7 @@ $control-appmenu-iconview: ( flex: 1; height: fit-content; overflow: hidden; - font-size: getCssVar('control-appmenu-iconview', 'font-item-text-font-size'); + font-size: getCssVar('control-appmenu-iconview', 'font-text-fontSize'); text-overflow: ellipsis; // 图标菜单最大俩行显示 @@ -106,23 +97,21 @@ $control-appmenu-iconview: ( // 分组样式 @include e(group-item) { - flex-basis: 100% !important; @include m(container) { width: 100%; } @include m(header) { display: flex; align-items: center; - padding: getCssVar('control-appmenu-iconview', 'spacing-group-item-padding'); - font-size: getCssVar('control-appmenu-iconview', 'font-group-item-font-size'); - color: getCssVar('control-appmenu-iconview', 'color-group-item-text'); - background-color: getCssVar('control-appmenu-iconview', 'color-group-item-bg'); + padding: getCssVar('control-appmenu-iconview', 'spacing-group-padding'); + font-size: getCssVar('control-appmenu-iconview', 'font-group-fontSize'); + color: getCssVar('control-appmenu-iconview', 'color-group-text'); + background-color: getCssVar('control-appmenu-iconview', 'color-group-bg'); .#{bem(icon)} { - min-width: getCssVar('control-appmenu-iconview', 'icon-group-item-icon-size'); - margin: getCssVar( + margin-right: getCssVar( 'control-appmenu-iconview', - 'spacing-group-item-icon-margin' + 'spacing-group-icon-gap' ); } } @@ -130,8 +119,11 @@ $control-appmenu-iconview: ( display: flex; width: 100%; } + @include m(caption) { + line-height: getCssVar('control-appmenu-iconview', 'font-group-lineHeight'); + } @include m(counter) { - margin: getCssVar('control-appmenu-iconview', 'spacing-group-item-counter-margin'); + margin: getCssVar('control-appmenu-iconview', 'spacing-group-counter-margin'); } } @@ -142,8 +134,8 @@ $control-appmenu-iconview: ( @include b(control-appmenu-iconview-no-data) { width: 100%; - padding: getCssVar(control-appmenu-iconview, spacing-nodata-ph-item-padding); - font-size: getCssVar(control-appmenu-iconview, font-nodata-ph-item-font-size); - color: getCssVar(control-appmenu-iconview, color-nodata-ph-item-text); + padding: getCssVar(control-appmenu-iconview, spacing-item-padding); + font-size: getCssVar(control-appmenu-iconview, font-item-fontSize); + color: getCssVar(control-appmenu-iconview, color-text); text-align: center; } diff --git a/src/control/app-menu-icon-view/app-menu-icon-view.tsx b/src/control/app-menu-icon-view/app-menu-icon-view.tsx index 070c32ec47b7e954faf8fd17cffdd1082dd765b2..4bcef085ae04c41f9690e310341f9321aef609d4 100644 --- a/src/control/app-menu-icon-view/app-menu-icon-view.tsx +++ b/src/control/app-menu-icon-view/app-menu-icon-view.tsx @@ -45,7 +45,9 @@ export const AppMenuIconViewControl = defineComponent({