mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Coupon): add @coupon-corner-checkbox-icon-color var (#8323)
This commit is contained in:
parent
27a52949fa
commit
e1bfb7b27d
@ -157,6 +157,7 @@ How to use: [Custom Theme](#/en-US/theme).
|
|||||||
| @coupon-disabled-text-color | `@gray-6` | - |
|
| @coupon-disabled-text-color | `@gray-6` | - |
|
||||||
| @coupon-description-padding | `@padding-xs @padding-md` | - |
|
| @coupon-description-padding | `@padding-xs @padding-md` | - |
|
||||||
| @coupon-description-border-color | `@border-color` | - |
|
| @coupon-description-border-color | `@border-color` | - |
|
||||||
|
| @coupon-corner-checkbox-icon-color | `@red` | - |
|
||||||
| @coupon-list-background-color | `@background-color` | - |
|
| @coupon-list-background-color | `@background-color` | - |
|
||||||
| @coupon-list-field-padding | `5px 0 5px @padding-md` | - |
|
| @coupon-list-field-padding | `5px 0 5px @padding-md` | - |
|
||||||
| @coupon-list-exchange-button-height | `32px` | - |
|
| @coupon-list-exchange-button-height | `32px` | - |
|
||||||
|
@ -159,6 +159,7 @@ export default {
|
|||||||
| @coupon-disabled-text-color | `@gray-6` | - |
|
| @coupon-disabled-text-color | `@gray-6` | - |
|
||||||
| @coupon-description-padding | `@padding-xs @padding-md` | - |
|
| @coupon-description-padding | `@padding-xs @padding-md` | - |
|
||||||
| @coupon-description-border-color | `@border-color` | - |
|
| @coupon-description-border-color | `@border-color` | - |
|
||||||
|
| @coupon-corner-checkbox-icon-color | `@red` | - |
|
||||||
| @coupon-list-background-color | `@background-color` | - |
|
| @coupon-list-background-color | `@background-color` | - |
|
||||||
| @coupon-list-field-padding | `5px 0 5px @padding-md` | - |
|
| @coupon-list-field-padding | `5px 0 5px @padding-md` | - |
|
||||||
| @coupon-list-exchange-button-height | `32px` | - |
|
| @coupon-list-exchange-button-height | `32px` | - |
|
||||||
|
@ -115,9 +115,7 @@ exports[`should be the sames as the last snapshot when render coupon list 1`] =
|
|||||||
aria-checked="true"
|
aria-checked="true"
|
||||||
>
|
>
|
||||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked">
|
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked">
|
||||||
<i class="van-badge__wrapper van-icon van-icon-success"
|
<i class="van-badge__wrapper van-icon van-icon-success">
|
||||||
style="border-color: #ee0a24; background-color: rgb(238, 10, 36);"
|
|
||||||
>
|
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { computed, PropType, defineComponent } from 'vue';
|
import { computed, PropType, defineComponent } from 'vue';
|
||||||
import { padZero, createNamespace } from '../utils';
|
import { padZero, createNamespace } from '../utils';
|
||||||
import { RED } from '../utils/constant';
|
|
||||||
import { Checkbox } from '../checkbox';
|
import { Checkbox } from '../checkbox';
|
||||||
|
|
||||||
export type CouponInfo = {
|
export type CouponInfo = {
|
||||||
@ -101,11 +100,7 @@ export default defineComponent({
|
|||||||
<p class={bem('name')}>{coupon.name}</p>
|
<p class={bem('name')}>{coupon.name}</p>
|
||||||
<p class={bem('valid')}>{validPeriod.value}</p>
|
<p class={bem('valid')}>{validPeriod.value}</p>
|
||||||
{!disabled && (
|
{!disabled && (
|
||||||
<Checkbox
|
<Checkbox class={bem('corner')} modelValue={chosen} />
|
||||||
class={bem('corner')}
|
|
||||||
modelValue={chosen}
|
|
||||||
checkedColor={RED}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,6 +80,11 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: @padding-md;
|
right: @padding-md;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|
||||||
|
.van-checkbox__icon--checked .van-icon {
|
||||||
|
background-color: @coupon-corner-checkbox-icon-color;
|
||||||
|
border-color: @coupon-corner-checkbox-icon-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__description {
|
&__description {
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
<van-dropdown-item :title="t('itemTitle')" ref="item">
|
<van-dropdown-item :title="t('itemTitle')" ref="item">
|
||||||
<van-cell center :title="t('switchTitle1')">
|
<van-cell center :title="t('switchTitle1')">
|
||||||
<template #right-icon>
|
<template #right-icon>
|
||||||
<van-switch v-model="switch1" size="24" :active-color="RED" />
|
<van-switch v-model="switch1" size="24" active-color="#ee0a24" />
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell center :title="t('switchTitle2')">
|
<van-cell center :title="t('switchTitle2')">
|
||||||
<template #right-icon>
|
<template #right-icon>
|
||||||
<van-switch v-model="switch2" size="24" :active-color="RED" />
|
<van-switch v-model="switch2" size="24" active-color="#ee0a24" />
|
||||||
</template>
|
</template>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<div style="padding: 5px 16px">
|
<div style="padding: 5px 16px">
|
||||||
@ -61,7 +61,6 @@
|
|||||||
import { computed, reactive, ref, toRefs } from 'vue';
|
import { computed, reactive, ref, toRefs } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { ComponentInstance } from '../../utils';
|
import { ComponentInstance } from '../../utils';
|
||||||
import { RED } from '../../utils/constant';
|
|
||||||
|
|
||||||
const i18n = {
|
const i18n = {
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
@ -126,7 +125,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
t,
|
t,
|
||||||
RED,
|
|
||||||
item,
|
item,
|
||||||
option1,
|
option1,
|
||||||
option2,
|
option2,
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
<van-col span="6" @click="copy(demoIcon, { color: '#1989fa' })">
|
<van-col span="6" @click="copy(demoIcon, { color: '#1989fa' })">
|
||||||
<van-icon name="cart-o" color="#1989fa" />
|
<van-icon name="cart-o" color="#1989fa" />
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6" @click="copy(demoIcon, { color: RED })">
|
<van-col span="6" @click="copy(demoIcon, { color: '#ee0a24' })">
|
||||||
<van-icon name="fire-o" :color="RED" />
|
<van-icon name="fire-o" color="#ee0a24" />
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
@ -97,7 +97,6 @@
|
|||||||
import icons from '@vant/icons';
|
import icons from '@vant/icons';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { RED } from '../../utils/constant';
|
|
||||||
import { Notify } from '../../notify';
|
import { Notify } from '../../notify';
|
||||||
|
|
||||||
// from https://30secondsofcode.org
|
// from https://30secondsofcode.org
|
||||||
@ -185,7 +184,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
t,
|
t,
|
||||||
tab,
|
tab,
|
||||||
RED,
|
|
||||||
copy,
|
copy,
|
||||||
icons,
|
icons,
|
||||||
demoIcon: 'chat-o',
|
demoIcon: 'chat-o',
|
||||||
|
@ -317,6 +317,7 @@
|
|||||||
@coupon-disabled-text-color: @gray-6;
|
@coupon-disabled-text-color: @gray-6;
|
||||||
@coupon-description-padding: @padding-xs @padding-md;
|
@coupon-description-padding: @padding-xs @padding-md;
|
||||||
@coupon-description-border-color: @border-color;
|
@coupon-description-border-color: @border-color;
|
||||||
|
@coupon-corner-checkbox-icon-color: @red;
|
||||||
|
|
||||||
// CouponCell
|
// CouponCell
|
||||||
@coupon-cell-selected-text-color: @text-color;
|
@coupon-cell-selected-text-color: @text-color;
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
// color
|
|
||||||
export const RED = '#ee0a24';
|
|
||||||
|
|
||||||
// border
|
// border
|
||||||
export const BORDER = 'van-hairline';
|
export const BORDER = 'van-hairline';
|
||||||
export const BORDER_TOP = `${BORDER}--top`;
|
export const BORDER_TOP = `${BORDER}--top`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user