index.tsx:
import styled from '@/styled-components'
import {
defineComponent, ref, reactive } from 'vue'
import {
ElDatePicker } from from 'element-plus/lib/components'
const BgContainer = styled.div`
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background-color: rgb(246, 246, 246);
`
export default defineComponent({
setup() {
const selectedDateVal = ref<number>(0)
const timeArr = ref<number[]>([])
const searchForm = reactive({
timeType: 'yesterday',
beginTime: 0,
endTime: 0
})
function confirmDateTime(val:any,type:string){
if(val