From c648410aec85ec7895352bfabbe1ef57720f3944 Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Sat, 25 Feb 2023 15:45:50 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(multi-select):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=E5=99=A8multi-select?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.less | 2 + src/multi-select/index.js | 12 +++ src/multi-select/index.less | 147 ++++++++++++++++++++++++++++++++++++ src/multi-select/vars.less | 12 +++ src/vars/index.js | 86 +++++++++++---------- src/wheel/index.js | 13 ++++ src/wheel/index.less | 105 ++++++++++++++++++++++++++ src/wheel/vars.less | 13 ++++ 8 files changed, 349 insertions(+), 41 deletions(-) create mode 100644 src/multi-select/index.js create mode 100644 src/multi-select/index.less create mode 100644 src/multi-select/vars.less create mode 100644 src/wheel/index.js create mode 100644 src/wheel/index.less create mode 100644 src/wheel/vars.less diff --git a/src/index.less b/src/index.less index 588df8c..39ffb4f 100644 --- a/src/index.less +++ b/src/index.less @@ -46,3 +46,5 @@ @import './tall-storage/index.less'; @import './time-line/index.less'; @import './upload-list/index.less'; +@import './multi-select/index.less'; +@import './wheel/index.less'; diff --git a/src/multi-select/index.js b/src/multi-select/index.js new file mode 100644 index 0000000..746e58a --- /dev/null +++ b/src/multi-select/index.js @@ -0,0 +1,12 @@ +export default { + "tiny-mobile-multi-select-select-bg": "#fff", + "tiny-mobile-multi-select-header-bg": "#fff", + "tiny-mobile-multi-select-header-item-height": "28px", + "tiny-mobile-multi-select-header-item-bg": "rgba(0, 0, 0, 0.03)", + "tiny-mobile-multi-select-header-item-margin-top": "10px", + "tiny-mobile-multi-select-header-label-color": "#595959", + "tiny-mobile-multi-select-header-label-font-size": "12px", + "tiny-mobile-multi-select-svg-fill": "#c2c2c2", + "tiny-mobile-multi-select-content-height": "226px", + "tiny-mobile-multi-select-footer-width": "164px", +}; diff --git a/src/multi-select/index.less b/src/multi-select/index.less new file mode 100644 index 0000000..274b699 --- /dev/null +++ b/src/multi-select/index.less @@ -0,0 +1,147 @@ +/** +* Copyright (c) 2022 - present TinyVue Authors. +* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. +* +* Use of this source code is governed by an MIT-style license. +* +* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR +* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. +* +*/ + +@import '../custom.less'; +@import '../mixins/hairline.less'; +@import './vars.less'; + +@multi-select-prefix-cls: ~'@{css-prefix}mobile-multi-select'; + +.@{multi-select-prefix-cls} { + background: var(--ti-mobile-multi-select-select-bg, #fff); + width: 100%; + border-radius: 0px 0px 16px 16px; + + &__header { + display: flex; + padding: 0 16px; + flex-direction: row; + justify-content: center; + + &__flexCenter { + height: 48px; + width: 100%; + display: flex; + flex: 1; + flex-direction: row; + justify-content: space-between; + background: var(--ti-mobile-multi-select-header-bg, #fff); + box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.06) inset; + } + + &__calc { + position: absolute; + opacity: 0; + z-index: -999; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + pointer-events: none; + } + + &__item { + display: flex; + align-items: center; + justify-content: center; + height: var(--ti-mobile-multi-select-header-item-height, 28px); + background: var(--ti-mobile-multi-select-header-item-bg, rgba(0, 0, 0, 0.03)); + border-radius: 4px; + margin-top: var(--ti-mobile-multi-select-header-item-margin-top, 10px); + padding: 5px 8px; + + &:hover { + svg { + fill: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + } + } + + &__item:hover &__label { + color: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + + &__label { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; + font-size: var(--ti-mobile-multi-select-header-label-font-size, 12px); + color: var(--ti-mobile-multi-select-header-label-color, #595959); + line-height: 18px; + } + + &__icon { + height: 12px; + line-height: 12px; + width: 12px; + margin-top: 2px; + margin-left: 4px; + font-size: 0px; + transform-origin: center center; + transition: all linear 0.3s; + + svg { + fill: var(--ti-mobile-multi-select-svg-fill, #c2c2c2); + font-size: 12px; + vertical-align: text-bottom; + } + } + + &__active { + svg { + fill: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + + color: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + } + + &__content { + height: var(--ti-mobile-multi-select-content-height, 226px); + } + + .noFooter { + border-radius: 0px 0px 16px 16px; + } + + &__footer { + height: 74px; + padding: 16px; + text-align: center; + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0px 0px 16px 16px; + box-shadow: 0px -1px 3px 0px #f8f8f8; + + button { + width: var(--ti-mobile-multi-select-footer-width, 164px); + } + + :first-child { + margin-right: 15px; + } + + .tiny-mobile-button--primary { + color: var(--ti-mobile-button-color, #fff); + border-color: var(--ti-mobile-base-color-brand-1, #4a79fe); + background-color: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + + .tiny-mobile-button--default { + color: #191919; + } + } +} \ No newline at end of file diff --git a/src/multi-select/vars.less b/src/multi-select/vars.less new file mode 100644 index 0000000..6aa2dae --- /dev/null +++ b/src/multi-select/vars.less @@ -0,0 +1,12 @@ +:root { + --ti-mobile-multi-select-select-background: #fff; + --ti-mobile-multi-select-header-bg: #fff; + --ti-mobile-multi-select-header-item-height: 28px; + --ti-mobile-multi-select-header-item-bg: rgba(0, 0, 0, 0.03); + --ti-mobile-multi-select-header-item-margin-top: 10px; + --ti-mobile-multi-select-header-label-color: #595959; + --ti-mobile-multi-select-header-label-font-size: 12px; + --ti-mobile-multi-select-svg-fill: #c2c2c2; + --ti-mobile-multi-select-content-height: 226px; + --ti-mobile-multi-select-footer-width: 164px; +} diff --git a/src/vars/index.js b/src/vars/index.js index 7feb5b9..63fada4 100644 --- a/src/vars/index.js +++ b/src/vars/index.js @@ -1,42 +1,44 @@ -import ActionSheet from '../action-sheet' -import Alert from '../alert' -import Avatar from '../avatar' -import Badge from '../badge' -import Base from '../base' -import Button from '../button' -import Checkbox from '../checkbox' -import CheckboxGroup from '../checkbox-group' -import DialogBox from '../dialog-box' -import DropdownItem from '../dropdown-item' -import DropdownMenu from '../dropdown-menu' -import Exception from '../exception' -import FileUpload from '../file-upload' -import Form from '../form' -import FormItem from '../form-item' -import ImageViewer from '../image-viewer' -import Input from '../input' -import List from '../list' -import Loading from '../loading' -import MiniPicker from '../mini-picker' -import NavBar from '../nav-bar' -import Numeric from '../numeric' -import PickerColumn from '../picker-column' -import Popup from '../popup' -import Progress from '../progress' -import PullRefresh from '../pull-refresh' -import Radio from '../radio' -import Search from '../search' -import Slider from '../slider' -import Svg from '../svg' -import Switch from '../switch' -import Tabbar from '../tabbar' -import TabbarItem from '../tabbar-item' -import Tabs from '../tabs' -import TallStorage from '../tall-storage' -import TimeLine from '../time-line' -import Upload from '../upload' -import UploadDragger from '../upload-dragger' -import UploadList from '../upload-list' +import ActionSheet from "../action-sheet"; +import Alert from "../alert"; +import Avatar from "../avatar"; +import Badge from "../badge"; +import Base from "../base"; +import Button from "../button"; +import Checkbox from "../checkbox"; +import CheckboxGroup from "../checkbox-group"; +import DialogBox from "../dialog-box"; +import DropdownItem from "../dropdown-item"; +import DropdownMenu from "../dropdown-menu"; +import Exception from "../exception"; +import FileUpload from "../file-upload"; +import Form from "../form"; +import FormItem from "../form-item"; +import ImageViewer from "../image-viewer"; +import Input from "../input"; +import List from "../list"; +import Loading from "../loading"; +import MiniPicker from "../mini-picker"; +import NavBar from "../nav-bar"; +import Numeric from "../numeric"; +import PickerColumn from "../picker-column"; +import Popup from "../popup"; +import Progress from "../progress"; +import PullRefresh from "../pull-refresh"; +import Radio from "../radio"; +import Search from "../search"; +import Slider from "../slider"; +import Svg from "../svg"; +import Switch from "../switch"; +import Tabbar from "../tabbar"; +import TabbarItem from "../tabbar-item"; +import Tabs from "../tabs"; +import TallStorage from "../tall-storage"; +import TimeLine from "../time-line"; +import Upload from "../upload"; +import UploadDragger from "../upload-dragger"; +import UploadList from "../upload-list"; +import MultiSelect from "../multi-select"; +import Wheel from "../wheel"; export default { ...ActionSheet, @@ -77,5 +79,7 @@ export default { ...TimeLine, ...Upload, ...UploadDragger, - ...UploadList -} + ...UploadList, + ...MultiSelect, + ...Wheel, +}; diff --git a/src/wheel/index.js b/src/wheel/index.js new file mode 100644 index 0000000..7ac84ce --- /dev/null +++ b/src/wheel/index.js @@ -0,0 +1,13 @@ +export default { + "tiny-mobile-wheel-content-font-size": "14px", + "tiny-mobile-wheel-wrapper-height": "224px", + "tiny-mobile-wheel-wrapper-font-size": "14px", + "tiny-mobile-wheel-wrapper-scroll-margin-top": "38px", + "tiny-mobile-wheel-scroll-hasFooter-lineHeight": "36px", + "tiny-mobile-wheel-scroll-hasFooter-height": "36px", + "tiny-mobile-wheel-scroll-hasFooter-color": "#595959", + "tiny-mobile-wheel-scroll-hasFooter-lineHeight": "44px", + "tiny-mobile-wheel-scroll-hasFooter-height": "44px", + "tiny-mobile-wheel-scroll-hasFooter-color": "#191919", + "tiny-mobile-wheel-scroll-icon-font-size": "20px", +}; diff --git a/src/wheel/index.less b/src/wheel/index.less new file mode 100644 index 0000000..3112fbe --- /dev/null +++ b/src/wheel/index.less @@ -0,0 +1,105 @@ +/** +* Copyright (c) 2022 - present TinyVue Authors. +* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. +* +* Use of this source code is governed by an MIT-style license. +* +* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR +* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. +* +*/ + +@import '../custom.less'; +@import '../mixins/hairline.less'; +@import './vars.less'; + +@wheel-prefix-cls: ~'@{css-prefix}mobile-wheel'; + +.@{wheel-prefix-cls} { + width: 100%; + + ul { + list-style: none; + padding: 0; + } + + &__container { + width: 100%; + z-index: 100; + overflow: hidden; + text-align: center; + font-size: var(--ti-mobile-wheel-content-font-size, 14px); + } + + &__picker__panel { + z-index: 600; + } + + &__picker__content { + position: relative; + top: 0px; + } + + &__wheel__wrapper { + display: flex; + padding: 0 16px; + + .wheel { + flex: 1; + width: 1%; + height: var(--ti-mobile-wheel-wrapper-height, 224px); + overflow: hidden; + font-size: var(--ti-mobile-wheel-wrapper-font-size, 14px); + + .wheel__scroll_hasFooter { + padding: 0px; + margin-top: var(--ti-mobile-wheel-wrapper-scroll-margin-top, 38px); + line-height: var(--ti-mobile-wheel-scroll-hasFooter-lineHeight, 36px); + list-style: none; + + .wheel__item { + list-style: none; + height: var(--ti-mobile-wheel-scroll-hasFooter-height, 36px); + overflow: hidden; + white-space: nowrap; + color: var(--ti-mobile-wheel-scroll-hasFooter-color, #595959); + font-weight: 500; + } + + .wheel__item__selected { + color: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + } + + .wheel__scroll_noFooter { + padding: 0px; + margin-top: 0px; + line-height: var(--ti-mobile-wheel-scroll-noFooter-lineHeight, 44px); + list-style: none; + + .wheel__item { + list-style: none; + height: var(--ti-mobile-wheel-scroll-noFooter-height, 44px); + overflow: hidden; + white-space: nowrap; + color: var(--ti-mobile-wheel-scroll-noFooter-color, #191919); + font-weight: 500; + display: flex; + justify-content: space-between; + align-items: center; + } + + .wheel__item__selected { + color: var(--ti-mobile-base-color-brand-1, #4a79fe); + fill: var(--ti-mobile-base-color-brand-1, #4a79fe); + } + + .size20 { + font-size: var(--ti-mobile-wheel-scroll-icon-font-size, 20px); + } + } + } + } + +} \ No newline at end of file diff --git a/src/wheel/vars.less b/src/wheel/vars.less new file mode 100644 index 0000000..6c5896c --- /dev/null +++ b/src/wheel/vars.less @@ -0,0 +1,13 @@ +:root { + --ti-mobile-wheel-content-font-size: 14px; + --ti-mobile-wheel-wrapper-height: 224px; + --ti-mobile-wheel-wrapper-font-size: 14px; + --ti-mobile-wheel-wrapper-scroll-margin-top: 38px; + --ti-mobile-wheel-scroll-hasFooter-lineHeight: 36px; + --ti-mobile-wheel-scroll-hasFooter-height: 36px; + --ti-mobile-wheel-scroll-hasFooter-color: #595959; + --ti-mobile-wheel-scroll-hasFooter-lineHeight: 44px; + --ti-mobile-wheel-scroll-hasFooter-height: 44px; + --ti-mobile-wheel-scroll-hasFooter-color: #191919; + --ti-mobile-wheel-scroll-icon-font-size: 20px; +} From 223436e04dce254206c2df11900f516e0f2564b6 Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Wed, 1 Mar 2023 15:22:15 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat(multi-select):=20=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/multi-select/index.js | 6 +++--- src/multi-select/index.less | 6 +++--- src/multi-select/vars.less | 6 +++--- src/wheel/index.js | 12 ++++++------ src/wheel/index.less | 12 ++++++------ src/wheel/vars.less | 12 ++++++------ 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/multi-select/index.js b/src/multi-select/index.js index 746e58a..de03ffe 100644 --- a/src/multi-select/index.js +++ b/src/multi-select/index.js @@ -1,12 +1,12 @@ export default { - "tiny-mobile-multi-select-select-bg": "#fff", + "tiny-mobile-multi-select-bg": "#fff", "tiny-mobile-multi-select-header-bg": "#fff", "tiny-mobile-multi-select-header-item-height": "28px", "tiny-mobile-multi-select-header-item-bg": "rgba(0, 0, 0, 0.03)", "tiny-mobile-multi-select-header-item-margin-top": "10px", - "tiny-mobile-multi-select-header-label-color": "#595959", + "tiny-mobile-multi-select-header-label-text-color": "#595959", "tiny-mobile-multi-select-header-label-font-size": "12px", - "tiny-mobile-multi-select-svg-fill": "#c2c2c2", + "tiny-mobile-multi-select-svg-fill-color": "#c2c2c2", "tiny-mobile-multi-select-content-height": "226px", "tiny-mobile-multi-select-footer-width": "164px", }; diff --git a/src/multi-select/index.less b/src/multi-select/index.less index 274b699..bafccd1 100644 --- a/src/multi-select/index.less +++ b/src/multi-select/index.less @@ -17,7 +17,7 @@ @multi-select-prefix-cls: ~'@{css-prefix}mobile-multi-select'; .@{multi-select-prefix-cls} { - background: var(--ti-mobile-multi-select-select-bg, #fff); + background: var(--ti-mobile-multi-select-bg, #fff); width: 100%; border-radius: 0px 0px 16px 16px; @@ -77,7 +77,7 @@ text-overflow: ellipsis; word-break: break-all; font-size: var(--ti-mobile-multi-select-header-label-font-size, 12px); - color: var(--ti-mobile-multi-select-header-label-color, #595959); + color: var(--ti-mobile-multi-select-header-label-text-color, #595959); line-height: 18px; } @@ -92,7 +92,7 @@ transition: all linear 0.3s; svg { - fill: var(--ti-mobile-multi-select-svg-fill, #c2c2c2); + fill: var(--ti-mobile-multi-select-svg-fill-color, #c2c2c2); font-size: 12px; vertical-align: text-bottom; } diff --git a/src/multi-select/vars.less b/src/multi-select/vars.less index 6aa2dae..a6dfcf0 100644 --- a/src/multi-select/vars.less +++ b/src/multi-select/vars.less @@ -1,12 +1,12 @@ :root { - --ti-mobile-multi-select-select-background: #fff; + --ti-mobile-multi-select-bg: #fff; --ti-mobile-multi-select-header-bg: #fff; --ti-mobile-multi-select-header-item-height: 28px; --ti-mobile-multi-select-header-item-bg: rgba(0, 0, 0, 0.03); --ti-mobile-multi-select-header-item-margin-top: 10px; - --ti-mobile-multi-select-header-label-color: #595959; + --ti-mobile-multi-select-header-label-text-color: #595959; --ti-mobile-multi-select-header-label-font-size: 12px; - --ti-mobile-multi-select-svg-fill: #c2c2c2; + --ti-mobile-multi-select-svg-fill-color: #c2c2c2; --ti-mobile-multi-select-content-height: 226px; --ti-mobile-multi-select-footer-width: 164px; } diff --git a/src/wheel/index.js b/src/wheel/index.js index 7ac84ce..0da3c98 100644 --- a/src/wheel/index.js +++ b/src/wheel/index.js @@ -3,11 +3,11 @@ export default { "tiny-mobile-wheel-wrapper-height": "224px", "tiny-mobile-wheel-wrapper-font-size": "14px", "tiny-mobile-wheel-wrapper-scroll-margin-top": "38px", - "tiny-mobile-wheel-scroll-hasFooter-lineHeight": "36px", - "tiny-mobile-wheel-scroll-hasFooter-height": "36px", - "tiny-mobile-wheel-scroll-hasFooter-color": "#595959", - "tiny-mobile-wheel-scroll-hasFooter-lineHeight": "44px", - "tiny-mobile-wheel-scroll-hasFooter-height": "44px", - "tiny-mobile-wheel-scroll-hasFooter-color": "#191919", + "tiny-mobile-wheel-scroll-hasfooter-line-height": "36px", + "tiny-mobile-wheel-scroll-hasfooter-height": "36px", + "tiny-mobile-wheel-scroll-hasfooter-color": "#595959", + "tiny-mobile-wheel-scroll-nofooter-line-height": "44px", + "tiny-mobile-wheel-scroll-nofooter-height": "44px", + "tiny-mobile-wheel-scroll-nofooter-color": "#191919", "tiny-mobile-wheel-scroll-icon-font-size": "20px", }; diff --git a/src/wheel/index.less b/src/wheel/index.less index 3112fbe..e5f80a1 100644 --- a/src/wheel/index.less +++ b/src/wheel/index.less @@ -55,15 +55,15 @@ .wheel__scroll_hasFooter { padding: 0px; margin-top: var(--ti-mobile-wheel-wrapper-scroll-margin-top, 38px); - line-height: var(--ti-mobile-wheel-scroll-hasFooter-lineHeight, 36px); + line-height: var(--ti-mobile-wheel-scroll-hasfooter-line-height, 36px); list-style: none; .wheel__item { list-style: none; - height: var(--ti-mobile-wheel-scroll-hasFooter-height, 36px); + height: var(--ti-mobile-wheel-scroll-hasfooter-height, 36px); overflow: hidden; white-space: nowrap; - color: var(--ti-mobile-wheel-scroll-hasFooter-color, #595959); + color: var(--ti-mobile-wheel-scroll-hasfooter-color, #595959); font-weight: 500; } @@ -75,15 +75,15 @@ .wheel__scroll_noFooter { padding: 0px; margin-top: 0px; - line-height: var(--ti-mobile-wheel-scroll-noFooter-lineHeight, 44px); + line-height: var(--ti-mobile-wheel-scroll-nofooter-line-height, 44px); list-style: none; .wheel__item { list-style: none; - height: var(--ti-mobile-wheel-scroll-noFooter-height, 44px); + height: var(--ti-mobile-wheel-scroll-nofooter-height, 44px); overflow: hidden; white-space: nowrap; - color: var(--ti-mobile-wheel-scroll-noFooter-color, #191919); + color: var(--ti-mobile-wheel-scroll-nofooter-color, #191919); font-weight: 500; display: flex; justify-content: space-between; diff --git a/src/wheel/vars.less b/src/wheel/vars.less index 6c5896c..811ccca 100644 --- a/src/wheel/vars.less +++ b/src/wheel/vars.less @@ -3,11 +3,11 @@ --ti-mobile-wheel-wrapper-height: 224px; --ti-mobile-wheel-wrapper-font-size: 14px; --ti-mobile-wheel-wrapper-scroll-margin-top: 38px; - --ti-mobile-wheel-scroll-hasFooter-lineHeight: 36px; - --ti-mobile-wheel-scroll-hasFooter-height: 36px; - --ti-mobile-wheel-scroll-hasFooter-color: #595959; - --ti-mobile-wheel-scroll-hasFooter-lineHeight: 44px; - --ti-mobile-wheel-scroll-hasFooter-height: 44px; - --ti-mobile-wheel-scroll-hasFooter-color: #191919; + --ti-mobile-wheel-scroll-hasfooter-line-height: 36px; + --ti-mobile-wheel-scroll-hasfooter-height: 36px; + --ti-mobile-wheel-scroll-hasfooter-color: #595959; + --ti-mobile-wheel-scroll-nofooter-line-height: 44px; + --ti-mobile-wheel-scroll-nofooter-height: 44px; + --ti-mobile-wheel-scroll-nofooter-color: #191919; --ti-mobile-wheel-scroll-icon-font-size: 20px; } From 9b2cb07e9dc7a7afc43edc30603cd4194d0b9b6a Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Thu, 2 Mar 2023 10:44:12 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat(multi-select):=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E8=A7=84=E8=8C=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wheel/index.js | 4 ++-- src/wheel/index.less | 4 ++-- src/wheel/vars.less | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wheel/index.js b/src/wheel/index.js index 0da3c98..04065c2 100644 --- a/src/wheel/index.js +++ b/src/wheel/index.js @@ -5,9 +5,9 @@ export default { "tiny-mobile-wheel-wrapper-scroll-margin-top": "38px", "tiny-mobile-wheel-scroll-hasfooter-line-height": "36px", "tiny-mobile-wheel-scroll-hasfooter-height": "36px", - "tiny-mobile-wheel-scroll-hasfooter-color": "#595959", + "tiny-mobile-wheel-scroll-hasfooter-text-color": "#595959", "tiny-mobile-wheel-scroll-nofooter-line-height": "44px", "tiny-mobile-wheel-scroll-nofooter-height": "44px", - "tiny-mobile-wheel-scroll-nofooter-color": "#191919", + "tiny-mobile-wheel-scroll-nofooter-text-color": "#191919", "tiny-mobile-wheel-scroll-icon-font-size": "20px", }; diff --git a/src/wheel/index.less b/src/wheel/index.less index e5f80a1..9f7d8fb 100644 --- a/src/wheel/index.less +++ b/src/wheel/index.less @@ -63,7 +63,7 @@ height: var(--ti-mobile-wheel-scroll-hasfooter-height, 36px); overflow: hidden; white-space: nowrap; - color: var(--ti-mobile-wheel-scroll-hasfooter-color, #595959); + color: var(--ti-mobile-wheel-scroll-hasfooter-text-color, #595959); font-weight: 500; } @@ -83,7 +83,7 @@ height: var(--ti-mobile-wheel-scroll-nofooter-height, 44px); overflow: hidden; white-space: nowrap; - color: var(--ti-mobile-wheel-scroll-nofooter-color, #191919); + color: var(--ti-mobile-wheel-scroll-nofooter-text-color, #191919); font-weight: 500; display: flex; justify-content: space-between; diff --git a/src/wheel/vars.less b/src/wheel/vars.less index 811ccca..1674146 100644 --- a/src/wheel/vars.less +++ b/src/wheel/vars.less @@ -5,9 +5,9 @@ --ti-mobile-wheel-wrapper-scroll-margin-top: 38px; --ti-mobile-wheel-scroll-hasfooter-line-height: 36px; --ti-mobile-wheel-scroll-hasfooter-height: 36px; - --ti-mobile-wheel-scroll-hasfooter-color: #595959; + --ti-mobile-wheel-scroll-hasfooter-text-color: #595959; --ti-mobile-wheel-scroll-nofooter-line-height: 44px; --ti-mobile-wheel-scroll-nofooter-height: 44px; - --ti-mobile-wheel-scroll-nofooter-color: #191919; + --ti-mobile-wheel-scroll-nofooter-text-color: #191919; --ti-mobile-wheel-scroll-icon-font-size: 20px; } From d8b758dd7d4f3c354b89943ab5859884a7c34da1 Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Fri, 3 Mar 2023 17:39:34 +0800 Subject: [PATCH 4/7] =?UTF-8?q?feat(form):=20form=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/action-sheet/index.js | 20 ++++++++++---------- src/action-sheet/index.less | 32 +++++++++++++++++++------------- src/action-sheet/vars.less | 16 ++++++++-------- src/form-item/index.less | 28 ++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 31 deletions(-) diff --git a/src/action-sheet/index.js b/src/action-sheet/index.js index dad69bd..3a9e5df 100644 --- a/src/action-sheet/index.js +++ b/src/action-sheet/index.js @@ -1,11 +1,11 @@ export default { - 'tiny-mobile-action-sheet-content-bgcolor': '#ddd', - 'tiny-mobile-action-sheet-menu-bgcolor': '#fff', - 'tiny-mobile-action-sheet-item-color': '#333', - 'tiny-mobile-action-sheet-item-warn-color': '#f36f64', - 'tiny-mobile-action-sheet-item-font-size': '16px', - 'tiny-mobile-action-sheet-item-border-color': '#ddd', - 'tiny-mobile-action-sheet-item-active-bgcolor': '#ececec', - 'tiny-mobile-action-sheet-item-active-color': '#039be5', - 'tiny-mobile-action-sheet-action-bgcolor': '#fff' -} + "tiny-mobile-action-sheet-content-bg-color": "#fff", + "tiny-mobile-action-sheet-menu-bg-color": "#fff", + "tiny-mobile-action-sheet-item-text-color": "#333", + "tiny-mobile-action-sheet-item-warn-text-color": "#f36f64", + "tiny-mobile-action-sheet-item-font-size": "12px", + "tiny-mobile-action-sheet-item-border-color": "#ddd", + "tiny-mobile-action-sheet-item-active-bg-color": "#ececec", + "tiny-mobile-action-sheet-item-active-text-color": "#039be5", + "tiny-mobile-action-sheet-action-bg-color": "#fff", +}; diff --git a/src/action-sheet/index.less b/src/action-sheet/index.less index 3e93d4b..c0f36d9 100644 --- a/src/action-sheet/index.less +++ b/src/action-sheet/index.less @@ -17,8 +17,9 @@ @action-sheet-prefix-cls: ~'@{css-prefix}mobile-action-sheet'; .@{action-sheet-prefix-cls} { + position: relative; + height: 100%; &__mask { - position: fixed; top: 0; right: 0; bottom: 0; @@ -28,23 +29,25 @@ } &__content { - position: fixed; bottom: 0; left: 0; width: 100%; - background-color: var(--ti-mobile-action-sheet-content-bgcolor, #ddd); + background-color: var(--ti-mobile-action-sheet-content-bg-color, #fff); transform: translate(0, 100%); backface-visibility: hidden; transition: transform 0.3s; - z-index: 5000; - + z-index: 500; + overflow: hidden; &.is-toggle { transform: translate(0, 0); } + &.is-not-content{ + z-index: 2000; + } } &__menu { - background-color: var(--ti-mobile-action-sheet-menu-bgcolor, #fff); + background-color: var(--ti-mobile-action-sheet-menu-bg-color, #fff); } &__menu.is-ellipsis &__item { @@ -58,19 +61,21 @@ &__item, &__cancel { position: relative; - padding: 10px 16px; - color: var(--ti-mobile-action-sheet-item-color, #333); + height: 40px; + line-height: 40px; + padding: 0px 16px; + color: var(--ti-mobile-action-sheet-item-text-color, #333); font-size: var(--ti-mobile-action-sheet-item-font-size, 16px); text-align: center; } &__item { &:active { - background-color: var(--ti-mobile-action-sheet-item-active-bgcolor, #ececec); + background-color: var(--ti-mobile-action-sheet-item-active-bg-color, #ececec); } &.is-active { - color: var(--ti-mobile-action-sheet-item-active-color, #039be5); + color: var(--ti-mobile-action-sheet-item-active-text-color, #039be5); } } @@ -78,13 +83,14 @@ .hairline('top', var(--ti-mobile-action-sheet-item-border-color, #ddd)); &.is-warn { - color: var(--ti-mobile-action-sheet-item-warn-color, #f36f64); + color: var(--ti-mobile-action-sheet-item-warn-text-color, #f36f64); } } &__action { - margin-top: 10px; - background-color: var(--ti-mobile-action-sheet-action-bgcolor, #fff); + width: 100%; + position: absolute; + background-color: var(--ti-mobile-action-sheet-action-bg-color, #fff); } } diff --git a/src/action-sheet/vars.less b/src/action-sheet/vars.less index f7f99a3..c4ad2c5 100644 --- a/src/action-sheet/vars.less +++ b/src/action-sheet/vars.less @@ -1,11 +1,11 @@ :root { - --ti-mobile-action-sheet-content-bgcolor: #ddd; - --ti-mobile-action-sheet-menu-bgcolor: var(--ti-mobile-base-color-light, #fff); - --ti-mobile-action-sheet-item-color: var(--ti-mobile-base-color-info-normal, #333); - --ti-mobile-action-sheet-item-warn-color: #f36f64; - --ti-mobile-action-sheet-item-font-size: 16px; + --ti-mobile-action-sheet-content-bg-color: #fff; + --ti-mobile-action-sheet-menu-bg-color: var(--ti-mobile-base-color-light, #fff); + --ti-mobile-action-sheet-item-text-color: var(--ti-mobile-base-color-info-normal, #333); + --ti-mobile-action-sheet-item-warn-text-color: #f36f64; + --ti-mobile-action-sheet-item-font-size: 12px; --ti-mobile-action-sheet-item-border-color: #ddd; - --ti-mobile-action-sheet-item-active-bgcolor: #ececec; - --ti-mobile-action-sheet-item-active-color: #039be5; - --ti-mobile-action-sheet-action-bgcolor: var(--ti-mobile-base-color-light, #fff); + --ti-mobile-action-sheet-item-active-bg-color: #ececec; + --ti-mobile-action-sheet-item-active-text-color: #039be5; + --ti-mobile-action-sheet-action-bg-color: var(--ti-mobile-base-color-light, #fff); } diff --git a/src/form-item/index.less b/src/form-item/index.less index 4e8b0f3..b52db13 100644 --- a/src/form-item/index.less +++ b/src/form-item/index.less @@ -77,6 +77,32 @@ box-sizing: border-box; } + &.is-ellipsis{ + .@{form-item-prefix-cls}__label { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 13px 0px; + display: inline-block; + } + } + + &.is-wordWarp{ + .@{form-item-prefix-cls}__label { + position: static; + min-height: 48px; + align-items: flex-start; + padding: 13px 0px; + height: auto; + } + .@{css-prefix}mobile-input-form { + // height: auto; + } + } + .tiny-mobile-input-form_content{ + flex: 1; + } + &__content { line-height: 48px; position: relative; @@ -90,6 +116,8 @@ .@{button-prefix-cls} + .@{button-prefix-cls} { margin-left: 8px; } + display: flex; + border-bottom: 1px solid #ddd; } &__error { From c20475b7ef508696769e2b1a47e030208977b31a Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Tue, 7 Mar 2023 17:19:18 +0800 Subject: [PATCH 5/7] =?UTF-8?q?feat(form):=20form=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form-item/index.less | 43 ++++++++++++++++++---------------------- src/form/index.less | 21 ++++++++++++++------ src/input/index.js | 43 ++++++++++++++++++++-------------------- src/input/index.less | 28 +++++++++----------------- src/input/vars.less | 1 + 5 files changed, 66 insertions(+), 70 deletions(-) diff --git a/src/form-item/index.less b/src/form-item/index.less index b52db13..9d250b2 100644 --- a/src/form-item/index.less +++ b/src/form-item/index.less @@ -77,31 +77,13 @@ box-sizing: border-box; } - &.is-ellipsis{ - .@{form-item-prefix-cls}__label { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 13px 0px; - display: inline-block; - } - } + &__value { + float: right; - &.is-wordWarp{ - .@{form-item-prefix-cls}__label { - position: static; - min-height: 48px; - align-items: flex-start; - padding: 13px 0px; - height: auto; - } - .@{css-prefix}mobile-input-form { - // height: auto; + .tiny-mobile-input-form__input{ + text-align: right; } } - .tiny-mobile-input-form_content{ - flex: 1; - } &__content { line-height: 48px; @@ -116,7 +98,20 @@ .@{button-prefix-cls} + .@{button-prefix-cls} { margin-left: 8px; } - display: flex; + } + + &__label.is-ellipsis{ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: initial; + } + + &.is-error .is-vertical{ + margin-bottom: 36px !important; + } + + .is-vertical { border-bottom: 1px solid #ddd; } @@ -140,7 +135,7 @@ &.is-required:not(.is-no-asterisk) { .@{form-item-prefix-cls}__label-wrap > .@{form-item-prefix-cls}__label:before, - & > .@{form-item-prefix-cls}__label:before { + .@{form-item-prefix-cls}__label:before { content: '*'; color: var(--ti-form-item-error-color, #f5222d); margin-right: 4px; diff --git a/src/form/index.less b/src/form/index.less index 566d65c..b18f4cb 100644 --- a/src/form/index.less +++ b/src/form/index.less @@ -32,15 +32,16 @@ .@{form-item-prefix-cls}__label { width: 35%; - height: 48px; + min-height: 48px; line-height: 1.4; font-size: 16px; display: flex; - align-items: center; - position: absolute; - left: 0; - top: 0; z-index: 1; + padding: 13px 0px; + } + + .@{form-item-prefix-cls}__value { + width: 65%; } .@{form-item-prefix-cls}__content { @@ -81,7 +82,10 @@ position: initial; text-align: left; line-height: 1; - padding: 0 0 8px; + } + + .@{form-item-prefix-cls}__value { + width: 100%; } .@{form-item-prefix-cls} { @@ -91,6 +95,11 @@ .@{input-form-prefix-cls}__input { width: 100%; } + + .@{form-item-prefix-cls}__content { + flex-wrap: wrap; + } + } &--label-top & { diff --git a/src/input/index.js b/src/input/index.js index 49257a9..17cb42d 100644 --- a/src/input/index.js +++ b/src/input/index.js @@ -1,22 +1,23 @@ export default { - 'tiny-mobile-input-bgcolor': '#fff', - 'tiny-mobile-input-height': '30px', - 'tiny-mobile-input-medium-height': '42px', - 'tiny-mobile-input-small-height': '36px', - 'tiny-mobile-input-mini-height': '24px', - 'tiny-mobile-input-disabled-color': '#999', - 'tiny-mobile-input-disabled-bgcolor': '#f5f5f5', - 'tiny-mobile-input-exceed-color': '#f5222d', - 'tiny-mobile-input-icon-font-size': '16px', - 'tiny-mobile-input-icon-close-color': '#bfbfbf', - 'tiny-mobile-textarea-count-color': '#999', - 'tiny-mobile-textarea-count-font-size': '12px', - 'tiny-mobile-textarea-inner-height': '96px', - 'tiny-mobile-textarea-inner-font-size': '16px', - 'tiny-mobile-textarea-inner-color': '#666', - 'tiny-mobile-textarea-inner-placeholder-color': '#ccc', - 'tiny-mobile-textarea-title-font-size': '16px', - 'tiny-mobile-textarea-title-color': '#333', - 'tiny-mobile-textarea-showlimit-inner-height': '70px', - 'tiny-mobile-textarea-showcontent-inner-height': '66px' -} + "tiny-mobile-input-bgcolor": "#fff", + "tiny-mobile-input-height": "30px", + "tiny-mobile-input-medium-height": "42px", + "tiny-mobile-input-small-height": "36px", + "tiny-mobile-input-mini-height": "24px", + "tiny-mobile-input-disabled-color": "#999", + "tiny-mobile-input-disabled-bgcolor": "#f5f5f5", + "tiny-mobile-input-exceed-color": "#f5222d", + "tiny-mobile-input-icon-font-size": "16px", + "tiny-mobile-input-icon-close-color": "#bfbfbf", + "tiny-mobile-textarea-count-color": "#999", + "tiny-mobile-textarea-count-font-size": "12px", + "tiny-mobile-textarea-inner-height": "96px", + "tiny-mobile-textarea-inner-font-size": "16px", + "tiny-mobile-textarea-inner-color": "#666", + "tiny-mobile-textarea-inner-placeholder-color": "#ccc", + "tiny-mobile-textarea-title-font-size": "16px", + "tiny-mobile-textarea-title-color": "#333", + "tiny-mobile-textarea-showlimit-inner-height": "70px", + "tiny-mobile-textarea-showcontent-inner-height": "66px", + "tiny-mobile-input-form-error-bg": "rgba(230, 34, 34, 0.04)", +}; diff --git a/src/input/index.less b/src/input/index.less index b34256e..5088556 100644 --- a/src/input/index.less +++ b/src/input/index.less @@ -348,18 +348,6 @@ line-height: 48px; position: relative; - &.isVertical:after { - content: ''; - display: block; - height: 0; - width: 100%; - border-bottom: 1px solid #ddd; - position: absolute; - left: 0; - bottom: 0; - z-index: 1; - } - &__select { display: flex; justify-content: flex-end; @@ -398,7 +386,6 @@ } &__input { - width: 65%; float: right; } @@ -410,14 +397,17 @@ } &__error { - position: relative; + width: 100%; + height: 36px; + position: absolute; overflow: hidden; - font-size: 12px; - line-height: 1.416; - color: #f36f64; + font-size: 13px; + line-height: 36px; + color: var(--ti-mobile-common-color-error-text-1, #e62222); text-overflow: ellipsis; - padding: 0px 16px 0 16px; - + bottom: -36px; + background: var(--ti-mobile-input-form-error-bg, rgba(230, 34, 34, 0.04)); + border-radius: 4px; &.align-right { text-align: right; } diff --git a/src/input/vars.less b/src/input/vars.less index e42e4a5..a4503db 100644 --- a/src/input/vars.less +++ b/src/input/vars.less @@ -19,4 +19,5 @@ --ti-mobile-textarea-title-color: var(--ti-mobile-base-color-info-normal, #333); --ti-mobile-textarea-showlimit-inner-height: 70px; --ti-mobile-textarea-showcontent-inner-height: 66px; + --ti-mobile-input-form-error-bg: rgba(230, 34, 34, 0.04); } From 98565b981bb29864e203b09e0bef478de5ac8064 Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Tue, 7 Mar 2023 21:12:47 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat(form):=20form=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form-item/index.less | 2 +- src/input/index.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/form-item/index.less b/src/form-item/index.less index 9d250b2..d1702ce 100644 --- a/src/form-item/index.less +++ b/src/form-item/index.less @@ -81,7 +81,7 @@ float: right; .tiny-mobile-input-form__input{ - text-align: right; + text-align: left; } } diff --git a/src/input/index.less b/src/input/index.less index 5088556..0b85b47 100644 --- a/src/input/index.less +++ b/src/input/index.less @@ -408,6 +408,7 @@ bottom: -36px; background: var(--ti-mobile-input-form-error-bg, rgba(230, 34, 34, 0.04)); border-radius: 4px; + padding: 0px 12px; &.align-right { text-align: right; } From e2171af42c29c79780a0856ec1a32f6c3ad0ea79 Mon Sep 17 00:00:00 2001 From: TC-twwang <741682830@qq.com> Date: Sun, 12 Mar 2023 20:04:44 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat(form):=20form=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C-?= =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form-item/index.less | 2 +- src/form/index.less | 4 ---- src/input/index.js | 18 ++++++++--------- src/input/index.less | 42 ++++++++++++++++++++-------------------- src/input/vars.less | 18 ++++++++--------- 5 files changed, 40 insertions(+), 44 deletions(-) diff --git a/src/form-item/index.less b/src/form-item/index.less index d1702ce..9e55c33 100644 --- a/src/form-item/index.less +++ b/src/form-item/index.less @@ -108,7 +108,7 @@ } &.is-error .is-vertical{ - margin-bottom: 36px !important; + margin-bottom: 36px; } .is-vertical { diff --git a/src/form/index.less b/src/form/index.less index b18f4cb..54ddef6 100644 --- a/src/form/index.less +++ b/src/form/index.less @@ -44,10 +44,6 @@ width: 65%; } - .@{form-item-prefix-cls}__content { - margin: 0 !important; - } - &--inline { .@{form-item-prefix-cls}, .@{form-item-prefix-cls}__content { diff --git a/src/input/index.js b/src/input/index.js index 17cb42d..371a6cf 100644 --- a/src/input/index.js +++ b/src/input/index.js @@ -1,23 +1,23 @@ export default { - "tiny-mobile-input-bgcolor": "#fff", - "tiny-mobile-input-height": "30px", + "tiny-mobile-input-bg-color": "#fff", + "tiny-mobile-input-line-height": "30px", "tiny-mobile-input-medium-height": "42px", "tiny-mobile-input-small-height": "36px", "tiny-mobile-input-mini-height": "24px", - "tiny-mobile-input-disabled-color": "#999", - "tiny-mobile-input-disabled-bgcolor": "#f5f5f5", - "tiny-mobile-input-exceed-color": "#f5222d", + "tiny-mobile-input-color-disabled": "#999", + "tiny-mobile-input-bg-color-disabled": "#f5f5f5", + "tiny-mobile-input-exceed-text-color": "#f5222d", "tiny-mobile-input-icon-font-size": "16px", "tiny-mobile-input-icon-close-color": "#bfbfbf", - "tiny-mobile-textarea-count-color": "#999", + "tiny-mobile-textarea-count-text-color": "#999", "tiny-mobile-textarea-count-font-size": "12px", "tiny-mobile-textarea-inner-height": "96px", "tiny-mobile-textarea-inner-font-size": "16px", - "tiny-mobile-textarea-inner-color": "#666", + "tiny-mobile-textarea-inner-text-color": "#666", "tiny-mobile-textarea-inner-placeholder-color": "#ccc", "tiny-mobile-textarea-title-font-size": "16px", - "tiny-mobile-textarea-title-color": "#333", + "tiny-mobile-textarea-title-text-color": "#333", "tiny-mobile-textarea-showlimit-inner-height": "70px", "tiny-mobile-textarea-showcontent-inner-height": "66px", - "tiny-mobile-input-form-error-bg": "rgba(230, 34, 34, 0.04)", + "tiny-mobile-input-form-bg-color-error": "rgba(230, 34, 34, 0.04)", }; diff --git a/src/input/index.less b/src/input/index.less index 0b85b47..d0ad705 100644 --- a/src/input/index.less +++ b/src/input/index.less @@ -24,11 +24,11 @@ position: relative; display: inline-block; width: 100%; - background-color: var(--ti-mobile-input-bgcolor, #fff); + background-color: var(--ti-mobile-input-bg-color, #fff); padding: 12px 16px; &__count { - color: var(--ti-mobile-textarea-count-color, #999); + color: var(--ti-mobile-textarea-count-text-color, #999); font-size: var(--ti-mobile-textarea-count-font-size, 12px); margin-top: 4px; text-align: right; @@ -39,7 +39,7 @@ width: 100%; height: var(--ti-mobile-textarea-inner-height, 96px); font-size: var(--ti-mobile-textarea-inner-font-size, 16px); - color: var(--ti-mobile-textarea-inner-color, #666); + color: var(--ti-mobile-textarea-inner-text-color, #666); padding: 0; border: 0; display: block; @@ -58,7 +58,7 @@ &__title { font-size: var(--ti-mobile-textarea-title-font-size, 16px); - color: var(--ti-mobile-textarea-title-color, #333); + color: var(--ti-mobile-textarea-title-text-color, #333); margin-bottom: 8px; } @@ -79,13 +79,13 @@ } &.is-disabled &__inner { - background-color: var(--ti-mobile-input-disabled-bgcolor, #f5f5f5); - color: var(--ti-mobile-input-disabled-color, #999); + background-color: var(--ti-mobile-input-bg-color-disabled, #f5f5f5); + color: var(--ti-mobile-input-color-disabled, #999); cursor: not-allowed; } &.is-exceed &__count { - color: var(--ti-mobile-input-exceed-color, #f5222d); + color: var(--ti-mobile-input-exceed-text-color, #f5222d); } } @@ -122,13 +122,13 @@ } &.is-exceed &__suffix &__count { - color: var(--ti-mobile-input-exceed-color, #f5222d); + color: var(--ti-mobile-input-exceed-text-color, #f5222d); } &.is-disabled &__inner { cursor: not-allowed; - color: var(--ti-mobile-input-disabled-color, #999); - background: var(--ti-mobile-input-disabled-bgcolor, #f5f5f5); + color: var(--ti-mobile-input-color-disabled, #999); + background: var(--ti-mobile-input-bg-color-disabled, #f5f5f5); } &.is-disabled &__icon { @@ -137,7 +137,7 @@ &.@{css-prefix}svg { &, &:hover { - fill: var(--ti-mobile-input-disabled-color, #999); + fill: var(--ti-mobile-input-color-disabled, #999); } } } @@ -147,7 +147,7 @@ .@{css-prefix}svg { &, &:hover { - fill: var(--ti-mobile-input-disabled-color, #999); + fill: var(--ti-mobile-input-color-disabled, #999); } } } @@ -159,7 +159,7 @@ &, &:hover { - fill: var(--ti-mobile-input-disabled-color, #999); + fill: var(--ti-mobile-input-color-disabled, #999); } } @@ -171,7 +171,7 @@ font-size: 12px; .@{input-prefix-cls}__count-inner { - background: var(--ti-mobile-input-bgcolor, #fff); + background: var(--ti-mobile-input-bg-color, #fff); line-height: initial; display: inline-block; } @@ -183,7 +183,7 @@ line-height: 48px; font-size: 16px; color: #666; - background: var(--ti-mobile-input-bgcolor, #fff); + background: var(--ti-mobile-input-bg-color, #fff); padding: 0 16px; border: 0; outline: 0; @@ -214,7 +214,7 @@ transition: all 0.3s; text-align: center; color: #d9d9d9; - line-height: calc(var(--ti-mobile-input-height, 30px) - 2px); + line-height: calc(var(--ti-mobile-input-line-height, 30px) - 2px); } &.is-active &__inner, @@ -244,14 +244,14 @@ &__icon { height: 100%; - line-height: var(--ti-mobile-input-height, 30px); + line-height: var(--ti-mobile-input-line-height, 30px); text-align: center; transition: all 0.3s; font-size: var(--ti-mobile-input-icon-font-size, 16px); &, &:hover { - fill: var(--ti-mobile-input-disabled-color, #999); + fill: var(--ti-mobile-input-color-disabled, #999); } &:after { @@ -354,7 +354,7 @@ align-items: center; width: 100%; height: 100%; - background: var(--ti-mobile-input-bgcolor, #fff); + background: var(--ti-mobile-input-bg-color, #fff); } &__icon { @@ -391,7 +391,7 @@ &__tips { width: 100%; - color: var(--ti-mobile-textarea-count-color, #999); + color: var(--ti-mobile-textarea-count-text-color, #999); padding-top: 6px; line-height: 20px; } @@ -406,7 +406,7 @@ color: var(--ti-mobile-common-color-error-text-1, #e62222); text-overflow: ellipsis; bottom: -36px; - background: var(--ti-mobile-input-form-error-bg, rgba(230, 34, 34, 0.04)); + background: var(--ti-mobile-input-form-bg-color-error, rgba(230, 34, 34, 0.04)); border-radius: 4px; padding: 0px 12px; &.align-right { diff --git a/src/input/vars.less b/src/input/vars.less index a4503db..4da41f2 100644 --- a/src/input/vars.less +++ b/src/input/vars.less @@ -1,23 +1,23 @@ :root { - --ti-mobile-input-bgcolor: var(--ti-mobile-base-color-light, #fff); - --ti-mobile-input-height: var(--ti-mobile-base-size-height-minor, 30px); + --ti-mobile-input-bg-color: var(--ti-mobile-base-color-light, #fff); + --ti-mobile-input-line-height: var(--ti-mobile-base-size-height-minor, 30px); --ti-mobile-input-medium-height: var(--ti-mobile-base-size-height-medium, 42px); --ti-mobile-input-small-height: var(--ti-mobile-base-size-height-small, 36px); --ti-mobile-input-mini-height: var(--ti-mobile-base-size-height-mini, 24px); - --ti-mobile-input-disabled-color: var(--ti-mobile-base-color-placeholder, #999); - --ti-mobile-input-disabled-bgcolor: var(--ti-mobile-base-color-selected-background, #f5f5f5); - --ti-mobile-input-exceed-color: var(--ti-mobile-base-color-danger-normal, #f5222d); + --ti-mobile-input-color-disabled: var(--ti-mobile-base-color-placeholder, #999); + --ti-mobile-input-bg-color-disabled: var(--ti-mobile-base-color-selected-background, #f5f5f5); + --ti-mobile-input-exceed-text-color: var(--ti-mobile-base-color-danger-normal, #f5222d); --ti-mobile-input-icon-font-size: 16px; --ti-mobile-input-icon-close-color: var(--ti-mobile-base-color-primary-disabled, #bfbfbf); - --ti-mobile-textarea-count-color: var(--ti-mobile-base-color-placeholder, #999); + --ti-mobile-textarea-count-text-color: var(--ti-mobile-base-color-placeholder, #999); --ti-mobile-textarea-count-font-size: var(--ti-mobile-base-font-size, 12px); --ti-mobile-textarea-inner-height: 96px; --ti-mobile-textarea-inner-font-size: 16px; - --ti-mobile-textarea-inner-color: var(--ti-mobile-base-color-secondary, #666); + --ti-mobile-textarea-inner-text-color: var(--ti-mobile-base-color-secondary, #666); --ti-mobile-textarea-inner-placeholder-color: #ccc; --ti-mobile-textarea-title-font-size: 16px; - --ti-mobile-textarea-title-color: var(--ti-mobile-base-color-info-normal, #333); + --ti-mobile-textarea-title-text-color: var(--ti-mobile-base-color-info-normal, #333); --ti-mobile-textarea-showlimit-inner-height: 70px; --ti-mobile-textarea-showcontent-inner-height: 66px; - --ti-mobile-input-form-error-bg: rgba(230, 34, 34, 0.04); + --ti-mobile-input-form-bg-color-error: rgba(230, 34, 34, 0.04); }