Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dept): [dept] Optimize style #2487

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@update:approvalPerson="person = $event"
:fetch-hrapprover="getFetchHrapprover"
:category="category"
title="选择权签人"
></tiny-hrapprover>
</div>
</template>
Expand Down
1 change: 1 addition & 0 deletions examples/sites/demos/pc/app/hrapprover/custom-service.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@update:approvalPerson="person = $event"
:fetch-hrapprover="getFetchHrapprover"
:category="category"
title="选择权签人"
></tiny-hrapprover>
</div>
</template>
Expand Down
18 changes: 17 additions & 1 deletion packages/theme/src/base/reset.less
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,23 @@
}
}

.tiny-popper,
.tiny-popper {
&[x-placement^='top'] {
margin-bottom: 4px;
}
&[x-placement^='bottom'] {
margin-top: 4px;
}
&[x-placement^='right'] {
margin-left: 4px;
}
&[x-placement^='left'] {
margin-right: 4px;
}
}


.tiny-popconfirm-popover,
.tiny-tooltip__popper {
.popper__arrow {
position: absolute;
Expand Down
11 changes: 4 additions & 7 deletions packages/theme/src/dept/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,19 @@
.inject-Dept-vars();

&__search {
margin-bottom: 12px;
margin-bottom: 24px;
}

&__text,
&__label {
width: 80px;
font-size: var(--tv-Dept-label-font-size);
color: var(--tv-Dept-label-text-color);
font-weight: var(--tv-Dept-label-font-weight);
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

&__label {
text-align: right;

&.is-selected {
text-align: left;
margin-bottom: 4px;
Expand All @@ -53,7 +50,7 @@
}

&__item {
margin-bottom: 12px;
margin-bottom: 24px;
}

&__search &__label,
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/dept/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

.inject-Dept-vars() {
--tv-Dept-label-font-size: var(--tv-font-size-md);
--tv-Dept-label-text-color: var(--tv-color-text);
--tv-Dept-label-font-weight: var(--tv-font-weight-bold);
--tv-Dept-label-text-color: var(--tv-color-text-secondary);
--tv-Dept-label-font-weight: var(--tv-font-weight-regular);
--tv-Dept-selected-info-text-color: var(--tv-color-text);
--tv-Dept-selected-info-bg-color: var(--tv-color-bg-active);
--tv-Dept-selected-info-border-radius: var(--tv-border-radius-md);
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/espace/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.item-talk,
.item-call,
.item-email {
margin: 0 8px 0 0;
margin: 0 24px 0 0;
line-height: 1;

.@{svg-prefix-cls} {
Expand Down
8 changes: 1 addition & 7 deletions packages/theme/src/roles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

&__selector {
&.@{css-prefix}popover.@{css-prefix}popper {
padding: 0;
padding: 8px 0;
}
}

Expand Down Expand Up @@ -57,11 +57,5 @@
background: var(--tv-Roles-poplist-item-hover-bg-color);
}

&.is-selected {
&,
&:hover {
background: var(--tv-Roles-poplist-item-selected-bg-color);
}
}
}
}
2 changes: 0 additions & 2 deletions packages/theme/src/roles/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@
--tv-Roles-poplist-item-font-size: var(--tv-font-size-md);
// 下拉面板选项悬浮背景色
--tv-Roles-poplist-item-hover-bg-color: var(--tv-color-bg-hover);
// 下拉面板选项选中色
--tv-Roles-poplist-item-selected-bg-color: var(--tv-color-bg-active);
}
2 changes: 1 addition & 1 deletion packages/vue/src/dept/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-dept",
"version": "3.19.0",
"version": "3.19.1",
"description": "",
"main": "lib/index.js",
"module": "index.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/vue/src/dept/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@update:visible="state.open = $event"
:close-on-click-modal="false"
width="550px"
top="10vh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥要改模板呢?需要评估下对saas主题的影响

append-to-body
@close="closeDialog"
:title="title"
Expand Down
Loading