Skip to content

Commit

Permalink
style: select and button
Browse files Browse the repository at this point in the history
  • Loading branch information
ZonaHex committed Nov 15, 2023
1 parent 73a55db commit fdb2626
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 62 deletions.
2 changes: 1 addition & 1 deletion src/assets/style/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
padding: 7px 14px;
font-size: 14px;
line-height: 16px;
border-radius: 6px;
border-radius: 4px;
}

.arco-btn-primary[type='button'] {
Expand Down
1 change: 0 additions & 1 deletion src/assets/style/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
height: 100%;
background-color: transparent;
border: 1px solid var(--border-color);
border-radius: 6px;
}

.arco-input-wrapper:hover {
Expand Down
53 changes: 8 additions & 45 deletions src/assets/style/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,11 @@ body {
}

.menu-dropdown {
.arco-dropdown {
padding: 4px 0;
border: 0;
border-radius: 4px;
box-shadow: 0 2px 10px 0 var(--box-shadow-color);

.arco-dropdown-option {
padding: 0;
}

.arco-dropdown-option:not(.arco-dropdown-option-disabled):hover {
background-color: transparent;
}

.arco-dropdown-option-content {
width: 100%;
height: 32px;
line-height: 32px;
border-radius: 0;
}
.arco-dropdown-option {
padding: 0;
}

.arco-dropdown {
.arco-link {
justify-content: flex-start;
width: 100%;
Expand All @@ -152,27 +136,6 @@ body {
color: var(--small-font-color);
background-color: var(--main-bg-color);
}

.arco-btn-text[type='button'] {
justify-content: start;
width: 100%;
color: var(--small-font-color);
font-size: 13px;
}

.arco-btn-text[type='button']:hover {
background-color: var(--grey-bg-color);
}
}

&.quick-select {
.arco-dropdown .arco-btn-text[type='button'] {
border-radius: 0;

&:hover {
background-color: var(--main-bg-color);
}
}
}
}

Expand Down Expand Up @@ -251,9 +214,9 @@ body {
}

.arco-select-dropdown {
padding: 0;
padding: 4px 0;
border: 0;
border-radius: 6px;
border-radius: 4px;
box-shadow: 0 2px 10px 0 var(--box-shadow-color);

.arco-select-option {
Expand All @@ -262,7 +225,7 @@ body {
font-size: 13px;
line-height: 32px;
text-align: left;
border-radius: 6px;
border-radius: 0;

.arco-checkbox-icon {
width: 12px;
Expand Down Expand Up @@ -309,7 +272,7 @@ body {

.arco-input-wrapper {
background: var(--grey-bg-color);
border-radius: 6px;
border-radius: 4px;

.arco-input[disabled] {
-webkit-text-fill-color: var(--hover-font-color);
Expand Down
28 changes: 20 additions & 8 deletions src/assets/style/select.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
padding-right: 8px;
padding-left: 8px;
background: var(--grey-bg-color);
border-radius: 6px;
border-radius: 4px;
}

.arco-select-view-single:hover {
Expand All @@ -20,7 +20,7 @@
padding-left: 8px;
background: var(--grey-bg-color);
border: 1px solid transparent;
border-radius: 6px;
border-radius: 4px;

.arco-select-view-inner .arco-select-view-tag {
background: var(--grey-bg-color);
Expand Down Expand Up @@ -50,10 +50,22 @@
background: var(--warning-bg-color);
border: 1px solid var(--warning-color);
}
.arco-select-dropdown {
.arco-select-option-active,
.arco-select-option:not(.arco-select-dropdown .arco-select-option-disabled):hover {
background-color: var(--grey-bg-color);
}
}
}

.arco-dropdown {
padding: 4px 0;
border: 0;
border-radius: 4px;
box-shadow: 0 2px 10px 0 var(--box-shadow-color);
}

.arco-dropdown-option:not(.arco-dropdown-option-disabled):hover {
background-color: transparent;
}

.arco-dropdown-option-content {
width: 100%;
height: 32px;
line-height: 32px;
border-radius: 0;
}
34 changes: 27 additions & 7 deletions src/views/dashboard/modules/table-manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ a-card.table-manager(:bordered="false")
:class="nodeData.childrenType === 'details' && expandedKeys?.includes(nodeData.key) ? '' : 'icon-color'"
)
use(href="#details")
a-dropdown.menu-dropdown.quick-select(
trigger="click"
position="right"
@click="(event) => clickMenu(event, nodeData)"
)
a-dropdown.quick-select(trigger="click" position="right" @click="(event) => clickMenu(event, nodeData)")
a-button(type="text")
template(#icon)
svg.icon-20.icon-color
Expand All @@ -76,7 +72,7 @@ a-card.table-manager(:bordered="false")
.tree-data
transition(name="slide-fade")
.data-type {{ nodeData.dataType }}
a-dropdown.menu-dropdown.quick-select(v-if="nodeData.dataType" trigger="click" position="right")
a-dropdown.quick-select(v-if="nodeData.dataType" trigger="click" position="right")
a-button(type="text")
template(#icon)
svg.icon-20.icon-color
Expand Down Expand Up @@ -554,4 +550,28 @@ a-card.table-manager(:bordered="false")
}
</style>

<style lang="less"></style>
<style lang="less">
.quick-select {
.arco-dropdown-option {
padding: 0;
}
.arco-dropdown .arco-btn-text[type='button'] {
border-radius: 0;
&:hover {
background-color: var(--main-bg-color);
}
}
.arco-btn-text[type='button'] {
justify-content: start;
width: 100%;
color: var(--small-font-color);
font-size: 13px;
}
.arco-btn-text[type='button']:hover {
background-color: var(--grey-bg-color);
}
}
</style>

0 comments on commit fdb2626

Please sign in to comment.