DropDown#picker.oc-dp-wrap(ref="dropdown", @hide="init", @show="init(true)", :isSetMinWidth="false", :disabled="disabled", :class="[{'show-time-zone': showTimeZone}]", :timezone="formatTimeZone", :title="showTimeZone && formatTimeZone === '-' ? '- 视作0时区' : null")
template(slot="dropHead")
input.ocFormElement.oc-datepicker(
ref="ipt",
:data-transferValue="transferValue",
:name="name",
:required="required",
type="text",
v-model.trim="currentValue",
:style="iptStyle",
:placeholder="placeholder",
autocomplete="off",
:readonly="readonly",
:disabled="disabled")
.z-dp(slot="dropBody")
#head.z-dp-head(ref="head")
span.z-dp-prev(@click="headClickHandler(-1)") <
span.z-dp-view-switch(@click="headClickHandler(0)") {{headText}}
span.z-dp-next(@click="headClickHandler(1)") >
#body.z-dp-body(ref="body", @click="bodyClickHandler($event)", @mouseover="bodyMouseover", @mouseout="bodyMouseout")
table.z-dp-view-year(v-if="currentView === 'year'")
tbody
tr(v-for="row in 4")
td(:data-val="getYearText(row, col)", v-if="getYearText(row, col)", v-for="col in 3")
span {{getYearText(row, col)}}
table.z-dp-view-month(v-if="currentView === 'month'")
tbody
tr(v-for="row in 4")
td(:data-val="(row - 1) * 3 + col - 1", :class="{ 'z-dp-active': currentViewValue == ((row - 1) * 3 + col - 1)}", v-for="col in 3")
span {{monthText[(row - 1) * 3 + col - 1]}}
table.z-dp-view-day(v-if="currentView ==='day'")
thead
tr
th Su
th Mo
th Tu
th We
th Th
th Fr
th Sa
tbody
//- 输出42个格子
tr(v-for="row in 6", :title="getDayWeekTitle(row, 0)")
td(v-for="col in 7", v-if="getDayText(row, col)", :class="getDayTdClass(row, col)", v-html="getDayText(row, col)")
.clearData(v-if="currentView ==='day'")
span(@click="clearDateData()") Clear
table.z-dp-view-hour.mt5.mb5(v-if="currentView ==='hour'")
tbody
tr(v-for="row in 5")
td(v-for="col in 5" v-if="getHourText(row,col)", :data-val="getHourText(row,col)")
span {{ getHourText(row,col) }}
table.z-dp-view-time.mt5.mb5(v-if="currentView ==='minute' || currentView === 'second'")
tbody
tr(v-for="row in 7")
td(v-for="col in 9") {{row === 7 && col > 6? '' : limitedTwo((row - 1) * 9 + col -1)}}
table.z-dp-view-season.mt15(v-if="currentView ==='season'")
tbody
tr(v-for="row in 2")
td(v-for="col in 2", :data-val="(row-1) * 2 + col") {{seasonText[(row - 1) * 2 + col -1]}}
table.z-dp-view-week(v-if="currentView ==='week'")
tbody
tr(v-for="row in 7")
td(v-for="col in 8", v-if="getWeekText(row, col)", :title="getWeekDaysTitle(row, col)", :class="{ 'z-dp-active': isCurrentWeek(row, col) }") {{getWeekText(row, col)}}