添加订单详情页, 及组件修改
This commit is contained in:
@@ -7,13 +7,11 @@ Component({
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
value: {
|
||||
type: null,
|
||||
},
|
||||
value: null,
|
||||
},
|
||||
observers: {
|
||||
value: function () {
|
||||
this.setData({ label: this.data.listToObj[this.data.value]?.label });
|
||||
this.setData({ label: this.data.listToObj[this.data.value]?.label || '' });
|
||||
},
|
||||
},
|
||||
|
||||
@@ -49,7 +47,7 @@ Component({
|
||||
if (!accountDefaultObj) {
|
||||
accountDefaultObj = list[0] || {};
|
||||
}
|
||||
this.setData({ list: list, label: this.data.listToObj[this.data.value]?.label });
|
||||
this.setData({ list: list, label: this.data.listToObj[this.data.value]?.label || '' });
|
||||
this.triggerEvent('default', accountDefaultObj);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<t-cell arrow note="{{label}}" hover bind:click="onShowPicker">
|
||||
<view slot="title" class="custom-label">选择账户</view>
|
||||
<t-cell arrow hover bind:click="onShowPicker">
|
||||
<view slot="title">选择账户</view>
|
||||
<view slot="note" style="color: {{ label ? '#000': '#999'}} ">{{label||'选择账户'}}</view>
|
||||
</t-cell>
|
||||
<t-picker visible="{{visible}}" value="{{value}}" title="选择账户" cancelBtn="取消" confirmBtn="确认"
|
||||
<t-picker visible="{{visible}}" value="{{[value]}}" title="选择账户" cancelBtn="取消" confirmBtn="确认"
|
||||
bindconfirm="onPickerConfirm" bindcancel="onPickerCancel">
|
||||
<t-picker-item options="{{list}}">
|
||||
<block wx:for="{{list}}" wx:key="index" wx:for-item="option">
|
||||
<view wx:if="{{option.tag}}" slot="label-suffix--{{index}}" class="label-suffix">
|
||||
<t-tag size="small" theme="primary">{{option.tag}}</t-tag>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</t-picker-item>
|
||||
</t-picker>
|
||||
@@ -10,7 +10,7 @@
|
||||
variant="{{value != (item.value || '') + ' asc' ? 'outline': 'base'}}"
|
||||
style="margin-right: 24rpx;" bind:tap="select" data-index="{{index}}" data-order="asc">升序
|
||||
</t-button>
|
||||
<t-button size="small" theme="primary" variant="outline"
|
||||
<t-button size="small" theme="primary"
|
||||
variant="{{value != (item.value || '') + ' desc' ? 'outline': 'base'}}" bind:tap="select"
|
||||
data-index="{{index}}" data-order="desc">降序</t-button>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user