Browse Source

修改日期问题

master
liaoxinyu 8 months ago
parent
commit
daa5aa9421
  1. 5
      pages/auth/primary.vue
  2. 4
      wxcomponents/vant/calendar/calendar.vue
  3. 4
      wxcomponents/vant/calendar/calendar.wxml
  4. 2
      wxcomponents/vant/calendar/index.json
  5. 4
      wxcomponents/vant/calendar/index.vue

5
pages/auth/primary.vue

@ -22,11 +22,12 @@
/> />
</view> </view>
</view> </view>
<view class="form-item border-b p-md m-b-md"> <view class="form-item border-b p-md m-b-md" v-if="0">
<view class="label m-b-xs">{{$t('auth.d0')}}</view> <view class="label m-b-xs">{{$t('auth.d0')}}</view>
<view class="input color-light"> <view class="input color-light">
<uni-datetime-picker type="date" :placeholder="$t('common.c8')" start="1873-1-01" :end="new Date()" <uni-datetime-picker type="date" :placeholder="$t('common.c8')" start="1873-1-01" :end="new Date().getTime()"
:clear-icon="false" v-model="form.birthday" /> :clear-icon="false" v-model="form.birthday" />
<!-- .toLocaleDateString() --> <!-- .toLocaleDateString() -->
</view> </view>
</view> </view>

4
wxcomponents/vant/calendar/calendar.vue

@ -1,9 +1,9 @@
<template> <template>
<uni-shadow-root class="vant-calendar-calendar"><template v-if="wxTemplateName === 'calendar'"> <uni-shadow-root class="vant-calendar-calendar"><template v-if="wxTemplateName === 'calendar'">
<view class="van-calendar"> <view class="van-calendar">
<header :title="title" :showTitle="showTitle" :subtitle="subtitle" :showSubtitle="showSubtitle"> <vanheader :title="title" :showTitle="showTitle" :subtitle="subtitle" :showSubtitle="showSubtitle">
<slot name="title" slot="title"></slot> <slot name="title" slot="title"></slot>
</header> </vanheader>
<scroll-view class="van-calendar__body" scroll-y :scroll-into-view="scrollIntoView"> <scroll-view class="van-calendar__body" scroll-y :scroll-into-view="scrollIntoView">
<month v-for="(item,index) in (computed.getMonths(minDate, maxDate))" :key="item.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" @click="_$self.$parent.$parent[('onClickDay')]($event)"></month> <month v-for="(item,index) in (computed.getMonths(minDate, maxDate))" :key="item.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" @click="_$self.$parent.$parent[('onClickDay')]($event)"></month>

4
wxcomponents/vant/calendar/calendar.wxml

@ -2,14 +2,14 @@
<template name="calendar"> <template name="calendar">
<view class="van-calendar"> <view class="van-calendar">
<header <vanheader
title="{{ title }}" title="{{ title }}"
showTitle="{{ showTitle }}" showTitle="{{ showTitle }}"
subtitle="{{ subtitle }}" subtitle="{{ subtitle }}"
showSubtitle="{{ showSubtitle }}" showSubtitle="{{ showSubtitle }}"
> >
<slot name="title" slot="title"></slot> <slot name="title" slot="title"></slot>
</header> </vanheader>
<scroll-view class="van-calendar__body" scroll-y scroll-into-view="{{ scrollIntoView }}"> <scroll-view class="van-calendar__body" scroll-y scroll-into-view="{{ scrollIntoView }}">
<month <month

2
wxcomponents/vant/calendar/index.json

@ -1,7 +1,7 @@
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"header": "./components/header/index", "vanheader": "./components/header/index",
"month": "./components/month/index", "month": "./components/month/index",
"van-button": "../button/index", "van-button": "../button/index",
"van-popup": "../popup/index", "van-popup": "../popup/index",

4
wxcomponents/vant/calendar/index.vue

@ -13,12 +13,12 @@
const __wxTemplateComponentProps = {"calendar":["wxTemplateName","title","subtitle","showTitle","showSubtitle","minDate","maxDate","type","color","showMark","formatter","rowHeight","currentDate","safeAreaInsetBottom","showConfirm","confirmDisabledText","confirmText","scrollIntoView","allowSameDay"]} const __wxTemplateComponentProps = {"calendar":["wxTemplateName","title","subtitle","showTitle","showSubtitle","minDate","maxDate","type","color","showMark","formatter","rowHeight","currentDate","safeAreaInsetBottom","showConfirm","confirmDisabledText","confirmText","scrollIntoView","allowSameDay"]}
import __wxTemplateComponent0 from './calendar.vue' import __wxTemplateComponent0 from './calendar.vue'
__wxTemplateComponentProps['calendar'] && __wxTemplateComponentProps['calendar'].forEach(prop => __wxTemplateComponent0.props[prop] = {type: null}) __wxTemplateComponentProps['calendar'] && __wxTemplateComponentProps['calendar'].forEach(prop => __wxTemplateComponent0.props[prop] = {type: null})
import Header from './components/header/index.vue' import Vanheader from './components/header/index.vue'
import Month from './components/month/index.vue' import Month from './components/month/index.vue'
import VanButton from '../button/index.vue' import VanButton from '../button/index.vue'
import VanPopup from '../popup/index.vue' import VanPopup from '../popup/index.vue'
import VanToast from '../toast/index.vue' import VanToast from '../toast/index.vue'
global['__wxVueOptions'] = {components:{'header': Header,'month': Month,'van-button': VanButton,'van-popup': VanPopup,'van-toast': VanToast,'calendar' : __wxTemplateComponent0}} global['__wxVueOptions'] = {components:{'vanheader': Vanheader,'month': Month,'van-button': VanButton,'van-popup': VanPopup,'van-toast': VanToast,'calendar' : __wxTemplateComponent0}}
global['__wxRoute'] = 'vant/calendar/index' global['__wxRoute'] = 'vant/calendar/index'
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';

Loading…
Cancel
Save