@silver-formily/element-plus 2.0.0 → 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/README.en-US.md +32 -0
- package/README.md +18 -21
- package/esm/__builtins__/index.mjs +15 -16
- package/esm/__builtins__/shared/index.mjs +11 -12
- package/esm/__builtins__/shared/transform-component.d.ts +2 -7
- 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 +11 -11
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +62 -62
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/utils.mjs +2 -2
- package/esm/array-cards/array-cards.d.ts +1 -1
- package/esm/array-cards/index.d.ts +3 -3
- package/esm/array-cards/index.mjs +49 -49
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/array-collapse.d.ts +2 -2
- package/esm/array-collapse/index.d.ts +3 -3
- package/esm/array-collapse/index.mjs +85 -84
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/utils.mjs +2 -2
- package/esm/array-items/index.mjs +43 -40
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/array-list-tabs.d.ts +3 -3
- package/esm/array-list-tabs/index.d.ts +6 -6
- package/esm/array-list-tabs/index.mjs +93 -89
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/utils.mjs +2 -2
- package/esm/array-table/array-table.d.ts +29 -1
- package/esm/array-table/index.d.ts +31 -3
- package/esm/array-table/index.mjs +126 -125
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/types.d.ts +2 -1
- package/esm/array-table/utils.mjs +2 -2
- package/esm/array-tabs/index.mjs +17 -17
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/cascader/cascader.d.ts +1 -6
- package/esm/cascader/index.d.ts +3 -16
- package/esm/cascader/index.mjs +29 -33
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts +3 -19
- package/esm/checkbox/index.d.ts +445 -407
- package/esm/checkbox/index.mjs +27 -36
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/date-picker/index.d.ts +442 -1
- package/esm/date-picker/index.mjs +12 -19
- 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 +108 -110
- package/esm/editable/index.mjs.map +1 -1
- package/esm/form/form.mjs +1 -1
- package/esm/form/form.mjs.map +1 -1
- package/esm/form-button-group/index.mjs +31 -30
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/utils.mjs +2 -2
- package/esm/form-collapse/index.mjs +40 -40
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-dialog/index.d.ts +1 -1
- package/esm/form-dialog/index.mjs +5 -5
- 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 +5 -5
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +6 -6
- package/esm/form-grid/index.d.ts +1 -183
- package/esm/form-grid/index.mjs +2 -2
- 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 +156 -152
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -1
- package/esm/form-layout/form-layout.mjs +55 -53
- 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 +47 -42
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +26 -24
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-tab/form-tab.d.ts +2 -2
- package/esm/form-tab/hooks.mjs +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 +31 -31
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/types.d.ts +1 -1
- package/esm/input/index.d.ts +6 -38
- package/esm/input/index.mjs +38 -47
- package/esm/input/index.mjs.map +1 -1
- package/esm/input/input.d.ts +1 -8
- package/esm/input-number/index.d.ts +326 -1
- package/esm/input-number/index.mjs +10 -17
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/pagination/pagination.mjs +110 -111
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.d.ts +6 -38
- package/esm/password/index.mjs +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/cascader.d.ts +1 -1
- package/esm/preview-text/date-picker.d.ts +1 -1
- package/esm/preview-text/index.d.ts +13 -13
- package/esm/preview-text/index.mjs +121 -121
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/input.d.ts +1 -1
- package/esm/preview-text/select.d.ts +1 -1
- package/esm/preview-text/time-picker.d.ts +1 -1
- package/esm/preview-text/tree.d.ts +1 -1
- package/esm/radio/index.d.ts +347 -219
- package/esm/radio/index.mjs +37 -44
- package/esm/radio/index.mjs.map +1 -1
- package/esm/radio/radio-group.d.ts +2 -13
- package/esm/reset/index.d.ts +1 -62
- package/esm/reset/index.mjs +2 -2
- package/esm/reset/index.mjs.map +1 -1
- package/esm/select/index.d.ts +3 -16
- package/esm/select/index.mjs +65 -70
- package/esm/select/index.mjs.map +1 -1
- package/esm/select/select.d.ts +1 -6
- package/esm/select-table/index.d.ts +33 -5
- package/esm/select-table/index.mjs +90 -89
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +58 -2
- package/esm/select-table/types.d.ts +1 -1
- package/esm/submit/index.d.ts +1 -47
- package/esm/submit/index.mjs +2 -2
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +296 -1
- package/esm/switch/index.mjs +5 -11
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.d.ts +442 -1
- package/esm/time-picker/index.mjs +9 -14
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.d.ts +184 -1
- package/esm/time-select/index.mjs +8 -13
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.d.ts +196 -115
- package/esm/transfer/index.mjs +5 -5
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.d.ts +5 -5
- package/esm/tree/index.mjs +34 -34
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/tree.d.ts +2 -2
- package/esm/tree/types.d.ts +1 -1
- package/esm/tree-select/index.d.ts +3 -19
- package/esm/tree-select/index.mjs +23 -30
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/tree-select/tree-select.d.ts +1 -8
- package/esm/upload/index.d.ts +409 -404
- package/esm/upload/index.mjs +9 -9
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +802 -792
- 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 +8 -11
package/esm/form-tab/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { observer as E } from "@formily/reactive-vue";
|
|
2
|
-
import { defineComponent as k, computed as B, ref as K, watch as w, createBlock as s, openBlock as
|
|
3
|
-
import { ElTabs as
|
|
4
|
-
import { reaction as
|
|
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
5
|
import "@formily/core";
|
|
6
|
-
import { useField as I, RecursionField as P } from "@formily/vue";
|
|
6
|
+
import { useField as I, RecursionField as P } from "@silver-formily/vue";
|
|
7
7
|
import { composeExport as S } from "../__builtins__/shared/utils.mjs";
|
|
8
8
|
import { stylePrefix as j } from "../__builtins__/configs/index.mjs";
|
|
9
9
|
import { useTabs as G } from "./hooks.mjs";
|
|
@@ -12,52 +12,52 @@ import '../styles/form-tab/index.css';const H = /* @__PURE__ */ k({
|
|
|
12
12
|
name: "FFormTab",
|
|
13
13
|
__name: "form-tab",
|
|
14
14
|
props: {
|
|
15
|
-
formTab:
|
|
16
|
-
|
|
15
|
+
formTab: {},
|
|
16
|
+
modelValue: {}
|
|
17
17
|
},
|
|
18
|
-
emits: ["
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
19
|
setup(_, { emit: h }) {
|
|
20
|
-
const u = _, F = h, i = I(), g = `${j}-form-tab`,
|
|
21
|
-
|
|
22
|
-
!t.some((e) => e.name ===
|
|
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);
|
|
23
23
|
}, {
|
|
24
24
|
fireImmediately: !0
|
|
25
|
-
}), w(() =>
|
|
26
|
-
|
|
25
|
+
}), w(() => l.value.activeKey, (e) => {
|
|
26
|
+
a.value = e;
|
|
27
27
|
});
|
|
28
|
-
const c =
|
|
28
|
+
const c = V(() => t.map((e) => i.value.form.queryFeedbacks({
|
|
29
29
|
type: "error",
|
|
30
30
|
address: `${i.value.address}.${e.name}.*`
|
|
31
31
|
}).length));
|
|
32
32
|
function x(e) {
|
|
33
33
|
/* istanbul ignore if -- @preserve */
|
|
34
|
-
typeof e == "string" && (F("
|
|
34
|
+
typeof e == "string" && (F("update:modelValue", e), l.value.setActiveKey?.(e));
|
|
35
35
|
}
|
|
36
|
-
return (e, M) => (
|
|
37
|
-
"model-value":
|
|
36
|
+
return (e, M) => (o(), s(r(q), {
|
|
37
|
+
"model-value": a.value,
|
|
38
38
|
style: { width: "100%" },
|
|
39
39
|
onTabChange: x
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
(
|
|
43
|
-
default:
|
|
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
44
|
R(r(P), {
|
|
45
45
|
schema: C,
|
|
46
46
|
name: f
|
|
47
47
|
}, null, 8, ["schema", "name"])
|
|
48
48
|
]),
|
|
49
|
-
label:
|
|
50
|
-
r(c)
|
|
49
|
+
label: m(() => [
|
|
50
|
+
r(c)[p] !== 0 ? (o(), s(r(A), {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: N(g),
|
|
53
|
-
value: r(c)
|
|
53
|
+
value: r(c)[p]
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
|
|
55
|
+
default: m(() => [
|
|
56
|
+
v(T(n.label), 1)
|
|
57
57
|
]),
|
|
58
58
|
_: 2
|
|
59
|
-
}, 1032, ["value"])) : (
|
|
60
|
-
|
|
59
|
+
}, 1032, ["value"])) : (o(), d(b, { key: 1 }, [
|
|
60
|
+
v(T(n.label), 1)
|
|
61
61
|
], 64))
|
|
62
62
|
]),
|
|
63
63
|
_: 2
|
|
@@ -66,12 +66,12 @@ import '../styles/form-tab/index.css';const H = /* @__PURE__ */ k({
|
|
|
66
66
|
_: 1
|
|
67
67
|
}, 8, ["model-value"]));
|
|
68
68
|
}
|
|
69
|
-
}), J = E(H),
|
|
69
|
+
}), J = E(H), oe = S(J, {
|
|
70
70
|
createFormTab: y
|
|
71
71
|
});
|
|
72
72
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
oe as FormTab,
|
|
74
|
+
oe as composeFormTab,
|
|
75
|
+
oe as default
|
|
76
76
|
};
|
|
77
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\">\nimport type { IFormTabProps } from './types.ts'\nimport {
|
|
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;"}
|
package/esm/form-tab/types.d.ts
CHANGED
package/esm/input/index.d.ts
CHANGED
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
export declare const Input: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
|
-
value?: string | number;
|
|
4
|
-
}> & Readonly<{
|
|
5
|
-
onChange?: (value: string | number) => any;
|
|
6
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (value: string | number) => any;
|
|
8
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
9
3
|
P: {};
|
|
10
4
|
B: {};
|
|
11
5
|
D: {};
|
|
12
6
|
C: {};
|
|
13
7
|
M: {};
|
|
14
8
|
Defaults: {};
|
|
15
|
-
}, Readonly<{
|
|
16
|
-
value?: string | number;
|
|
17
|
-
}> & Readonly<{
|
|
18
|
-
onChange?: (value: string | number) => any;
|
|
19
|
-
}>, {}, {}, {}, {}, {}>;
|
|
9
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
20
10
|
__isFragment?: never;
|
|
21
11
|
__isTeleport?: never;
|
|
22
12
|
__isSuspense?: never;
|
|
23
|
-
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
24
|
-
value?: string | number;
|
|
25
|
-
}> & Readonly<{
|
|
26
|
-
onChange?: (value: string | number) => any;
|
|
27
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
-
change: (value: string | number) => any;
|
|
29
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
13
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
30
14
|
$slots: Readonly<{
|
|
31
15
|
prefix?: () => any;
|
|
32
16
|
suffix?: () => any;
|
|
@@ -40,34 +24,18 @@ export declare const Input: {
|
|
|
40
24
|
};
|
|
41
25
|
}) & {
|
|
42
26
|
TextArea: {
|
|
43
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
44
|
-
value?: string | number;
|
|
45
|
-
}> & Readonly<{
|
|
46
|
-
onChange?: (value: string | number) => any;
|
|
47
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
48
|
-
change: (value: string | number) => any;
|
|
49
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
27
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
50
28
|
P: {};
|
|
51
29
|
B: {};
|
|
52
30
|
D: {};
|
|
53
31
|
C: {};
|
|
54
32
|
M: {};
|
|
55
33
|
Defaults: {};
|
|
56
|
-
}, Readonly<{
|
|
57
|
-
value?: string | number;
|
|
58
|
-
}> & Readonly<{
|
|
59
|
-
onChange?: (value: string | number) => any;
|
|
60
|
-
}>, {}, {}, {}, {}, {}>;
|
|
34
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
61
35
|
__isFragment?: never;
|
|
62
36
|
__isTeleport?: never;
|
|
63
37
|
__isSuspense?: never;
|
|
64
|
-
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
65
|
-
value?: string | number;
|
|
66
|
-
}> & Readonly<{
|
|
67
|
-
onChange?: (value: string | number) => any;
|
|
68
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
69
|
-
change: (value: string | number) => any;
|
|
70
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
38
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
71
39
|
$slots: Readonly<{
|
|
72
40
|
prefix?: () => any;
|
|
73
41
|
suffix?: () => any;
|
package/esm/input/index.mjs
CHANGED
|
@@ -1,77 +1,68 @@
|
|
|
1
|
-
import { connect as s, mapProps as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { ElInput as
|
|
1
|
+
import { connect as s, mapProps as a } from "@silver-formily/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";
|
|
3
|
+
import { ElInput as v } from "element-plus";
|
|
4
4
|
import "@formily/reactive";
|
|
5
|
-
import { mapReadPretty as
|
|
6
|
-
import { useCleanAttrs as
|
|
7
|
-
import { PreviewText as
|
|
5
|
+
import { mapReadPretty as i } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
+
import { useCleanAttrs as P, composeExport as _ } from "../__builtins__/shared/utils.mjs";
|
|
7
|
+
import { PreviewText as m } from "../preview-text/index.mjs";
|
|
8
8
|
import "@formily/core";
|
|
9
|
-
import "@formily/reactive-vue";
|
|
10
|
-
const
|
|
9
|
+
import "@silver-formily/reactive-vue";
|
|
10
|
+
const f = /* @__PURE__ */ d({
|
|
11
11
|
name: "FInput",
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "input",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setup(e, { emit: d }) {
|
|
19
|
-
const f = e, c = d, t = I(), { props: v } = A();
|
|
20
|
-
return (o, p) => (P(), k(a(h), $(a(v), {
|
|
21
|
-
"model-value": f.value,
|
|
22
|
-
"onUpdate:modelValue": p[0] || (p[0] = (y) => c("change", y))
|
|
23
|
-
}), g({ _: 2 }, [
|
|
24
|
-
t.prefix ? {
|
|
14
|
+
setup(o) {
|
|
15
|
+
const e = l(), { props: u } = P();
|
|
16
|
+
return (t, A) => (y(), c(p(v), x(I(p(u))), k({ _: 2 }, [
|
|
17
|
+
e.prefix ? {
|
|
25
18
|
name: "prefix",
|
|
26
|
-
fn:
|
|
27
|
-
|
|
19
|
+
fn: r(() => [
|
|
20
|
+
n(t.$slots, "prefix")
|
|
28
21
|
]),
|
|
29
22
|
key: "0"
|
|
30
23
|
} : void 0,
|
|
31
|
-
|
|
24
|
+
e.suffix ? {
|
|
32
25
|
name: "suffix",
|
|
33
|
-
fn:
|
|
34
|
-
|
|
26
|
+
fn: r(() => [
|
|
27
|
+
n(t.$slots, "suffix")
|
|
35
28
|
]),
|
|
36
29
|
key: "1"
|
|
37
30
|
} : void 0,
|
|
38
|
-
|
|
31
|
+
e.prepend ? {
|
|
39
32
|
name: "prepend",
|
|
40
|
-
fn:
|
|
41
|
-
|
|
33
|
+
fn: r(() => [
|
|
34
|
+
n(t.$slots, "prepend")
|
|
42
35
|
]),
|
|
43
36
|
key: "2"
|
|
44
37
|
} : void 0,
|
|
45
|
-
|
|
38
|
+
e.append ? {
|
|
46
39
|
name: "append",
|
|
47
|
-
fn:
|
|
48
|
-
|
|
40
|
+
fn: r(() => [
|
|
41
|
+
n(t.$slots, "append")
|
|
49
42
|
]),
|
|
50
43
|
key: "3"
|
|
51
44
|
} : void 0
|
|
52
|
-
]), 1040
|
|
45
|
+
]), 1040));
|
|
53
46
|
}
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
value: "modelValue",
|
|
47
|
+
}), $ = s(
|
|
48
|
+
f,
|
|
49
|
+
a({
|
|
58
50
|
readOnly: "readonly"
|
|
59
51
|
}),
|
|
60
|
-
|
|
61
|
-
),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
...
|
|
65
|
-
|
|
66
|
-
readonly: e.readOnly,
|
|
52
|
+
i(m.Input)
|
|
53
|
+
), h = s(
|
|
54
|
+
f,
|
|
55
|
+
a((o) => ({
|
|
56
|
+
...o,
|
|
57
|
+
readonly: o.readOnly,
|
|
67
58
|
type: "textarea"
|
|
68
59
|
})),
|
|
69
|
-
|
|
70
|
-
),
|
|
71
|
-
TextArea:
|
|
60
|
+
i(m.Input)
|
|
61
|
+
), z = _($, {
|
|
62
|
+
TextArea: h
|
|
72
63
|
});
|
|
73
64
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
z as Input,
|
|
66
|
+
z as default
|
|
76
67
|
};
|
|
77
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\">\nimport { ElInput } from 'element-plus'\nimport { useCleanAttrs } from '../__builtins__/index'\n\ndefineOptions({\n name: 'FInput',\n inheritAttrs: false,\n})\n\nconst
|
|
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;"}
|
package/esm/input/input.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
value?: string | number;
|
|
3
|
-
};
|
|
4
1
|
declare function __VLS_template(): {
|
|
5
2
|
attrs: Partial<{}>;
|
|
6
3
|
slots: Readonly<{
|
|
@@ -18,11 +15,7 @@ declare function __VLS_template(): {
|
|
|
18
15
|
rootEl: any;
|
|
19
16
|
};
|
|
20
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
22
|
-
change: (value: string | number) => any;
|
|
23
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
-
onChange?: (value: string | number) => any;
|
|
25
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
26
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
20
|
export default _default;
|
|
28
21
|
type __VLS_WithTemplateSlots<T, S> = T & {
|