cosey 0.5.3 → 0.5.5
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.
- package/components/form/form-item.vue.js +10 -6
- package/components/form/form.api.d.ts +1 -1
- package/components/form/form.api.js +15 -1
- package/components/transition/index.d.ts +3 -0
- package/components/transition/transition.api.d.ts +1 -0
- package/components/transition/transition.api.js +2 -1
- package/components/transition/transition.d.ts +2 -0
- package/components/transition-group/index.d.ts +3 -0
- package/components/transition-group/transition-group.api.d.ts +1 -0
- package/components/transition-group/transition-group.d.ts +2 -0
- package/components/upload/upload.js +24 -20
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, useSlots, useAttrs, inject, ref, mergeProps, createBlock, openBlock, unref, withCtx, createVNode, createSlots, createElementVNode, normalizeStyle, normalizeClass,
|
|
1
|
+
import { defineComponent, computed, useSlots, useAttrs, inject, ref, mergeProps, createBlock, openBlock, unref, withCtx, createVNode, createSlots, renderSlot, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { exlucdeFieldSlotNames, formItemExposeKeys } from './form-item.api.js';
|
|
3
3
|
import { formContextSymbol } from './form.api.js';
|
|
4
4
|
import { Field as _Field } from '../field/index.js';
|
|
@@ -86,11 +86,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
86
86
|
},
|
|
87
87
|
labelWidth: {
|
|
88
88
|
type: null,
|
|
89
|
-
required: false
|
|
89
|
+
required: false,
|
|
90
|
+
default: ""
|
|
90
91
|
},
|
|
91
92
|
labelPosition: {
|
|
92
93
|
type: String,
|
|
93
|
-
required: false
|
|
94
|
+
required: false,
|
|
95
|
+
default: ""
|
|
94
96
|
},
|
|
95
97
|
prop: {
|
|
96
98
|
type: null,
|
|
@@ -118,11 +120,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
118
120
|
},
|
|
119
121
|
inlineMessage: {
|
|
120
122
|
type: null,
|
|
121
|
-
required: false
|
|
123
|
+
required: false,
|
|
124
|
+
default: false
|
|
122
125
|
},
|
|
123
126
|
showMessage: {
|
|
124
127
|
type: Boolean,
|
|
125
|
-
required: false
|
|
128
|
+
required: false,
|
|
129
|
+
default: true
|
|
126
130
|
},
|
|
127
131
|
size: {
|
|
128
132
|
type: null,
|
|
@@ -239,7 +243,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
239
243
|
ref: formItemRef,
|
|
240
244
|
class: [unref(hashId), `${unref(prefixCls)}-item`]
|
|
241
245
|
}), createSlots({
|
|
242
|
-
error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
|
|
243
246
|
default: withCtx(() => [createElementVNode("div", {
|
|
244
247
|
class: normalizeClass(`${unref(prefixCls)}-item-content`),
|
|
245
248
|
style: normalizeStyle(unref(fixedWidthStyle))
|
|
@@ -261,6 +264,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
261
264
|
})], 2
|
|
262
265
|
/* CLASS */)) : createCommentVNode("v-if", true)], 6
|
|
263
266
|
/* CLASS, STYLE */)]),
|
|
267
|
+
error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
|
|
264
268
|
_: 2
|
|
265
269
|
/* DYNAMIC */
|
|
266
270
|
}, [_ctx.label || slots.label ? {
|
|
@@ -125,7 +125,7 @@ export declare const formProps: {
|
|
|
125
125
|
disabled: BooleanConstructor;
|
|
126
126
|
};
|
|
127
127
|
export type FormProps = ExtractPropTypes<typeof formProps>;
|
|
128
|
-
export declare const formPropsOmit: readonly ["grid", "rowProps", "colProps", "width"];
|
|
128
|
+
export declare const formPropsOmit: readonly ["grid", "rowProps", "colProps", "width", "readonly", "submit", "reset", "submitText", "resetText", "submitProps", "resetProps", "hideSubmit", "hideReset"];
|
|
129
129
|
export interface FormSlots {
|
|
130
130
|
default: {};
|
|
131
131
|
button: {
|
|
@@ -46,7 +46,21 @@ const formProps = {
|
|
|
46
46
|
type: Boolean
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
const formPropsOmit = [
|
|
49
|
+
const formPropsOmit = [
|
|
50
|
+
"grid",
|
|
51
|
+
"rowProps",
|
|
52
|
+
"colProps",
|
|
53
|
+
"width",
|
|
54
|
+
"readonly",
|
|
55
|
+
"submit",
|
|
56
|
+
"reset",
|
|
57
|
+
"submitText",
|
|
58
|
+
"resetText",
|
|
59
|
+
"submitProps",
|
|
60
|
+
"resetProps",
|
|
61
|
+
"hideSubmit",
|
|
62
|
+
"hideReset"
|
|
63
|
+
];
|
|
50
64
|
const formSlots = Object;
|
|
51
65
|
const formEmits = {
|
|
52
66
|
...formEmits$1
|
|
@@ -23,6 +23,7 @@ declare const _Transition: {
|
|
|
23
23
|
};
|
|
24
24
|
appear: {
|
|
25
25
|
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
26
27
|
};
|
|
27
28
|
enterFromClass: {
|
|
28
29
|
type: StringConstructor;
|
|
@@ -85,6 +86,7 @@ declare const _Transition: {
|
|
|
85
86
|
};
|
|
86
87
|
appear: {
|
|
87
88
|
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
88
90
|
};
|
|
89
91
|
enterFromClass: {
|
|
90
92
|
type: StringConstructor;
|
|
@@ -144,6 +146,7 @@ declare const _Transition: {
|
|
|
144
146
|
};
|
|
145
147
|
appear: {
|
|
146
148
|
type: BooleanConstructor;
|
|
149
|
+
default: boolean;
|
|
147
150
|
};
|
|
148
151
|
enterFromClass: {
|
|
149
152
|
type: StringConstructor;
|
|
@@ -21,6 +21,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
21
21
|
};
|
|
22
22
|
appear: {
|
|
23
23
|
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
24
25
|
};
|
|
25
26
|
enterFromClass: {
|
|
26
27
|
type: StringConstructor;
|
|
@@ -72,6 +73,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
72
73
|
};
|
|
73
74
|
appear: {
|
|
74
75
|
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
75
77
|
};
|
|
76
78
|
enterFromClass: {
|
|
77
79
|
type: StringConstructor;
|
|
@@ -26,6 +26,7 @@ declare const _TransitionGroup: {
|
|
|
26
26
|
};
|
|
27
27
|
appear: {
|
|
28
28
|
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
29
30
|
};
|
|
30
31
|
css: {
|
|
31
32
|
type: BooleanConstructor;
|
|
@@ -96,6 +97,7 @@ declare const _TransitionGroup: {
|
|
|
96
97
|
};
|
|
97
98
|
appear: {
|
|
98
99
|
type: BooleanConstructor;
|
|
100
|
+
default: boolean;
|
|
99
101
|
};
|
|
100
102
|
css: {
|
|
101
103
|
type: BooleanConstructor;
|
|
@@ -163,6 +165,7 @@ declare const _TransitionGroup: {
|
|
|
163
165
|
};
|
|
164
166
|
appear: {
|
|
165
167
|
type: BooleanConstructor;
|
|
168
|
+
default: boolean;
|
|
166
169
|
};
|
|
167
170
|
css: {
|
|
168
171
|
type: BooleanConstructor;
|
|
@@ -24,6 +24,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
};
|
|
25
25
|
appear: {
|
|
26
26
|
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
27
28
|
};
|
|
28
29
|
css: {
|
|
29
30
|
type: BooleanConstructor;
|
|
@@ -82,6 +83,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
83
|
};
|
|
83
84
|
appear: {
|
|
84
85
|
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
85
87
|
};
|
|
86
88
|
css: {
|
|
87
89
|
type: BooleanConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, toRaw, reactive, onBeforeUnmount, createVNode, nextTick } from 'vue';
|
|
1
|
+
import { defineComponent, computed, ref, watch, toRaw, reactive, onBeforeUnmount, createVNode, isVNode, nextTick } from 'vue';
|
|
2
2
|
import { uploadEmits, uploadSlots, uploadProps } from './upload.api.js';
|
|
3
3
|
import { useFormItem, CHANGE_EVENT, ElMessage } from 'element-plus';
|
|
4
4
|
import { debugWarn } from 'element-plus/es/utils/error.mjs';
|
|
@@ -15,6 +15,9 @@ import { getBasename } from '../../utils/path.js';
|
|
|
15
15
|
import { isString } from '../../utils/is.js';
|
|
16
16
|
import { isShallowEqual } from '../../utils/array.js';
|
|
17
17
|
|
|
18
|
+
function _isSlot(s) {
|
|
19
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
20
|
+
}
|
|
18
21
|
var stdin_default = defineComponent({
|
|
19
22
|
name: "CoUpload",
|
|
20
23
|
props: uploadProps,
|
|
@@ -182,29 +185,30 @@ var stdin_default = defineComponent({
|
|
|
182
185
|
syncProp();
|
|
183
186
|
};
|
|
184
187
|
return () => {
|
|
188
|
+
let _slot;
|
|
185
189
|
return createVNode("div", {
|
|
186
190
|
"class": [hashId.value, prefixCls.value]
|
|
187
191
|
}, [createVNode(_TransitionGroup, {
|
|
188
192
|
"effect": "fade"
|
|
189
|
-
}, {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
})]);
|
|
193
|
+
}, _isSlot(_slot = fileList.value.map(file => {
|
|
194
|
+
return createVNode(stdin_default$2, {
|
|
195
|
+
"key": file.key,
|
|
196
|
+
"file": file,
|
|
197
|
+
"readonly": props.readonly,
|
|
198
|
+
"size": props.size,
|
|
199
|
+
"onRemove": () => onRemove(file),
|
|
200
|
+
"onRe-upload": () => onReUpload(file),
|
|
201
|
+
"onCancel": () => onCancel(file)
|
|
202
|
+
}, null);
|
|
203
|
+
})) ? _slot : {
|
|
204
|
+
default: () => [_slot]
|
|
205
|
+
}), showSelect.value && createVNode("div", {
|
|
206
|
+
"class": [`${prefixCls.value}-select`, `is-${props.size}`],
|
|
207
|
+
"onClick": onSelect
|
|
208
|
+
}, [createVNode(stdin_default$3, {
|
|
209
|
+
"name": "co:add-large",
|
|
210
|
+
"size": "24"
|
|
211
|
+
}, null)])]);
|
|
208
212
|
};
|
|
209
213
|
}
|
|
210
214
|
});
|