@vunk/form 0.0.1-alpha.28 → 0.0.1-alpha.29

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.
@@ -32,7 +32,11 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
32
32
  type: {
33
33
  type: String,
34
34
  default: "default"
35
- }
35
+ },
36
+ modelValue: {
37
+ type: [String, Number]
38
+ },
39
+ defaultModelValue: null
36
40
  });
37
41
  const emits = __spreadValues({}, radioGroupEmits);
38
42
 
@@ -54,6 +58,7 @@ var script = defineComponent({
54
58
  return props2.options.filter((item) => item.value !== void 0 && item.value !== null);
55
59
  });
56
60
  const readonly = useComputedReadonly(props2);
61
+ !props2.modelValue && props2.defaultModelValue && emit("update:modelValue", props2.defaultModelValue);
57
62
  return {
58
63
  formItemBindProps,
59
64
  coreBindProps,
@@ -9,6 +9,10 @@ export declare const props: {
9
9
  type: PropType<"default" | "button">;
10
10
  default: string;
11
11
  };
12
+ modelValue: {
13
+ type: PropType<string | number>;
14
+ };
15
+ defaultModelValue: null;
12
16
  id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
13
17
  size: {
14
18
  readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
@@ -17,7 +21,6 @@ export declare const props: {
17
21
  __epPropKey: true;
18
22
  };
19
23
  disabled: BooleanConstructor;
20
- modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
21
24
  fill: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
22
25
  label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
23
26
  textColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -28,7 +28,11 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
28
28
  type: {
29
29
  type: String,
30
30
  default: "default"
31
- }
31
+ },
32
+ modelValue: {
33
+ type: [String, Number]
34
+ },
35
+ defaultModelValue: null
32
36
  });
33
37
  const emits = __spreadValues({}, radioGroupEmits);
34
38
 
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
7
7
  type: import("vue").PropType<"default" | "button">;
8
8
  default: string;
9
9
  };
10
+ modelValue: {
11
+ type: import("vue").PropType<string | number>;
12
+ };
13
+ defaultModelValue: null;
10
14
  id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
11
15
  size: {
12
16
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
@@ -15,7 +19,6 @@ declare const _default: import("vue").DefineComponent<{
15
19
  __epPropKey: true;
16
20
  };
17
21
  disabled: BooleanConstructor;
18
- modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
19
22
  fill: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
20
23
  label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
21
24
  textColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -90,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
90
93
  name: string | undefined;
91
94
  id: string | undefined;
92
95
  validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
93
- modelValue: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown>;
96
+ modelValue: string | number | undefined;
94
97
  textColor: string;
95
98
  }>;
96
99
  coreOnEmits: {
@@ -115,6 +118,10 @@ declare const _default: import("vue").DefineComponent<{
115
118
  type: import("vue").PropType<"default" | "button">;
116
119
  default: string;
117
120
  };
121
+ modelValue: {
122
+ type: import("vue").PropType<string | number>;
123
+ };
124
+ defaultModelValue: null;
118
125
  id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
119
126
  size: {
120
127
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
@@ -123,7 +130,6 @@ declare const _default: import("vue").DefineComponent<{
123
130
  __epPropKey: true;
124
131
  };
125
132
  disabled: BooleanConstructor;
126
- modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
127
133
  fill: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
128
134
  label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
129
135
  textColor: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
@@ -192,7 +198,6 @@ declare const _default: import("vue").DefineComponent<{
192
198
  disabled: boolean;
193
199
  id: string;
194
200
  validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
195
- modelValue: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor, BooleanConstructor], unknown, unknown>;
196
201
  options: import("../../../shared/types/form").RadioProps[];
197
202
  textColor: string;
198
203
  }>;
@@ -8,13 +8,13 @@
8
8
  min-width: 100px;
9
9
  }
10
10
 
11
-
12
- .el-upload-list__item-status-label{
13
- z-index: 1;
14
- }
15
- .el-upload-list__item .el-icon--close{
16
- z-index: 1;
17
- }
18
- .el-upload-list__item-name .el-icon.el-icon--download-primary{
19
- color: var(--el-color-primary);
20
- }
11
+
12
+ .el-upload-list__item-status-label{
13
+ z-index: 1;
14
+ }
15
+ .el-upload-list__item .el-icon--close{
16
+ z-index: 1;
17
+ }
18
+ .el-upload-list__item-name .el-icon.el-icon--download-primary{
19
+ color: var(--el-color-primary);
20
+ }
@@ -341,8 +341,8 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
341
341
  createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
342
342
  createCommentVNode(" This is a bug which needs to be fixed "),
343
343
  createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
344
- createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{
345
- t('el.upload.deleteTip')
344
+ createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{\r
345
+ t('el.upload.deleteTip')\r
346
346
  }}</i> `),
347
347
  createCommentVNode(" picture-card "),
348
348
  _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
package/index.css CHANGED
@@ -132,13 +132,13 @@
132
132
  min-width: 100px;
133
133
  }
134
134
 
135
-
136
- .el-upload-list__item-status-label{
137
- z-index: 1;
138
- }
139
- .el-upload-list__item .el-icon--close{
140
- z-index: 1;
141
- }
142
- .el-upload-list__item-name .el-icon.el-icon--download-primary{
143
- color: var(--el-color-primary);
144
- }
135
+
136
+ .el-upload-list__item-status-label{
137
+ z-index: 1;
138
+ }
139
+ .el-upload-list__item .el-icon--close{
140
+ z-index: 1;
141
+ }
142
+ .el-upload-list__item-name .el-icon.el-icon--download-primary{
143
+ color: var(--el-color-primary);
144
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "0.0.1-alpha.28",
3
+ "version": "0.0.1-alpha.29",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {
@@ -13,4 +13,5 @@ export declare const propInfoAction: {
13
13
  VkfInputNumber: InferPropInfo;
14
14
  VkfSwitch: InferPropInfo;
15
15
  VkfUpload: InferPropInfo;
16
+ VkfDatePicker: InferPropInfo;
16
17
  };
@@ -1,21 +1,25 @@
1
1
  const inferString = (item) => ({
2
2
  prop: item.prop,
3
- type: "string"
3
+ type: "String"
4
4
  });
5
5
  const inferBoolean = (item) => ({
6
6
  prop: item.prop,
7
- type: "boolean"
7
+ type: "Boolean"
8
8
  });
9
9
  const inferNumber = (item) => {
10
10
  const info = {
11
11
  prop: item.prop,
12
- type: "int"
12
+ type: "Number"
13
13
  };
14
14
  if (item.precision) {
15
15
  info.precision = item.precision;
16
16
  }
17
17
  return info;
18
18
  };
19
+ const inferDate = (item) => ({
20
+ prop: item.prop,
21
+ type: "Date"
22
+ });
19
23
  const propInfoAction = {
20
24
  VkfSelect: inferString,
21
25
  VkfRadio: inferString,
@@ -23,7 +27,8 @@ const propInfoAction = {
23
27
  VkfColorPicker: inferString,
24
28
  VkfInputNumber: inferNumber,
25
29
  VkfSwitch: inferBoolean,
26
- VkfUpload: inferString
30
+ VkfUpload: inferString,
31
+ VkfDatePicker: inferDate
27
32
  };
28
33
 
29
34
  export { propInfoAction };
@@ -4,4 +4,5 @@ export declare type ComponentSource<C = undefined> = Merge<{
4
4
  templateType: 'Component';
5
5
  templateIf?: BasicSource['templateIf'];
6
6
  is: any;
7
+ prop?: string;
7
8
  }, C>;