@silver-formily/element-plus 2.0.1 → 2.1.0
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/LICENSE +21 -21
- package/README.en-US.md +32 -0
- package/README.md +32 -35
- package/esm/__builtins__/configs/index.mjs.map +1 -1
- package/esm/__builtins__/index.mjs +15 -16
- package/esm/__builtins__/shared/hooks.mjs.map +1 -1
- package/esm/__builtins__/shared/index.mjs +11 -12
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.d.ts +2 -6
- package/esm/__builtins__/shared/transform-component.mjs +16 -33
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +10 -10
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +76 -73
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/utils.mjs +33 -29
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/index.mjs +56 -54
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +64 -62
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/utils.mjs +8 -2
- package/esm/array-collapse/utils.mjs.map +1 -1
- package/esm/array-items/index.mjs +53 -47
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/index.mjs +36 -34
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/utils.mjs +11 -5
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/array-table.d.ts +28 -0
- package/esm/array-table/index.d.ts +28 -0
- package/esm/array-table/index.mjs +126 -123
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/types.d.ts +1 -0
- package/esm/array-table/utils.mjs +18 -12
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/index.mjs +19 -17
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/cascader/index.mjs +26 -24
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts +1 -4
- package/esm/checkbox/index.d.ts +442 -379
- package/esm/checkbox/index.mjs +19 -16
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/date-picker/index.mjs +14 -12
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/editable/editable.d.ts +16 -12
- package/esm/editable/index.d.ts +8 -6
- package/esm/editable/index.mjs +113 -113
- package/esm/editable/index.mjs.map +1 -1
- package/esm/form/form.mjs +6 -6
- package/esm/form/form.mjs.map +1 -1
- package/esm/form-button-group/index.mjs +33 -29
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/utils.mjs +8 -2
- package/esm/form-button-group/utils.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +43 -42
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/index.d.ts +1 -1
- package/esm/form-dialog/index.mjs +22 -22
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +6 -6
- package/esm/form-drawer/index.d.ts +1 -1
- package/esm/form-drawer/index.mjs +21 -21
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +6 -6
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.d.ts +1 -183
- package/esm/form-grid/index.mjs +23 -20
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/form-item.d.ts +2 -1
- package/esm/form-item/index.d.ts +12 -6
- package/esm/form-item/index.mjs +157 -151
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +0 -1
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.d.ts +0 -1
- package/esm/form-layout/form-layout.mjs +56 -51
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/types.d.ts +0 -2
- package/esm/form-layout/utils.d.ts +3 -3
- package/esm/form-layout/utils.mjs +55 -45
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +38 -34
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +1 -26
- package/esm/form-tab/index.mjs +36 -35
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/index.mjs +58 -58
- package/esm/input/index.mjs +23 -20
- package/esm/input/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +258 -147
- package/esm/input-number/index.mjs +9 -7
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/pagination/components/jumper.mjs.map +1 -1
- package/esm/pagination/components/next.mjs.map +1 -1
- package/esm/pagination/components/pager.mjs.map +1 -1
- package/esm/pagination/components/prev.mjs.map +1 -1
- package/esm/pagination/components/total.mjs.map +1 -1
- package/esm/pagination/pagination.mjs +109 -110
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/index.mjs +35 -32
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/radio/index.d.ts +344 -194
- package/esm/radio/index.mjs +28 -25
- package/esm/radio/index.mjs.map +1 -1
- package/esm/reset/index.d.ts +1 -62
- package/esm/reset/index.mjs +1 -1
- package/esm/reset/index.mjs.map +1 -1
- package/esm/select/index.mjs +23 -20
- package/esm/select/index.mjs.map +1 -1
- package/esm/select-table/index.d.ts +28 -0
- package/esm/select-table/index.mjs +59 -55
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +56 -0
- package/esm/submit/index.d.ts +1 -47
- package/esm/submit/index.mjs +1 -1
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +225 -189
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.mjs +8 -6
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.d.ts +163 -103
- package/esm/time-select/index.mjs +8 -6
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.d.ts +196 -115
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.mjs +43 -40
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.mjs +20 -17
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/upload/index.d.ts +404 -399
- package/esm/upload/index.mjs +9 -7
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +800 -790
- package/esm/vendor/icon.mjs.map +1 -1
- package/esm/vendor/lodash.mjs +12 -20
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/runtime.mjs +29 -24
- package/esm/vendor/runtime.mjs.map +1 -1
- package/esm/vendor/shared.esm-bundler.mjs +2 -2
- package/esm/vendor/sizes.mjs.map +1 -1
- package/esm/vendor/types.mjs +5 -5
- package/esm/vendor/types.mjs.map +1 -1
- package/package.json +113 -114
package/esm/form-tab/index.d.ts
CHANGED
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const composeFormTab: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').IFormTabProps> & Readonly<{
|
|
4
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
5
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
"update:modelValue": (...args: any[]) => void;
|
|
7
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
8
|
-
P: {};
|
|
9
|
-
B: {};
|
|
10
|
-
D: {};
|
|
11
|
-
C: {};
|
|
12
|
-
M: {};
|
|
13
|
-
Defaults: {};
|
|
14
|
-
}, Readonly<import('./types').IFormTabProps> & Readonly<{
|
|
15
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
16
|
-
}>, {}, {}, {}, {}, {}>;
|
|
17
|
-
__isFragment?: never;
|
|
18
|
-
__isTeleport?: never;
|
|
19
|
-
__isSuspense?: never;
|
|
20
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./types').IFormTabProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
22
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
-
"update:modelValue": (...args: any[]) => void;
|
|
24
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
25
|
-
createFormTab: typeof createFormTab;
|
|
26
|
-
};
|
|
1
|
+
export declare const composeFormTab: any;
|
|
27
2
|
export { composeFormTab as FormTab };
|
|
28
3
|
export default composeFormTab;
|
package/esm/form-tab/index.mjs
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { formilyComputed as V, observer as E } from "@silver-formily/reactive-vue";
|
|
2
|
+
import { defineComponent as k, computed as B, ref as K, watch as w, createBlock as s, openBlock as o, unref as r, withCtx as m, createElementBlock as d, Fragment as b, renderList as $, mergeProps as L, normalizeClass as N, createTextVNode as v, toDisplayString as T, createVNode as R } from "vue";
|
|
3
|
+
import { ElTabs as q, ElTabPane as z, ElBadge as A } from "element-plus";
|
|
4
|
+
import { reaction as D } from "@formily/reactive";
|
|
5
|
+
import "@formily/core";
|
|
6
|
+
import { useField as I, RecursionField as P } from "@silver-formily/vue";
|
|
7
|
+
import { composeExport as S } from "../__builtins__/shared/utils.mjs";
|
|
8
8
|
import { stylePrefix as j } from "../__builtins__/configs/index.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
9
|
+
import { useTabs as G } from "./hooks.mjs";
|
|
10
|
+
import { createFormTab as y } from "./utils.mjs";
|
|
11
|
+
import '../styles/form-tab/index.css';const H = /* @__PURE__ */ k({
|
|
11
12
|
name: "FFormTab",
|
|
12
13
|
__name: "form-tab",
|
|
13
14
|
props: {
|
|
14
|
-
formTab:
|
|
15
|
-
modelValue:
|
|
15
|
+
formTab: {},
|
|
16
|
+
modelValue: {}
|
|
16
17
|
},
|
|
17
18
|
emits: ["update:modelValue"],
|
|
18
19
|
setup(_, { emit: h }) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
!
|
|
20
|
+
const u = _, F = h, i = I(), g = `${j}-form-tab`, l = B(() => u.formTab ?? y()), t = G(), a = K(u?.modelValue ?? l.value.activeKey ?? t?.[0]?.name);
|
|
21
|
+
D(() => t.length, () => {
|
|
22
|
+
!t.some((e) => e.name === a.value) && (a.value = t?.[0]?.name);
|
|
22
23
|
}, {
|
|
23
24
|
fireImmediately: !0
|
|
24
|
-
}),
|
|
25
|
-
|
|
25
|
+
}), w(() => l.value.activeKey, (e) => {
|
|
26
|
+
a.value = e;
|
|
26
27
|
});
|
|
27
|
-
const
|
|
28
|
+
const c = V(() => t.map((e) => i.value.form.queryFeedbacks({
|
|
28
29
|
type: "error",
|
|
29
|
-
address: `${
|
|
30
|
+
address: `${i.value.address}.${e.name}.*`
|
|
30
31
|
}).length));
|
|
31
32
|
function x(e) {
|
|
32
33
|
/* istanbul ignore if -- @preserve */
|
|
33
|
-
typeof e == "string" && (F("update:modelValue", e),
|
|
34
|
+
typeof e == "string" && (F("update:modelValue", e), l.value.setActiveKey?.(e));
|
|
34
35
|
}
|
|
35
|
-
return (e, M) => (
|
|
36
|
-
"model-value":
|
|
36
|
+
return (e, M) => (o(), s(r(q), {
|
|
37
|
+
"model-value": a.value,
|
|
37
38
|
style: { width: "100%" },
|
|
38
39
|
onTabChange: x
|
|
39
40
|
}, {
|
|
40
|
-
default:
|
|
41
|
-
(
|
|
42
|
-
default:
|
|
43
|
-
|
|
41
|
+
default: m(() => [
|
|
42
|
+
(o(!0), d(b, null, $(r(t), ({ props: n, schema: C, name: f }, p) => (o(), s(r(z), L({ key: f }, { ref_for: !0 }, n), {
|
|
43
|
+
default: m(() => [
|
|
44
|
+
R(r(P), {
|
|
44
45
|
schema: C,
|
|
45
46
|
name: f
|
|
46
47
|
}, null, 8, ["schema", "name"])
|
|
47
48
|
]),
|
|
48
|
-
label:
|
|
49
|
-
r(
|
|
49
|
+
label: m(() => [
|
|
50
|
+
r(c)[p] !== 0 ? (o(), s(r(A), {
|
|
50
51
|
key: 0,
|
|
51
|
-
class:
|
|
52
|
-
value: r(
|
|
52
|
+
class: N(g),
|
|
53
|
+
value: r(c)[p]
|
|
53
54
|
}, {
|
|
54
|
-
default:
|
|
55
|
+
default: m(() => [
|
|
55
56
|
v(T(n.label), 1)
|
|
56
57
|
]),
|
|
57
58
|
_: 2
|
|
58
|
-
}, 1032, ["value"])) : (
|
|
59
|
+
}, 1032, ["value"])) : (o(), d(b, { key: 1 }, [
|
|
59
60
|
v(T(n.label), 1)
|
|
60
61
|
], 64))
|
|
61
62
|
]),
|
|
@@ -65,12 +66,12 @@ import '../styles/form-tab/index.css';const H = /* @__PURE__ */ E({
|
|
|
65
66
|
_: 1
|
|
66
67
|
}, 8, ["model-value"]));
|
|
67
68
|
}
|
|
68
|
-
}), J =
|
|
69
|
+
}), J = E(H), oe = S(J, {
|
|
69
70
|
createFormTab: y
|
|
70
71
|
});
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
oe as FormTab,
|
|
74
|
+
oe as composeFormTab,
|
|
75
|
+
oe as default
|
|
75
76
|
};
|
|
76
77
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-tab/form-tab.vue","../../src/form-tab/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/form-tab/form-tab.vue","../../src/form-tab/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { IFormTabProps } from './types.ts'\nimport { reaction } from '@formily/reactive'\nimport { formilyComputed } from '@silver-formily/reactive-vue'\nimport { RecursionField, useField } from '@silver-formily/vue'\nimport { ElBadge, ElTabPane, ElTabs } from 'element-plus'\nimport { computed, ref, watch } from 'vue'\nimport { stylePrefix } from '../__builtins__'\nimport { useTabs } from './hooks'\nimport { createFormTab } from './utils'\n\ndefineOptions({\n name: 'FFormTab',\n})\n\nconst props = defineProps<IFormTabProps>()\nconst emit = defineEmits(['update:modelValue'])\n\nconst field = useField()\nconst prefixCls = `${stylePrefix}-form-tab`\nconst formTabRef = computed(() => props.formTab ?? createFormTab())\nconst tabs = useTabs()\nconst _activeKey = ref(props?.modelValue ?? formTabRef.value.activeKey ?? tabs?.[0]?.name)\n\nreaction(() => {\n return tabs.length\n}, () => {\n !tabs.some(tab => tab.name === _activeKey.value) && (_activeKey.value = tabs?.[0]?.name)\n}, {\n fireImmediately: true,\n})\nwatch(() => formTabRef.value.activeKey, (val) => {\n _activeKey.value = val\n})\n\nconst errorList = formilyComputed(() => {\n return tabs.map((tab) => {\n return field.value.form.queryFeedbacks({\n type: 'error',\n address: `${field.value.address}.${tab.name}.*`,\n }).length\n })\n})\n\nfunction handleTabChange(key: string) {\n /* istanbul ignore if -- @preserve */\n if (typeof key !== 'string')\n return\n emit('update:modelValue', key)\n formTabRef.value.setActiveKey?.(key)\n}\n</script>\n\n<template>\n <ElTabs\n :model-value=\"_activeKey\"\n style=\"width: 100%;\"\n @tab-change=\"handleTabChange\"\n >\n <ElTabPane\n v-for=\"({ props: tabProps, schema, name }, key) in tabs\"\n :key=\"name\"\n v-bind=\"tabProps\"\n >\n <template #default>\n <RecursionField :schema=\"schema\" :name=\"name\" />\n </template>\n <template #label>\n <ElBadge\n v-if=\"errorList[key] !== 0\"\n :class=\"prefixCls\"\n :value=\"errorList[key]\"\n >\n {{ tabProps.label }}\n </ElBadge>\n <template v-else>\n {{ tabProps.label }}\n </template>\n </template>\n </ElTabPane>\n </ElTabs>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport { composeExport } from '../__builtins__'\nimport FFormTab from './form-tab.vue'\nimport { createFormTab } from './utils'\nimport './style.scss'\n\nconst FormTab = observer(FFormTab)\n\nexport const composeFormTab = composeExport(FormTab, {\n createFormTab,\n})\n\nexport { composeFormTab as FormTab }\nexport default composeFormTab\n"],"names":["props","__props","emit","__emit","field","useField","prefixCls","stylePrefix","formTabRef","computed","createFormTab","tabs","useTabs","_activeKey","ref","reaction","tab","watch","val","errorList","formilyComputed","handleTabChange","key","_createBlock","_unref","ElTabs","_createElementBlock","_Fragment","_renderList","tabProps","schema","name","_openBlock","_mergeProps","_createVNode","RecursionField","ElBadge","_createTextVNode","_toDisplayString","FormTab","observer","FFormTab","composeFormTab","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,UAAMA,IAAQC,GACRC,IAAOC,GAEPC,IAAQC,EAAA,GACRC,IAAY,GAAGC,CAAW,aAC1BC,IAAaC,EAAS,MAAMT,EAAM,WAAWU,GAAe,GAC5DC,IAAOC,EAAA,GACPC,IAAaC,EAAId,GAAO,cAAcQ,EAAW,MAAM,aAAaG,IAAO,CAAC,GAAG,IAAI;AAEzF,IAAAI,EAAS,MACAJ,EAAK,QACX,MAAM;AACP,OAACA,EAAK,KAAK,CAAAK,MAAOA,EAAI,SAASH,EAAW,KAAK,MAAMA,EAAW,QAAQF,IAAO,CAAC,GAAG;AAAA,IACrF,GAAG;AAAA,MACD,iBAAiB;AAAA,IAAA,CAClB,GACDM,EAAM,MAAMT,EAAW,MAAM,WAAW,CAACU,MAAQ;AAC/C,MAAAL,EAAW,QAAQK;AAAA,IACrB,CAAC;AAED,UAAMC,IAAYC,EAAgB,MACzBT,EAAK,IAAI,CAACK,MACRZ,EAAM,MAAM,KAAK,eAAe;AAAA,MACrC,MAAM;AAAA,MACN,SAAS,GAAGA,EAAM,MAAM,OAAO,IAAIY,EAAI,IAAI;AAAA,IAAA,CAC5C,EAAE,MACJ,CACF;AAED,aAASK,EAAgBC,GAAa;AAAA,MAAA;AAEpC,MAAI,OAAOA,KAAQ,aAEnBpB,EAAK,qBAAqBoB,CAAG,GAC7Bd,EAAW,MAAM,eAAec,CAAG;AAAA,IACrC;2BAIEC,EA0BSC,EAAAC,CAAA,GAAA;AAAA,MAzBN,eAAaZ,EAAA;AAAA,MACd,OAAA,EAAA,OAAA,OAAA;AAAA,MACC,aAAYQ;AAAA,IAAA;iBAGX,MAAwD;AAAA,gBAD1DK,EAoBYC,GAAA,MAAAC,EAnByCJ,MAAI,CAAA,EAAA,OAAtCK,GAAU,QAAAC,GAAQ,MAAAC,EAAA,GAAQT,OAD7CU,KAAAT,EAoBYC,MApBZS,EAoBY,EAlBT,KAAKF,EAAA,oBACEF,CAAQ,GAAA;AAAA,UAEL,WACT,MAAgD;AAAA,YAAhDK,EAAgDV,EAAAW,CAAA,GAAA;AAAA,cAA/B,QAAAL;AAAA,cAAiB,MAAAC;AAAA,YAAA;;UAEzB,SACT,MAMU;AAAA,YALFP,EAAAL,CAAA,EAAUG,CAAG,MAAA,UADrBC,EAMUC,EAAAY,CAAA,GAAA;AAAA;cAJP,SAAO9B,CAAS;AAAA,cAChB,OAAOkB,EAAAL,CAAA,EAAUG,CAAG;AAAA,YAAA;yBAErB,MAAoB;AAAA,gBAAjBe,EAAAC,EAAAT,EAAS,KAAK,GAAA,CAAA;AAAA,cAAA;;yCAEnBH,EAEWC,GAAA,EAAA,KAAA,KAAA;AAAA,cADNU,EAAAC,EAAAT,EAAS,KAAK,GAAA,CAAA;AAAA,YAAA;;;;;;;;ICtErBU,IAAUC,EAASC,CAAQ,GAEpBC,KAAiBC,EAAcJ,GAAS;AAAA,EACnD,eAAA7B;AACF,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/form-tab/utils.ts"],"sourcesContent":["import { model } from '@formily/reactive'\
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/form-tab/utils.ts"],"sourcesContent":["import { model } from '@formily/reactive'\n\nexport function createFormTab(defaultActiveKey?: string) {\n const formTab = model({\n activeKey: defaultActiveKey,\n setActiveKey(key: string) {\n formTab.activeKey = key\n },\n })\n return formTab\n}\n"],"names":["createFormTab","defaultActiveKey","formTab","model","key"],"mappings":";AAEO,SAASA,EAAcC,GAA2B;AACvD,QAAMC,IAAUC,EAAM;AAAA,IACpB,WAAWF;AAAA,IACX,aAAaG,GAAa;AACxB,MAAAF,EAAQ,YAAYE;AAAA,IACtB;AAAA,EAAA,CACD;AACD,SAAOF;AACT;"}
|
package/esm/index.mjs
CHANGED
|
@@ -8,33 +8,33 @@ import { Cascader as T } from "./cascader/index.mjs";
|
|
|
8
8
|
import { Checkbox as d } from "./checkbox/index.mjs";
|
|
9
9
|
import { DatePicker as u } from "./date-picker/index.mjs";
|
|
10
10
|
import { Editable as A } from "./editable/index.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
11
|
+
import { _ as I } from "./form/form.mjs";
|
|
12
|
+
import { FormButtonGroup as n } from "./form-button-group/index.mjs";
|
|
13
|
+
import { FormCollapse as P, FormCollapseItem as D } from "./form-collapse/index.mjs";
|
|
14
|
+
import { FormDialog as B } from "./form-dialog/index.mjs";
|
|
15
|
+
import { FormDrawer as G } from "./form-drawer/index.mjs";
|
|
16
|
+
import { FormGrid as R } from "./form-grid/index.mjs";
|
|
17
|
+
import { FormBaseItem as g, FormItem as v, fieldFeedbackMapper as M } from "./form-item/index.mjs";
|
|
18
|
+
import { _ as U } from "./form-layout/form-layout.mjs";
|
|
19
|
+
import { FormStep as q } from "./form-step/index.mjs";
|
|
20
|
+
import { composeFormTab as H, composeFormTab as J } from "./form-tab/index.mjs";
|
|
21
|
+
import { Input as O } from "./input/index.mjs";
|
|
22
|
+
import { InputNumber as V } from "./input-number/index.mjs";
|
|
23
|
+
import { Password as X } from "./password/index.mjs";
|
|
24
|
+
import { PreviewText as Z } from "./preview-text/index.mjs";
|
|
25
|
+
import { Radio as rr } from "./radio/index.mjs";
|
|
26
|
+
import { Reset as er } from "./reset/index.mjs";
|
|
27
|
+
import { Select as tr } from "./select/index.mjs";
|
|
28
|
+
import { SelectTable as fr } from "./select-table/index.mjs";
|
|
29
|
+
import { ElSpace as ar } from "element-plus";
|
|
30
|
+
import { Submit as lr } from "./submit/index.mjs";
|
|
31
|
+
import { Switch as cr } from "./switch/index.mjs";
|
|
32
|
+
import { TimePicker as Tr } from "./time-picker/index.mjs";
|
|
33
|
+
import { TimeSelect as dr } from "./time-select/index.mjs";
|
|
34
|
+
import { Transfer as ur } from "./transfer/index.mjs";
|
|
35
|
+
import { Tree as Ar } from "./tree/index.mjs";
|
|
36
|
+
import { TreeSelect as Ir } from "./tree-select/index.mjs";
|
|
37
|
+
import { Upload as nr } from "./upload/index.mjs";
|
|
38
38
|
export {
|
|
39
39
|
e as ArrayCards,
|
|
40
40
|
t as ArrayCollapse,
|
|
@@ -46,36 +46,36 @@ export {
|
|
|
46
46
|
d as Checkbox,
|
|
47
47
|
u as DatePicker,
|
|
48
48
|
A as Editable,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
49
|
+
I as Form,
|
|
50
|
+
g as FormBaseItem,
|
|
51
|
+
n as FormButtonGroup,
|
|
52
|
+
P as FormCollapse,
|
|
53
|
+
D as FormCollapseItem,
|
|
54
|
+
B as FormDialog,
|
|
55
|
+
G as FormDrawer,
|
|
56
|
+
R as FormGrid,
|
|
57
|
+
v as FormItem,
|
|
58
|
+
U as FormLayout,
|
|
59
|
+
q as FormStep,
|
|
60
|
+
H as FormTab,
|
|
61
|
+
O as Input,
|
|
62
|
+
V as InputNumber,
|
|
63
|
+
X as Password,
|
|
64
|
+
Z as PreviewText,
|
|
65
|
+
rr as Radio,
|
|
66
|
+
er as Reset,
|
|
67
|
+
tr as Select,
|
|
68
|
+
fr as SelectTable,
|
|
69
|
+
ar as Space,
|
|
70
|
+
lr as Submit,
|
|
71
|
+
cr as Switch,
|
|
72
|
+
Tr as TimePicker,
|
|
73
|
+
dr as TimeSelect,
|
|
74
|
+
ur as Transfer,
|
|
75
|
+
Ar as Tree,
|
|
76
|
+
Ir as TreeSelect,
|
|
77
|
+
nr as Upload,
|
|
78
|
+
J as composeFormTab,
|
|
79
|
+
M as fieldFeedbackMapper
|
|
80
80
|
};
|
|
81
81
|
//# sourceMappingURL=index.mjs.map
|
package/esm/input/index.mjs
CHANGED
|
@@ -1,65 +1,68 @@
|
|
|
1
1
|
import { connect as s, mapProps as a } from "@silver-formily/vue";
|
|
2
|
-
import {
|
|
3
|
-
import { defineComponent as d, useSlots as l, createBlock as c, openBlock as y, unref as p, normalizeProps as x, guardReactiveProps as I, createSlots as k, withCtx as t, renderSlot as r } from "vue";
|
|
2
|
+
import { defineComponent as d, useSlots as l, createBlock as c, openBlock as y, unref as p, normalizeProps as x, guardReactiveProps as I, createSlots as k, withCtx as r, renderSlot as n } from "vue";
|
|
4
3
|
import { ElInput as v } from "element-plus";
|
|
4
|
+
import "@formily/reactive";
|
|
5
|
+
import { mapReadPretty as i } from "../__builtins__/shared/transform-component.mjs";
|
|
5
6
|
import { useCleanAttrs as P, composeExport as _ } from "../__builtins__/shared/utils.mjs";
|
|
6
|
-
import {
|
|
7
|
-
|
|
7
|
+
import { PreviewText as m } from "../preview-text/index.mjs";
|
|
8
|
+
import "@formily/core";
|
|
9
|
+
import "@silver-formily/reactive-vue";
|
|
10
|
+
const f = /* @__PURE__ */ d({
|
|
8
11
|
name: "FInput",
|
|
9
12
|
inheritAttrs: !1,
|
|
10
13
|
__name: "input",
|
|
11
14
|
setup(o) {
|
|
12
15
|
const e = l(), { props: u } = P();
|
|
13
|
-
return (
|
|
16
|
+
return (t, A) => (y(), c(p(v), x(I(p(u))), k({ _: 2 }, [
|
|
14
17
|
e.prefix ? {
|
|
15
18
|
name: "prefix",
|
|
16
|
-
fn:
|
|
17
|
-
|
|
19
|
+
fn: r(() => [
|
|
20
|
+
n(t.$slots, "prefix")
|
|
18
21
|
]),
|
|
19
22
|
key: "0"
|
|
20
23
|
} : void 0,
|
|
21
24
|
e.suffix ? {
|
|
22
25
|
name: "suffix",
|
|
23
|
-
fn:
|
|
24
|
-
|
|
26
|
+
fn: r(() => [
|
|
27
|
+
n(t.$slots, "suffix")
|
|
25
28
|
]),
|
|
26
29
|
key: "1"
|
|
27
30
|
} : void 0,
|
|
28
31
|
e.prepend ? {
|
|
29
32
|
name: "prepend",
|
|
30
|
-
fn:
|
|
31
|
-
|
|
33
|
+
fn: r(() => [
|
|
34
|
+
n(t.$slots, "prepend")
|
|
32
35
|
]),
|
|
33
36
|
key: "2"
|
|
34
37
|
} : void 0,
|
|
35
38
|
e.append ? {
|
|
36
39
|
name: "append",
|
|
37
|
-
fn:
|
|
38
|
-
|
|
40
|
+
fn: r(() => [
|
|
41
|
+
n(t.$slots, "append")
|
|
39
42
|
]),
|
|
40
43
|
key: "3"
|
|
41
44
|
} : void 0
|
|
42
45
|
]), 1040));
|
|
43
46
|
}
|
|
44
47
|
}), $ = s(
|
|
45
|
-
|
|
48
|
+
f,
|
|
46
49
|
a({
|
|
47
50
|
readOnly: "readonly"
|
|
48
51
|
}),
|
|
49
|
-
|
|
52
|
+
i(m.Input)
|
|
50
53
|
), h = s(
|
|
51
|
-
|
|
54
|
+
f,
|
|
52
55
|
a((o) => ({
|
|
53
56
|
...o,
|
|
54
57
|
readonly: o.readOnly,
|
|
55
58
|
type: "textarea"
|
|
56
59
|
})),
|
|
57
|
-
|
|
58
|
-
),
|
|
60
|
+
i(m.Input)
|
|
61
|
+
), z = _($, {
|
|
59
62
|
TextArea: h
|
|
60
63
|
});
|
|
61
64
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
z as Input,
|
|
66
|
+
z as default
|
|
64
67
|
};
|
|
65
68
|
//# sourceMappingURL=index.mjs.map
|
package/esm/input/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/input/input.vue","../../src/input/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/input/input.vue","../../src/input/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElInput } from 'element-plus'\nimport { useCleanAttrs } from '../__builtins__/index'\n\ndefineOptions({\n name: 'FInput',\n inheritAttrs: false,\n})\n\nconst slots = defineSlots<{\n prefix?: () => any\n suffix?: () => any\n prepend?: () => any\n append?: () => any\n}>()\n\nconst { props: inputProps } = useCleanAttrs()\n</script>\n\n<template>\n <ElInput\n v-bind=\"inputProps\"\n >\n <template v-if=\"slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n <template v-if=\"slots.prepend\" #prepend>\n <slot name=\"prepend\" />\n </template>\n <template v-if=\"slots.append\" #append>\n <slot name=\"append\" />\n </template>\n </ElInput>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { composeExport, mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FInput from './input.vue'\n\nconst InnerInput = connect<typeof FInput>(\n FInput,\n mapProps({\n readOnly: 'readonly',\n }),\n mapReadPretty(PreviewText.Input),\n)\n\nconst TextArea = connect<typeof FInput>(\n FInput,\n mapProps((props) => {\n return {\n ...props,\n readonly: props.readOnly,\n type: 'textarea',\n }\n }),\n mapReadPretty(PreviewText.Input),\n)\n\nexport const Input = composeExport(InnerInput, {\n TextArea,\n})\n\nexport default Input\n"],"names":["slots","_useSlots","inputProps","useCleanAttrs","_openBlock","_createBlock","_unref","_createSlots","_renderSlot","_ctx","InnerInput","connect","FInput","mapProps","mapReadPretty","PreviewText","TextArea","props","Input","composeExport"],"mappings":";;;;;;;;;;;;;;AASA,UAAMA,IAAQC,EAAA,GAOR,EAAE,OAAOC,EAAA,IAAeC,EAAA;sBAI5BC,KAAAC,EAeUC,UAdAA,EAAAJ,CAAA,CAAU,CAAA,GAAAK,EAAA,EAAA,GAAA,KAAA;AAAA,MAEFP,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBQ,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERT,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBQ,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERT,EAAM;cAAU;AAAA,cAC9B,MAAuB;AAAA,UAAvBQ,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;MAETT,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBQ,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;;;IC5BtBC,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS;AAAA,IACP,UAAU;AAAA,EAAA,CACX;AAAA,EACDC,EAAcC,EAAY,KAAK;AACjC,GAEMC,IAAWL;AAAA,EACfC;AAAAA,EACAC,EAAS,CAACI,OACD;AAAA,IACL,GAAGA;AAAA,IACH,UAAUA,EAAM;AAAA,IAChB,MAAM;AAAA,EAAA,EAET;AAAA,EACDH,EAAcC,EAAY,KAAK;AACjC,GAEaG,IAAQC,EAAcT,GAAY;AAAA,EAC7C,UAAAM;AACF,CAAC;"}
|