fix: bug#10921

This commit is contained in:
xieyonghong 2023-03-28 16:14:45 +08:00
parent 7474254a45
commit eb21e64cc1
5 changed files with 13 additions and 7 deletions

View File

@ -48,7 +48,7 @@ const label: Record<number, any> = {
const emit = defineEmits<Emit>() const emit = defineEmits<Emit>()
const myValue = ref<ValueType>(props.value) const myValue = ref<ValueType>(props.value || [undefined, undefined] as any)
const mySource = ref<string>(props.source) const mySource = ref<string>(props.source)
const onSelect = (v: any, _label: string, index: number) => { const onSelect = (v: any, _label: string, index: number) => {

View File

@ -100,7 +100,7 @@ type Emit = {
} }
const props = defineProps({ const props = defineProps({
...defaultSetting ...defaultSetting,
}) })
const emit = defineEmits<Emit>() const emit = defineEmits<Emit>()

View File

@ -14,7 +14,7 @@ export type TabsOption = {
key: string; key: string;
component: string component: string
} }
type ValueArrayType = [string, number] type ValueArrayType = [string, number, undefined]
export type ValueType = string | number | undefined | ValueArrayType export type ValueType = string | number | undefined | ValueArrayType
export const defaultSetting = { export const defaultSetting = {

View File

@ -133,7 +133,7 @@ const props = defineProps({
type: '', type: '',
termType: 'eq', termType: 'eq',
value: { value: {
source: 'fixed', source: 'manual',
value: undefined value: undefined
} }
}) })
@ -223,7 +223,13 @@ const showDouble = computed(() => {
metricOption.value = [] metricOption.value = []
} }
return isRange && !isMetric.value && !isSourceMetric if (isRange) {
if (isMetric.value) {
return !isSourceMetric
}
return true
}
return false
}) })
const mouseover = () => { const mouseover = () => {
@ -298,7 +304,7 @@ const termAdd = () => {
const terms = { const terms = {
column: undefined, column: undefined,
value: { value: {
source: 'fixed', source: 'manual',
value: undefined value: undefined
}, },
termType: undefined, termType: undefined,

View File

@ -97,7 +97,7 @@ const addWhen = () => {
{ {
column: undefined, column: undefined,
value: { value: {
source: 'fixed', source: 'manual',
value: undefined value: undefined
}, },
termType: undefined, termType: undefined,