el-plus 0.0.30 → 0.0.33

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.full.js +283 -49
  3. package/dist/index.full.min.js +1 -1
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +1 -1
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +280 -47
  8. package/es/components/attachment/index.d.ts +174 -0
  9. package/es/components/attachment/index.mjs +8 -0
  10. package/es/components/attachment/index.mjs.map +1 -0
  11. package/es/components/attachment/src/attachment.d.ts +23 -0
  12. package/es/components/attachment/src/attachment.mjs +31 -0
  13. package/es/components/attachment/src/attachment.mjs.map +1 -0
  14. package/es/components/attachment/src/attachment.vue.d.ts +71 -0
  15. package/es/components/attachment/src/attachment.vue.mjs +6 -0
  16. package/es/components/attachment/src/attachment.vue.mjs.map +1 -0
  17. package/es/components/attachment/src/attachment.vue2.mjs +65 -0
  18. package/es/components/attachment/src/attachment.vue2.mjs.map +1 -0
  19. package/es/components/attachment/src/use-attachment.d.ts +212 -0
  20. package/es/components/attachment/src/use-attachment.mjs +80 -0
  21. package/es/components/attachment/src/use-attachment.mjs.map +1 -0
  22. package/es/components/attachment/style/css.d.ts +2 -0
  23. package/es/components/attachment/style/css.mjs +5 -0
  24. package/es/components/attachment/style/css.mjs.map +1 -0
  25. package/es/components/attachment/style/index.d.ts +2 -0
  26. package/es/components/attachment/style/index.mjs +5 -0
  27. package/es/components/attachment/style/index.mjs.map +1 -0
  28. package/es/components/form/src/hooks/use-form-item.mjs +9 -12
  29. package/es/components/form/src/hooks/use-form-item.mjs.map +1 -1
  30. package/es/components/index.d.ts +1 -0
  31. package/es/components/index.mjs +2 -0
  32. package/es/components/index.mjs.map +1 -1
  33. package/es/components/search-list-page/index.d.ts +213 -192
  34. package/es/components/search-list-page/src/search-list-page.d.ts +1 -1
  35. package/es/components/search-list-page/src/search-list-page.vue.d.ts +54 -49
  36. package/es/components/search-list-page/src/use-search-list-page.d.ts +52 -47
  37. package/es/components/table/index.d.ts +51 -46
  38. package/es/components/table/src/table.d.ts +1 -1
  39. package/es/components/table/src/table.mjs.map +1 -1
  40. package/es/components/table/src/table.vue.d.ts +12 -11
  41. package/es/components/table/src/table.vue2.mjs +1 -2
  42. package/es/components/table/src/table.vue2.mjs.map +1 -1
  43. package/es/components/table/src/use-table.d.ts +1 -71
  44. package/es/components/table/src/use-table.mjs +7 -9
  45. package/es/components/table/src/use-table.mjs.map +1 -1
  46. package/es/components.mjs +3 -1
  47. package/es/components.mjs.map +1 -1
  48. package/es/index.mjs +2 -0
  49. package/es/index.mjs.map +1 -1
  50. package/es/package.json.mjs +1 -1
  51. package/es/utils/env.d.ts +2 -1
  52. package/es/utils/env.mjs +9 -1
  53. package/es/utils/env.mjs.map +1 -1
  54. package/es/utils/file.d.ts +2 -0
  55. package/es/utils/file.mjs +13 -3
  56. package/es/utils/file.mjs.map +1 -1
  57. package/es/utils/index.mjs +1 -1
  58. package/lib/components/attachment/index.d.ts +174 -0
  59. package/lib/components/attachment/index.js +14 -0
  60. package/lib/components/attachment/index.js.map +1 -0
  61. package/lib/components/attachment/src/attachment.d.ts +23 -0
  62. package/lib/components/attachment/src/attachment.js +33 -0
  63. package/lib/components/attachment/src/attachment.js.map +1 -0
  64. package/lib/components/attachment/src/attachment.vue.d.ts +71 -0
  65. package/lib/components/attachment/src/attachment.vue.js +10 -0
  66. package/lib/components/attachment/src/attachment.vue.js.map +1 -0
  67. package/lib/components/attachment/src/attachment.vue2.js +69 -0
  68. package/lib/components/attachment/src/attachment.vue2.js.map +1 -0
  69. package/lib/components/attachment/src/use-attachment.d.ts +212 -0
  70. package/lib/components/attachment/src/use-attachment.js +82 -0
  71. package/lib/components/attachment/src/use-attachment.js.map +1 -0
  72. package/lib/components/attachment/style/css.d.ts +2 -0
  73. package/lib/components/attachment/style/css.js +7 -0
  74. package/lib/components/attachment/style/css.js.map +1 -0
  75. package/lib/components/attachment/style/index.d.ts +2 -0
  76. package/lib/components/attachment/style/index.js +7 -0
  77. package/lib/components/attachment/style/index.js.map +1 -0
  78. package/lib/components/form/src/hooks/use-form-item.js +9 -12
  79. package/lib/components/form/src/hooks/use-form-item.js.map +1 -1
  80. package/lib/components/index.d.ts +1 -0
  81. package/lib/components/index.js +4 -0
  82. package/lib/components/index.js.map +1 -1
  83. package/lib/components/search-list-page/index.d.ts +213 -192
  84. package/lib/components/search-list-page/src/search-list-page.d.ts +1 -1
  85. package/lib/components/search-list-page/src/search-list-page.vue.d.ts +54 -49
  86. package/lib/components/search-list-page/src/use-search-list-page.d.ts +52 -47
  87. package/lib/components/table/index.d.ts +51 -46
  88. package/lib/components/table/src/table.d.ts +1 -1
  89. package/lib/components/table/src/table.js.map +1 -1
  90. package/lib/components/table/src/table.vue.d.ts +12 -11
  91. package/lib/components/table/src/table.vue2.js +1 -2
  92. package/lib/components/table/src/table.vue2.js.map +1 -1
  93. package/lib/components/table/src/use-table.d.ts +1 -71
  94. package/lib/components/table/src/use-table.js +7 -9
  95. package/lib/components/table/src/use-table.js.map +1 -1
  96. package/lib/components.js +3 -1
  97. package/lib/components.js.map +1 -1
  98. package/lib/index.js +10 -6
  99. package/lib/index.js.map +1 -1
  100. package/lib/package.json.js +1 -1
  101. package/lib/utils/env.d.ts +2 -1
  102. package/lib/utils/env.js +9 -0
  103. package/lib/utils/env.js.map +1 -1
  104. package/lib/utils/file.d.ts +2 -0
  105. package/lib/utils/file.js +13 -1
  106. package/lib/utils/file.js.map +1 -1
  107. package/lib/utils/index.js +1 -0
  108. package/lib/utils/index.js.map +1 -1
  109. package/package.json +1 -1
