xusd
7 days ago 998218675eb243d43912c203174a6b72b299c0f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<view class="van-calendar">
  <header
    title="{{ title }}"
    showTitle="{{ showTitle }}"
    subtitle="{{ subtitle }}"
    showSubtitle="{{ showSubtitle }}"
    firstDayOfWeek="{{ firstDayOfWeek }}"
    bind:click-subtitle="onClickSubtitle"
  >
    <slot name="title" slot="title"></slot>
  </header>
 
  <scroll-view
    class="van-calendar__body"
    scroll-y
    scroll-into-view="{{ scrollIntoView }}"
  >
    <month
      wx:for="{{ computed.getMonths(minDate, maxDate) }}"
      wx:key="index"
      id="month{{ index }}"
      class="month"
      data-date="{{ item }}"
      date="{{ item }}"
      type="{{ type }}"
      color="{{ color }}"
      minDate="{{ minDate }}"
      maxDate="{{ maxDate }}"
      showMark="{{ showMark }}"
      formatter="{{ formatter }}"
      rowHeight="{{ rowHeight }}"
      currentDate="{{ currentDate }}"
      showSubtitle="{{ showSubtitle }}"
      allowSameDay="{{ allowSameDay }}"
      showMonthTitle="{{ index !== 0 || !showSubtitle }}"
      firstDayOfWeek="{{ firstDayOfWeek }}"
      bind:click="onClickDay"
    />
  </scroll-view>
 
  <view
    class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
  >
    <slot name="footer"></slot>
  </view>
 
  <view
    class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
  >
    <van-button
      wx:if="{{ showConfirm }}"
      round
      block
      type="danger"
      color="{{ color }}"
      custom-class="van-calendar__confirm"
      disabled="{{ computed.getButtonDisabled(type, currentDate) }}"
      nativeType="text"
      bind:click="onConfirm"
    >
      {{
        computed.getButtonDisabled(type, currentDate)
          ? confirmDisabledText
          : confirmText
      }}
    </van-button>
  </view>
</view>