fix: type check error

pull/38/head
xingyu 2023-10-13 10:23:28 +08:00
parent b06d3c58b3
commit ced9f8ca2c
6 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import CronParser from 'cron-parser'
import type { ValidatorRule } from 'ant-design-vue/lib/form/interface'
const cronRule: ValidatorRule = {
// eslint-disable-next-line no-empty-pattern
validator({}, value) {
// 没填写就不校验
if (!value)

View File

@ -119,6 +119,7 @@ export default defineComponent({
return null
const getField = get(_data, field)
// eslint-disable-next-line no-prototype-builtins
if (getField && !toRefs(_data).hasOwnProperty(field))
return isFunction(render) ? render('', _data) : ''

View File

@ -28,6 +28,7 @@ const activeClass = computed(() => {
*/
function handleDelete() {
const traverse = (schemas: IVFormComponent[]) => {
// eslint-disable-next-line array-callback-return
schemas.some((formItem, index) => {
const { component, key } = formItem;
//

View File

@ -160,6 +160,7 @@ function handleCopy(item: IVFormComponent = formConfig.value.currentItem as IVFo
*/
const traverse = (schemas: IVFormComponent[]) => {
// 使some
// eslint-disable-next-line array-callback-return
schemas.some((formItem: IVFormComponent, index: number) => {
if (formItem.key === key) {
//

View File

@ -132,6 +132,7 @@ export function useVFormMethods<E extends EmitsOptions = EmitsOptions>(
* formData
* @return {Promise<IAnyObject<any>>}
*/
// eslint-disable-next-line @typescript-eslint/require-await
const getData: IGetData = async () => {
return cloneDeep(props.formModel)
}

View File

@ -195,6 +195,7 @@ export default defineComponent({
const onChange = unref(getComponentProps)?.onChangeTemp
if (onChange && isFunction(onChange))
// eslint-disable-next-line prefer-rest-params
onChange(...arguments)
table.emit?.('edit-change', {