mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-21 18:57:08 +08:00
refactor: 更换 ESLint 配置为 @antfu/eslint-config
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
|
||||
<template v-if="item.type === 'date-picker'">
|
||||
<a-date-picker
|
||||
:placeholder="`请选择日期`"
|
||||
placeholder="请选择日期"
|
||||
v-bind="(item.props as A.DatePickerInstance['$props'])"
|
||||
:model-value="modelValue[item.field as keyof typeof modelValue]"
|
||||
@update:model-value="valueChange($event, item.field)"
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
<template v-if="item.type === 'time-picker'">
|
||||
<a-time-picker
|
||||
:placeholder="`请选择时间`"
|
||||
placeholder="请选择时间"
|
||||
v-bind="(item.props as A.TimePickerInstance['$props'])"
|
||||
:model-value="modelValue[item.field as keyof typeof modelValue]"
|
||||
@update:model-value="valueChange($event, item.field)"
|
||||
@@ -171,9 +171,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Options, Columns, ColumnsItemHide, ColumnsItemDisabled, ColumnsItem } from './type'
|
||||
import type * as A from '@arco-design/web-vue'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import type { Columns, ColumnsItem, ColumnsItemDisabled, ColumnsItemHide, Options } from './type'
|
||||
|
||||
interface Props {
|
||||
modelValue: any
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import type { Columns, ColumnsItem, ColumnsItemPropsKey } from './type'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import type { Columns, ColumnsItem, ColumnsItemPropsKey } from './type'
|
||||
|
||||
export function useGiForm(initValue: Columns) {
|
||||
const getInitValue = () => cloneDeep(initValue)
|
||||
|
@@ -36,11 +36,11 @@ export type ColumnsItemRequest<F = any> = (form: F) => Promise<any>
|
||||
export type ColumnsItemFormat<T = any> = (
|
||||
res: T
|
||||
) =>
|
||||
| A.SelectInstance['$props']['options']
|
||||
| A.RadioGroupInstance['$props']['options']
|
||||
| A.CheckboxGroupInstance['$props']['options']
|
||||
| A.CascaderInstance['$props']['options']
|
||||
| A.TreeSelectInstance['$props']['data']
|
||||
| A.SelectInstance['$props']['options']
|
||||
| A.RadioGroupInstance['$props']['options']
|
||||
| A.CheckboxGroupInstance['$props']['options']
|
||||
| A.CascaderInstance['$props']['options']
|
||||
| A.TreeSelectInstance['$props']['data']
|
||||
|
||||
export type ColumnsItemOptionsOrData =
|
||||
| A.SelectInstance['$props']['options']
|
||||
@@ -91,8 +91,8 @@ export interface Options {
|
||||
form: Omit<A.FormInstance['$props'], 'model'>
|
||||
row?: Partial<typeof import('@arco-design/web-vue')['Row']['__defaults']>
|
||||
col?: A.ColProps
|
||||
btns?: { hide?: boolean; span?: number; col?: A.ColProps; searchBtnText?: string }
|
||||
fold?: { enable?: boolean; index?: number; defaultCollapsed?: boolean }
|
||||
btns?: { hide?: boolean, span?: number, col?: A.ColProps, searchBtnText?: string }
|
||||
fold?: { enable?: boolean, index?: number, defaultCollapsed?: boolean }
|
||||
}
|
||||
|
||||
export type Columns<F = any> = ColumnsItem<F>[]
|
||||
|
Reference in New Issue
Block a user