fix: eslint
parent
e8c9af962f
commit
7d0bcf6a48
|
@ -18,7 +18,7 @@ const props = defineProps({
|
|||
autoFormat: { type: Boolean, default: true },
|
||||
})
|
||||
|
||||
const emit = defineEmits(['change', 'update:value', 'format-error'])
|
||||
const emit = defineEmits(['change', 'update:value', 'formatError'])
|
||||
|
||||
const getValue = computed(() => {
|
||||
const { value, mode, autoFormat } = props
|
||||
|
@ -31,7 +31,7 @@ const getValue = computed(() => {
|
|||
result = JSON.parse(value)
|
||||
}
|
||||
catch (e) {
|
||||
emit('format-error', value)
|
||||
emit('formatError', value)
|
||||
return value as string
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ function emitValue(value) {
|
|||
</Col>
|
||||
<Col :span="6">
|
||||
<div>近十次执行时间(不含年)</div>
|
||||
<Textarea type="textarea" :value="preTimeList" :rows="5" />
|
||||
<Textarea :value="preTimeList" :rows="5" />
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import CronTab from './CronTabInner.vue'
|
||||
import { useAttrs } from '@/hooks/core/useAttrs'
|
||||
import { BasicModal, useModalInner } from '@/components/Modal'
|
||||
|
||||
defineOptions({ name: 'CronTabModal', inheritAttrs: false })
|
||||
|
||||
const attrs = useAttrs()
|
||||
const [registerModal, { closeModal }] = useModalInner()
|
||||
|
||||
function onOk() {
|
||||
|
@ -15,6 +13,6 @@ function onOk() {
|
|||
|
||||
<template>
|
||||
<BasicModal title="Cron表达式" width="800px" @register="registerModal" @ok="onOk">
|
||||
<CronTab v-bind="attrs" />
|
||||
<CronTab v-bind="$attrs" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
|
|
@ -5,7 +5,7 @@ import { TypeEnum, useTabEmits, useTabProps, useTabSetup } from './useTabMixin'
|
|||
|
||||
export default defineComponent({
|
||||
name: 'DayUI',
|
||||
components: { Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '*',
|
||||
props: {
|
||||
|
@ -62,9 +62,9 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 日 至 </span>
|
||||
<Input v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 日 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -72,9 +72,9 @@ export default defineComponent({
|
|||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueLoop.start" type="number" class="w-4" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.start" type="number" class="w-4" v-bind="typeLoopAttrs" />
|
||||
<span> 日开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 日 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTabEmits, useTabProps, useTabSetup } from './useTabMixin'
|
|||
|
||||
export default defineComponent({
|
||||
name: 'HourUI',
|
||||
components: { Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '*',
|
||||
}),
|
||||
|
@ -35,9 +35,9 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 时 至 </span>
|
||||
<Input v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 时 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -45,9 +45,9 @@ export default defineComponent({
|
|||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 时开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 时 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTabEmits, useTabProps, useTabSetup } from './useTabMixin'
|
|||
|
||||
export default defineComponent({
|
||||
name: 'MinuteUI',
|
||||
components: { Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '*',
|
||||
}),
|
||||
|
@ -35,9 +35,9 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 分 至 </span>
|
||||
<Input v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 分 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -45,9 +45,9 @@ export default defineComponent({
|
|||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 分开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 分 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTabEmits, useTabProps, useTabSetup } from './useTabMixin'
|
|||
|
||||
export default defineComponent({
|
||||
name: 'MonthUI',
|
||||
components: { Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '*',
|
||||
}),
|
||||
|
@ -35,9 +35,9 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 月 至 </span>
|
||||
<Input v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 月 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -45,9 +45,9 @@ export default defineComponent({
|
|||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 月开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 月 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTabEmits, useTabProps, useTabSetup } from './useTabMixin'
|
|||
|
||||
export default defineComponent({
|
||||
name: 'SecondUI',
|
||||
components: { Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '*',
|
||||
}),
|
||||
|
@ -35,9 +35,9 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.start" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 秒 至 </span>
|
||||
<Input v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<AInput v-model:value="valueRange.end" type="number" v-bind="typeRangeAttrs" />
|
||||
<span> 秒 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -45,15 +45,15 @@ export default defineComponent({
|
|||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Input v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.start" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 秒开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 秒 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-radio :value="TypeEnum.specify" v-bind="beforeRadioAttrs">
|
||||
<Radio :value="TypeEnum.specify" v-bind="beforeRadioAttrs">
|
||||
指定
|
||||
</a-radio>
|
||||
</Radio>
|
||||
<div class="list">
|
||||
<CheckboxGroup v-model:value="valueList">
|
||||
<template v-for="i in specifyRange" :key="i">
|
||||
|
|
|
@ -25,7 +25,7 @@ const WEEK_MAP_CN = {
|
|||
|
||||
export default defineComponent({
|
||||
name: 'WeekUI',
|
||||
components: { Input, Select, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
components: { AInput: Input, ASelect: Select, Checkbox, CheckboxGroup: Checkbox.Group, Radio, RadioGroup: Radio.Group },
|
||||
props: useTabProps({
|
||||
defaultValue: '?',
|
||||
props: {
|
||||
|
@ -102,27 +102,27 @@ export default defineComponent({
|
|||
区间
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Select v-model:value="valueRange.start" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
|
||||
<ASelect v-model:value="valueRange.start" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
|
||||
<span> 至 </span>
|
||||
<Select v-model:value="valueRange.end" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
|
||||
<ASelect v-model:value="valueRange.end" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<Radio :value="TypeEnum.loop" v-bind="beforeRadioAttrs">
|
||||
循环
|
||||
</Radio>
|
||||
<span> 从 </span>
|
||||
<Select v-model:value="valueLoop.start" :options="weekOptions" v-bind="typeLoopSelectAttrs" />
|
||||
<ASelect v-model:value="valueLoop.start" :options="weekOptions" v-bind="typeLoopSelectAttrs" />
|
||||
<span> 开始,间隔 </span>
|
||||
<Input v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<AInput v-model:value="valueLoop.interval" type="number" v-bind="typeLoopAttrs" />
|
||||
<span> 天 </span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a-radio :value="TypeEnum.specify" v-bind="beforeRadioAttrs">
|
||||
<Radio :value="TypeEnum.specify" v-bind="beforeRadioAttrs">
|
||||
指定
|
||||
</a-radio>
|
||||
</Radio>
|
||||
<div class="list list-cn">
|
||||
<CheckboxGroup v-model:value="valueList">
|
||||
<template v-for="opt in weekOptions" :key="i">
|
||||
<template v-for="opt in weekOptions" :key="opt.value">
|
||||
<Checkbox :value="opt.value" v-bind="typeSpecifyAttrs">
|
||||
{{ opt.label }}
|
||||
</Checkbox>
|
||||
|
|
Loading…
Reference in New Issue