mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
feat: improve cursor
This commit is contained in:
parent
5cbb9e2998
commit
2eb680723d
@ -14,6 +14,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: @action-sheet-item-background;
|
background-color: @action-sheet-item-background;
|
||||||
border: none;
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @active-color;
|
background-color: @active-color;
|
||||||
@ -23,6 +24,7 @@
|
|||||||
&__item {
|
&__item {
|
||||||
height: @action-sheet-item-height;
|
height: @action-sheet-item-height;
|
||||||
|
|
||||||
|
&--loading,
|
||||||
&--disabled {
|
&--disabled {
|
||||||
color: @action-sheet-item-disabled-text-color;
|
color: @action-sheet-item-disabled-text-color;
|
||||||
|
|
||||||
@ -30,6 +32,14 @@
|
|||||||
background-color: @action-sheet-item-background;
|
background-color: @action-sheet-item-background;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--loading {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__subname {
|
&__subname {
|
||||||
|
@ -70,17 +70,17 @@ function ActionSheet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Option(item: ActionSheetItem, index: number) {
|
function Option(item: ActionSheetItem, index: number) {
|
||||||
const disabled = item.disabled || item.loading;
|
const { disabled, loading, callback } = item;
|
||||||
|
|
||||||
function onClickOption(event: MouseEvent) {
|
function onClickOption(event: MouseEvent) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (item.disabled || item.loading) {
|
if (disabled || loading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.callback) {
|
if (callback) {
|
||||||
item.callback(item);
|
callback(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(ctx, 'select', item, index);
|
emit(ctx, 'select', item, index);
|
||||||
@ -91,7 +91,7 @@ function ActionSheet(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function OptionContent() {
|
function OptionContent() {
|
||||||
if (item.loading) {
|
if (loading) {
|
||||||
return <Loading size="20px" />;
|
return <Loading size="20px" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ function ActionSheet(
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class={[bem('item', { disabled }), item.className, BORDER_TOP]}
|
class={[bem('item', { disabled, loading }), item.className, BORDER_TOP]}
|
||||||
style={{ color: item.color }}
|
style={{ color: item.color }}
|
||||||
onClick={onClickOption}
|
onClick={onClickOption}
|
||||||
>
|
>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`callback events 1`] = `
|
exports[`callback events 1`] = `
|
||||||
<div class="van-popup van-popup--round van-popup--bottom van-popup--safe-area-inset-bottom van-action-sheet" name="van-popup-slide-bottom"><button type="button" class="van-action-sheet__item van-hairline--top"><span class="van-action-sheet__name">Option</span></button><button type="button" class="van-action-sheet__item van-action-sheet__item--disabled van-hairline--top"><span class="van-action-sheet__name">Option</span></button><button type="button" class="van-action-sheet__item van-action-sheet__item--disabled van-hairline--top">
|
<div class="van-popup van-popup--round van-popup--bottom van-popup--safe-area-inset-bottom van-action-sheet" name="van-popup-slide-bottom"><button type="button" class="van-action-sheet__item van-hairline--top"><span class="van-action-sheet__name">Option</span></button><button type="button" class="van-action-sheet__item van-action-sheet__item--disabled van-hairline--top"><span class="van-action-sheet__name">Option</span></button><button type="button" class="van-action-sheet__item van-action-sheet__item--loading van-hairline--top">
|
||||||
<div class="van-loading van-loading--circular"><span class="van-loading__spinner van-loading__spinner--circular" style="width: 20px; height: 20px;"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
<div class="van-loading van-loading--circular"><span class="van-loading__spinner van-loading__spinner--circular" style="width: 20px; height: 20px;"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
||||||
</button><button type="button" class="van-action-sheet__item van-hairline--top"><span class="van-action-sheet__name">Option</span><span class="van-action-sheet__subname">Subname</span></button><button type="button" class="van-action-sheet__cancel">Cancel</button></div>
|
</button><button type="button" class="van-action-sheet__item van-hairline--top"><span class="van-action-sheet__name">Option</span><span class="van-action-sheet__subname">Subname</span></button><button type="button" class="van-action-sheet__cancel">Cancel</button></div>
|
||||||
`;
|
`;
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
&,
|
&,
|
||||||
& .van-cell__right-icon {
|
& .van-cell__right-icon {
|
||||||
color: @collapse-item-title-disabled-color;
|
color: @collapse-item-title-disabled-color;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 0; // hack for flex ellipsis
|
min-width: 0; // hack for flex ellipsis
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
opacity: @active-opacity;
|
opacity: @active-opacity;
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
&__clear {
|
&__clear {
|
||||||
color: @field-clear-icon-color;
|
color: @field-clear-icon-color;
|
||||||
font-size: @field-clear-icon-size;
|
font-size: @field-clear-icon-size;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__left-icon .van-icon,
|
&__left-icon .van-icon,
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: @white;
|
background-color: @white;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @goods-action-icon-active-color;
|
background-color: @goods-action-icon-active-color;
|
||||||
|
@ -39,10 +39,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--clickable:active {
|
&--clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:active {
|
||||||
background-color: @grid-item-content-active-color;
|
background-color: @grid-item-content-active-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__icon {
|
&__icon {
|
||||||
font-size: @grid-item-icon-size;
|
font-size: @grid-item-icon-size;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
font-size: @font-size-md;
|
font-size: @font-size-md;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__left {
|
&__left {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
&__right-icon {
|
&__right-icon {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__wrap {
|
&__wrap {
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
padding: @number-keyboard-close-padding;
|
padding: @number-keyboard-close-padding;
|
||||||
color: @number-keyboard-close-color;
|
color: @number-keyboard-close-color;
|
||||||
font-size: @number-keyboard-close-font-size;
|
font-size: @number-keyboard-close-font-size;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @number-keyboard-key-active-color;
|
background-color: @number-keyboard-key-active-color;
|
||||||
@ -69,6 +70,7 @@
|
|||||||
line-height: @number-keyboard-key-height;
|
line-height: @number-keyboard-key-height;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
border-width: @border-width-base @border-width-base 0 0;
|
border-width: @border-width-base @border-width-base 0 0;
|
||||||
|
@ -39,7 +39,7 @@ export default {
|
|||||||
i18n: {
|
i18n: {
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '简单模式',
|
title2: '简单模式',
|
||||||
title3: '',
|
title3: '显示省略号',
|
||||||
prevText: '上一页',
|
prevText: '上一页',
|
||||||
nextText: '下一页'
|
nextText: '下一页'
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
height: @pagination-height;
|
height: @pagination-height;
|
||||||
color: @pagination-item-default-color;
|
color: @pagination-item-default-color;
|
||||||
background-color: @pagination-background-color;
|
background-color: @pagination-background-color;
|
||||||
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
@ -28,13 +29,6 @@
|
|||||||
border-right-width: @border-width-base;
|
border-right-width: @border-width-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled,
|
|
||||||
&--disabled:active {
|
|
||||||
color: @pagination-item-disabled-color;
|
|
||||||
background-color: @pagination-item-disabled-background-color;
|
|
||||||
opacity: @pagination-disabled-opacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
color: @white;
|
color: @white;
|
||||||
background-color: @pagination-item-default-color;
|
background-color: @pagination-item-default-color;
|
||||||
@ -44,6 +38,17 @@
|
|||||||
&__prev,
|
&__prev,
|
||||||
&__next {
|
&__next {
|
||||||
padding: 0 @padding-base;
|
padding: 0 @padding-base;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__item--disabled {
|
||||||
|
&,
|
||||||
|
&:active {
|
||||||
|
color: @pagination-item-disabled-color;
|
||||||
|
background-color: @pagination-item-disabled-background-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: @pagination-disabled-opacity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__page {
|
&__page {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: @password-input-height;
|
height: @password-input-height;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
border-radius: @password-input-border-radius;
|
border-radius: @password-input-border-radius;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
&__columns {
|
&__columns {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: grab;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__loading {
|
&__loading {
|
||||||
|
@ -201,7 +201,14 @@ export default createComponent({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div class={bem()} tabindex="0" role="radiogroup">
|
<div
|
||||||
|
class={bem({
|
||||||
|
readonly: this.readonly,
|
||||||
|
disabled: this.disabled
|
||||||
|
})}
|
||||||
|
tabindex="0"
|
||||||
|
role="radiogroup"
|
||||||
|
>
|
||||||
{this.list.map((status, index) => this.genStar(status, index))}
|
{this.list.map((status, index) => this.genStar(status, index))}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
.van-rate {
|
.van-rate {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
@ -25,4 +26,12 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--readonly {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div tabindex="0" role="radiogroup" class="van-rate">
|
<div tabindex="0" role="radiogroup" class="van-rate van-rate--disabled">
|
||||||
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="1" aria-checked="true" class="van-rate__item"><i data-score="1" class="van-icon van-icon-star van-rate__icon" style="color: rgb(189, 189, 189);">
|
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="1" aria-checked="true" class="van-rate__item"><i data-score="1" class="van-icon van-icon-star van-rate__icon" style="color: rgb(189, 189, 189);">
|
||||||
<!----></i></div>
|
<!----></i></div>
|
||||||
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="2" aria-checked="true" class="van-rate__item"><i data-score="2" class="van-icon van-icon-star van-rate__icon" style="color: rgb(189, 189, 189);">
|
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="2" aria-checked="true" class="van-rate__item"><i data-score="2" class="van-icon van-icon-star van-rate__icon" style="color: rgb(189, 189, 189);">
|
||||||
@ -94,7 +94,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div tabindex="0" role="radiogroup" class="van-rate">
|
<div tabindex="0" role="radiogroup" class="van-rate van-rate--readonly">
|
||||||
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="1" aria-checked="true" class="van-rate__item"><i data-score="1" class="van-icon van-icon-star van-rate__icon" style="color: rgb(255, 210, 30);">
|
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="1" aria-checked="true" class="van-rate__item"><i data-score="1" class="van-icon van-icon-star van-rate__icon" style="color: rgb(255, 210, 30);">
|
||||||
<!----></i></div>
|
<!----></i></div>
|
||||||
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="2" aria-checked="true" class="van-rate__item"><i data-score="2" class="van-icon van-icon-star van-rate__icon" style="color: rgb(255, 210, 30);">
|
<div role="radio" tabindex="0" aria-setsize="5" aria-posinset="2" aria-checked="true" class="van-rate__item"><i data-score="2" class="van-icon van-icon-star van-rate__icon" style="color: rgb(255, 210, 30);">
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
color: @search-action-text-color;
|
color: @search-action-text-color;
|
||||||
font-size: @search-action-font-size;
|
font-size: @search-action-font-size;
|
||||||
line-height: @search-input-height;
|
line-height: @search-input-height;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @active-color;
|
background-color: @active-color;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
background-color: @sidebar-background-color;
|
background-color: @sidebar-background-color;
|
||||||
border-left: 3px solid transparent;
|
border-left: 3px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
@ -43,6 +44,7 @@
|
|||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
color: @sidebar-disabled-text-color;
|
color: @sidebar-disabled-text-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @sidebar-background-color;
|
background-color: @sidebar-background-color;
|
||||||
|
@ -147,6 +147,7 @@
|
|||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-radius: @border-radius-md;
|
border-radius: @border-radius-md;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -184,6 +185,7 @@
|
|||||||
&--disabled {
|
&--disabled {
|
||||||
color: @gray-5;
|
color: @gray-5;
|
||||||
background: @active-color;
|
background: @active-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
.van-sku-row__item-img {
|
.van-sku-row__item-img {
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
background-color: @slider-inactive-background-color;
|
background-color: @slider-inactive-background-color;
|
||||||
border-radius: @border-radius-max;
|
border-radius: @border-radius-max;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
// use pseudo element to expand click area
|
// use pseudo element to expand click area
|
||||||
&::before {
|
&::before {
|
||||||
@ -34,11 +35,17 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
right: 0;
|
right: 0;
|
||||||
transform: translate3d(50%, -50%, 0);
|
transform: translate3d(50%, -50%, 0);
|
||||||
|
cursor: grab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
opacity: @slider-disabled-opacity;
|
opacity: @slider-disabled-opacity;
|
||||||
|
|
||||||
|
.van-slider__button-wrapper {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--vertical {
|
&--vertical {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: @stepper-background-color;
|
background-color: @stepper-background-color;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
width: 13px;
|
width: 13px;
|
||||||
@ -46,6 +47,7 @@
|
|||||||
&--disabled {
|
&--disabled {
|
||||||
color: @stepper-button-disabled-icon-color;
|
color: @stepper-button-disabled-icon-color;
|
||||||
background-color: @stepper-button-disabled-color;
|
background-color: @stepper-button-disabled-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @stepper-button-disabled-color;
|
background-color: @stepper-button-disabled-color;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
.van-swipe-cell {
|
.van-swipe-cell {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
cursor: grab;
|
||||||
|
|
||||||
&__wrapper {
|
&__wrapper {
|
||||||
transition-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1);
|
transition-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
.van-swipe {
|
.van-swipe {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
cursor: grab;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&__track {
|
&__track {
|
||||||
|
@ -31,7 +31,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-cell van-cell--center van-switch-cell">
|
<div class="van-cell van-cell--center van-switch-cell">
|
||||||
<div class="van-cell__title"><span>标题</span></div>
|
<div class="van-cell__title"><span>标题</span></div>
|
||||||
<div class="van-cell__value">
|
<div class="van-cell__value">
|
||||||
<div role="switch" aria-checked="true" class="van-switch van-switch--on" style="font-size: 24px;">
|
<div role="switch" aria-checked="true" class="van-switch van-switch--on van-switch--loading" style="font-size: 24px;">
|
||||||
<div class="van-switch__node">
|
<div class="van-switch__node">
|
||||||
<div class="van-loading van-loading--circular van-switch__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(25, 137, 250);"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
<div class="van-loading van-loading--circular van-switch__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(25, 137, 250);"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
background-color: @switch-background-color;
|
background-color: @switch-background-color;
|
||||||
border: @switch-border;
|
border: @switch-border;
|
||||||
border-radius: @switch-node-size;
|
border-radius: @switch-node-size;
|
||||||
|
cursor: pointer;
|
||||||
transition: background-color @switch-transition-duration;
|
transition: background-color @switch-transition-duration;
|
||||||
|
|
||||||
&__node {
|
&__node {
|
||||||
@ -42,6 +43,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
opacity: @switch-disabled-opacity;
|
opacity: @switch-disabled-opacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--loading {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ function Switch(
|
|||||||
<div
|
<div
|
||||||
class={bem({
|
class={bem({
|
||||||
on: checked,
|
on: checked,
|
||||||
|
loading,
|
||||||
disabled
|
disabled
|
||||||
})}
|
})}
|
||||||
role="switch"
|
role="switch"
|
||||||
|
@ -13,7 +13,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div role="switch" aria-checked="true" class="van-switch van-switch--on">
|
<div role="switch" aria-checked="true" class="van-switch van-switch--on van-switch--loading">
|
||||||
<div class="van-switch__node">
|
<div class="van-switch__node">
|
||||||
<div class="van-loading van-loading--circular van-switch__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(25, 137, 250);"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
<div class="van-loading van-loading--circular van-switch__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(25, 137, 250);"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
color: @tab-disabled-text-color;
|
color: @tab-disabled-text-color;
|
||||||
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
padding: 0 32px 0 @padding-md;
|
padding: 0 32px 0 @padding-md;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: @tree-select-item-height;
|
line-height: @tree-select-item-height;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
color: @tree-select-item-active-color;
|
color: @tree-select-item-active-color;
|
||||||
@ -36,6 +37,7 @@
|
|||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
color: @tree-select-item-disabled-color;
|
color: @tree-select-item-disabled-color;
|
||||||
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
&__preview {
|
&__preview {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 @padding-xs @padding-xs 0;
|
margin: 0 @padding-xs @padding-xs 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&-image {
|
&-image {
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user