@@ -0,0 +1,174 @@
1
+ export declare const EpAttachment: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ formatColumns: {
4
+ readonly type: import("vue").PropType<Partial<import("element-plus").TableColumnCtx & {
5
+ [key: string]: any;
6
+ required: boolean | (() => boolean);
7
+ cellRequired: (scope: import("el-plus/es/index").TableScope) => boolean;
8
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
9
+ disabled: boolean | ((scope: import("el-plus/es/index").TableScope) => boolean);
10
+ type: string;
11
+ props: Record<string, any>;
12
+ filter: boolean;
13
+ editable: boolean | ((formData: Record<string, any>) => void);
14
+ } & {} & {
15
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
16
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
17
+ }>[]>;
18
+ readonly default: () => never[];
19
+ };
20
+ mode: {
21
+ readonly type: import("vue").PropType<import("el-plus/es/hooks/use-navigation").PageMode>;
22
+ };
23
+ openType: {
24
+ readonly type: import("vue").PropType<"dialog" | "normal">;
25
+ readonly default: "dialog";
26
+ };
27
+ isType: {
28
+ readonly type: BooleanConstructor;
29
+ readonly default: true;
30
+ };
31
+ isNote: {
32
+ readonly type: BooleanConstructor;
33
+ readonly default: false;
34
+ };
35
+ modelValue: {
36
+ type: import("vue").PropType<any[]>;
37
+ };
38
+ }>> & Readonly<{
39
+ "onUpdate:modelValue"?: ((value: any[] | undefined) => any) | undefined;
40
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
+ "update:modelValue": (value: any[] | undefined) => any;
42
+ }, import("vue").PublicProps, {
43
+ formatColumns: Partial<import("element-plus").TableColumnCtx & {
44
+ [key: string]: any;
45
+ required: boolean | (() => boolean);
46
+ cellRequired: (scope: import("el-plus/es/index").TableScope) => boolean;
47
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
48
+ disabled: boolean | ((scope: import("el-plus/es/index").TableScope) => boolean);
49
+ type: string;
50
+ props: Record<string, any>;
51
+ filter: boolean;
52
+ editable: boolean | ((formData: Record<string, any>) => void);
53
+ } & {} & {
54
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
55
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
56
+ }>[];
57
+ openType: "dialog" | "normal";
58
+ isType: boolean;
59
+ isNote: boolean;
60
+ }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
61
+ P: {};
62
+ B: {};
63
+ D: {};
64
+ C: {};
65
+ M: {};
66
+ Defaults: {};
67
+ }, Readonly<import("vue").ExtractPropTypes<{
68
+ formatColumns: {
69
+ readonly type: import("vue").PropType<Partial<import("element-plus").TableColumnCtx & {
70
+ [key: string]: any;
71
+ required: boolean | (() => boolean);
72
+ cellRequired: (scope: import("el-plus/es/index").TableScope) => boolean;
73
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
74
+ disabled: boolean | ((scope: import("el-plus/es/index").TableScope) => boolean);
75
+ type: string;
76
+ props: Record<string, any>;
77
+ filter: boolean;
78
+ editable: boolean | ((formData: Record<string, any>) => void);
79
+ } & {} & {
80
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
81
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
82
+ }>[]>;
83
+ readonly default: () => never[];
84
+ };
85
+ mode: {
86
+ readonly type: import("vue").PropType<import("el-plus/es/hooks/use-navigation").PageMode>;
87
+ };
88
+ openType: {
89
+ readonly type: import("vue").PropType<"dialog" | "normal">;
90
+ readonly default: "dialog";
91
+ };
92
+ isType: {
93
+ readonly type: BooleanConstructor;
94
+ readonly default: true;
95
+ };
96
+ isNote: {
97
+ readonly type: BooleanConstructor;
98
+ readonly default: false;
99
+ };
100
+ modelValue: {
101
+ type: import("vue").PropType<any[]>;
102
+ };
103
+ }>> & Readonly<{
104
+ "onUpdate:modelValue"?: ((value: any[] | undefined) => any) | undefined;
105
+ }>, {}, {}, {}, {}, {
106
+ formatColumns: Partial<import("element-plus").TableColumnCtx & {
107
+ [key: string]: any;
108
+ required: boolean | (() => boolean);
109
+ cellRequired: (scope: import("el-plus/es/index").TableScope) => boolean;
110
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
111
+ disabled: boolean | ((scope: import("el-plus/es/index").TableScope) => boolean);
112
+ type: string;
113
+ props: Record<string, any>;
114
+ filter: boolean;
115
+ editable: boolean | ((formData: Record<string, any>) => void);
116
+ } & {} & {
117
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
118
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
119
+ }>[];
120
+ openType: "dialog" | "normal";
121
+ isType: boolean;
122
+ isNote: boolean;
123
+ }>;
124
+ __isFragment?: never;
125
+ __isTeleport?: never;
126
+ __isSuspense?: never;
127
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
128
+ formatColumns: {
129
+ readonly type: import("vue").PropType<import("el-plus/es/index").TableColumn[]>;
130
+ readonly default: () => never[];
131
+ };
132
+ mode: {
133
+ readonly type: import("vue").PropType<import("el-plus/es/hooks/use-navigation").PageMode>;
134
+ };
135
+ openType: {
136
+ readonly type: import("vue").PropType<"dialog" | "normal">;
137
+ readonly default: "dialog";
138
+ };
139
+ isType: {
140
+ readonly type: BooleanConstructor;
141
+ readonly default: true;
142
+ };
143
+ isNote: {
144
+ readonly type: BooleanConstructor;
145
+ readonly default: false;
146
+ };
147
+ modelValue: {
148
+ type: import("vue").PropType<any[]>;
149
+ };
150
+ }>> & Readonly<{
151
+ "onUpdate:modelValue"?: ((value: any[] | undefined) => any) | undefined;
152
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
153
+ "update:modelValue": (value: any[] | undefined) => any;
154
+ }, string, {
155
+ formatColumns: Partial<import("element-plus").TableColumnCtx & {
156
+ [key: string]: any;
157
+ required: boolean | (() => boolean);
158
+ cellRequired: (scope: import("el-plus/es/index").TableScope) => boolean;
159
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
160
+ disabled: boolean | ((scope: import("el-plus/es/index").TableScope) => boolean);
161
+ type: string;
162
+ props: Record<string, any>;
163
+ filter: boolean;
164
+ editable: boolean | ((formData: Record<string, any>) => void);
165
+ } & {} & {
166
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
167
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
168
+ }>[];
169
+ openType: "dialog" | "normal";
170
+ isType: boolean;
171
+ isNote: boolean;
172
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
173
+ export default EpAttachment;
174
+ export * from './src/attachment';
@@ -0,0 +1,8 @@
1
+ import _sfc_main from './src/attachment.vue2.mjs';
2
+ import { withInstall } from '../../utils/with-install.mjs';
3
+ export { attachmentProps } from './src/attachment.mjs';
4
+
5
+ const EpAttachment = withInstall(_sfc_main);
6
+
7
+ export { EpAttachment, EpAttachment as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/attachment/index.ts"],"sourcesContent":["import Attachment from './src/attachment.vue'\nimport { withInstall } from '@el-plus/utils/with-install'\n\nexport const EpAttachment = withInstall(Attachment)\nexport default EpAttachment\nexport * from './src/attachment'\n"],"names":["Attachment"],"mappings":";;;;AAGO,MAAM,YAAA,GAAe,YAAYA,SAAU;;;;"}
@@ -0,0 +1,23 @@
1
+ import type { ExtractPropTypes, PropType } from 'vue';
2
+ export declare const attachmentProps: {
3
+ readonly formatColumns: {
4
+ readonly type: PropType<import("el-plus/es/components/table").TableColumn[]>;
5
+ readonly default: () => never[];
6
+ };
7
+ readonly mode: {
8
+ readonly type: PropType<import("el-plus/es/hooks").PageMode>;
9
+ };
10
+ readonly openType: {
11
+ readonly type: PropType<"dialog" | "normal">;
12
+ readonly default: "dialog";
13
+ };
14
+ readonly isType: {
15
+ readonly type: BooleanConstructor;
16
+ readonly default: true;
17
+ };
18
+ readonly isNote: {
19
+ readonly type: BooleanConstructor;
20
+ readonly default: false;
21
+ };
22
+ };
23
+ export type AttachmentProps = ExtractPropTypes<typeof attachmentProps>;
@@ -0,0 +1,31 @@
1
+ import { headerProps } from '../../header/src/header.mjs';
2
+ import { tableProps } from '../../table/src/table.mjs';
3
+
4
+ const attachmentProps = {
5
+ // 格式化列
6
+ formatColumns: {
7
+ ...tableProps.formatColumns
8
+ },
9
+ // 页面模式
10
+ mode: {
11
+ ...headerProps.mode
12
+ },
13
+ // 展示模式
14
+ openType: {
15
+ type: String,
16
+ default: "dialog"
17
+ },
18
+ // 是否需要类型
19
+ isType: {
20
+ type: Boolean,
21
+ default: true
22
+ },
23
+ // 是否需要备注
24
+ isNote: {
25
+ type: Boolean,
26
+ default: false
27
+ }
28
+ };
29
+
30
+ export { attachmentProps };
31
+ //# sourceMappingURL=attachment.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.mjs","sources":["../../../../../../packages/components/attachment/src/attachment.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\nimport { tableProps } from '@el-plus/components/table'\nimport { headerProps } from '@el-plus/components/header'\nexport const attachmentProps = {\n // 格式化列\n formatColumns: {\n ...tableProps.formatColumns,\n },\n // 页面模式\n mode: {\n ...headerProps.mode,\n },\n // 展示模式\n openType: {\n type: String as PropType<'dialog' | 'normal'>,\n default: 'dialog',\n },\n // 是否需要类型\n isType: {\n type: Boolean,\n default: true,\n },\n // 是否需要备注\n isNote: {\n type: Boolean,\n default: false,\n },\n} as const\nexport type AttachmentProps = ExtractPropTypes<typeof attachmentProps>\n"],"names":[],"mappings":";;;AAGO,MAAM,eAAA,GAAkB;AAAA;AAAA,EAE7B,aAAA,EAAe;AAAA,IACb,GAAG,UAAA,CAAW;AAAA,GAChB;AAAA;AAAA,EAEA,IAAA,EAAM;AAAA,IACJ,GAAG,WAAA,CAAY;AAAA,GACjB;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb;;;;"}
@@ -0,0 +1,71 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ formatColumns: {
3
+ readonly type: import("vue").PropType<import("el-plus/es/components/table").TableColumn[]>;
4
+ readonly default: () => never[];
5
+ };
6
+ mode: {
7
+ readonly type: import("vue").PropType<import("el-plus/es/hooks").PageMode>;
8
+ };
9
+ openType: {
10
+ readonly type: import("vue").PropType<"dialog" | "normal">;
11
+ readonly default: "dialog";
12
+ };
13
+ isType: {
14
+ readonly type: BooleanConstructor;
15
+ readonly default: true;
16
+ };
17
+ isNote: {
18
+ readonly type: BooleanConstructor;
19
+ readonly default: false;
20
+ };
21
+ modelValue: {
22
+ type: import("vue").PropType<any[]>;
23
+ };
24
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ "update:modelValue": (value: any[] | undefined) => any;
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ formatColumns: {
28
+ readonly type: import("vue").PropType<import("el-plus/es/components/table").TableColumn[]>;
29
+ readonly default: () => never[];
30
+ };
31
+ mode: {
32
+ readonly type: import("vue").PropType<import("el-plus/es/hooks").PageMode>;
33
+ };
34
+ openType: {
35
+ readonly type: import("vue").PropType<"dialog" | "normal">;
36
+ readonly default: "dialog";
37
+ };
38
+ isType: {
39
+ readonly type: BooleanConstructor;
40
+ readonly default: true;
41
+ };
42
+ isNote: {
43
+ readonly type: BooleanConstructor;
44
+ readonly default: false;
45
+ };
46
+ modelValue: {
47
+ type: import("vue").PropType<any[]>;
48
+ };
49
+ }>> & Readonly<{
50
+ "onUpdate:modelValue"?: ((value: any[] | undefined) => any) | undefined;
51
+ }>, {
52
+ formatColumns: Partial<import("element-plus").TableColumnCtx & {
53
+ [key: string]: any;
54
+ required: boolean | (() => boolean);
55
+ cellRequired: (scope: import("el-plus/es/components/table").TableScope) => boolean;
56
+ headerRender: import("element-plus").TableColumnCtx["renderHeader"];
57
+ disabled: boolean | ((scope: import("el-plus/es/components/table").TableScope) => boolean);
58
+ type: string;
59
+ props: Record<string, any>;
60
+ filter: boolean;
61
+ editable: boolean | ((formData: Record<string, any>) => void);
62
+ } & {} & {
63
+ show?: (boolean | ((T: unknown) => boolean)) | undefined;
64
+ hide?: (boolean | ((T: unknown) => boolean)) | undefined;
65
+ }>[];
66
+ openType: "dialog" | "normal";
67
+ isType: boolean;
68
+ isNote: boolean;
69
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
70
+ declare const _default: typeof __VLS_export;
71
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './attachment.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
6
+ //# sourceMappingURL=attachment.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,65 @@
1
+ import { defineComponent, mergeModels, useModel, resolveComponent, createBlock, openBlock, unref, withCtx, createCommentVNode, createVNode, createTextVNode, mergeProps } from 'vue';
2
+ import { createNameSpace } from '../../../utils/bem.mjs';
3
+ import { prepareStyles, prepareClassNames } from '../../../utils/props.mjs';
4
+ import { attachmentProps } from './attachment.mjs';
5
+ import { EpTable } from '../../table/index.mjs';
6
+ import { useAttachment } from './use-attachment.mjs';
7
+ import { useDialog } from '../../../hooks/dialog/use-dialog.mjs';
8
+
9
+ var _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...{
11
+ name: "EpAttachment",
12
+ inheritAttrs: false
13
+ },
14
+ __name: "attachment",
15
+ props: /* @__PURE__ */ mergeModels(attachmentProps, {
16
+ "modelValue": {},
17
+ "modelModifiers": {}
18
+ }),
19
+ emits: ["update:modelValue"],
20
+ setup(__props) {
21
+ const bem = createNameSpace("attachment");
22
+ const props = __props;
23
+ const modelValue = useModel(__props, "modelValue");
24
+ const AttachmentDialog = useDialog({
25
+ class: bem.em("dialog", props.openType === "normal" ? props.openType : ""),
26
+ width: 850,
27
+ center: true,
28
+ title: "\u9644\u4EF6\u7BA1\u7406",
29
+ onConfirm: async (resolve) => {
30
+ }
31
+ });
32
+ const { columns } = useAttachment(props, {
33
+ data: modelValue
34
+ });
35
+ return (_ctx, _cache) => {
36
+ const _component_el_button = resolveComponent("el-button");
37
+ return openBlock(), createBlock(unref(AttachmentDialog), null, {
38
+ default: withCtx(() => [
39
+ _ctx.openType === "dialog" ? (openBlock(), createBlock(_component_el_button, {
40
+ key: 0,
41
+ type: "primary",
42
+ size: "default"
43
+ }, {
44
+ default: withCtx(() => [
45
+ createTextVNode("\u6DFB\u52A0\u9644\u4EF6")
46
+ ]),
47
+ _: 1
48
+ })) : createCommentVNode("", true),
49
+ createVNode(unref(EpTable), mergeProps({
50
+ class: `${unref(bem).b()} ${unref(prepareClassNames)()}`,
51
+ style: {
52
+ ...unref(prepareStyles)()
53
+ },
54
+ columns: unref(columns),
55
+ data: modelValue.value
56
+ }, props), null, 16, ["class", "style", "columns", "data"])
57
+ ]),
58
+ _: 1
59
+ });
60
+ };
61
+ }
62
+ });
63
+
64
+ export { _sfc_main as default };
65
+ //# sourceMappingURL=attachment.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.vue2.mjs","sources":["../../../../../../packages/components/attachment/src/attachment.vue"],"sourcesContent":["<template>\n <AttachmentDialog>\n <el-button v-if=\"openType === 'dialog'\" type=\"primary\" size=\"default\"\n >添加附件</el-button\n >\n <ep-table\n :class=\"`${bem.b()} ${prepareClassNames()}`\"\n :style=\"{\n ...prepareStyles(),\n }\"\n :columns=\"columns\"\n :data=\"modelValue\"\n v-bind=\"props\"\n >\n </ep-table>\n </AttachmentDialog>\n</template>\n<script setup lang=\"ts\">\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { prepareClassNames, prepareStyles } from '@el-plus/utils/props'\nimport { attachmentProps } from './attachment'\nimport EpTable from '@el-plus/components/table'\nimport { useAttachment } from './use-attachment'\nimport type { TableProps } from '@el-plus/components/table'\nimport { useDialog } from '@el-plus/hooks/dialog/use-dialog'\ndefineOptions({\n name: 'EpAttachment',\n inheritAttrs: false,\n})\nconst bem = createNameSpace('attachment')\nconst props = defineProps(attachmentProps)\nconst modelValue = defineModel<TableProps['data']>()\nconst AttachmentDialog = useDialog({\n class: bem.em('dialog', props.openType === 'normal' ? props.openType : ''),\n width: 850,\n center: true,\n title: '附件管理',\n onConfirm: async (resolve) => {},\n})\nconst { columns } = useAttachment(props, {\n data: modelValue,\n})\n</script>\n"],"names":["_useModel","_createBlock","_unref","openType","_createVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,IAAA,MAAM,GAAA,GAAM,gBAAgB,YAAY,CAAA;AACxC,IAAA,MAAM,KAAA,GAAQ,OAAA;AACd,IAAA,MAAM,UAAA,GAAaA,QAAA,CAA+B,OAAA,EAAA,YAAC,CAAA;AACnD,IAAA,MAAM,mBAAmB,SAAA,CAAU;AAAA,MACjC,KAAA,EAAO,IAAI,EAAA,CAAG,QAAA,EAAU,MAAM,QAAA,KAAa,QAAA,GAAW,KAAA,CAAM,QAAA,GAAW,EAAE,CAAA;AAAA,MACzE,KAAA,EAAO,GAAA;AAAA,MACP,MAAA,EAAQ,IAAA;AAAA,MACR,KAAA,EAAO,0BAAA;AAAA,MACP,SAAA,EAAW,OAAO,OAAA,KAAY;AAAA,MAAC;AAAA,KAChC,CAAA;AACD,IAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,aAAA,CAAc,KAAA,EAAO;AAAA,MACvC,IAAA,EAAM;AAAA,KACP,CAAA;;;0BAxCCC,WAAA,CAcmBC,KAAA,CAAA,gBAAA,GAAA,IAAA,EAAA;AAAA,yBAbjB,MAEC;AAAA,UAFgBC,KAAAA,QAAAA,KAAQ,QAAA,iBAAzBF,YAEC,oBAAA,EAAA;AAAA;YAFuC,IAAA,EAAK,SAAA;AAAA,YAAU,IAAA,EAAK;AAAA;6BACzD,MAAI;AAAA,8BAAJ,0BAAI;AAAA;;;UAEPG,WAAA,CASWF,KAAA,WATXG,UAAA,CASW;AAAA,YARR,KAAA,EAAK,CAAA,EAAKH,KAAA,CAAA,GAAA,CAAA,CAAI,CAAA,MAAOA,KAAA,CAAA,iBAAA,CAAA,EAAiB,CAAA,CAAA;AAAA,YACtC,KAAA,EAAK;AAAA,iBAAeA,KAAA,CAAA,aAAA,CAAA;AAAa;YAGjC,OAAA,EAASA,MAAA,OAAA,CAAA;AAAA,YACT,MAAM,UAAA,CAAA;AAAA,aACC,KAAK,CAAA,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAAA;;;;;;;;;"}
@@ -0,0 +1,212 @@
1
+ export declare const useAttachment: (props: any, { data }: {
2
+ data: any;
3
+ }) => {
4
+ columns: import("vue").Ref<({
5
+ type: string;
6
+ label: string;
7
+ width: string;
8
+ props: {
9
+ type: string;
10
+ list: ({
11
+ name: string;
12
+ onClick: ({ row }: {
13
+ row: any;
14
+ }) => void;
15
+ disabled?: undefined;
16
+ } | {
17
+ name: string;
18
+ disabled: () => boolean;
19
+ onClick: ({ $index }: {
20
+ $index: any;
21
+ }) => void;
22
+ })[];
23
+ desc?: undefined;
24
+ };
25
+ prop?: undefined;
26
+ required?: undefined;
27
+ show?: undefined;
28
+ onClick?: undefined;
29
+ } | {
30
+ label: string;
31
+ prop: string;
32
+ type: string;
33
+ required: boolean;
34
+ show: () => any;
35
+ props: {
36
+ desc: ({ row }: {
37
+ row: any;
38
+ }) => any;
39
+ type?: undefined;
40
+ list?: undefined;
41
+ };
42
+ width?: undefined;
43
+ onClick?: undefined;
44
+ } | {
45
+ label: string;
46
+ prop: string;
47
+ type: string;
48
+ onClick: ({ row }: {
49
+ row: any;
50
+ }) => void;
51
+ width?: undefined;
52
+ props?: undefined;
53
+ required?: undefined;
54
+ show?: undefined;
55
+ } | {
56
+ label: string;
57
+ prop: string;
58
+ type?: undefined;
59
+ width?: undefined;
60
+ props?: undefined;
61
+ required?: undefined;
62
+ show?: undefined;
63
+ onClick?: undefined;
64
+ } | {
65
+ label: string;
66
+ prop: string;
67
+ type: string;
68
+ show: () => any;
69
+ width?: undefined;
70
+ props?: undefined;
71
+ required?: undefined;
72
+ onClick?: undefined;
73
+ })[], ({
74
+ type: string;
75
+ label: string;
76
+ width: string;
77
+ props: {
78
+ type: string;
79
+ list: ({
80
+ name: string;
81
+ onClick({ row }: {
82
+ row: any;
83
+ }): void;
84
+ disabled?: undefined;
85
+ } | {
86
+ name: string;
87
+ disabled: () => boolean;
88
+ onClick: ({ $index }: {
89
+ $index: any;
90
+ }) => void;
91
+ })[];
92
+ desc?: undefined;
93
+ };
94
+ prop?: undefined;
95
+ required?: undefined;
96
+ show?: undefined;
97
+ onClick?: undefined;
98
+ } | {
99
+ label: string;
100
+ prop: string;
101
+ type: string;
102
+ required: boolean;
103
+ show: () => any;
104
+ props: {
105
+ desc: ({ row }: {
106
+ row: any;
107
+ }) => any;
108
+ type?: undefined;
109
+ list?: undefined;
110
+ };
111
+ width?: undefined;
112
+ onClick?: undefined;
113
+ } | {
114
+ label: string;
115
+ prop: string;
116
+ type: string;
117
+ onClick({ row }: {
118
+ row: any;
119
+ }): void;
120
+ width?: undefined;
121
+ props?: undefined;
122
+ required?: undefined;
123
+ show?: undefined;
124
+ } | {
125
+ label: string;
126
+ prop: string;
127
+ type?: undefined;
128
+ width?: undefined;
129
+ props?: undefined;
130
+ required?: undefined;
131
+ show?: undefined;
132
+ onClick?: undefined;
133
+ } | {
134
+ label: string;
135
+ prop: string;
136
+ type: string;
137
+ show: () => any;
138
+ width?: undefined;
139
+ props?: undefined;
140
+ required?: undefined;
141
+ onClick?: undefined;
142
+ })[] | ({
143
+ type: string;
144
+ label: string;
145
+ width: string;
146
+ props: {
147
+ type: string;
148
+ list: ({
149
+ name: string;
150
+ onClick: ({ row }: {
151
+ row: any;
152
+ }) => void;
153
+ disabled?: undefined;
154
+ } | {
155
+ name: string;
156
+ disabled: () => boolean;
157
+ onClick: ({ $index }: {
158
+ $index: any;
159
+ }) => void;
160
+ })[];
161
+ desc?: undefined;
162
+ };
163
+ prop?: undefined;
164
+ required?: undefined;
165
+ show?: undefined;
166
+ onClick?: undefined;
167
+ } | {
168
+ label: string;
169
+ prop: string;
170
+ type: string;
171
+ required: boolean;
172
+ show: () => any;
173
+ props: {
174
+ desc: ({ row }: {
175
+ row: any;
176
+ }) => any;
177
+ type?: undefined;
178
+ list?: undefined;
179
+ };
180
+ width?: undefined;
181
+ onClick?: undefined;
182
+ } | {
183
+ label: string;
184
+ prop: string;
185
+ type: string;
186
+ onClick: ({ row }: {
187
+ row: any;
188
+ }) => void;
189
+ width?: undefined;
190
+ props?: undefined;
191
+ required?: undefined;
192
+ show?: undefined;
193
+ } | {
194
+ label: string;
195
+ prop: string;
196
+ type?: undefined;
197
+ width?: undefined;
198
+ props?: undefined;
199
+ required?: undefined;
200
+ show?: undefined;
201
+ onClick?: undefined;
202
+ } | {
203
+ label: string;
204
+ prop: string;
205
+ type: string;
206
+ show: () => any;
207
+ width?: undefined;
208
+ props?: undefined;
209
+ required?: undefined;
210
+ onClick?: undefined;
211
+ })[]>;
212
+ };