精简搜索函数, 添加页面
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<t-cell title="{{title || ''}}" hover arrow bindtap="showPicker">
|
||||
<view slot="note" style="display: flex;align-items: center;column-gap: 12rpx;">
|
||||
<view>{{value || ''}}</view>
|
||||
<t-icon wx:if="{{value}}" name="close-circle-filled" catch:tap="onClear"></t-icon>
|
||||
<view style="color: {{value? '#000': ''}}">{{value || ''}}</view>
|
||||
<t-icon wx:if="{{value}}" name="close-circle-filled" catch:tap="onClear" />
|
||||
<text wx:else>{{placeholder || title || '选择日期'}}</text>
|
||||
</view>
|
||||
</t-cell>
|
||||
|
||||
@@ -78,7 +78,7 @@ Component({
|
||||
this.triggerEvent('handleLogin', true);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
.catch(() => {
|
||||
this.triggerEvent('handleLogin', false);
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<t-cell title="{{title || ''}}" arrow hover bind:click="onOpenPicker">
|
||||
<view slot="note" style="display: flex;align-items: center;column-gap: 12rpx;">
|
||||
<view>{{note || ''}}</view>
|
||||
<t-icon wx:if="{{value}}" name="close-circle-filled" catch:tap="onClear"></t-icon>
|
||||
<view style="color: {{value? '#000': ''}}">{{note || ''}}</view>
|
||||
<t-icon wx:if="{{value}}" name="close-circle-filled" catch:tap="onClear" />
|
||||
<text wx:else>{{placeholder || title}}</text>
|
||||
</view>
|
||||
</t-cell>
|
||||
<t-picker visible="{{show}}" value="{{[value]}}" data-key="value" title="{{title || ''}}"
|
||||
cancelBtn="取消" confirmBtn="确认" bind:confirm="onConfirm" bindcancel="onPickerCancel">
|
||||
<t-picker-item options="{{options || []}}">
|
||||
<block wx:for="{{options || []}}" wx:key="value">
|
||||
{{item.label}}
|
||||
</block>
|
||||
<block wx:for="{{options || []}}" wx:key="value">{{item.label}}</block>
|
||||
</t-picker-item>
|
||||
</t-picker>
|
||||
Reference in New Issue
Block a user