cosey 0.5.3 → 0.5.4
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 { 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 ? {
|
|
@@ -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
|
});
|