BUG 25181
This commit is contained in:
@@ -116,8 +116,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handleDateSearch(v) {
|
||||
this.search.startTime = v?.[0]
|
||||
this.search.endTime = v?.[0] || v?.[1]
|
||||
console.log(v)
|
||||
this.search.startTime = v?.startDate
|
||||
this.search.endTime = v?.startDate|| v?.endDate
|
||||
this.current = 1
|
||||
this.getList()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<section class="AiDate">
|
||||
<u-calendar v-model="show" :maxDate="maxDate"
|
||||
@confirm="handleSelect" :mode="mode" @close="show=false"/>
|
||||
@change="handleSelect" :mode="mode" @close="show=false"/>
|
||||
<div flex @click="show=true">
|
||||
<div v-if="label" v-html="label"/>
|
||||
<div v-else v-html="placeholder"/>
|
||||
@@ -31,18 +31,18 @@ export default {
|
||||
props: {
|
||||
value: {default: ""},
|
||||
placeholder: {default: "请选择"},
|
||||
mode: {default: "single"},//date 单个日期|range 日期范围
|
||||
mode: {default: "date"},//date 单个日期|range 日期范围
|
||||
maxDate: String
|
||||
},
|
||||
methods: {
|
||||
handleSelect(v) {
|
||||
this.show = false
|
||||
if (this.mode == 'date') {
|
||||
this.selected = v?.[0]
|
||||
this.selected = v.result
|
||||
this.$emit('change', v.result)
|
||||
} else if (this.mode == 'range') {
|
||||
this.selected = [v?.[0], v?.slice(-1)?.[0]]
|
||||
this.selected = [v.startDate, v.endDate]
|
||||
this.$emit('change', v)
|
||||
}
|
||||
this.$emit('change', this.selected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user