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.
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, useSlots, useAttrs, inject, ref, mergeProps, createBlock, openBlock, unref, withCtx, createVNode, createSlots, createElementVNode, normalizeStyle, normalizeClass, renderSlot, createElementBlock, createCommentVNode, Fragment, createTextVNode, toDisplayString } from 'vue';
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 = ["grid", "rowProps", "colProps", "width"];
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;
@@ -22,6 +22,7 @@ export declare const transitionProps: {
22
22
  };
23
23
  appear: {
24
24
  type: BooleanConstructor;
25
+ default: boolean;
25
26
  };
26
27
  enterFromClass: {
27
28
  type: StringConstructor;
@@ -17,7 +17,8 @@ const transitionProps = {
17
17
  type: String
18
18
  },
19
19
  appear: {
20
- type: Boolean
20
+ type: Boolean,
21
+ default: false
21
22
  },
22
23
  enterFromClass: {
23
24
  type: String
@@ -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;
@@ -25,6 +25,7 @@ export declare const transitionGroupProps: {
25
25
  };
26
26
  appear: {
27
27
  type: BooleanConstructor;
28
+ default: boolean;
28
29
  };
29
30
  css: {
30
31
  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
- default: () => [fileList.value.map(file => {
191
- return createVNode(stdin_default$2, {
192
- "key": file.key,
193
- "file": file,
194
- "readonly": props.readonly,
195
- "size": props.size,
196
- "onRemove": () => onRemove(file),
197
- "onRe-upload": () => onReUpload(file),
198
- "onCancel": () => onCancel(file)
199
- }, null);
200
- }), showSelect.value && createVNode("div", {
201
- "class": [`${prefixCls.value}-select`, `is-${props.size}`],
202
- "onClick": onSelect
203
- }, [createVNode(stdin_default$3, {
204
- "name": "co:add-large",
205
- "size": "24"
206
- }, null)])]
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",