Refactor Date Calculator UI to Morandi theme and fix logic; fix Index page interaction
This commit is contained in:
@@ -1,9 +1,44 @@
|
||||
<!--pages/calculator/calculator.wxml-->
|
||||
<view class="calculator-container">
|
||||
<!-- 历史记录面板 -->
|
||||
<view class="history-panel {{showHistory ? 'show' : ''}}" catchtouchmove="preventTouchMove">
|
||||
<view class="history-mask" bindtap="toggleHistory"></view>
|
||||
<view class="history-content">
|
||||
<view class="history-header">
|
||||
<text class="history-title">计算历史</text>
|
||||
<text class="history-clear" bindtap="clearHistory">清空</text>
|
||||
</view>
|
||||
<scroll-view scroll-y class="history-list" enhanced show-scrollbar="{{false}}">
|
||||
<block wx:if="{{historyList.length > 0}}">
|
||||
<view class="history-item" wx:for="{{historyList}}" wx:key="index"
|
||||
bindtap="useHistoryResult" data-result="{{item.result}}"
|
||||
hover-class="history-item-hover" hover-stay-time="100">
|
||||
<text class="history-expr">{{item.expression}}</text>
|
||||
<text class="history-result">= {{item.result}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view wx:else class="history-empty">
|
||||
<text class="history-empty-icon">📭</text>
|
||||
<text>暂无计算记录</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 显示区域 -->
|
||||
<view class="display-area">
|
||||
<view class="mode-indicator" bindtap="toggleMode">
|
||||
<text class="{{isScientific ? 'active' : ''}}">⚗️ 科学模式</text>
|
||||
<view class="display-top-bar">
|
||||
<view class="mode-indicator" bindtap="toggleMode">
|
||||
<text class="{{isScientific ? 'active' : ''}}">⚗️ 科学</text>
|
||||
</view>
|
||||
<view class="top-actions">
|
||||
<view class="action-btn" bindtap="toggleHistory" hover-class="action-btn-hover" hover-stay-time="100">
|
||||
<text class="action-icon">🕐</text>
|
||||
</view>
|
||||
<view class="action-btn" bindtap="copyResult" hover-class="action-btn-hover" hover-stay-time="100">
|
||||
<text class="action-icon">📋</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="history-text">{{history}}</view>
|
||||
<view class="current-value {{displayValue.length > 9 ? 'shrink' : ''}} {{displayValue.length > 15 ? 'shrink-more' : ''}}">{{displayValue}}</view>
|
||||
|
||||
Reference in New Issue
Block a user