@oiij/naive-ui 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { DataTableColumns, DataTableInst, DataTableProps, DropdownOption, FlexProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
1
+ import { DataTableColumns, DataTableInst, DataTableProps, DropdownOption, FlexProps, FormItemProps, GridItemProps, GridProps, PaginationProps } from 'naive-ui';
2
2
  import { ComputedRef, CSSProperties, Ref, ShallowRef, VNode } from 'vue';
3
3
  import { useRequestResult } from 'vue-hooks-plus/es/useRequest/types';
4
4
  import { PresetInputOptions } from '../preset-input';
@@ -29,6 +29,10 @@ export type DataTablePlusExposeRefs<P extends Record<string, any>, D extends Rec
29
29
  };
30
30
  export type DataTablePlusFilterOptions<P extends Record<string, any>, D extends Record<string, any>, R extends Record<string, any>> = (PresetInputOptions & {
31
31
  key?: keyof P;
32
+ label?: string | boolean | (FormItemProps & {
33
+ style?: CSSProperties;
34
+ class?: string;
35
+ });
32
36
  collapsed?: boolean;
33
37
  gridItemProps?: GridItemProps;
34
38
  render?: (refs: DataTablePlusExposeRefs<P, D, R>, actions: DataTablePlusExposeActions<P, D>) => VNode;
@@ -0,0 +1,2 @@
1
+ import { NaiveFormRules, PresetFormOptions } from '.';
2
+ export declare function options2Rules<D extends Record<string, any>>(options?: PresetFormOptions<D>): NaiveFormRules<D> | undefined;
@@ -1,6 +1,6 @@
1
- import { FlexProps, FormProps, GridItemProps, GridProps } from 'naive-ui';
2
- import { VNode } from 'vue';
3
- import { NaiveFormReturns, NaiveFormRules } from '../../composables';
1
+ import { FlexProps, FormItemProps, FormItemRule, FormProps, FormRules, GridItemProps, GridProps } from 'naive-ui';
2
+ import { CSSProperties, VNode } from 'vue';
3
+ import { NaiveFormClearRules, NaiveFormReturns, NaiveFormRules } from '../../composables';
4
4
  import { PresetInputOptions } from '../preset-input';
5
5
  export type { NaiveFormRules } from '../../composables';
6
6
  export { default as NPresetForm } from './PresetForm.vue';
@@ -10,6 +10,11 @@ export type PresetFormExposeActions<V extends Record<string, any>> = Pick<NaiveF
10
10
  };
11
11
  export type PresetFormOptions<V extends Record<string, any>> = (PresetInputOptions & {
12
12
  key?: keyof V;
13
+ label?: string | boolean | (FormItemProps & {
14
+ style?: CSSProperties;
15
+ class?: string;
16
+ });
17
+ rules?: FormRules | FormItemRule | FormItemRule[];
13
18
  collapsed?: boolean;
14
19
  gridItemProps?: GridItemProps;
15
20
  render?: (refs: PresetFormExposeRefs<V>, actions: PresetFormExposeActions<V>) => VNode;
@@ -18,6 +23,7 @@ export interface PresetFormProps<V extends Record<string, any> = Record<string,
18
23
  options?: PresetFormOptions<V>;
19
24
  values?: V;
20
25
  rules?: NaiveFormRules<V>;
26
+ clearRules?: NaiveFormClearRules;
21
27
  formProps?: FormProps;
22
28
  gridProps?: GridProps;
23
29
  flexProps?: FlexProps;
@@ -3,6 +3,6 @@ import { CSSProperties, VNode } from 'vue';
3
3
  export declare function renderLabel(children: VNode, label?: string | boolean | (FormItemProps & {
4
4
  style?: CSSProperties;
5
5
  class?: string;
6
- }), path?: string): VNode<import('vue').RendererNode, import('vue').RendererElement, {
6
+ }), defaultProps?: FormItemProps): VNode<import('vue').RendererNode, import('vue').RendererElement, {
7
7
  [key: string]: any;
8
8
  }>;
@@ -1,4 +1,4 @@
1
- import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DynamicTagsProps, FormItemProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui';
1
+ import { ButtonProps, CheckboxGroupProps, CheckboxProps, ColorPickerProps, DatePickerProps, DynamicTagsProps, InputNumberProps, InputProps, RadioGroupProps, RadioProps, RateProps, SelectProps, SliderProps, SwitchProps, TimePickerProps } from 'naive-ui';
2
2
  import { CSSProperties } from 'vue';
3
3
  import { SearchInputProps } from '..';
4
4
  export { default as NPresetInput } from './PresetInput.vue';
@@ -25,10 +25,6 @@ export interface PresetInputType {
25
25
  export type PresetInputOptions = {
26
26
  [K in keyof PresetInputType]: {
27
27
  type?: K;
28
- label?: string | boolean | (FormItemProps & {
29
- style?: CSSProperties;
30
- class?: string;
31
- });
32
28
  props?: PresetInputType[K] & {
33
29
  style?: CSSProperties;
34
30
  class?: string;
@@ -37,6 +33,5 @@ export type PresetInputOptions = {
37
33
  }[keyof PresetInputType];
38
34
  export interface PresetInputProps<V> {
39
35
  value?: V;
40
- path?: string;
41
36
  options?: PresetInputOptions;
42
37
  }