uu
This commit is contained in:
parent
75554064dc
commit
50f29385f2
@ -5,7 +5,12 @@
|
|||||||
readonly="true"
|
readonly="true"
|
||||||
>
|
>
|
||||||
<template v-slot:suffix>
|
<template v-slot:suffix>
|
||||||
<u-icon name="calendar" :size="fontSize*1.5"></u-icon>
|
<u-row>
|
||||||
|
<view v-if="inputValue" @click.stop="handleClearVal" style="position: relative;z-index: 1000;">
|
||||||
|
<u-icon name="close-circle" :size="fontSize*1.5"></u-icon>
|
||||||
|
</view>
|
||||||
|
<u-icon v-else name="calendar" :size="fontSize*1.5"></u-icon>
|
||||||
|
</u-row>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
<view class="pos-abt-all" style="z-index: 20;">
|
<view class="pos-abt-all" style="z-index: 20;">
|
||||||
@ -142,7 +147,7 @@
|
|||||||
this.handleClaShow()
|
this.handleClaShow()
|
||||||
},
|
},
|
||||||
handleChange(val){
|
handleChange(val){
|
||||||
if(Array.isArray(val)) {
|
if(Array.isArray(val) && val.length > 0) {
|
||||||
// 补全 时间戳
|
// 补全 时间戳
|
||||||
if(val[0].indexOf(":") == -1) {
|
if(val[0].indexOf(":") == -1) {
|
||||||
val[0] = dayjs(val[0]).format(`${formatStr} 00:00:00`)
|
val[0] = dayjs(val[0]).format(`${formatStr} 00:00:00`)
|
||||||
@ -174,8 +179,12 @@
|
|||||||
this.handleClaShow()
|
this.handleClaShow()
|
||||||
} else {
|
} else {
|
||||||
let sltRang = this.toolsRangesList.filter(t=> t.val == val)[0].range
|
let sltRang = this.toolsRangesList.filter(t=> t.val == val)[0].range
|
||||||
this.handleChange(sltRang, )
|
this.handleChange(sltRang)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleClearVal(){
|
||||||
|
let emptVal = Array.isArray(this.proxyValue) ? [] : ''
|
||||||
|
this.handleChange(emptVal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user