Merge pull request #7882 from dataease/pr@dev-v2_dzz

fix(查询组件): 时间范围年月不显示
This commit is contained in:
dataeaseShu 2024-01-29 17:39:14 +08:00 committed by GitHub
commit 4ed0c88530
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { toRefs, PropType, ref, onBeforeMount, watch, computed } from 'vue'
import { toRefs, nextTick, PropType, ref, onBeforeMount, watch, computed } from 'vue'
import { Calendar } from '@element-plus/icons-vue'
import { type DatePickType } from 'element-plus-secondary'
import { getCustomTime } from './time-format'
@ -98,10 +98,16 @@ watch(
watch(
() => config.value.id,
() => {
rendering.value = false
nextTick(() => {
init()
rendering.value = true
})
}
)
const rendering = ref(true)
const init = () => {
const {
timeNum,
@ -155,6 +161,7 @@ const formatDate = computed(() => {
<template>
<el-date-picker
disabled
v-if="rendering"
v-model="selectValue"
:type="config.timeGranularityMultiple"
:prefix-icon="Calendar"