Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: demo 更新 #1932

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_common
54 changes: 27 additions & 27 deletions src/calendar/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ exports[`Calendar > :props > :cell 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -638,7 +638,7 @@ exports[`Calendar > :props > :cell 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -1174,7 +1174,7 @@ exports[`Calendar > :props > :cellAppend 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -2020,7 +2020,7 @@ exports[`Calendar > :props > :cellAppend 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -4378,7 +4378,7 @@ exports[`Calendar > :props > :fillWithZero 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -5224,7 +5224,7 @@ exports[`Calendar > :props > :fillWithZero 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -6074,7 +6074,7 @@ exports[`Calendar > :props > :firstDayOfWeek 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -7039,7 +7039,7 @@ exports[`Calendar > :props > :format 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -7891,7 +7891,7 @@ exports[`Calendar > :props > :head 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -8741,7 +8741,7 @@ exports[`Calendar > :props > :head 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -9592,7 +9592,7 @@ exports[`Calendar > :props > :isShowWeekendDefault 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -10438,7 +10438,7 @@ exports[`Calendar > :props > :isShowWeekendDefault 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-tag--checked t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-tag--checked t-calendar__control-tag"
>
显示周末
</span>
Expand Down Expand Up @@ -11115,7 +11115,7 @@ exports[`Calendar > :props > :mode 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -12314,7 +12314,7 @@ exports[`Calendar > :props > :multiple 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -13164,7 +13164,7 @@ exports[`Calendar > :props > :preventCellContextmenu 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -14010,7 +14010,7 @@ exports[`Calendar > :props > :preventCellContextmenu 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -14860,7 +14860,7 @@ exports[`Calendar > :props > :range 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -16533,7 +16533,7 @@ exports[`Calendar > :props > :theme 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -17383,7 +17383,7 @@ exports[`Calendar > :props > :value 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -18233,7 +18233,7 @@ exports[`Calendar > :props > :week 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -19065,7 +19065,7 @@ exports[`Calendar > :props > :week 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -19916,7 +19916,7 @@ exports[`Calendar > :props > :year:month 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -20762,7 +20762,7 @@ exports[`Calendar > :props > :year:month 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -21612,7 +21612,7 @@ exports[`Calendar > <slot> > <cell> 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -22461,7 +22461,7 @@ exports[`Calendar > <slot> > <cellAppend> 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -23310,7 +23310,7 @@ exports[`Calendar > <slot> > <head> 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down Expand Up @@ -24159,7 +24159,7 @@ exports[`Calendar > <slot> > <week> 1`] = `
class="t-calendar__control-section-cell"
>
<span
class="t-tag t-tag--check t-tag--default t-size-m t-calendar__control-tag"
class="t-tag t-tag--check t-tag--default t-size-l t-calendar__control-tag"
>
隐藏周末
</span>
Expand Down
10 changes: 6 additions & 4 deletions src/calendar/_example/cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,24 @@ export default {
.shadow {
position: absolute;
width: 100%;
height: 12px;
height: 22px;
bottom: 0;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
}
.number {
font-weight: bold;
font-weight: 600;
position: absolute;
top: 3px;
right: 5px;
right: 0;
font-size: 14px;
line-height: 22px;
}
.item {
position: relative;
display: flex;
align-items: center;
color: var(--td-text-color-secondary);
font-size: 14px;
line-height: 22px;
span {
display: block;
left: 1px;
Expand Down
4 changes: 2 additions & 2 deletions src/calendar/_example/controller-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export default {
showWeekendButtonProps: {
// 用于透传props给显示周末按钮组件
disabled: false,
size: 'small',
size: 'medium',
},
hideWeekendButtonProps: {
// 用于透传props给隐藏周末按钮组件
disabled: false,
variant: 'base',
size: 'small',
size: 'medium',
},
},
// “今天\本月”按钮组件相关设置
Expand Down
8 changes: 4 additions & 4 deletions src/calendar/_example/slot-props-api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default {
position: relative;
display: flex;
align-items: center;
color: rgba(0, 0, 0, 0.6);
color: var(--td-text-color-secondary);
span {
display: block;
left: 1px;
Expand All @@ -91,13 +91,13 @@ export default {
}
}
.error {
background: #e34d59;
background: var(--td-error-color);
}
.warning {
background: #ed7b2f;
background: var(--td-warning-color);
}
.success {
background: #00a870;
background: var(--td-success-color);
}
}
.calendar-slot-props-api-demo-slot-wrapper {
Expand Down
1 change: 1 addition & 0 deletions src/calendar/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ export default mixins(getConfigReceiverMixins<Vue, CalendarConfig>('calendar')).
defaultChecked={!this.isShowWeekend}
disabled={this.isWeekendToggleDisabled}
onClick={this.onWeekendToggleClick}
size="large"
props={{ ...this.weekendBtnVBind }}
>
{this.weekendBtnText}
Expand Down