perf(theme-mobile): remove css vars from :root to root class of component (#1579)

This commit is contained in:
黄怡林 2024-04-19 09:25:48 +08:00 committed by GitHub
parent 5430eed386
commit 9589ea5805
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
74 changed files with 115 additions and 38 deletions

View File

@ -17,6 +17,8 @@
@action-sheet-prefix-cls: ~'@{css-prefix}mobile-action-sheet'; @action-sheet-prefix-cls: ~'@{css-prefix}mobile-action-sheet';
.@{action-sheet-prefix-cls} { .@{action-sheet-prefix-cls} {
.component-css-vars-action-sheet();
position: relative; position: relative;
height: 100%; height: 100%;
&__mask { &__mask {

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-action-sheet() {
--ti-mobile-action-sheet-content-bg-color: #fff; --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-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-text-color: var(--ti-mobile-base-color-info-normal, #333);

View File

@ -18,6 +18,8 @@
@alert-prefix-cls: ~'@{css-prefix}mobile-alert'; @alert-prefix-cls: ~'@{css-prefix}mobile-alert';
.@{alert-prefix-cls} { .@{alert-prefix-cls} {
.component-css-vars-alert();
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
clear: both; clear: both;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-alert() {
// 警告类型提示图标色 // 警告类型提示图标色
--ti-mobile-alert-warning-icon-color: var(--ti-mobile-color-warning, #ff8800); --ti-mobile-alert-warning-icon-color: var(--ti-mobile-color-warning, #ff8800);
// 警告类型提示链接字体色 // 警告类型提示链接字体色

View File

@ -17,6 +17,8 @@
@avatar-prefix-cls: ~'@{css-prefix}mobile-avatar'; @avatar-prefix-cls: ~'@{css-prefix}mobile-avatar';
.@{avatar-prefix-cls} { .@{avatar-prefix-cls} {
.component-css-vars-avatar();
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-avatar() {
--ti-mobile-avatar-color: var(--ti-mobile-base-color-light, #fff); --ti-mobile-avatar-color: var(--ti-mobile-base-color-light, #fff);
--ti-mobile-avatar-bgcolor: #c0c4cc; --ti-mobile-avatar-bgcolor: #c0c4cc;
--ti-mobile-avatar-size: 40px; --ti-mobile-avatar-size: 40px;

View File

@ -16,6 +16,8 @@
@badge-prefix-cls: ~'@{css-prefix}mobile-badge'; @badge-prefix-cls: ~'@{css-prefix}mobile-badge';
.@{badge-prefix-cls} { .@{badge-prefix-cls} {
.component-css-vars-badge();
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-badge() {
--ti-mobile-badge-size: 18px; --ti-mobile-badge-size: 18px;
--ti-mobile-badge-font-size: 13px; --ti-mobile-badge-font-size: 13px;
--ti-mobile-badge-color: var(--ti-mobile-base-color-light, #fff); --ti-mobile-badge-color: var(--ti-mobile-base-color-light, #fff);

View File

@ -20,6 +20,8 @@
@button-prefix-cls: ~'@{css-prefix}mobile-button'; @button-prefix-cls: ~'@{css-prefix}mobile-button';
.@{button-prefix-cls} { .@{button-prefix-cls} {
.component-css-vars-button();
position: relative; position: relative;
margin: 0; margin: 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-button() {
// 按钮高度-大 // 按钮高度-大
--ti-mobile-button-height-large: 40px; --ti-mobile-button-height-large: 40px;
// 按钮文字大小-大 // 按钮文字大小-大

View File

@ -19,6 +19,8 @@
@checkbox-prefix-cls: ~'@{css-prefix}mobile-checkbox'; @checkbox-prefix-cls: ~'@{css-prefix}mobile-checkbox';
.@{checkbox-prefix-cls} { .@{checkbox-prefix-cls} {
.component-css-vars-checkbox();
position: relative; position: relative;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-checkbox() {
// 复选框图标宽度 // 复选框图标宽度
--ti-mobile-checkbox-width: var(--ti-mobile-space-6x, 24px); --ti-mobile-checkbox-width: var(--ti-mobile-space-6x, 24px);
// 复选框图标高度 // 复选框图标高度

View File

@ -16,6 +16,8 @@
@container-prefix-cls: ~'@{css-prefix}mobile-container'; @container-prefix-cls: ~'@{css-prefix}mobile-container';
.@{container-prefix-cls} { .@{container-prefix-cls} {
.component-css-vars-container();
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;

View File

@ -1,3 +1,3 @@
:root { .component-css-vars-container() {
--ti-mobile-container-common-padding: var(--ti-mobile-space-3x, 12px); --ti-mobile-container-common-padding: var(--ti-mobile-space-3x, 12px);
} }

View File

@ -17,6 +17,8 @@
@dialog-box-prefix-cls: ~'@{css-prefix}mobile-dialog-box'; @dialog-box-prefix-cls: ~'@{css-prefix}mobile-dialog-box';
.@{dialog-box-prefix-cls} { .@{dialog-box-prefix-cls} {
.component-css-vars-dialog-box();
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-dialog-box() {
--ti-mobile-dialogbox-background: var(--ti-mobile-base-color-light, #fff); --ti-mobile-dialogbox-background: var(--ti-mobile-base-color-light, #fff);
--ti-mobile-dialogbox-width: 270px; --ti-mobile-dialogbox-width: 270px;
--ti-mobile-dialogbox-border-color: #ccc; --ti-mobile-dialogbox-border-color: #ccc;

View File

@ -11,6 +11,8 @@
*/ */
.tiny-popup__wrapper { .tiny-popup__wrapper {
.component-css-vars-error-page();
z-index: 2147483647 !important; z-index: 2147483647 !important;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
position: fixed; position: fixed;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-error-page {
--ti-errortips-box-background: var(--ti-mobile-base-color-light, #fff); --ti-errortips-box-background: var(--ti-mobile-base-color-light, #fff);
--ti-errortips-body-color: #5a5e66; --ti-errortips-body-color: #5a5e66;
--ti-errortips-body-font-size: 14px; --ti-errortips-body-font-size: 14px;

View File

@ -16,6 +16,8 @@
@exception-prefix-cls: ~'@{css-prefix}mobile-exception'; @exception-prefix-cls: ~'@{css-prefix}mobile-exception';
.@{exception-prefix-cls} { .@{exception-prefix-cls} {
.component-css-vars-exception();
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-exception {
--ti-mobile-exception-main-message-color: var(--ti-mobile-common-color-text-weaken-dark, #999); --ti-mobile-exception-main-message-color: var(--ti-mobile-common-color-text-weaken-dark, #999);
--ti-mobile-exception-main-message-font-size: 13px; --ti-mobile-exception-main-message-font-size: 13px;
--ti-mobile-exception-sub-message-color: var(--ti-mobile-common-color-text-weaken-dark, #999); --ti-mobile-exception-sub-message-color: var(--ti-mobile-common-color-text-weaken-dark, #999);

View File

@ -20,6 +20,8 @@
@svg-prefix-cls: ~'@{css-prefix}svg'; @svg-prefix-cls: ~'@{css-prefix}svg';
.@{file-upload-prefix-cls} { .@{file-upload-prefix-cls} {
.component-css-vars-file-upload();
&__header { &__header {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-file-upload() {
--ti-mobile-file-upload-hairline-color: #ddd; --ti-mobile-file-upload-hairline-color: #ddd;
--ti-mobile-file-upload-title-color: var(--ti-mobile-base-color-info-normal, #333333); --ti-mobile-file-upload-title-color: var(--ti-mobile-base-color-info-normal, #333333);
--ti-mobile-file-upload-font-size: 16px; --ti-mobile-file-upload-font-size: 16px;

View File

@ -22,9 +22,11 @@
@numeric-prefix-cls: ~'@{css-prefix}mobile-numeric'; @numeric-prefix-cls: ~'@{css-prefix}mobile-numeric';
.@{form-item-prefix-cls} { .@{form-item-prefix-cls} {
margin-bottom: 12px; .component-css-vars-form-item();
.clearfix(); .clearfix();
margin-bottom: 12px;
& & { & & {
margin-bottom: 0; margin-bottom: 0;
} }

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-form-item() {
--ti-form-item-small-line-height: 28px; --ti-form-item-small-line-height: 28px;
--ti-form-item-medium-line-height: 36px; --ti-form-item-medium-line-height: 36px;
--ti-form-item-mini-line-height: 24px; --ti-form-item-mini-line-height: 24px;

View File

@ -17,6 +17,8 @@
@image-viewer-prefix-cls: ~'@{css-prefix}mobile-image-viewer'; @image-viewer-prefix-cls: ~'@{css-prefix}mobile-image-viewer';
.@{image-viewer-prefix-cls} { .@{image-viewer-prefix-cls} {
.component-css-vars-image-viewer();
&__wrapper { &__wrapper {
position: fixed; position: fixed;
top: 0; top: 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-image-viewer() {
--ti-mobile-image-viewer-color: var(--ti-mobile-base-color-light, #fff); --ti-mobile-image-viewer-color: var(--ti-mobile-base-color-light, #fff);
--ti-mobile-image-viewer-close-bgcolor: #606266; --ti-mobile-image-viewer-close-bgcolor: #606266;
--ti-mobile-image-viewer-arrow-disabled-bgcolor: var(--ti-mobile-base-color-info-disabled, #bfbfbf); --ti-mobile-image-viewer-arrow-disabled-bgcolor: var(--ti-mobile-base-color-info-disabled, #bfbfbf);

View File

@ -16,7 +16,10 @@
@index-bar-prefix-cls: ~'@{css-prefix}mobile-index-bar-anchor'; @index-bar-prefix-cls: ~'@{css-prefix}mobile-index-bar-anchor';
.@{index-bar-prefix-cls} { .@{index-bar-prefix-cls} {
.component-css-vars-index-bar-anchor();
background: var(--ti-mobile-index-bar-anchor-bg-color); background: var(--ti-mobile-index-bar-anchor-bg-color);
&__label { &__label {
margin-left: 16px; margin-left: 16px;
line-height: 32px; line-height: 32px;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-index-bar-anchor() {
--ti-mobile-index-bar-anchor-bg-color: var(--ti-mobile-common-bg-color-dark-gray, #f5f5f5); --ti-mobile-index-bar-anchor-bg-color: var(--ti-mobile-common-bg-color-dark-gray, #f5f5f5);
--ti-mobile-index-bar-anchor-text-color: var(--ti-mobile-common-color-text-weaken-dark, #999); --ti-mobile-index-bar-anchor-text-color: var(--ti-mobile-common-color-text-weaken-dark, #999);
} }

View File

@ -17,6 +17,8 @@
@index-bar-prefix-cls: ~'@{css-prefix}mobile-index-bar'; @index-bar-prefix-cls: ~'@{css-prefix}mobile-index-bar';
.@{index-bar-prefix-cls} { .@{index-bar-prefix-cls} {
.component-css-vars-index-bar();
&__side { &__side {
position: fixed; position: fixed;
right: 0; right: 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-index-bar() {
--ti-mobile-index-bar-bg-color-active: var(--ti-mobile-common-bg-color-main, #4a79fe); --ti-mobile-index-bar-bg-color-active: var(--ti-mobile-common-bg-color-main, #4a79fe);
--ti-mobile-index-bar-text-color: var(--ti-mobile-common-color-text-secondary, #595959); --ti-mobile-index-bar-text-color: var(--ti-mobile-common-color-text-secondary, #595959);
--ti-mobile-index-bar-text-color-active: var(--ti-mobile-common-color-text-white, #fff); --ti-mobile-index-bar-text-color-active: var(--ti-mobile-common-color-text-white, #fff);

View File

@ -21,6 +21,8 @@
@input-group-prefix-cls: ~'@{css-prefix}mobile-input-group'; @input-group-prefix-cls: ~'@{css-prefix}mobile-input-group';
.@{textarea-prefix-cls} { .@{textarea-prefix-cls} {
.component-css-vars-input();
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -93,6 +95,8 @@
} }
.@{input-prefix-cls} { .@{input-prefix-cls} {
.component-css-vars-input();
position: relative; position: relative;
width: 100%; width: 100%;
line-height: var(--ti-mobile-input-line-height); line-height: var(--ti-mobile-input-line-height);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-input() {
// 高度 // 高度
--ti-mobile-input-height: 40px; --ti-mobile-input-height: 40px;
// 水平内边距 // 水平内边距

View File

@ -16,6 +16,8 @@
@label-prefix-cls: ~'@{css-prefix}mobile-label'; @label-prefix-cls: ~'@{css-prefix}mobile-label';
.@{label-prefix-cls} { .@{label-prefix-cls} {
.component-css-vars-label();
display: inline-block; display: inline-block;
word-break: break-word; word-break: break-word;
hyphens: auto; hyphens: auto;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-label() {
// 主要文本色、灰色标签文本色 // 主要文本色、灰色标签文本色
--ti-mobile-label-text-color-primary: var(--ti-mobile-color-text-primary, #191919); --ti-mobile-label-text-color-primary: var(--ti-mobile-color-text-primary, #191919);
// 次要文本色 // 次要文本色

View File

@ -17,6 +17,8 @@
@svg-prefix-cls: ~'@{css-prefix}svg'; @svg-prefix-cls: ~'@{css-prefix}svg';
.@{list-prefix-cls} { .@{list-prefix-cls} {
.component-css-vars-list();
width: 100%; width: 100%;
min-height: 48px; min-height: 48px;
display: flex; display: flex;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-list() {
--ti-mobile-list-bgcolor: var(--ti-mobile-base-color-light, #fff); --ti-mobile-list-bgcolor: var(--ti-mobile-base-color-light, #fff);
--ti-mobile-list-active-bgcolor: #ddd; --ti-mobile-list-active-bgcolor: #ddd;
--ti-mobile-list-border-color: #ddd; --ti-mobile-list-border-color: #ddd;

View File

@ -17,6 +17,8 @@
@mask-prefix-cls: ~'@{css-prefix}mobile-mask'; @mask-prefix-cls: ~'@{css-prefix}mobile-mask';
.@{mask-prefix-cls} { .@{mask-prefix-cls} {
.component-css-vars-mask();
position: fixed; position: fixed;
top: 0; top: 0;
bottom: 0; bottom: 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-mask() {
// 遮罩层背景色 // 遮罩层背景色
--tiny-mobile-mask-bg-color: var(--ti-mobile-color-bg-mask, #0000004b); --tiny-mobile-mask-bg-color: var(--ti-mobile-color-bg-mask, #0000004b);
} }

View File

@ -17,6 +17,8 @@
@mini-picker-prefix-cls: ~'@{css-prefix}mobile-mini-picker'; @mini-picker-prefix-cls: ~'@{css-prefix}mobile-mini-picker';
.@{mini-picker-prefix-cls} { .@{mini-picker-prefix-cls} {
.component-css-vars-mini-picker();
&__mask { &__mask {
position: fixed; position: fixed;
top: 0; top: 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-mini-picker() {
--ti-mobile-mini-picker-mask-background: rgba(0, 0, 0, 0.6); --ti-mobile-mini-picker-mask-background: rgba(0, 0, 0, 0.6);
--ti-mobile-mini-picker-content-bgcolor: #ddd; --ti-mobile-mini-picker-content-bgcolor: #ddd;
--ti-mobile-mini-picker-toolbar-height: 44px; --ti-mobile-mini-picker-toolbar-height: 44px;

View File

@ -18,6 +18,8 @@
@multi-select-item-prefix-cls: ~'@{css-prefix}mobile-multi-select-item'; @multi-select-item-prefix-cls: ~'@{css-prefix}mobile-multi-select-item';
.@{multi-select-item-prefix-cls} { .@{multi-select-item-prefix-cls} {
.component-css-vars-multi-select-item();
width: 100%; width: 100%;
height: var(--ti-mobile-multi-select-item-height); height: var(--ti-mobile-multi-select-item-height);
padding: 0 var(--ti-mobile-multi-select-item-padding-horizontal); padding: 0 var(--ti-mobile-multi-select-item-padding-horizontal);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-multi-select-item() {
// 选项高度 // 选项高度
--ti-mobile-multi-select-item-height: 48px; --ti-mobile-multi-select-item-height: 48px;
// 选项水平内边距 // 选项水平内边距

View File

@ -18,6 +18,8 @@
@multi-select-prefix-cls: ~'@{css-prefix}mobile-multi-select'; @multi-select-prefix-cls: ~'@{css-prefix}mobile-multi-select';
.@{multi-select-prefix-cls} { .@{multi-select-prefix-cls} {
.component-css-vars-multi-select();
position: relative; position: relative;
background: var(--ti-mobile-multi-select-bg, #fff); background: var(--ti-mobile-multi-select-bg, #fff);
width: 100%; width: 100%;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-multi-select() {
// 背景色 // 背景色
--ti-mobile-multi-select-bg: var(--ti-mobile-color-bg-container-1, #fff); --ti-mobile-multi-select-bg: var(--ti-mobile-color-bg-container-1, #fff);
// 头部高度 // 头部高度

View File

@ -18,6 +18,8 @@
@svg-prefix-cls: ~'@{css-prefix}svg'; @svg-prefix-cls: ~'@{css-prefix}svg';
.@{mobile-nav-bar-prefix-cls} { .@{mobile-nav-bar-prefix-cls} {
.component-css-vars-nav-bar();
position: relative; position: relative;
z-index: 1; z-index: 1;
height: var(--ti-mobile-nav-bar-height, 44px); height: var(--ti-mobile-nav-bar-height, 44px);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-nav-bar() {
--ti-mobile-nav-bar-height: 44px; --ti-mobile-nav-bar-height: 44px;
--ti-mobile-nav-bar-bgcolor: #343745; --ti-mobile-nav-bar-bgcolor: #343745;
--ti-mobile-nav-bar-icon-color: var(--ti-mobile-base-color-light, #fff); --ti-mobile-nav-bar-icon-color: var(--ti-mobile-base-color-light, #fff);

View File

@ -19,6 +19,8 @@
@input-prefix-cls: ~'@{css-prefix}mobile-input'; @input-prefix-cls: ~'@{css-prefix}mobile-input';
.@{numeric-prefix-cls} { .@{numeric-prefix-cls} {
.component-css-vars-numeric();
position: relative; position: relative;
display: inline-block; display: inline-block;
width: var(--ti-mobile-numeric-width); width: var(--ti-mobile-numeric-width);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-numeric() {
// 宽度 // 宽度
--ti-mobile-numeric-width: 108px; --ti-mobile-numeric-width: 108px;
// 高度 // 高度

View File

@ -17,6 +17,8 @@
@picker-column-prefix-cls: ~'@{css-prefix}mobile-picker-column'; @picker-column-prefix-cls: ~'@{css-prefix}mobile-picker-column';
.@{picker-column-prefix-cls} { .@{picker-column-prefix-cls} {
.component-css-vars-picker-column();
position: relative; position: relative;
flex: 1; flex: 1;
height: 100%; height: 100%;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-picker-column() {
--ti-mobile-picker-column-item-height: 34px; --ti-mobile-picker-column-item-height: 34px;
--ti-mobile-picker-column-item-color: #333; --ti-mobile-picker-column-item-color: #333;
--ti-mobile-picker-column-item-font-size: 17px; --ti-mobile-picker-column-item-font-size: 17px;

View File

@ -16,6 +16,8 @@
@pull-refresh-prefix-cls: ~'@{css-prefix}mobile-pull-refresh'; @pull-refresh-prefix-cls: ~'@{css-prefix}mobile-pull-refresh';
.@{pull-refresh-prefix-cls} { .@{pull-refresh-prefix-cls} {
.component-css-vars-pull-refresh();
height: 100%; height: 100%;
user-select: none; user-select: none;
overflow: hidden; overflow: hidden;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-pull-refresh() {
// 文字颜色 // 文字颜色
--ti-mobile-pull-refresh-text-color: var(--ti-mobile-color-text-placeholder, #808080); --ti-mobile-pull-refresh-text-color: var(--ti-mobile-color-text-placeholder, #808080);
// 文字尺寸 // 文字尺寸

View File

@ -17,6 +17,8 @@
@radio-prefix-cls: ~'@{css-prefix}mobile-radio'; @radio-prefix-cls: ~'@{css-prefix}mobile-radio';
.@{radio-prefix-cls} { .@{radio-prefix-cls} {
.component-css-vars-radio();
margin-right: 30px; margin-right: 30px;
outline: 0; outline: 0;
white-space: nowrap; white-space: nowrap;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-radio() {
// 组件尺寸 // 组件尺寸
--ti-mobile-radio-size: 24px; --ti-mobile-radio-size: 24px;
// 外圈尺寸 // 外圈尺寸

View File

@ -19,6 +19,8 @@
@search-prefix-cls: ~'@{css-prefix}mobile-search'; @search-prefix-cls: ~'@{css-prefix}mobile-search';
.@{search-prefix-cls} { .@{search-prefix-cls} {
.component-css-vars-search();
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-search() {
// 搜索框高度 // 搜索框高度
--ti-mobile-search-height: 56px; --ti-mobile-search-height: 56px;
// 输入框高度 // 输入框高度

View File

@ -17,6 +17,8 @@
@slider-prefix-cls: ~'@{css-prefix}mobile-slider'; @slider-prefix-cls: ~'@{css-prefix}mobile-slider';
.@{slider-prefix-cls} { .@{slider-prefix-cls} {
.component-css-vars-slider();
position: relative; position: relative;
height: var(--ti-mobile-slider-track-size, 2px); height: var(--ti-mobile-slider-track-size, 2px);
margin: 15px 0; margin: 15px 0;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-slider() {
--ti-mobile-slider-track-size: 2px; --ti-mobile-slider-track-size: 2px;
--ti-mobile-slider-track-bgcolor: #ccc; --ti-mobile-slider-track-bgcolor: #ccc;
--ti-mobile-slider-range-bgcolor: #00c696; --ti-mobile-slider-range-bgcolor: #00c696;

View File

@ -29,6 +29,8 @@
@loading-left-mini: calc(calc(@btn-size-half-mini - @loading-size-half-mini) + @btn-padding-mini); @loading-left-mini: calc(calc(@btn-size-half-mini - @loading-size-half-mini) + @btn-padding-mini);
.@{switch-prefix-cls} { .@{switch-prefix-cls} {
.component-css-vars-switch();
width: var(--ti-mobile-switch-width-normal, 40px); width: var(--ti-mobile-switch-width-normal, 40px);
height: var(--ti-mobile-switch-height-mormal, 24px); height: var(--ti-mobile-switch-height-mormal, 24px);
border-radius: 999px; border-radius: 999px;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-switch() {
// 默认尺寸宽度 // 默认尺寸宽度
--ti-mobile-switch-width-normal: calc(var(--ti-mobile-base-size-width-small) + 4px); --ti-mobile-switch-width-normal: calc(var(--ti-mobile-base-size-width-small) + 4px);
// 默认尺寸高度 // 默认尺寸高度

View File

@ -18,6 +18,8 @@
@svg-prefix-cls: ~'@{css-prefix}svg'; @svg-prefix-cls: ~'@{css-prefix}svg';
.@{tabbar-item-prefix-cls} { .@{tabbar-item-prefix-cls} {
.component-css-vars-tabbar-item();
display: flex; display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-tabbar-item() {
--ti-mobile-tabbar-item-color: var(--ti-mobile-base-color-secondary, #666); --ti-mobile-tabbar-item-color: var(--ti-mobile-base-color-secondary, #666);
--ti-mobile-tabbar-item-active-color: #f04b3d; --ti-mobile-tabbar-item-active-color: #f04b3d;
--ti-mobile-tabbar-item-icon-size: 18px; --ti-mobile-tabbar-item-icon-size: 18px;

View File

@ -17,6 +17,8 @@
@tabbar-prefix-cls: ~'@{css-prefix}mobile-tabbar'; @tabbar-prefix-cls: ~'@{css-prefix}mobile-tabbar';
.@{tabbar-prefix-cls} { .@{tabbar-prefix-cls} {
.component-css-vars-tabbar();
z-index: 1; z-index: 1;
display: flex; display: flex;
box-sizing: content-box; box-sizing: content-box;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-tabbar() {
--ti-mobile-tabbar-height: 48px; --ti-mobile-tabbar-height: 48px;
--ti-mobile-tabbar-bgcolor: #f0f0f0; --ti-mobile-tabbar-bgcolor: #f0f0f0;
--ti-mobile-tabbar-border-color: #ccc; --ti-mobile-tabbar-border-color: #ccc;

View File

@ -18,6 +18,8 @@
@tabs-prefix-cls: ~'@{css-prefix}mobile-tabs'; @tabs-prefix-cls: ~'@{css-prefix}mobile-tabs';
.@{tabs-prefix-cls} { .@{tabs-prefix-cls} {
.component-css-vars-tabs();
position: relative; position: relative;
&-small { &-small {

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-tabs() {
// 页签内容字体色 // 页签内容字体色
--ti-mobile-tabs-text-color: var(--ti-mobile-color-text-secondary, #595959); --ti-mobile-tabs-text-color: var(--ti-mobile-color-text-secondary, #595959);
// 页签栏背景色 // 页签栏背景色

View File

@ -19,6 +19,8 @@
@storage-item-prefix-cls: ~'@{css-prefix}storage-item'; @storage-item-prefix-cls: ~'@{css-prefix}storage-item';
.@{tall-storage-prefix-cls} { .@{tall-storage-prefix-cls} {
.component-css-vars-tall-storage();
position: relative; position: relative;
margin-top: var(--ti-tall-storage-margin-top, 2px); margin-top: var(--ti-tall-storage-margin-top, 2px);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-tall-storage() {
--ti-tall-storage-margin-top: 2px; --ti-tall-storage-margin-top: 2px;
--ti-tall-storage-bgcolor: #fff; --ti-tall-storage-bgcolor: #fff;
--ti-tall-storage-border-radius: 2px; --ti-tall-storage-border-radius: 2px;

View File

@ -17,6 +17,8 @@
@timeline-prefix-cls: ~'@{css-prefix}mobile-timeline'; @timeline-prefix-cls: ~'@{css-prefix}mobile-timeline';
.@{timeline-prefix-cls} { .@{timeline-prefix-cls} {
.component-css-vars-timeline();
overflow: hidden; overflow: hidden;
font-size: var(--ti-mobile-timeline-font-size, 14px); font-size: var(--ti-mobile-timeline-font-size, 14px);

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-timeline() {
--ti-mobile-timeline-font-size: 14px; --ti-mobile-timeline-font-size: 14px;
--ti-mobile-timeline-color: #333; --ti-mobile-timeline-color: #333;
--ti-mobile-timeline-hairline-color: #ddd; --ti-mobile-timeline-hairline-color: #ddd;

View File

@ -19,6 +19,8 @@
@svg-prefix-cls: ~'@{css-prefix}svg'; @svg-prefix-cls: ~'@{css-prefix}svg';
.@{upload-list-prefix-cls} { .@{upload-list-prefix-cls} {
.component-css-vars-upload-list();
& &__item { & &__item {
position: relative; position: relative;
display: flex; display: flex;

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-upload-list() {
--ti-mobile-upload-list-item-border-radius: 2px; --ti-mobile-upload-list-item-border-radius: 2px;
--ti-mobile-upload-list-item-bgcolor: #f9f9f9; --ti-mobile-upload-list-item-bgcolor: #f9f9f9;
--ti-mobile-upload-list-icon-close-color: #606266; --ti-mobile-upload-list-icon-close-color: #606266;

View File

@ -17,6 +17,8 @@
@wheel-prefix-cls: ~'@{css-prefix}mobile-wheel'; @wheel-prefix-cls: ~'@{css-prefix}mobile-wheel';
.@{wheel-prefix-cls} { .@{wheel-prefix-cls} {
.component-css-vars-wheel();
width: 100%; width: 100%;
ul { ul {

View File

@ -1,4 +1,4 @@
:root { .component-css-vars-wheel() {
--ti-mobile-wheel-content-font-size: 14px; --ti-mobile-wheel-content-font-size: 14px;
--ti-mobile-wheel-wrapper-height: 224px; --ti-mobile-wheel-wrapper-height: 224px;
--ti-mobile-wheel-wrapper-font-size: 14px; --ti-mobile-wheel-wrapper-font-size: 14px;