mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
perf(Calendar): simplify placeholder dom (#8955)
This commit is contained in:
parent
be3a7d7497
commit
9040bfd77c
@ -136,6 +136,11 @@ export default defineComponent({
|
||||
|
||||
return () => {
|
||||
const { type, className } = props.item;
|
||||
|
||||
if (type === 'placeholder') {
|
||||
return <div class={bem('day')} style={style.value} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
role="gridcell"
|
||||
|
@ -190,34 +190,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@ -229,34 +219,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@ -268,34 +248,24 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,40 +37,28 @@ exports[`color prop when type is range 1`] = `
|
||||
<div role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@ -606,40 +594,28 @@ exports[`popup wrapper 2`] = `
|
||||
<div role="grid"
|
||||
class="van-calendar__days"
|
||||
>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
<div role="gridcell"
|
||||
<div class="van-calendar__day"
|
||||
style="width: 100%;"
|
||||
class="van-calendar__day van-calendar__day--placeholder"
|
||||
tabindex="-1"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user