easybill-ui 1.4.2 → 1.4.3

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,8 +1,48 @@
1
- import { SFCWithInstall } from '../../utils';
2
- import { DefineComponent } from 'vue';
3
- type PublicComponent = DefineComponent<Record<string, unknown>, Record<string, unknown>, any>;
4
- export declare const CurdForm: SFCWithInstall<PublicComponent>;
5
- export declare const CurdFormItem: SFCWithInstall<PublicComponent>;
1
+ import { AllowedComponentProps, ComponentCustomProps, Plugin, VNodeProps } from 'vue';
2
+ import { default as Instance } from './src/CurdForm.vue';
3
+ import { CurdFormProps, CurdFormSlots } from './src/types';
4
+ type CurdFormPublicProps = CurdFormProps & Record<string, unknown> & VNodeProps & AllowedComponentProps & ComponentCustomProps;
5
+ export type CurdFormComponent = typeof Instance & Plugin & {
6
+ new (): {
7
+ $props: CurdFormPublicProps;
8
+ $slots: CurdFormSlots;
9
+ };
10
+ };
11
+ export declare const CurdForm: CurdFormComponent;
12
+ export declare const CurdFormItem: import('../../utils').SFCWithInstall<import('vue').DefineComponent<{
13
+ formItem: {
14
+ required: true;
15
+ type: import('vue').PropType<import('.').FormItem>;
16
+ };
17
+ formModel: {
18
+ type: import('vue').PropType<import('.').Fields>;
19
+ default: () => {};
20
+ };
21
+ modelValue: {
22
+ type: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
23
+ default: string;
24
+ };
25
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ "update:modelValue": (...args: any[]) => void;
27
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
28
+ formItem: {
29
+ required: true;
30
+ type: import('vue').PropType<import('.').FormItem>;
31
+ };
32
+ formModel: {
33
+ type: import('vue').PropType<import('.').Fields>;
34
+ default: () => {};
35
+ };
36
+ modelValue: {
37
+ type: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
38
+ default: string;
39
+ };
40
+ }>> & {
41
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
42
+ }, {
43
+ modelValue: string | unknown[] | Record<string, any>;
44
+ formModel: import('.').Fields;
45
+ }, {}>> & Record<string, unknown>;
6
46
  export default CurdForm;
7
47
  export * from './src/directive';
8
48
  export * from './src/hooks';
@@ -1,7 +1,7 @@
1
1
  import o from "./CurdForm.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1eccc6fe"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e389a19"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -19,6 +19,12 @@ export interface FormSchema {
19
19
  hideRequiredAsterisk?: boolean;
20
20
  scrollToError?: boolean;
21
21
  }
22
+ export interface CurdFormProps {
23
+ formSchema: FormSchema;
24
+ fields?: Fields;
25
+ modelValue?: Fields;
26
+ extendContext?: Partial<FormContext>;
27
+ }
22
28
  export interface FormItem {
23
29
  prop: string;
24
30
  label?: string;
@@ -86,6 +92,14 @@ export interface FormContext {
86
92
  export interface Fields {
87
93
  [key: string]: unknown;
88
94
  }
95
+ export interface CurdFormSlotScope {
96
+ formItem: FormItem;
97
+ formModel: Fields;
98
+ }
99
+ export interface CurdFormSlots {
100
+ [name: string]: ((scope: CurdFormSlotScope) => unknown) | undefined;
101
+ "operate-button"?: () => unknown;
102
+ }
89
103
  export interface CurdFormOptionItem extends OptionItem {
90
104
  component?: string | ReturnType<typeof defineComponent>;
91
105
  disabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easybill-ui",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "A component library for easybill",
5
5
  "author": "tuchongyang <779311998@qq.com>",
6
6
  "private": false,