From 53cc6f817625897935fb10c3845ad7be400f3036 Mon Sep 17 00:00:00 2001
From: Sanakey <714737083@qq.com>
Date: 星期日, 31 一月 2021 20:04:55 +0800
Subject: [PATCH] 团购相关功能

---
 src/vant-weapp/calendar/calendar.wxml |  114 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 61 insertions(+), 53 deletions(-)

diff --git a/src/vant-weapp/calendar/calendar.wxml b/src/vant-weapp/calendar/calendar.wxml
index 09a60b3..26938c1 100644
--- a/src/vant-weapp/calendar/calendar.wxml
+++ b/src/vant-weapp/calendar/calendar.wxml
@@ -1,57 +1,65 @@
-<wxs src="./index.wxs" module="computed"></wxs>
+<view class="van-calendar">
+  <header
+    title="{{ title }}"
+    showTitle="{{ showTitle }}"
+    subtitle="{{ subtitle }}"
+    showSubtitle="{{ showSubtitle }}"
+  >
+    <slot name="title" slot="title"></slot>
+  </header>
 
-<template name="calendar">
-  <view class="van-calendar">
-    <header
-      title="{{ title }}"
-      showTitle="{{ showTitle }}"
-      subtitle="{{ subtitle }}"
+  <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 }}"
-    >
-      <slot name="title" slot="title"></slot>
-    </header>
+      allowSameDay="{{ allowSameDay }}"
+      showMonthTitle="{{ index !== 0 || !showSubtitle }}"
+      bind:click="onClickDay"
+    />
+  </scroll-view>
 
-    <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 }}"
-        bind:click="onClickDay"
-      />
-    </scroll-view>
-
-    <view class="van-calendar__footer {{ safeAreaInsetBottom ? 'van-calendar__footer--safe-area-inset-bottom' : '' }}">
-      <slot name="footer"></slot>
-    </view>
-
-    <view class="van-calendar__footer {{ safeAreaInsetBottom ? 'van-calendar__footer--safe-area-inset-bottom' : '' }}">
-      <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
+    class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
+  >
+    <slot name="footer"></slot>
   </view>
-</template>
+
+  <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>

--
Gitblit v1.8.0