style: format vc-calendar

pull/666/head
tangjinzhou 2019-02-13 22:12:00 +08:00
parent 4df4424570
commit 1d80cec3d7
11 changed files with 51 additions and 56 deletions

View File

@ -39,14 +39,15 @@
}
}
.@{prefixClass}-decade-panel-prev-century-btn, .@{prefixClass}-decade-panel-next-century-btn {
.@{prefixClass}-decade-panel-prev-century-btn,
.@{prefixClass}-decade-panel-next-century-btn {
position: absolute;
top: 0;
}
.@{prefixClass}-decade-panel-next-century-btn {
&:after {
content: '»'
content: '»';
}
}
@ -54,7 +55,7 @@
user-select: none;
left: 0;
&:after {
content: '«'
content: '«';
}
}
@ -111,7 +112,8 @@
}
}
.@{prefixClass}-decade-panel-last-century-cell, .@{prefixClass}-decade-panel-next-century-cell {
.@{prefixClass}-decade-panel-last-century-cell,
.@{prefixClass}-decade-panel-next-century-cell {
.@{prefixClass}-decade-panel-decade {
user-select: none;
-webkit-user-select: none;

View File

@ -43,14 +43,15 @@
}
}
.@{prefixClass}-month-panel-prev-year-btn, .@{prefixClass}-month-panel-next-year-btn {
.@{prefixClass}-month-panel-prev-year-btn,
.@{prefixClass}-month-panel-next-year-btn {
position: absolute;
top: 0;
}
.@{prefixClass}-month-panel-next-year-btn {
&:after {
content: '»'
content: '»';
}
}
@ -59,7 +60,7 @@
left: 0;
&:after {
content: '«'
content: '«';
}
}
@ -96,8 +97,6 @@
.@{prefixClass}-month-panel-cell {
text-align: center;
.@{prefixClass}-month-panel-month {
display: block;
width: 46px;

View File

@ -43,14 +43,15 @@
}
}
.@{prefixClass}-year-panel-prev-decade-btn, .@{prefixClass}-year-panel-next-decade-btn {
.@{prefixClass}-year-panel-prev-decade-btn,
.@{prefixClass}-year-panel-next-decade-btn {
position: absolute;
top: 0;
}
.@{prefixClass}-year-panel-next-decade-btn {
&:after {
content: '»'
content: '»';
}
}
@ -59,7 +60,7 @@
left: 0;
&:after {
content: '«'
content: '«';
}
}
@ -125,7 +126,8 @@
}
}
.@{prefixClass}-year-panel-last-decade-cell, .@{prefixClass}-year-panel-next-decade-cell {
.@{prefixClass}-year-panel-last-decade-cell,
.@{prefixClass}-year-panel-next-decade-cell {
.@{prefixClass}-year-panel-year {
user-select: none;
-webkit-user-select: none;

View File

@ -273,7 +273,8 @@ const Calendar = {
if (props.renderSidebar) {
children.push(props.renderSidebar());
}
children.push(<div class={`${prefixCls}-panel`} key="panel">
children.push(
<div class={`${prefixCls}-panel`} key="panel">
{dateInputElement}
<div tabIndex={props.focusablePanel ? 0 : undefined} class={`${prefixCls}-date-panel`}>
<CalendarHeader
@ -328,7 +329,8 @@ const Calendar = {
onCloseTimePicker={this.closeTimePicker}
/>
</div>
</div>);
</div>,
);
return this.renderRoot({
children,

View File

@ -52,10 +52,7 @@ const DateInput = {
!this.invalid &&
!(cachedSelectionStart === 0 && cachedSelectionEnd === 0)
) {
dateInputInstance.setSelectionRange(
cachedSelectionStart,
cachedSelectionEnd,
);
dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd);
}
});
},
@ -167,12 +164,14 @@ const DateInput = {
<div class={`${prefixCls}-input-wrap`}>
<div class={`${prefixCls}-date-input-wrap`}>
<input
{...{directives: [
{...{
directives: [
{
name: 'ant-ref',
value: this.saveDateInput,
},
]}}
],
}}
class={`${prefixCls}-input ${invalidClass}`}
value={str}
disabled={disabled}

View File

@ -120,10 +120,7 @@ export default {
<tbody class={`${prefixCls}-tbody`}>{decadesEls}</tbody>
</table>
</div>
{footer && (
<div class={`${prefixCls}-footer`}>
{footer}
</div>)}
{footer && <div class={`${prefixCls}-footer`}>{footer}</div>}
</div>
);
},

View File

@ -116,10 +116,7 @@ const MonthPanel = {
prefixCls={prefixCls}
/>
</div>
{footer && (
<div class={`${prefixCls}-footer`}>
{footer}
</div>)}
{footer && <div class={`${prefixCls}-footer`}>{footer}</div>}
</div>
</div>
);

View File

@ -137,10 +137,7 @@ export default {
<tbody class={`${prefixCls}-tbody`}>{yeasEls}</tbody>
</table>
</div>
{footer && (
<div class={`${prefixCls}-footer`}>
{footer}
</div>)}
{footer && <div class={`${prefixCls}-footer`}>{footer}</div>}
</div>
</div>
);