fix: eslint

pull/31/head
xingyu 2023-08-12 16:45:52 +08:00
parent e8c9af962f
commit 7d0bcf6a48
9 changed files with 39 additions and 41 deletions

View File

@ -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
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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>