Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<div id="timeranges_s_e_container" class="flex justify-between items-center">
|
||||
<Durationjs :max="minVuemax" :min="minVuemin" :size="'min'" :updateMax="updateMax"
|
||||
@total-seconds="minTotalSeconds" :value="durationMin">
|
||||
<Durationjs
|
||||
:max="minVuemax"
|
||||
:min="minVuemin"
|
||||
:size="'min'"
|
||||
:updateMax="updateMax"
|
||||
@total-seconds="minTotalSeconds"
|
||||
:value="durationMin"
|
||||
>
|
||||
</Durationjs>
|
||||
<span>~</span>
|
||||
<Durationjs :max="maxVuemax" :min="maxVuemin" :size="'max'" :updateMin="updateMin"
|
||||
@total-seconds="maxTotalSeconds" :value="durationMax">
|
||||
<span>~</span>
|
||||
<Durationjs
|
||||
:max="maxVuemax"
|
||||
:min="maxVuemin"
|
||||
:size="'max'"
|
||||
:updateMin="updateMin"
|
||||
@total-seconds="maxTotalSeconds"
|
||||
:value="durationMax"
|
||||
>
|
||||
</Durationjs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,11 +34,11 @@
|
||||
* for conformance time-based rules.
|
||||
*/
|
||||
|
||||
import { ref, watch } from 'vue';
|
||||
import Durationjs from '@/components/durationjs.vue';
|
||||
import { ref, watch } from "vue";
|
||||
import Durationjs from "@/components/durationjs.vue";
|
||||
|
||||
const props = defineProps(['time', 'select']);
|
||||
const emit = defineEmits(['min-total-seconds', 'max-total-seconds']);
|
||||
const props = defineProps(["time", "select"]);
|
||||
const emit = defineEmits(["min-total-seconds", "max-total-seconds"]);
|
||||
|
||||
const timeData = ref({ min: 0, max: 0 });
|
||||
const timeRangeMin = ref(0);
|
||||
@@ -56,7 +68,7 @@ function setTimeValue() {
|
||||
function minTotalSeconds(e) {
|
||||
timeRangeMin.value = e;
|
||||
updateMin.value = e;
|
||||
emit('min-total-seconds', e);
|
||||
emit("min-total-seconds", e);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,29 +78,33 @@ function minTotalSeconds(e) {
|
||||
function maxTotalSeconds(e) {
|
||||
timeRangeMax.value = e;
|
||||
updateMax.value = e;
|
||||
emit('max-total-seconds', e);
|
||||
emit("max-total-seconds", e);
|
||||
}
|
||||
|
||||
watch(() => props.time, (newValue, oldValue) => {
|
||||
durationMax.value = null;
|
||||
durationMin.value = null;
|
||||
if(newValue === null) {
|
||||
timeData.value = { min: 0, max: 0 };
|
||||
}else if(newValue !== null) {
|
||||
timeData.value = { min: newValue.min, max: newValue.max };
|
||||
emit('min-total-seconds', newValue.min);
|
||||
emit('max-total-seconds', newValue.max);
|
||||
}
|
||||
setTimeValue();
|
||||
}, { deep: true, immediate: true });
|
||||
watch(
|
||||
() => props.time,
|
||||
(newValue, oldValue) => {
|
||||
durationMax.value = null;
|
||||
durationMin.value = null;
|
||||
if (newValue === null) {
|
||||
timeData.value = { min: 0, max: 0 };
|
||||
} else if (newValue !== null) {
|
||||
timeData.value = { min: newValue.min, max: newValue.max };
|
||||
emit("min-total-seconds", newValue.min);
|
||||
emit("max-total-seconds", newValue.max);
|
||||
}
|
||||
setTimeValue();
|
||||
},
|
||||
{ deep: true, immediate: true },
|
||||
);
|
||||
|
||||
// created
|
||||
if(props.select){
|
||||
if(Object.keys(props.select.base).length !== 0) {
|
||||
if (props.select) {
|
||||
if (Object.keys(props.select.base).length !== 0) {
|
||||
timeData.value = props.select.base;
|
||||
setTimeValue();
|
||||
}
|
||||
if(Object.keys(props.select.rule).length !== 0) {
|
||||
if (Object.keys(props.select.rule).length !== 0) {
|
||||
durationMin.value = props.select.rule.min;
|
||||
durationMax.value = props.select.rule.max;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user