diff --git a/packages/opendesign/src/option/style/index.scss b/packages/opendesign/src/option/style/index.scss index 963760e610cbbff65b4e79ec57f8f8c8d46a3936..504d59c44eea7243e3faa4e454b7675ea8b98768 100644 --- a/packages/opendesign/src/option/style/index.scss +++ b/packages/opendesign/src/option/style/index.scss @@ -1,42 +1,2 @@ -@use '../../_styles/mixin.scss' as *; -@use './var.scss'; - -.o-option { - display: flex; - align-items: center; - padding: var(--option-padding); - color: var(--option-color); - background-color: var(--option-bg-color); - font-size: var(--option-text-size); - line-height: var(--option-text-height); - border-radius: var(--option-radius); - transition: background-color var(--o-duration-s) var(--o-easing-standard); - cursor: pointer; - margin-bottom: var(--option-gap); - &:last-child { - margin-bottom: 0; - } - @include hover { - &.o-option-multiple:hover, - &:hover { - background-color: var(--option-bg-color-hover); - color: var(--option-color-hover); - } - } - &.active { - font-weight: 500; - color: var(--option-color-active); - background-color: var(--option-bg-color-active); - } -} - -.o-option-disabled { - &, - &:hover, - &:active, - &.o-option-multiple:hover { - cursor: not-allowed; - color: var(--option-color-disabled); - background-color: var(--option-bg-color-disabled); - } -} +@use './style.scss' as *; +@use './media.scss' as *; diff --git a/packages/opendesign/src/option/style/media.scss b/packages/opendesign/src/option/style/media.scss new file mode 100644 index 0000000000000000000000000000000000000000..612fbb04300f70635528cfc7538d2bd4760df6ca --- /dev/null +++ b/packages/opendesign/src/option/style/media.scss @@ -0,0 +1,9 @@ +@use '../../_styles/mixin.scss' as *; + +@include respond-to('<=laptop') { + .o-option { + --option-text-size: var(--o-font_size-tip1); + --option-text-height: var(--o-line_height-tip1); + --option-padding: 6px 12px; + } +} diff --git a/packages/opendesign/src/option/style/style.scss b/packages/opendesign/src/option/style/style.scss new file mode 100644 index 0000000000000000000000000000000000000000..963760e610cbbff65b4e79ec57f8f8c8d46a3936 --- /dev/null +++ b/packages/opendesign/src/option/style/style.scss @@ -0,0 +1,42 @@ +@use '../../_styles/mixin.scss' as *; +@use './var.scss'; + +.o-option { + display: flex; + align-items: center; + padding: var(--option-padding); + color: var(--option-color); + background-color: var(--option-bg-color); + font-size: var(--option-text-size); + line-height: var(--option-text-height); + border-radius: var(--option-radius); + transition: background-color var(--o-duration-s) var(--o-easing-standard); + cursor: pointer; + margin-bottom: var(--option-gap); + &:last-child { + margin-bottom: 0; + } + @include hover { + &.o-option-multiple:hover, + &:hover { + background-color: var(--option-bg-color-hover); + color: var(--option-color-hover); + } + } + &.active { + font-weight: 500; + color: var(--option-color-active); + background-color: var(--option-bg-color-active); + } +} + +.o-option-disabled { + &, + &:hover, + &:active, + &.o-option-multiple:hover { + cursor: not-allowed; + color: var(--option-color-disabled); + background-color: var(--option-bg-color-disabled); + } +} diff --git a/packages/opendesign/src/select/OSelect.vue b/packages/opendesign/src/select/OSelect.vue index 5828c83cd406677c6533d96f2de34c1282aff116..712b2f5ceffac017835f52d835d46a09013e3c3a 100644 --- a/packages/opendesign/src/select/OSelect.vue +++ b/packages/opendesign/src/select/OSelect.vue @@ -366,6 +366,7 @@ const selectDlgAction: DialogActionT[] = [ { selectVal1.value = 'opt3'; @@ -22,7 +33,7 @@ const changeVal = () => { - + @@ -37,7 +48,7 @@ const changeVal = () => { - + diff --git a/packages/opendesign/src/select/__demo__/SelectLoading.vue b/packages/opendesign/src/select/__demo__/SelectLoading.vue index bf595a86ec850f7119010378aba853ef188b4de6..513f172994b1244216da4cb352a4de32a9e5ee1a 100644 --- a/packages/opendesign/src/select/__demo__/SelectLoading.vue +++ b/packages/opendesign/src/select/__demo__/SelectLoading.vue @@ -104,7 +104,6 @@ const onAdd = () => { diff --git a/packages/opendesign/src/table/style/index.scss b/packages/opendesign/src/table/style/index.scss index 3ccc20e89dfcc1414a745f18f944908edaffdccc..504d59c44eea7243e3faa4e454b7675ea8b98768 100644 --- a/packages/opendesign/src/table/style/index.scss +++ b/packages/opendesign/src/table/style/index.scss @@ -1,114 +1,2 @@ -@use '../../_styles/mixin.scss' as *; -@use './var.scss'; - -.o-table { - position: relative; - color: var(--table-color); - - table { - width: 100%; - // border-collapse: collapse; - border-spacing: 0; - } - th, - td { - box-sizing: border-box; - } - th { - text-align: left; - font-weight: normal; - background-color: var(--table-head-bg); - - padding: var(--table-cell-padding); - font-size: var(--table-head-text-size); - line-height: var(--table-head-text-height); - height: var(--table-head-cell-height); - } - td { - padding: var(--table-cell-padding); - font-size: var(--table-text-size); - line-height: var(--table-text-height); - height: var(--table-cell-height); - } - - tbody tr { - @include hover { - &:hover { - background-color: var(--table-row-hover); - } - } - &:active { - background-color: var(--table-row-active); - } - } -} -.o-table-wrap { - border-radius: var(--table-radius); - overflow: hidden; - background-color: var(--table-bg-color); -} - -// border -.o-table-border-all, -.o-table-border-frame { - border: var(--table-border); -} -.o-table-border-all, -.o-table-border-row { - th, - td { - border-bottom: var(--table-border); - } -} - -.o-table-border-all, -.o-table-border-frame, -.o-table-border-row { - tr.last { - td { - border-bottom-color: transparent; - } - } -} - -.o-table-border-all, -.o-table-border-column { - th, - td { - border-right: var(--table-border); - - &.last { - border-right-color: transparent; - } - } -} - -// tip -.o-table-tip-wrap { - display: flex; - justify-content: center; - align-items: center; - font-size: var(--table-tip-text-size); - line-height: var(--table-tip-text-height); - color: var(--table-tip-color); - min-height: var(--table-body-min-height); -} -.o-table-loading-wrap { - display: flex; - justify-content: center; - align-items: center; - font-size: var(--table-tip-text-size); - line-height: var(--table-tip-text-height); - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: var(--table-loading-mask); - color: var(--table-loading-color); - border-radius: var(--table-radius); -} - -.o-table-loading-label { - margin-left: 8px; -} +@use './style.scss' as *; +@use './media.scss' as *; diff --git a/packages/opendesign/src/table/style/media.scss b/packages/opendesign/src/table/style/media.scss new file mode 100644 index 0000000000000000000000000000000000000000..d1b3400aaa7f1e060e53559cd9658ed991b441ae --- /dev/null +++ b/packages/opendesign/src/table/style/media.scss @@ -0,0 +1,70 @@ +@use '../../_styles/mixin.scss' as *; + +.o-table { + @include respond-to('<=pad') { + --table-radius: var(--o-radius_control-s); + } + + @include respond-to('laptop') { + --table-text-size: var(--o-font_size-tip1); + --table-text-height: var(--o-line_height-tip1); + + --table-head-cell-height: 40px; + --table-cell-height: 48px; + + --table-cell-padding: 12px 12px; + } + @include respond-to('pad') { + --table-text-size: var(--o-font_size-tip1); + --table-text-height: var(--o-line_height-tip1); + + --table-head-cell-height: 40px; + --table-cell-height: 48px; + + --table-cell-padding: 8px 12px; + } + @include respond-to('phone') { + --table-text-size: var(--o-font_size-tip2); + --table-text-height: var(--o-line_height-tip2); + + --table-head-cell-height: 32px; + --table-cell-height: 32px; + + --table-head-cell-padding: 4px 12px; + --table-cell-padding: 4px 12px; + } +} +.o-table-small { + @include respond-to('<=laptop') { + --table-head-cell-padding: 4px 12px; + --table-cell-padding: 8px 12px; + } + + @include respond-to('<=pad') { + --table-radius: var(--o-radius_control-s); + } + + @include respond-to('laptop') { + --table-text-size: var(--o-font_size-tip1); + --table-text-height: var(--o-line_height-tip1); + + --table-head-cell-height: 32px; + --table-cell-height: 40px; + } + + @include respond-to('pad') { + --table-text-size: var(--o-font_size-tip1); + --table-text-height: var(--o-line_height-tip1); + + --table-head-cell-height: 32px; + --table-cell-height: 40px; + } + + @include respond-to('phone') { + --table-text-size: var(--o-font_size-tip2); + --table-text-height: var(--o-line_height-tip2); + + --table-head-cell-height: 32px; + --table-cell-height: 32px; + } +} diff --git a/packages/opendesign/src/table/style/style.scss b/packages/opendesign/src/table/style/style.scss new file mode 100644 index 0000000000000000000000000000000000000000..78668c1a4b7648755fe73b69c5e9f6cd1c901791 --- /dev/null +++ b/packages/opendesign/src/table/style/style.scss @@ -0,0 +1,114 @@ +@use '../../_styles/mixin.scss' as *; +@use './var.scss'; + +.o-table { + position: relative; + color: var(--table-color); + + table { + width: 100%; + // border-collapse: collapse; + border-spacing: 0; + } + th, + td { + box-sizing: border-box; + } + th { + text-align: left; + font-weight: normal; + background-color: var(--table-head-bg); + + padding: var(--table-head-cell-padding); + font-size: var(--table-head-text-size); + line-height: var(--table-head-text-height); + height: var(--table-head-cell-height); + } + td { + padding: var(--table-cell-padding); + font-size: var(--table-text-size); + line-height: var(--table-text-height); + height: var(--table-cell-height); + } + + tbody tr { + @include hover { + &:hover { + background-color: var(--table-row-hover); + } + } + &:active { + background-color: var(--table-row-active); + } + } +} +.o-table-wrap { + border-radius: var(--table-radius); + overflow: hidden; + background-color: var(--table-bg-color); +} + +// border +.o-table-border-all, +.o-table-border-frame { + border: var(--table-border); +} +.o-table-border-all, +.o-table-border-row { + // th, + td { + border-bottom: var(--table-border); + } +} + +.o-table-border-all, +.o-table-border-frame, +.o-table-border-row { + tr.last { + td { + border-bottom-color: transparent; + } + } +} + +.o-table-border-all, +.o-table-border-column { + th, + td { + border-right: var(--table-border); + + &.last { + border-right-color: transparent; + } + } +} + +// tip +.o-table-tip-wrap { + display: flex; + justify-content: center; + align-items: center; + font-size: var(--table-tip-text-size); + line-height: var(--table-tip-text-height); + color: var(--table-tip-color); + min-height: var(--table-body-min-height); +} +.o-table-loading-wrap { + display: flex; + justify-content: center; + align-items: center; + font-size: var(--table-tip-text-size); + line-height: var(--table-tip-text-height); + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: var(--table-loading-mask); + color: var(--table-loading-color); + border-radius: var(--table-radius); +} + +.o-table-loading-label { + margin-left: 8px; +} diff --git a/packages/opendesign/src/table/style/var.scss b/packages/opendesign/src/table/style/var.scss index ce26b742b10e5fc289f2a6e182727aafa3d7e553..315ab48668067fbcbd5b584f1da6c9191df6dc0c 100644 --- a/packages/opendesign/src/table/style/var.scss +++ b/packages/opendesign/src/table/style/var.scss @@ -22,21 +22,28 @@ --table-body-min-height: 200px; --table-bg-color: var(--o-color-control-light); - --table-radius: var(--o-radius_control-s); - --table-cell-padding: 8px 12px; - --table-cell-height: 48px; + --table-radius: var(--o-radius_control-m); + + --table-head-cell-padding: 8px 16px; + --table-cell-padding: 16px 16px; + + --table-cell-height: 56px; --table-head-cell-height: 48px; } .o-table-small { - --table-text-size: var(--o-font_size-tip1); - --table-text-height: var(--o-line_height-tip1); + --table-text-size: var(--o-font_size-text1); + --table-text-height: var(--o-line_height-text1); --table-head-text-size: var(--table-text-size); --table-head-text-height: var(--table-text-height); - --table-cell-padding: 4px 12px; - --table-cell-height: 32px; - --table-head-cell-height: 32px; + --table-radius: var(--o-radius_control-m); + + --table-head-cell-padding: 8px 12px; + --table-cell-padding: 12px 12px; + + --table-cell-height: 48px; + --table-head-cell-height: 40px; } diff --git a/packages/portal-ak/src/ak/theme/select.scss b/packages/portal-ak/src/ak/theme/select.scss index b25884a818616728db21434efdce91253e7c0bde..55bb15b4f61f5fe731b385aef79ed8a882f67f4f 100644 --- a/packages/portal-ak/src/ak/theme/select.scss +++ b/packages/portal-ak/src/ak/theme/select.scss @@ -1,51 +1,6 @@ @use './mixin.scss' as *; -.o-select { - --select-multiple-padding: 3px 7px; -} -.o-select-outline { - --select-bg-color: var(--o-color-control-light); - --select-bg-color-disabled: var(--o-color-control4-light); -} -.o-select-text { - --select-color: var(--o-color-info1); - --select-color-hover: var(--o-color-info2); - --select-color-focus: var(--o-color-info2); - --select-bg-color-hover: transparent; - --select-bg-color-focus: transparent; -} -.o-select-medium { - --select-padding: 0 15px; - --select-text-size: var(--o-font_size-tip1); - --select-text-height: var(--o-line_height-tip1); -} -.o-select-large { - --select-padding: 0 15px; - --select-text-size: var(--o-font_size-text1); - --select-text-height: var(--o-line_height-text1); - - @include respond-to('<=pad') { - --select-text-size: var(--o-font_size-tip1); - --select-text-height: var(--o-line_height-tip1); - } -} -.o-select-options { - --select-options-radius: var(--o-radius_control-m); - --select-options-max-height: 302px; -} -// 移动端响应式 -.o-select-options-dlg { - --select-options-radius: 0; -} - -.o-select, -.o-select-tag-popover { - --select-tag-radius: var(--o-control_size-s); - --select-tag-text-size: var(--o-font_size-tip2); - --select-tag-text-height: var(--o-line_height-tip2); -} .c-select-action { - border-top: 1px solid var(--o-color-control4); padding: 8px 12px; cursor: pointer; display: flex; diff --git a/packages/portal-ak/src/ak/theme/table.scss b/packages/portal-ak/src/ak/theme/table.scss index d27a5bcb4f41203a3f21e24a8fab67a99ad14d54..2162e0ce9f4a2df2416348f9c8d4d9c2010d33d1 100644 --- a/packages/portal-ak/src/ak/theme/table.scss +++ b/packages/portal-ak/src/ak/theme/table.scss @@ -1,65 +1 @@ @use './mixin.scss' as *; - -.o-table { - --table-cell-height: 56px; - --table-head-cell-height: 48px; - --table-cell-padding: 8px 16px 7px; - @include respond-to('laptop') { - --table-cell-height: 48px; - --table-head-cell-height: 40px; - --table-text-size: var(--o-font_size-tip1); - --table-text-height: var(--o-line_height-tip1); - } - - @include respond-to('laptop') { - --table-cell-height: 48px; - --table-head-cell-height: 40px; - --table-text-size: var(--o-font_size-tip1); - --table-text-height: var(--o-line_height-tip1); - - --table-cell-padding: 8px 12px 7px; - } - - @include respond-to('phone') { - --table-cell-height: 32px; - --table-head-cell-height: 32px; - - --table-text-size: var(--o-font_size-tip2); - --table-text-height: var(--o-line_height-tip2); - - --table-cell-padding: 8px 12px 7px; - --table-radius: var(--o-radius_control-xs); - } -} - -.o-table-small { - --table-text-size: var(--o-font_size-text1); - --table-text-height: var(--o-line_height-text1); - - --table-cell-height: 48px; - --table-head-cell-height: 40px; - - --table-cell-padding: 8px 12px 7px; - - @include respond-to('pad') { - --table-cell-height: 40px; - --table-head-cell-height: 32px; - - --table-text-size: var(--o-font_size-tip1); - --table-text-height: var(--o-line_height-tip1); - } - @include respond-to('phone') { - --table-cell-height: 34px; - --table-head-cell-height: 34px; - - --table-text-size: var(--o-font_size-tip2); - --table-text-height: var(--o-line_height-tip2); - --table-radius: var(--o-radius_control-xs); - } -} -.o-table-border-all, -.o-table-border-row { - th { - border-bottom: none; - } -}