Skip to content

Commit

Permalink
fix(style-panel): modify some reviews & color variables & Align lables
Browse files Browse the repository at this point in the history
  • Loading branch information
betterdancing committed Dec 9, 2024
1 parent 3f64e3d commit 9a03f5e
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion packages/common/component/MetaCodeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export default {
height: 24px;
padding: 4px;
border: 1px solid var(--ti-lowcode-meta-codeEditor-border-color);
border-radius: 6px;
border-radius: var(--te-base-border-radius-1);
&:hover {
border-color: var(--ti-lowcode-meta-codeEditor-border-hover-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,31 @@
<div class="tab-container">
<div class="tabs-wrap">
<tiny-button-group>
<tiny-button
v-for="(item, index) in uncollapsedOptions"
:key="item.label || item.icon"
:style="{ width: getItemWidth() + 'px' }"
:class="['tab-item', { selected: picked === (valueKey ? item.value[valueKey] : item.value) }]"
@click.stop="change(item)"
>
<span
:class="[
'label-text',
{ 'border-right': collapsedOptions.length || index < uncollapsedOptions.length - 1 }
]"
<div class="button-wrap" v-for="(item, index) in uncollapsedOptions" :key="item.label || item.icon">
<tiny-button
:style="{ width: getItemWidth() + 'px' }"
:class="['tab-item', { selected: picked === (valueKey ? item.value[valueKey] : item.value) }]"
@click.stop="change(item)"
>
<span v-if="item?.label && !item?.content">{{ item.label }}</span>
<tiny-popover
v-if="item?.content"
:placement="placement"
:open-delay="1000"
:visible-arrow="false"
:content="item.content"
trigger="hover"
>
<template #reference>
<span v-if="item?.label">{{ item.label }}</span>
<svg-icon v-if="item?.icon" :name="item.icon" class="bem-Svg"></svg-icon>
</template>
</tiny-popover>
</span>
</tiny-button>
<span :class="['label-text']">
<span v-if="item?.label && !item?.content">{{ item.label }}</span>
<tiny-popover
v-if="item?.content"
:placement="placement"
:open-delay="1000"
:visible-arrow="false"
:content="item.content"
trigger="hover"
>
<template #reference>
<span v-if="item?.label">{{ item.label }}</span>
<svg-icon v-if="item?.icon" :name="item.icon" class="bem-Svg"></svg-icon>
</template>
</tiny-popover>
</span>
</tiny-button>
<span :class="[{ 'border-right': collapsedOptions.length || index < uncollapsedOptions.length - 1 }]"></span>
</div>
<tiny-dropdown
v-if="collapsedOptions.length"
trigger="click"
Expand Down Expand Up @@ -198,13 +194,23 @@ const change = (item) => {
.tabs-wrap {
display: flex;
justify-content: space-between;
background-color: var(--te-common-bg-container);
border-radius: 4px;
.tiny-button-group {
display: flex;
.button-wrap {
display: flex;
align-items: center;
}
}
.tiny-button.tiny-button.tiny-button--default {
margin: 0;
padding: 0;
border: none;
background-color: var(--te-common-bg-container);
line-height: 14px;
min-width: 20px;
background-color: var(--te-common-bg-container);
color: var(--te-common-text-weaken);
&:hover {
Expand All @@ -225,7 +231,6 @@ const change = (item) => {
text-align: center;
cursor: pointer;
position: relative;
background-color: var(--te-common-bg-container);
.label-text {
width: 100%;
height: 12px;
Expand All @@ -240,7 +245,6 @@ const change = (item) => {
justify-content: center;
align-items: center;
height: 24px;
background-color: var(--te-common-bg-container);
color: var(--te-common-text-weaken);
&:hover {
Expand Down Expand Up @@ -290,14 +294,16 @@ const change = (item) => {
padding: 4px 12px;
background-color: var(--te-common-bg-default);
&:hover {
background-color: var(--te-common-bg-container);
border-radius: 4px;
&:hover,
&:active {
background-color: var(--te-common-bg-prompt);
color: var(--te-common-text-primary);
}
}
}
.border-right {
display: inline-block;
height: 12px;
border-right: 1px solid var(--te-common-border-default);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ export default {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
:class="{ 'is-setting': isBorderSetting(), 'set-border-style': true }"
@click="openSetting(BORDER_PROPERTY.Border, $event)"
>
<span class="border-title">边框</span>
<span>边框</span>
</label>
</div>
<div class="border-container">
Expand Down Expand Up @@ -574,7 +574,6 @@ export default {
.radius-label {
flex: 0 0 48px;
padding: 0 2px;
line-height: 24px;
color: var(--ti-lowcode-component-setting-panel-label-color);
}
Expand Down Expand Up @@ -655,10 +654,6 @@ export default {
.border-label {
color: var(--te-common-text-secondary);
flex-shrink: 0;
.border-title {
margin-left: 2px;
}
}
.border-container {
display: flex;
Expand Down Expand Up @@ -724,7 +719,7 @@ export default {
span {
border-radius: 2px;
color: var(--ti-lowcode-style-setting-label-color);
background: var(--ti-lowcode-style-setting-label-bg);
background: var(--te-common-bg-text-emphasize);
cursor: pointer;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ const handleDeleteCurSelector = () => {
display: flex;
padding: 3px;
border: 1px solid var(--ti-lowcode-className-selector-container-border-color);
border-radius: 6px;
border-radius: var(--te-base-border-radius-1);
cursor: pointer;
}
Expand All @@ -528,7 +528,7 @@ const handleDeleteCurSelector = () => {
min-width: 0;
padding: 1px 10px;
border: 1px solid var(--ti-lowcode-className-selector-container-border-color);
border-radius: 6px;
border-radius: var(--te-base-border-radius-1);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
font-size: 12px;
Expand Down Expand Up @@ -670,7 +670,7 @@ const handleDeleteCurSelector = () => {
flex: 4;
min-width: 84px;
border: 1px solid var(--ti-lowcode-className-selector-container-border-color);
border-radius: 6px;
border-radius: var(--te-base-border-radius-1);
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export default {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default {
.input-select {
display: flex;
align-items: center;
background-color: var(--ti-lowcode-tabs-bg);
background-color: var(--te-common-bg-default);
border-radius: 3px;
transition: 0.3s;
&.focus {
Expand Down
2 changes: 1 addition & 1 deletion packages/settings/styles/src/components/layout/GridBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ export default {
}
.is-setting {
color: var(--ti-lowcode-style-setting-label-color);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
:deep(.reference-wrapper) {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export default {
.display-label {
flex: 0 0 50px;
padding: 0 3px;
line-height: 24px;
color: var(--te-common-text-secondary);
Expand All @@ -139,7 +138,7 @@ export default {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export default {
align-items: center;
justify-content: center;
&.is-setting {
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
&.is-show {
Expand Down Expand Up @@ -603,7 +603,7 @@ export default {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
}
.lr-path-color {
Expand Down
5 changes: 1 addition & 4 deletions packages/settings/styles/src/components/size/SizeGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ span {
.size-label {
flex: 0 0 52px;
padding-left: 2px;
margin-right: 2px;
line-height: 28px;
color: var(--te-common-text-secondary);
Expand All @@ -485,7 +484,6 @@ span {
}
.overflow-label {
flex: 0 0 54px;
padding: 0 2px;
line-height: 24px;
color: var(--te-common-text-secondary);
}
Expand All @@ -495,7 +493,7 @@ span {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
.is-setting {
Expand Down Expand Up @@ -545,7 +543,6 @@ span {
}
.fit-label {
flex: 0 0 54px;
padding: 0 2px;
line-height: 28px;
color: var(--te-common-text-secondary);
span {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ export default {
justify-content: center;
&.is-setting {
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
&.is-show {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
&:hover,
&.active {
color: var(--ti-lowcode-style-setting-label-color);
background: var(--ti-lowcode-style-setting-label-bg);
background: var(--te-common-bg-text-emphasize);
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ export default {
&:hover,
&.active {
color: var(--ti-lowcode-style-setting-label-color);
background: var(--ti-lowcode-style-setting-label-bg);
background: var(--te-common-bg-text-emphasize);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ export default {
.typography-label {
margin-right: -16px;
line-height: 16px;
color: var(--te-common-text-secondary);
.font-family-col {
width: 118px;
Expand Down Expand Up @@ -663,12 +662,15 @@ export default {
}
}
.typography-label {
color: var(--te-common-text-secondary);
}
.is-setting {
span {
cursor: pointer;
border-radius: 2px;
color: var(--te-common-text-emphasize);
background-color: var(--ti-lowcode-style-setting-label-bg);
background-color: var(--te-common-bg-text-emphasize);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/theme/base/src/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
--te-common-bg-switch: var(--te-base-gray-50); // 开关默认色 #c2c2c2
--te-common-bg-error: var(--te-base-red-20); // 浅色错误背景-背景色 #fce2e0
--te-common-bg-popover: var(--te-base-gray-0); // 对话框/tooltip/popover背景 #fff
--te-common-bg-text-emphasize: var(--te-base-blue-140); // 强调性文字背景色 rgba(20, 118, 255, 0.1)

// 通用间距
--te-common-vertical-item-spacing-normal: 12px; // 表单元素之间的距离,标题和列表之间的距离、一个独立元素的padding等等
Expand Down

0 comments on commit 9a03f5e

Please sign in to comment.