forked from github/dataease
Merge pull request #7882 from dataease/pr@dev-v2_dzz
fix(查询组件): 时间范围年月不显示
This commit is contained in:
commit
4ed0c88530
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user