mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
style: improve cursor of haptics elements (#10232)
This commit is contained in:
parent
befdf5e857
commit
b338aef41f
@ -36,7 +36,6 @@
|
|||||||
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;
|
|
||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
.van-dropdown-menu__title {
|
.van-dropdown-menu__title {
|
||||||
|
@ -88,7 +88,6 @@
|
|||||||
z-index: var(--van-image-preview-close-icon-z-index);
|
z-index: var(--van-image-preview-close-icon-z-index);
|
||||||
color: var(--van-image-preview-close-icon-color);
|
color: var(--van-image-preview-close-icon-color);
|
||||||
font-size: var(--van-image-preview-close-icon-size);
|
font-size: var(--van-image-preview-close-icon-size);
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&--top-left {
|
&--top-left {
|
||||||
top: var(--van-image-preview-close-icon-margin);
|
top: var(--van-image-preview-close-icon-margin);
|
||||||
|
@ -64,7 +64,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 var(--van-padding-md);
|
padding: 0 var(--van-padding-md);
|
||||||
font-size: var(--van-font-size-md);
|
font-size: var(--van-font-size-md);
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__left {
|
&__left {
|
||||||
|
@ -74,7 +74,6 @@
|
|||||||
font-size: var(--van-number-keyboard-close-font-size);
|
font-size: var(--van-number-keyboard-close-font-size);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__sidebar {
|
&__sidebar {
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
font-size: var(--van-picker-action-font-size);
|
font-size: var(--van-picker-action-font-size);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__confirm {
|
&__confirm {
|
||||||
|
@ -116,7 +116,6 @@
|
|||||||
z-index: var(--van-popup-close-icon-z-index);
|
z-index: var(--van-popup-close-icon-z-index);
|
||||||
color: var(--van-popup-close-icon-color);
|
color: var(--van-popup-close-icon-color);
|
||||||
font-size: var(--van-popup-close-icon-size);
|
font-size: var(--van-popup-close-icon-size);
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&--top-left {
|
&--top-left {
|
||||||
top: var(--van-popup-close-icon-margin);
|
top: var(--van-popup-close-icon-margin);
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background: var(--van-stepper-background-color);
|
background: var(--van-stepper-background-color);
|
||||||
border: 0;
|
border: 0;
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -31,8 +31,12 @@
|
|||||||
padding-bottom: env(safe-area-inset-bottom);
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
.van-haptics-feedback:active {
|
.van-haptics-feedback {
|
||||||
opacity: var(--van-active-opacity);
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
opacity: var(--van-active-opacity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*='van-hairline'] {
|
[class*='van-hairline'] {
|
||||||
|
@ -5,7 +5,12 @@ import {
|
|||||||
type CSSProperties,
|
type CSSProperties,
|
||||||
type ExtractPropTypes,
|
type ExtractPropTypes,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { truthProp, makeStringProp, createNamespace } from '../utils';
|
import {
|
||||||
|
truthProp,
|
||||||
|
makeStringProp,
|
||||||
|
createNamespace,
|
||||||
|
HAPTICS_FEEDBACK,
|
||||||
|
} from '../utils';
|
||||||
import { Icon } from '../icon';
|
import { Icon } from '../icon';
|
||||||
|
|
||||||
const [name, bem] = createNamespace('tag');
|
const [name, bem] = createNamespace('tag');
|
||||||
@ -66,7 +71,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CloseIcon = closeable && (
|
const CloseIcon = closeable && (
|
||||||
<Icon name="cross" class={bem('close')} onClick={onClose} />
|
<Icon
|
||||||
|
name="cross"
|
||||||
|
class={[bem('close'), HAPTICS_FEEDBACK]}
|
||||||
|
onClick={onClose}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -114,6 +114,5 @@
|
|||||||
|
|
||||||
&__close {
|
&__close {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<transition-stub>
|
<transition-stub>
|
||||||
<span class="van-tag van-tag--medium van-tag--primary">
|
<span class="van-tag van-tag--medium van-tag--primary">
|
||||||
Tag
|
Tag
|
||||||
<i class="van-badge__wrapper van-icon van-icon-cross van-tag__close">
|
<i class="van-badge__wrapper van-icon van-icon-cross van-tag__close van-haptics-feedback">
|
||||||
</i>
|
</i>
|
||||||
</span>
|
</span>
|
||||||
</transition-stub>
|
</transition-stub>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user