From 600e189aa02f2249119b4562e7c97f85ac1863c4 Mon Sep 17 00:00:00 2001 From: rex Date: Tue, 19 Jan 2021 11:08:56 +0800 Subject: [PATCH] perf(calendar): shorten template code (#3972) --- packages/calendar/calendar.wxml | 114 +++++++++++++++++--------------- packages/calendar/index.wxml | 12 +--- 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/packages/calendar/calendar.wxml b/packages/calendar/calendar.wxml index 09a60b3e..26938c1a 100644 --- a/packages/calendar/calendar.wxml +++ b/packages/calendar/calendar.wxml @@ -1,57 +1,65 @@ - + +
+ +
- + + + + {{ + computed.getButtonDisabled(type, currentDate) + ? confirmDisabledText + : confirmText + }} + + +
diff --git a/packages/calendar/index.wxml b/packages/calendar/index.wxml index d4849cc7..7df0b980 100644 --- a/packages/calendar/index.wxml +++ b/packages/calendar/index.wxml @@ -1,4 +1,5 @@ + @@ -16,16 +17,9 @@ bind:after-enter="onOpened" bind:after-leave="onClosed" > -