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>
|
<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 { Calendar } from '@element-plus/icons-vue'
|
||||||
import { type DatePickType } from 'element-plus-secondary'
|
import { type DatePickType } from 'element-plus-secondary'
|
||||||
import { getCustomTime } from './time-format'
|
import { getCustomTime } from './time-format'
|
||||||
@ -98,10 +98,16 @@ watch(
|
|||||||
watch(
|
watch(
|
||||||
() => config.value.id,
|
() => config.value.id,
|
||||||
() => {
|
() => {
|
||||||
init()
|
rendering.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
init()
|
||||||
|
rendering.value = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const rendering = ref(true)
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
const {
|
const {
|
||||||
timeNum,
|
timeNum,
|
||||||
@ -155,6 +161,7 @@ const formatDate = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
disabled
|
disabled
|
||||||
|
v-if="rendering"
|
||||||
v-model="selectValue"
|
v-model="selectValue"
|
||||||
:type="config.timeGranularityMultiple"
|
:type="config.timeGranularityMultiple"
|
||||||
:prefix-icon="Calendar"
|
:prefix-icon="Calendar"
|
||||||
|
Loading…
Reference in New Issue
Block a user