@silver-formily/element-plus 0.0.1-alpha.0 → 0.0.1-alpha.1
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/package.json +1 -1
- package/esm/__builtins__/configs/index.d.ts +0 -1
- package/esm/__builtins__/configs/index.mjs +0 -5
- package/esm/__builtins__/configs/index.mjs.map +0 -1
- package/esm/__builtins__/index.d.ts +0 -2
- package/esm/__builtins__/index.mjs +0 -27
- package/esm/__builtins__/index.mjs.map +0 -1
- package/esm/__builtins__/shared/hooks.d.ts +0 -7
- package/esm/__builtins__/shared/hooks.mjs +0 -59
- package/esm/__builtins__/shared/hooks.mjs.map +0 -1
- package/esm/__builtins__/shared/index.d.ts +0 -7
- package/esm/__builtins__/shared/index.mjs +0 -25
- package/esm/__builtins__/shared/index.mjs.map +0 -1
- package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
- package/esm/__builtins__/shared/load-config-provider.mjs +0 -13
- package/esm/__builtins__/shared/load-config-provider.mjs.map +0 -1
- package/esm/__builtins__/shared/loading.d.ts +0 -12
- package/esm/__builtins__/shared/loading.mjs +0 -49
- package/esm/__builtins__/shared/loading.mjs.map +0 -1
- package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
- package/esm/__builtins__/shared/simple-version-compare.mjs +0 -18
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +0 -1
- package/esm/__builtins__/shared/transform-component.d.ts +0 -8
- package/esm/__builtins__/shared/transform-component.mjs +0 -50
- package/esm/__builtins__/shared/transform-component.mjs.map +0 -1
- package/esm/__builtins__/shared/types.d.ts +0 -2
- package/esm/__builtins__/shared/types.mjs +0 -2
- package/esm/__builtins__/shared/types.mjs.map +0 -1
- package/esm/__builtins__/shared/utils.d.ts +0 -8
- package/esm/__builtins__/shared/utils.mjs +0 -34
- package/esm/__builtins__/shared/utils.mjs.map +0 -1
- package/esm/array-base/array-base-addition.d.ts +0 -5
- package/esm/array-base/array-base-index.d.ts +0 -19
- package/esm/array-base/array-base-inner.d.ts +0 -18
- package/esm/array-base/array-base-item.d.ts +0 -18
- package/esm/array-base/array-base-move-down.d.ts +0 -18
- package/esm/array-base/array-base-move-up.d.ts +0 -18
- package/esm/array-base/array-base-remove.d.ts +0 -18
- package/esm/array-base/array-base-sort-handle.d.ts +0 -2
- package/esm/array-base/index.d.ts +0 -114
- package/esm/array-base/index.mjs +0 -225
- package/esm/array-base/index.mjs.map +0 -1
- package/esm/array-base/symbols.d.ts +0 -4
- package/esm/array-base/symbols.mjs +0 -6
- package/esm/array-base/symbols.mjs.map +0 -1
- package/esm/array-base/types.d.ts +0 -28
- package/esm/array-base/types.mjs +0 -2
- package/esm/array-base/types.mjs.map +0 -1
- package/esm/array-base/utils.d.ts +0 -18
- package/esm/array-base/utils.mjs +0 -88
- package/esm/array-base/utils.mjs.map +0 -1
- package/esm/array-cards/array-cards.d.ts +0 -13
- package/esm/array-cards/index.d.ts +0 -122
- package/esm/array-cards/index.mjs +0 -119
- package/esm/array-cards/index.mjs.map +0 -1
- package/esm/array-collapse/array-collapse-item.d.ts +0 -18
- package/esm/array-collapse/array-collapse.d.ts +0 -16
- package/esm/array-collapse/index.d.ts +0 -134
- package/esm/array-collapse/index.mjs +0 -180
- package/esm/array-collapse/index.mjs.map +0 -1
- package/esm/array-collapse/utils.d.ts +0 -1
- package/esm/array-collapse/utils.mjs +0 -12
- package/esm/array-collapse/utils.mjs.map +0 -1
- package/esm/array-items/array-items-item.d.ts +0 -30
- package/esm/array-items/array-items.d.ts +0 -2
- package/esm/array-items/index.d.ts +0 -130
- package/esm/array-items/index.mjs +0 -105
- package/esm/array-items/index.mjs.map +0 -1
- package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
- package/esm/array-list-tabs/index.d.ts +0 -83
- package/esm/array-list-tabs/index.mjs +0 -183
- package/esm/array-list-tabs/index.mjs.map +0 -1
- package/esm/array-list-tabs/utils.d.ts +0 -3
- package/esm/array-list-tabs/utils.mjs +0 -16
- package/esm/array-list-tabs/utils.mjs.map +0 -1
- package/esm/array-table/index.mjs +0 -230
- package/esm/array-table/index.mjs.map +0 -1
- package/esm/array-table/types.d.ts +0 -6
- package/esm/array-table/types.mjs +0 -2
- package/esm/array-table/types.mjs.map +0 -1
- package/esm/array-table/utils.d.ts +0 -5
- package/esm/array-table/utils.mjs +0 -26
- package/esm/array-table/utils.mjs.map +0 -1
- package/esm/array-tabs/array-tabs.d.ts +0 -2
- package/esm/array-tabs/index.d.ts +0 -2
- package/esm/array-tabs/index.mjs +0 -88
- package/esm/array-tabs/index.mjs.map +0 -1
- package/esm/cascader/cascader.d.ts +0 -30
- package/esm/cascader/index.d.ts +0 -41
- package/esm/cascader/index.mjs +0 -54
- package/esm/cascader/index.mjs.map +0 -1
- package/esm/checkbox/checkbox-group.d.ts +0 -58
- package/esm/checkbox/index.d.ts +0 -716
- package/esm/checkbox/index.mjs +0 -86
- package/esm/checkbox/index.mjs.map +0 -1
- package/esm/date-picker/index.d.ts +0 -2
- package/esm/date-picker/index.mjs +0 -57
- package/esm/date-picker/index.mjs.map +0 -1
- package/esm/editable/editable-popover.d.ts +0 -25
- package/esm/editable/editable.d.ts +0 -187
- package/esm/editable/index.d.ts +0 -147
- package/esm/editable/index.mjs +0 -231
- package/esm/editable/index.mjs.map +0 -1
- package/esm/form/form.d.ts +0 -46
- package/esm/form/form.mjs +0 -77
- package/esm/form/form.mjs.map +0 -1
- package/esm/form/index.d.ts +0 -1
- package/esm/form/index.mjs +0 -6
- package/esm/form/index.mjs.map +0 -1
- package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
- package/esm/form-button-group/form-button-group.d.ts +0 -48
- package/esm/form-button-group/index.d.ts +0 -87
- package/esm/form-button-group/index.mjs +0 -90
- package/esm/form-button-group/index.mjs.map +0 -1
- package/esm/form-button-group/utils.d.ts +0 -1
- package/esm/form-button-group/utils.mjs +0 -12
- package/esm/form-button-group/utils.mjs.map +0 -1
- package/esm/form-collapse/form-collapse.d.ts +0 -18
- package/esm/form-collapse/index.d.ts +0 -45
- package/esm/form-collapse/index.mjs +0 -103
- package/esm/form-collapse/index.mjs.map +0 -1
- package/esm/form-collapse/utils.d.ts +0 -31
- package/esm/form-collapse/utils.mjs +0 -54
- package/esm/form-collapse/utils.mjs.map +0 -1
- package/esm/form-dialog/dialog-content.d.ts +0 -60
- package/esm/form-dialog/index.d.ts +0 -4
- package/esm/form-dialog/index.mjs +0 -209
- package/esm/form-dialog/index.mjs.map +0 -1
- package/esm/form-dialog/types.d.ts +0 -32
- package/esm/form-dialog/types.mjs +0 -2
- package/esm/form-dialog/types.mjs.map +0 -1
- package/esm/form-drawer/drawer-content.d.ts +0 -60
- package/esm/form-drawer/index.d.ts +0 -4
- package/esm/form-drawer/index.mjs +0 -203
- package/esm/form-drawer/index.mjs.map +0 -1
- package/esm/form-drawer/types.d.ts +0 -32
- package/esm/form-drawer/types.mjs +0 -2
- package/esm/form-drawer/types.mjs.map +0 -1
- package/esm/form-grid/form-grid-column.d.ts +0 -29
- package/esm/form-grid/form-grid.d.ts +0 -101
- package/esm/form-grid/hooks.d.ts +0 -4
- package/esm/form-grid/hooks.mjs +0 -7
- package/esm/form-grid/hooks.mjs.map +0 -1
- package/esm/form-grid/index.d.ts +0 -182
- package/esm/form-grid/index.mjs +0 -106
- package/esm/form-grid/index.mjs.map +0 -1
- package/esm/form-item/form-item.d.ts +0 -18
- package/esm/form-item/index.d.ts +0 -70
- package/esm/form-item/index.mjs +0 -346
- package/esm/form-item/index.mjs.map +0 -1
- package/esm/form-item/types.d.ts +0 -25
- package/esm/form-item/types.mjs +0 -2
- package/esm/form-item/types.mjs.map +0 -1
- package/esm/form-item/utils.d.ts +0 -3
- package/esm/form-item/utils.mjs +0 -18
- package/esm/form-item/utils.mjs.map +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -32
- package/esm/form-layout/form-layout.mjs +0 -86
- package/esm/form-layout/form-layout.mjs.map +0 -1
- package/esm/form-layout/index.d.ts +0 -1
- package/esm/form-layout/index.mjs +0 -6
- package/esm/form-layout/index.mjs.map +0 -1
- package/esm/form-layout/types.d.ts +0 -43
- package/esm/form-layout/types.mjs +0 -2
- package/esm/form-layout/types.mjs.map +0 -1
- package/esm/form-layout/utils.d.ts +0 -57
- package/esm/form-layout/utils.mjs +0 -109
- package/esm/form-layout/utils.mjs.map +0 -1
- package/esm/form-step/form-step-pane.d.ts +0 -2
- package/esm/form-step/form-step.d.ts +0 -5
- package/esm/form-step/index.d.ts +0 -24
- package/esm/form-step/index.mjs +0 -96
- package/esm/form-step/index.mjs.map +0 -1
- package/esm/form-step/types.d.ts +0 -21
- package/esm/form-step/types.mjs +0 -2
- package/esm/form-step/types.mjs.map +0 -1
- package/esm/form-step/utils.d.ts +0 -11
- package/esm/form-step/utils.mjs +0 -66
- package/esm/form-step/utils.mjs.map +0 -1
- package/esm/form-tab/form-tab.d.ts +0 -7
- package/esm/form-tab/hooks.d.ts +0 -7
- package/esm/form-tab/hooks.mjs +0 -32
- package/esm/form-tab/hooks.mjs.map +0 -1
- package/esm/form-tab/index.d.ts +0 -28
- package/esm/form-tab/index.mjs +0 -80
- package/esm/form-tab/index.mjs.map +0 -1
- package/esm/form-tab/types.d.ts +0 -12
- package/esm/form-tab/types.mjs +0 -2
- package/esm/form-tab/types.mjs.map +0 -1
- package/esm/form-tab/utils.d.ts +0 -4
- package/esm/form-tab/utils.mjs +0 -14
- package/esm/form-tab/utils.mjs.map +0 -1
- package/esm/index.d.ts +0 -37
- package/esm/index.mjs +0 -81
- package/esm/index.mjs.map +0 -1
- package/esm/input/index.d.ts +0 -84
- package/esm/input/index.mjs +0 -77
- package/esm/input/index.mjs.map +0 -1
- package/esm/input/input.d.ts +0 -32
- package/esm/input-number/index.d.ts +0 -4
- package/esm/input-number/index.mjs +0 -30
- package/esm/input-number/index.mjs.map +0 -1
- package/esm/pagination/components/jumper.d.ts +0 -16
- package/esm/pagination/components/jumper.mjs +0 -12
- package/esm/pagination/components/jumper.mjs.map +0 -1
- package/esm/pagination/components/next.d.ts +0 -42
- package/esm/pagination/components/next.mjs +0 -23
- package/esm/pagination/components/next.mjs.map +0 -1
- package/esm/pagination/components/pager.d.ts +0 -42
- package/esm/pagination/components/pager.mjs +0 -23
- package/esm/pagination/components/pager.mjs.map +0 -1
- package/esm/pagination/components/prev.d.ts +0 -39
- package/esm/pagination/components/prev.mjs +0 -22
- package/esm/pagination/components/prev.mjs.map +0 -1
- package/esm/pagination/components/sizes.d.ts +0 -56
- package/esm/pagination/components/sizes.mjs +0 -7
- package/esm/pagination/components/sizes.mjs.map +0 -1
- package/esm/pagination/components/total.d.ts +0 -8
- package/esm/pagination/components/total.mjs +0 -11
- package/esm/pagination/components/total.mjs.map +0 -1
- package/esm/pagination/pagination.d.ts +0 -128
- package/esm/pagination/pagination.mjs +0 -631
- package/esm/pagination/pagination.mjs.map +0 -1
- package/esm/password/index.d.ts +0 -86
- package/esm/password/index.mjs +0 -14
- package/esm/password/index.mjs.map +0 -1
- package/esm/preview-text/cascader.d.ts +0 -5
- package/esm/preview-text/date-picker.d.ts +0 -5
- package/esm/preview-text/index.d.ts +0 -102
- package/esm/preview-text/index.mjs +0 -321
- package/esm/preview-text/index.mjs.map +0 -1
- package/esm/preview-text/input.d.ts +0 -28
- package/esm/preview-text/preview.d.ts +0 -18
- package/esm/preview-text/select.d.ts +0 -5
- package/esm/preview-text/time-picker.d.ts +0 -5
- package/esm/preview-text/tree.d.ts +0 -22
- package/esm/preview-text/utils.d.ts +0 -14
- package/esm/preview-text/utils.mjs +0 -16
- package/esm/preview-text/utils.mjs.map +0 -1
- package/esm/radio/index.d.ts +0 -634
- package/esm/radio/index.mjs +0 -80
- package/esm/radio/index.mjs.map +0 -1
- package/esm/radio/radio-group.d.ts +0 -44
- package/esm/reset/index.d.ts +0 -63
- package/esm/reset/index.mjs +0 -48
- package/esm/reset/index.mjs.map +0 -1
- package/esm/reset/reset.d.ts +0 -45
- package/esm/select/index.d.ts +0 -142
- package/esm/select/index.mjs +0 -132
- package/esm/select/index.mjs.map +0 -1
- package/esm/select/select.d.ts +0 -50
- package/esm/select-table/index.mjs +0 -204
- package/esm/select-table/index.mjs.map +0 -1
- package/esm/select-table/types.d.ts +0 -14
- package/esm/select-table/types.mjs +0 -2
- package/esm/select-table/types.mjs.map +0 -1
- package/esm/space/index.d.ts +0 -1
- package/esm/space/index.mjs +0 -6
- package/esm/space/index.mjs.map +0 -1
- package/esm/styles/array-base/index.css +0 -1
- package/esm/styles/array-cards/index.css +0 -1
- package/esm/styles/array-collapse/index.css +0 -1
- package/esm/styles/array-items/index.css +0 -1
- package/esm/styles/array-list-tabs/index.css +0 -1
- package/esm/styles/array-table/index.css +0 -1
- package/esm/styles/array-tabs/index.css +0 -1
- package/esm/styles/editable/index.css +0 -1
- package/esm/styles/form-button-group/index.css +0 -1
- package/esm/styles/form-collapse/index.css +0 -1
- package/esm/styles/form-grid/index.css +0 -1
- package/esm/styles/form-item/index.css +0 -1
- package/esm/styles/form-tab/index.css +0 -1
- package/esm/styles/preview-text/index.css +0 -1
- package/esm/styles/radio/index.css +0 -1
- package/esm/styles/select-table/index.css +0 -1
- package/esm/submit/index.d.ts +0 -48
- package/esm/submit/index.mjs +0 -47
- package/esm/submit/index.mjs.map +0 -1
- package/esm/submit/submit.d.ts +0 -36
- package/esm/switch/index.d.ts +0 -4
- package/esm/switch/index.mjs +0 -19
- package/esm/switch/index.mjs.map +0 -1
- package/esm/time-picker/index.d.ts +0 -4
- package/esm/time-picker/index.mjs +0 -21
- package/esm/time-picker/index.mjs.map +0 -1
- package/esm/time-select/index.d.ts +0 -2
- package/esm/time-select/index.mjs +0 -21
- package/esm/time-select/index.mjs.map +0 -1
- package/esm/transfer/index.d.ts +0 -1509
- package/esm/transfer/index.mjs +0 -11
- package/esm/transfer/index.mjs.map +0 -1
- package/esm/tree/index.d.ts +0 -42
- package/esm/tree/index.mjs +0 -105
- package/esm/tree/index.mjs.map +0 -1
- package/esm/tree/tree.d.ts +0 -20
- package/esm/tree/types.d.ts +0 -13
- package/esm/tree/types.mjs +0 -2
- package/esm/tree/types.mjs.map +0 -1
- package/esm/tree/utils.d.ts +0 -45
- package/esm/tree/utils.mjs +0 -161
- package/esm/tree/utils.mjs.map +0 -1
- package/esm/tree-select/index.d.ts +0 -32
- package/esm/tree-select/index.mjs +0 -51
- package/esm/tree-select/index.mjs.map +0 -1
- package/esm/tree-select/tree-select.d.ts +0 -17
- package/esm/upload/index.d.ts +0 -889
- package/esm/upload/index.mjs +0 -185
- package/esm/upload/index.mjs.map +0 -1
- package/esm/upload/upload.d.ts +0 -1613
- package/esm/vendor/icon.mjs +0 -11
- package/esm/vendor/icon.mjs.map +0 -1
- package/esm/vendor/lodash.mjs +0 -1400
- package/esm/vendor/lodash.mjs.map +0 -1
- package/esm/vendor/runtime.mjs +0 -29
- package/esm/vendor/runtime.mjs.map +0 -1
- package/esm/vendor/shared.esm-bundler.mjs +0 -14
- package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
- package/esm/vendor/sizes.mjs +0 -27
- package/esm/vendor/sizes.mjs.map +0 -1
- package/esm/vendor/types.mjs +0 -19
- package/esm/vendor/types.mjs.map +0 -1
package/esm/radio/index.mjs
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { connect as T, mapProps as B } from "@formily/vue";
|
|
2
|
-
import { ElRadioButton as G, ElRadio as b, ElRadioGroup as O, version as x } from "element-plus";
|
|
3
|
-
import { defineComponent as C, computed as s, useSlots as L, createBlock as u, openBlock as a, unref as d, withCtx as l, createElementBlock as f, Fragment as c, renderList as v, resolveDynamicComponent as y, mergeProps as _, createTextVNode as h, toDisplayString as j, renderSlot as w } from "vue";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import { mapReadPretty as A } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
-
import { composeExport as D } from "../__builtins__/shared/utils.mjs";
|
|
7
|
-
import { PreviewText as F } from "../preview-text/index.mjs";
|
|
8
|
-
import { isPlainObj as N } from "@formily/shared";
|
|
9
|
-
import { lt as V } from "../__builtins__/shared/simple-version-compare.mjs";
|
|
10
|
-
import "@formily/core";
|
|
11
|
-
import "@formily/reactive-vue";
|
|
12
|
-
import '../styles/radio/index.css';const H = /* @__PURE__ */ C({
|
|
13
|
-
name: "FRadioGroup",
|
|
14
|
-
__name: "radio-group",
|
|
15
|
-
props: {
|
|
16
|
-
value: {
|
|
17
|
-
default: void 0
|
|
18
|
-
},
|
|
19
|
-
options: {
|
|
20
|
-
type: Array,
|
|
21
|
-
default: () => []
|
|
22
|
-
},
|
|
23
|
-
optionType: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "default"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
emits: ["change"],
|
|
29
|
-
setup(S, { emit: g }) {
|
|
30
|
-
const o = S, R = g, p = s(() => o.optionType === "button" ? G : b), k = V(x, "2.6.0");
|
|
31
|
-
function i(e) {
|
|
32
|
-
return N(e);
|
|
33
|
-
}
|
|
34
|
-
function P(e, r) {
|
|
35
|
-
return i(o.options[r]) ? o.options[r].label : e.label;
|
|
36
|
-
}
|
|
37
|
-
const m = s(() => o.options.map((e) => {
|
|
38
|
-
if (!i(e))
|
|
39
|
-
return {
|
|
40
|
-
label: e,
|
|
41
|
-
value: e
|
|
42
|
-
};
|
|
43
|
-
/* istanbul ignore if -- @preserve */
|
|
44
|
-
return k ? {
|
|
45
|
-
...e,
|
|
46
|
-
label: e.value
|
|
47
|
-
} : e;
|
|
48
|
-
})), E = L();
|
|
49
|
-
return (e, r) => (a(), u(d(O), {
|
|
50
|
-
"model-value": o.value,
|
|
51
|
-
"onUpdate:modelValue": r[0] || (r[0] = (t) => R("change", t))
|
|
52
|
-
}, {
|
|
53
|
-
default: l(() => [
|
|
54
|
-
d(E).option ? (a(!0), f(c, { key: 1 }, v(m.value, (t, n) => (a(), u(y(p.value), _({ key: n }, { ref_for: !0 }, t), {
|
|
55
|
-
default: l(() => [
|
|
56
|
-
w(e.$slots, "option", { option: t })
|
|
57
|
-
]),
|
|
58
|
-
_: 2
|
|
59
|
-
}, 1040))), 128)) : (a(!0), f(c, { key: 0 }, v(m.value, (t, n) => (a(), u(y(p.value), _({ key: n }, { ref_for: !0 }, t), {
|
|
60
|
-
default: l(() => [
|
|
61
|
-
h(j(P(t, n)), 1)
|
|
62
|
-
]),
|
|
63
|
-
_: 2
|
|
64
|
-
}, 1040))), 128))
|
|
65
|
-
]),
|
|
66
|
-
_: 3
|
|
67
|
-
}, 8, ["model-value"]));
|
|
68
|
-
}
|
|
69
|
-
}), I = T(
|
|
70
|
-
H,
|
|
71
|
-
B({ dataSource: "options", disabled: !0 }),
|
|
72
|
-
A(F.Select)
|
|
73
|
-
), Z = D(b, {
|
|
74
|
-
Group: I
|
|
75
|
-
});
|
|
76
|
-
export {
|
|
77
|
-
Z as Radio,
|
|
78
|
-
Z as default
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=index.mjs.map
|
package/esm/radio/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n})\n\nconst props = defineProps({\n value: {\n default: undefined,\n },\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst emits = defineEmits(['change'])\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(props.options[index])) {\n return props.options[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return props.options.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup :model-value=\"props.value\" @update:model-value=\"(value) => emits('change', value)\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n","import { connect, mapProps } from '@formily/vue'\nimport { ElRadio } from 'element-plus'\nimport { composeExport, mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FRadioGroup from './radio-group.vue'\nimport './style.scss'\n\nconst RadioGroup = connect(\n FRadioGroup,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\nexport const Radio = composeExport(ElRadio, {\n Group: RadioGroup,\n})\n\nexport default Radio\n"],"names":["props","__props","emits","__emit","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_createBlock","_unref","ElRadioGroup","_cache","value","_openBlock","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAcRC,IAAQC,GACRC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;2BAIZC,EAWeC,EAAAC,CAAA,GAAA;AAAA,MAXA,eAAarB,EAAM;AAAA,MAAQ,uBAAkBsB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAGC,MAAUrB,YAAgBqB,CAAK;AAAA,IAAA;iBAC5F,MAIW;AAAA,QAJMH,EAAAH,CAAA,EAAM,UAMrBO,EAAA,EAAA,GAAAC,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CX,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CI,EAEYS,EAFIxB,OAAU,GAA1ByB,EAEY,EAF6D,KAAKd,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCkB,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAnB,GAAc;AAAA,UAAA;;6BANrCY,EAAA,EAAA,GAAAC,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CX,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CI,EAEYS,EAFIxB,OAAU,GAA1ByB,EAEY,EAF6D,KAAKd,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC9DjCiB,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,IAAQC,EAAchC,GAAS;AAAA,EAC1C,OAAOyB;AACT,CAAC;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { RadioProps } from 'element-plus';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
declare function __VLS_template(): any;
|
|
4
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
5
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
|
-
value: {
|
|
7
|
-
default: any;
|
|
8
|
-
};
|
|
9
|
-
options: {
|
|
10
|
-
type: PropType<Array<RadioProps | string | number>>;
|
|
11
|
-
default: () => any[];
|
|
12
|
-
};
|
|
13
|
-
optionType: {
|
|
14
|
-
type: PropType<"default" | "button">;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
-
change: (...args: any[]) => void;
|
|
19
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
-
value: {
|
|
21
|
-
default: any;
|
|
22
|
-
};
|
|
23
|
-
options: {
|
|
24
|
-
type: PropType<Array<RadioProps | string | number>>;
|
|
25
|
-
default: () => any[];
|
|
26
|
-
};
|
|
27
|
-
optionType: {
|
|
28
|
-
type: PropType<"default" | "button">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
}>> & Readonly<{
|
|
32
|
-
onChange?: (...args: any[]) => any;
|
|
33
|
-
}>, {
|
|
34
|
-
value: any;
|
|
35
|
-
options: (string | number | RadioProps)[];
|
|
36
|
-
optionType: "button" | "default";
|
|
37
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
|
-
export default _default;
|
|
40
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
-
new (): {
|
|
42
|
-
$slots: S;
|
|
43
|
-
};
|
|
44
|
-
};
|
package/esm/reset/index.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
export declare const Reset: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
-
onClick: import('vue').PropType<(e: MouseEvent) => void | boolean>;
|
|
4
|
-
forceClear: {
|
|
5
|
-
type: BooleanConstructor;
|
|
6
|
-
default: boolean;
|
|
7
|
-
};
|
|
8
|
-
validate: {
|
|
9
|
-
type: BooleanConstructor;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
onResetValidateSuccess: import('vue').PropType<(payload: any) => void>;
|
|
13
|
-
onResetValidateFailed: import('vue').PropType<(error: any) => void>;
|
|
14
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
15
|
-
validate: boolean;
|
|
16
|
-
forceClear: boolean;
|
|
17
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
18
|
-
P: {};
|
|
19
|
-
B: {};
|
|
20
|
-
D: {};
|
|
21
|
-
C: {};
|
|
22
|
-
M: {};
|
|
23
|
-
Defaults: {};
|
|
24
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
25
|
-
onClick: import('vue').PropType<(e: MouseEvent) => void | boolean>;
|
|
26
|
-
forceClear: {
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
validate: {
|
|
31
|
-
type: BooleanConstructor;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
onResetValidateSuccess: import('vue').PropType<(payload: any) => void>;
|
|
35
|
-
onResetValidateFailed: import('vue').PropType<(error: any) => void>;
|
|
36
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
37
|
-
validate: boolean;
|
|
38
|
-
forceClear: boolean;
|
|
39
|
-
}>;
|
|
40
|
-
__isFragment?: never;
|
|
41
|
-
__isTeleport?: never;
|
|
42
|
-
__isSuspense?: never;
|
|
43
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
44
|
-
onClick: import('vue').PropType<(e: MouseEvent) => void | boolean>;
|
|
45
|
-
forceClear: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
48
|
-
};
|
|
49
|
-
validate: {
|
|
50
|
-
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
52
|
-
};
|
|
53
|
-
onResetValidateSuccess: import('vue').PropType<(payload: any) => void>;
|
|
54
|
-
onResetValidateFailed: import('vue').PropType<(error: any) => void>;
|
|
55
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
56
|
-
validate: boolean;
|
|
57
|
-
forceClear: boolean;
|
|
58
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
59
|
-
$slots: {
|
|
60
|
-
default?(_: {}): any;
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
export default Reset;
|
package/esm/reset/index.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { observer as i } from "@formily/reactive-vue";
|
|
2
|
-
import { defineComponent as u, createBlock as d, openBlock as f, unref as m, mergeProps as C, withCtx as k, renderSlot as p } from "vue";
|
|
3
|
-
import { useParentForm as F } from "@formily/vue";
|
|
4
|
-
import { ElButton as h } from "element-plus";
|
|
5
|
-
const v = /* @__PURE__ */ u({
|
|
6
|
-
name: "FReset",
|
|
7
|
-
inheritAttrs: !1,
|
|
8
|
-
__name: "reset",
|
|
9
|
-
props: {
|
|
10
|
-
onClick: Function,
|
|
11
|
-
forceClear: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: !1
|
|
14
|
-
},
|
|
15
|
-
validate: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: !1
|
|
18
|
-
},
|
|
19
|
-
onResetValidateSuccess: Function,
|
|
20
|
-
onResetValidateFailed: Function
|
|
21
|
-
},
|
|
22
|
-
setup(r) {
|
|
23
|
-
const e = r, n = F();
|
|
24
|
-
function s(a) {
|
|
25
|
-
var o;
|
|
26
|
-
if (e.onClick && ((o = e.onClick) == null ? void 0 : o.call(e, a)) === !1)
|
|
27
|
-
return;
|
|
28
|
-
const t = n == null ? void 0 : n.value;
|
|
29
|
-
t == null || t.reset("*", {
|
|
30
|
-
forceClear: e.forceClear
|
|
31
|
-
}), e.validate && (t == null || t.validate().then(e.onResetValidateSuccess).catch((c) => {
|
|
32
|
-
var l;
|
|
33
|
-
return (l = e.onResetValidateFailed) == null ? void 0 : l.call(e, c);
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
return (a, t) => (f(), d(m(h), C(a.$attrs, { onClick: s }), {
|
|
37
|
-
default: k(() => [
|
|
38
|
-
p(a.$slots, "default")
|
|
39
|
-
]),
|
|
40
|
-
_: 3
|
|
41
|
-
}, 16));
|
|
42
|
-
}
|
|
43
|
-
}), S = i(v);
|
|
44
|
-
export {
|
|
45
|
-
S as Reset,
|
|
46
|
-
S as default
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=index.mjs.map
|
package/esm/reset/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FReset',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\n forceClear: {\n type: Boolean,\n default: false,\n },\n validate: {\n type: Boolean,\n default: false,\n },\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\n onResetValidateFailed: Function as PropType<(error: any) => void>,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick && (props.onClick)?.(e) === false)\n return\n\n const form = formRef?.value\n form?.reset('*', {\n forceClear: props.forceClear,\n })\n props.validate && form?.validate()\n .then(props.onResetValidateSuccess)\n .catch(error => props.onResetValidateFailed?.(error))\n}\n</script>\n\n<template>\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\n <slot />\n </ElButton>\n</template>\n","import { observer } from '@formily/reactive-vue'\nimport FReset from './reset.vue'\n\nexport const Reset = observer(FReset)\n\nexport default Reset\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_a","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;;AAClC,UAAIL,EAAM,aAAYM,IAAAN,EAAM,YAAN,gBAAAM,EAAA,KAAAN,GAAiBK,QAAO;AAC5C;AAEF,YAAME,IAAOL,KAAA,gBAAAA,EAAS;AACtB,MAAAK,KAAA,QAAAA,EAAM,MAAM,KAAK;AAAA,QACf,YAAYP,EAAM;AAAA,MAAA,IAEpBA,EAAM,aAAYO,KAAA,QAAAA,EAAM,WACrB,KAAKP,EAAM,wBACX,MAAM,CAAAQ,MAAA;;AAAS,gBAAAF,IAAAN,EAAM,0BAAN,gBAAAM,EAAA,KAAAN,GAA8BQ;AAAA;AAAA,IAClD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOT,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARU,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
|
package/esm/reset/reset.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {};
|
|
8
|
-
rootEl: any;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
-
onClick: PropType<(e: MouseEvent) => void | boolean>;
|
|
13
|
-
forceClear: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
validate: {
|
|
18
|
-
type: BooleanConstructor;
|
|
19
|
-
default: boolean;
|
|
20
|
-
};
|
|
21
|
-
onResetValidateSuccess: PropType<(payload: any) => void>;
|
|
22
|
-
onResetValidateFailed: PropType<(error: any) => void>;
|
|
23
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
24
|
-
onClick: PropType<(e: MouseEvent) => void | boolean>;
|
|
25
|
-
forceClear: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
validate: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
default: boolean;
|
|
32
|
-
};
|
|
33
|
-
onResetValidateSuccess: PropType<(payload: any) => void>;
|
|
34
|
-
onResetValidateFailed: PropType<(error: any) => void>;
|
|
35
|
-
}>> & Readonly<{}>, {
|
|
36
|
-
validate: boolean;
|
|
37
|
-
forceClear: boolean;
|
|
38
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
39
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
|
-
export default _default;
|
|
41
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
-
new (): {
|
|
43
|
-
$slots: S;
|
|
44
|
-
};
|
|
45
|
-
};
|
package/esm/select/index.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
export declare const Select: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
|
-
value?: any;
|
|
4
|
-
options?: Array<(Partial<{
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
created: boolean;
|
|
7
|
-
}> & Omit<{
|
|
8
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
9
|
-
readonly disabled: boolean;
|
|
10
|
-
readonly created: boolean;
|
|
11
|
-
readonly label?: string | number;
|
|
12
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">) | (Partial<{
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
}> & Omit<{
|
|
15
|
-
readonly disabled: boolean;
|
|
16
|
-
readonly label?: string;
|
|
17
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled"> & {
|
|
18
|
-
options: (Partial<{
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
created: boolean;
|
|
21
|
-
}> & Omit<{
|
|
22
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
23
|
-
readonly disabled: boolean;
|
|
24
|
-
readonly created: boolean;
|
|
25
|
-
readonly label?: string | number;
|
|
26
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">)[];
|
|
27
|
-
})>;
|
|
28
|
-
}> & Readonly<{
|
|
29
|
-
onChange?: (value: any) => any;
|
|
30
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
31
|
-
change: (value: any) => any;
|
|
32
|
-
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
33
|
-
P: {};
|
|
34
|
-
B: {};
|
|
35
|
-
D: {};
|
|
36
|
-
C: {};
|
|
37
|
-
M: {};
|
|
38
|
-
Defaults: {};
|
|
39
|
-
}, Readonly<{
|
|
40
|
-
value?: any;
|
|
41
|
-
options?: Array<(Partial<{
|
|
42
|
-
disabled: boolean;
|
|
43
|
-
created: boolean;
|
|
44
|
-
}> & Omit<{
|
|
45
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
46
|
-
readonly disabled: boolean;
|
|
47
|
-
readonly created: boolean;
|
|
48
|
-
readonly label?: string | number;
|
|
49
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">) | (Partial<{
|
|
50
|
-
disabled: boolean;
|
|
51
|
-
}> & Omit<{
|
|
52
|
-
readonly disabled: boolean;
|
|
53
|
-
readonly label?: string;
|
|
54
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled"> & {
|
|
55
|
-
options: (Partial<{
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
created: boolean;
|
|
58
|
-
}> & Omit<{
|
|
59
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
60
|
-
readonly disabled: boolean;
|
|
61
|
-
readonly created: boolean;
|
|
62
|
-
readonly label?: string | number;
|
|
63
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">)[];
|
|
64
|
-
})>;
|
|
65
|
-
}> & Readonly<{
|
|
66
|
-
onChange?: (value: any) => any;
|
|
67
|
-
}>, {}, {}, {}, {}, {}>;
|
|
68
|
-
__isFragment?: never;
|
|
69
|
-
__isTeleport?: never;
|
|
70
|
-
__isSuspense?: never;
|
|
71
|
-
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
72
|
-
value?: any;
|
|
73
|
-
options?: Array<(Partial<{
|
|
74
|
-
disabled: boolean;
|
|
75
|
-
created: boolean;
|
|
76
|
-
}> & Omit<{
|
|
77
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
78
|
-
readonly disabled: boolean;
|
|
79
|
-
readonly created: boolean;
|
|
80
|
-
readonly label?: string | number;
|
|
81
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">) | (Partial<{
|
|
82
|
-
disabled: boolean;
|
|
83
|
-
}> & Omit<{
|
|
84
|
-
readonly disabled: boolean;
|
|
85
|
-
readonly label?: string;
|
|
86
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled"> & {
|
|
87
|
-
options: (Partial<{
|
|
88
|
-
disabled: boolean;
|
|
89
|
-
created: boolean;
|
|
90
|
-
}> & Omit<{
|
|
91
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
92
|
-
readonly disabled: boolean;
|
|
93
|
-
readonly created: boolean;
|
|
94
|
-
readonly label?: string | number;
|
|
95
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">)[];
|
|
96
|
-
})>;
|
|
97
|
-
}> & Readonly<{
|
|
98
|
-
onChange?: (value: any) => any;
|
|
99
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
100
|
-
change: (value: any) => any;
|
|
101
|
-
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
102
|
-
$slots: Readonly<{
|
|
103
|
-
option?: (props: {
|
|
104
|
-
option: Partial<{
|
|
105
|
-
disabled: boolean;
|
|
106
|
-
created: boolean;
|
|
107
|
-
}> & Omit<{
|
|
108
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
109
|
-
readonly disabled: boolean;
|
|
110
|
-
readonly created: boolean;
|
|
111
|
-
readonly label?: string | number;
|
|
112
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">;
|
|
113
|
-
}) => any;
|
|
114
|
-
header?: () => any;
|
|
115
|
-
footer?: () => any;
|
|
116
|
-
prefix?: () => any;
|
|
117
|
-
empty?: () => any;
|
|
118
|
-
tag?: () => any;
|
|
119
|
-
loading?: () => any;
|
|
120
|
-
label?: () => any;
|
|
121
|
-
}> & {
|
|
122
|
-
option?: (props: {
|
|
123
|
-
option: Partial<{
|
|
124
|
-
disabled: boolean;
|
|
125
|
-
created: boolean;
|
|
126
|
-
}> & Omit<{
|
|
127
|
-
readonly value: string | number | boolean | Record<string, any>;
|
|
128
|
-
readonly disabled: boolean;
|
|
129
|
-
readonly created: boolean;
|
|
130
|
-
readonly label?: string | number;
|
|
131
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "disabled" | "created">;
|
|
132
|
-
}) => any;
|
|
133
|
-
header?: () => any;
|
|
134
|
-
footer?: () => any;
|
|
135
|
-
prefix?: () => any;
|
|
136
|
-
empty?: () => any;
|
|
137
|
-
tag?: () => any;
|
|
138
|
-
loading?: () => any;
|
|
139
|
-
label?: () => any;
|
|
140
|
-
};
|
|
141
|
-
});
|
|
142
|
-
export default Select;
|
package/esm/select/index.mjs
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { useField as P, connect as C, mapProps as E } from "@formily/vue";
|
|
2
|
-
import { defineComponent as K, useSlots as B, createBlock as m, openBlock as a, unref as e, mergeProps as u, createSlots as F, withCtx as l, createElementBlock as p, Fragment as d, renderList as c, renderSlot as n, createCommentVNode as k } from "vue";
|
|
3
|
-
import { ElSelect as w, ElOptionGroup as A, ElOption as g } from "element-plus";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import { mapReadPretty as G } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
-
import { PreviewText as O } from "../preview-text/index.mjs";
|
|
7
|
-
import "@formily/core";
|
|
8
|
-
import "@formily/reactive-vue";
|
|
9
|
-
import { useCleanAttrs as R } from "../__builtins__/shared/utils.mjs";
|
|
10
|
-
import { o as V } from "../vendor/lodash.mjs";
|
|
11
|
-
const _ = /* @__PURE__ */ K({
|
|
12
|
-
name: "FSelect",
|
|
13
|
-
inheritAttrs: !1,
|
|
14
|
-
__name: "select",
|
|
15
|
-
props: {
|
|
16
|
-
value: null,
|
|
17
|
-
options: null
|
|
18
|
-
},
|
|
19
|
-
emits: ["change"],
|
|
20
|
-
setup($, { emit: S }) {
|
|
21
|
-
const y = $, b = S, r = B(), { props: i } = R(), f = P();
|
|
22
|
-
function h(t) {
|
|
23
|
-
return t.options !== void 0;
|
|
24
|
-
}
|
|
25
|
-
return (t, v) => (a(), m(e(w), u(e(i), {
|
|
26
|
-
"model-value": y.value,
|
|
27
|
-
"onUpdate:modelValue": v[0] || (v[0] = (o) => b("change", o))
|
|
28
|
-
}), F({
|
|
29
|
-
default: l(() => [
|
|
30
|
-
(a(!0), p(d, null, c(y.options, (o) => (a(), p(d, null, [
|
|
31
|
-
h(o) ? (a(), m(e(A), u({
|
|
32
|
-
key: 0,
|
|
33
|
-
ref_for: !0
|
|
34
|
-
}, e(V)(o, "options"), {
|
|
35
|
-
key: o.label
|
|
36
|
-
}), {
|
|
37
|
-
default: l(() => [
|
|
38
|
-
(a(!0), p(d, null, c(o.options, (s) => (a(), m(e(g), u({
|
|
39
|
-
key: e(i).valueKey ? s[e(i).valueKey] : s.label
|
|
40
|
-
}, { ref_for: !0 }, s), {
|
|
41
|
-
default: l(() => [
|
|
42
|
-
r.option ? n(t.$slots, "option", {
|
|
43
|
-
key: 0,
|
|
44
|
-
option: s
|
|
45
|
-
}) : k("", !0)
|
|
46
|
-
]),
|
|
47
|
-
_: 2
|
|
48
|
-
}, 1040))), 128))
|
|
49
|
-
]),
|
|
50
|
-
_: 2
|
|
51
|
-
}, 1040)) : (a(), m(e(g), u({
|
|
52
|
-
key: 1,
|
|
53
|
-
ref_for: !0
|
|
54
|
-
}, o, {
|
|
55
|
-
key: e(i).valueKey ? o[e(i).valueKey] : o.label
|
|
56
|
-
}), {
|
|
57
|
-
default: l(() => [
|
|
58
|
-
r.option ? n(t.$slots, "option", {
|
|
59
|
-
key: 0,
|
|
60
|
-
option: o
|
|
61
|
-
}) : k("", !0)
|
|
62
|
-
]),
|
|
63
|
-
_: 2
|
|
64
|
-
}, 1040))
|
|
65
|
-
], 64))), 256))
|
|
66
|
-
]),
|
|
67
|
-
_: 2
|
|
68
|
-
}, [
|
|
69
|
-
r.header ? {
|
|
70
|
-
name: "header",
|
|
71
|
-
fn: l(() => [
|
|
72
|
-
n(t.$slots, "header", { field: e(f) })
|
|
73
|
-
]),
|
|
74
|
-
key: "0"
|
|
75
|
-
} : void 0,
|
|
76
|
-
r.footer ? {
|
|
77
|
-
name: "footer",
|
|
78
|
-
fn: l(() => [
|
|
79
|
-
n(t.$slots, "footer", { field: e(f) })
|
|
80
|
-
]),
|
|
81
|
-
key: "1"
|
|
82
|
-
} : void 0,
|
|
83
|
-
r.prefix ? {
|
|
84
|
-
name: "prefix",
|
|
85
|
-
fn: l(() => [
|
|
86
|
-
n(t.$slots, "prefix")
|
|
87
|
-
]),
|
|
88
|
-
key: "2"
|
|
89
|
-
} : void 0,
|
|
90
|
-
r.empty ? {
|
|
91
|
-
name: "empty",
|
|
92
|
-
fn: l(() => [
|
|
93
|
-
n(t.$slots, "empty")
|
|
94
|
-
]),
|
|
95
|
-
key: "3"
|
|
96
|
-
} : void 0,
|
|
97
|
-
r.tag ? {
|
|
98
|
-
name: "tag",
|
|
99
|
-
fn: l(() => [
|
|
100
|
-
n(t.$slots, "tag", { field: e(f) })
|
|
101
|
-
]),
|
|
102
|
-
key: "4"
|
|
103
|
-
} : void 0,
|
|
104
|
-
r.loading ? {
|
|
105
|
-
name: "loading",
|
|
106
|
-
fn: l(() => [
|
|
107
|
-
n(t.$slots, "loading")
|
|
108
|
-
]),
|
|
109
|
-
key: "5"
|
|
110
|
-
} : void 0,
|
|
111
|
-
r.label ? {
|
|
112
|
-
name: "label",
|
|
113
|
-
fn: l(({ label: o, value: s }) => [
|
|
114
|
-
n(t.$slots, "label", {
|
|
115
|
-
label: o,
|
|
116
|
-
value: s
|
|
117
|
-
})
|
|
118
|
-
]),
|
|
119
|
-
key: "6"
|
|
120
|
-
} : void 0
|
|
121
|
-
]), 1040, ["model-value"]));
|
|
122
|
-
}
|
|
123
|
-
}), J = C(
|
|
124
|
-
_,
|
|
125
|
-
E({ dataSource: "options", loading: !0, disabled: !0 }),
|
|
126
|
-
G(O.Select)
|
|
127
|
-
);
|
|
128
|
-
export {
|
|
129
|
-
J as Select,
|
|
130
|
-
J as default
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=index.mjs.map
|
package/esm/select/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/select/select.vue","../../src/select/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useField } from '@formily/vue'\nimport { ElOption, ElOptionGroup, ElSelect } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelect',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n value: null,\n options: null\n})\n\nconst emit = defineEmits([\"change\"])\n\nconst slots = defineSlots<{\n option?: (props: { option: OptionType }) => any\n header?: () => any\n footer?: () => any\n prefix?: () => any\n empty?: () => any\n tag?: () => any\n loading?: () => any\n label?: () => any\n}>()\n\ntype OptionType = InstanceType<typeof ElOption>['$props']\ntype OptionGroupType = InstanceType<typeof ElOptionGroup>['$props'] & {\n options: OptionType[]\n}\n\nconst { props: selectProps } = useCleanAttrs()\n\nconst fieldRef = useField()\n\nfunction isGroup(option: OptionType | OptionGroupType): option is OptionGroupType {\n return (option as OptionGroupType).options !== undefined\n}\n</script>\n\n<template>\n <ElSelect v-bind=\"selectProps\" :model-value=\"props.value\" @update:model-value=\"(val) => emit('change', val)\">\n <template v-for=\"option of props.options\">\n <template v-if=\"isGroup(option)\">\n <ElOptionGroup v-bind=\"omit(option, 'options')\" :key=\"option.label\">\n <ElOption v-for=\"i of option.options\" :key=\"selectProps.valueKey ? i[selectProps.valueKey] : i.label\" v-bind=\"i\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"i\" />\n </ElOption>\n </ElOptionGroup>\n </template>\n <ElOption v-else v-bind=\"option\" :key=\"selectProps.valueKey ? option[selectProps.valueKey] : option.label\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"option\" />\n </ElOption>\n </template>\n <template v-if=\"slots.header\" #header>\n <slot name=\"header\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"slots.empty\" #empty>\n <slot name=\"empty\" />\n </template>\n <template v-if=\"slots.tag\" #tag>\n <slot name=\"tag\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.loading\" #loading>\n <slot name=\"loading\" />\n </template>\n <template v-if=\"slots.label\" #label=\"{ label, value: labelValue }\">\n <slot name=\"label\" :label=\"label\" :value=\"labelValue\" />\n </template>\n </ElSelect>\n</template>\n","import { connect, mapProps } from '@formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSelect from './select.vue'\n\nexport const Select = connect(\n FSelect,\n mapProps({ dataSource: 'options', loading: true, disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Select\n"],"names":["props","__props","emit","__emit","slots","_useSlots","selectProps","useCleanAttrs","fieldRef","useField","isGroup","option","_createBlock","_unref","ElSelect","_mergeProps","_cache","val","_openBlock","_createElementBlock","_Fragment","_renderList","omit","i","_renderSlot","_ctx","label","labelValue","Select","connect","FSelect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GAKRC,IAAOC,GAEPC,IAAQC,EAAA,GAgBR,EAAE,OAAOC,EAAA,IAAgBC,EAAA,GAEzBC,IAAWC,EAAA;AAEjB,aAASC,EAAQC,GAAiE;AAChF,aAAQA,EAA2B,YAAY;AAAA,IACjD;2BAIEC,EAkCWC,EAAAC,CAAA,GAlCXC,EAkCWF,EAAAP,CAAA,GAlCkB;AAAA,MAAG,eAAaN,EAAM;AAAA,MAAQ,uBAAkBgB,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAGC,MAAQf,YAAee,CAAG;AAAA,IAAA;iBAC9F,MAA+B;AAAA,SAAzCC,EAAA,EAAA,GAAAC,EAWWC,GAAA,MAAAC,EAXgBrB,EAAM,UAAhBW;UACCD,EAAQC,CAAM,KAC5BO,EAAA,GAAAN,EAIgBC,MAJhBE,EAIgB;AAAA;;aAJOF,EAAAS,CAAA,EAAKX,GAAM,SAAA,GAAA;AAAA,YAAe,KAAKA,EAAO;AAAA,UAAA;uBACjD,MAA2B;AAAA,eAArCO,EAAA,EAAA,GAAAC,EAEWC,GAAA,MAAAC,EAFWV,EAAO,UAAZY,OAAjBL,KAAAN,EAEWC,MAFXE,EAEW;AAAA,gBAF4B,KAAKF,EAAAP,CAAA,EAAY,WAAWiB,EAAEV,EAAAP,CAAA,EAAY,QAAQ,IAAIiB,EAAE;AAAA,cAAA,oBAAeA,CAAC,GAAA;AAAA,2BAE/C,MACtE;AAAA,kBAFoBnB,EAAM,SAAlBoB,EAAsDC,EAAA,QAAA,UAAA;AAAA;oBAAb,QAAQF;AAAA,kBAAA;;;;;;uBAIvDL,EAAA,GAAAN,EAEWC,MAFXE,EAEW;AAAA;;aAFcJ,GAAM;AAAA,YAAG,KAAKE,EAAAP,CAAA,EAAY,WAAWK,EAAOE,EAAAP,CAAA,EAAY,QAAQ,IAAIK,EAAO;AAAA,UAAA;uBAE9C,MACvD;AAAA,cAFeP,EAAM,SAAlBoB,EAA2DC,EAAA,QAAA,UAAA;AAAA;gBAAlB,QAAAd;AAAA,cAAA;;;;;;;;MAG7BP,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCoB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOZ,EAAAL,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCoB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOZ,EAAAL,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBoB,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERrB,EAAM;cAAQ;AAAA,cAC5B,MAAqB;AAAA,UAArBoB,EAAqBC,EAAA,QAAA,OAAA;AAAA,QAAA;;;MAEPrB,EAAM;cAAM;AAAA,cAC1B,MAAqC;AAAA,UAArCoB,EAAqCC,EAAA,QAAA,OAAA,EAAnB,OAAOZ,EAAAL,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEnBJ,EAAM;cAAU;AAAA,cAC9B,MAAuB;AAAA,UAAvBoB,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;MAETrB,EAAM;cAAQ;AAAA,cAC5B,CAAwD,EADnB,OAAAsB,GAAK,OAASC,QAAU;AAAA,UAC7DH,EAAwDC,EAAA,QAAA,SAAA;AAAA,YAApC,OAAAC;AAAA,YAAe,OAAOC;AAAA,UAAA;;;;;;ICvEnCC,IAASC;AAAA,EACpBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,SAAS,IAAM,UAAU,IAAM;AAAA,EACjEC,EAAcC,EAAY,MAAM;AAClC;"}
|
package/esm/select/select.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ElOption, ElOptionGroup } from 'element-plus';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
value?: any;
|
|
4
|
-
options?: Array<OptionType | OptionGroupType>;
|
|
5
|
-
};
|
|
6
|
-
type OptionType = InstanceType<typeof ElOption>['$props'];
|
|
7
|
-
type OptionGroupType = InstanceType<typeof ElOptionGroup>['$props'] & {
|
|
8
|
-
options: OptionType[];
|
|
9
|
-
};
|
|
10
|
-
declare function __VLS_template(): {
|
|
11
|
-
attrs: Partial<{}>;
|
|
12
|
-
slots: Readonly<{
|
|
13
|
-
option?: (props: {
|
|
14
|
-
option: OptionType;
|
|
15
|
-
}) => any;
|
|
16
|
-
header?: () => any;
|
|
17
|
-
footer?: () => any;
|
|
18
|
-
prefix?: () => any;
|
|
19
|
-
empty?: () => any;
|
|
20
|
-
tag?: () => any;
|
|
21
|
-
loading?: () => any;
|
|
22
|
-
label?: () => any;
|
|
23
|
-
}> & {
|
|
24
|
-
option?: (props: {
|
|
25
|
-
option: OptionType;
|
|
26
|
-
}) => any;
|
|
27
|
-
header?: () => any;
|
|
28
|
-
footer?: () => any;
|
|
29
|
-
prefix?: () => any;
|
|
30
|
-
empty?: () => any;
|
|
31
|
-
tag?: () => any;
|
|
32
|
-
loading?: () => any;
|
|
33
|
-
label?: () => any;
|
|
34
|
-
};
|
|
35
|
-
refs: {};
|
|
36
|
-
rootEl: any;
|
|
37
|
-
};
|
|
38
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
39
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
40
|
-
change: (value: any) => any;
|
|
41
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
42
|
-
onChange?: (value: any) => any;
|
|
43
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
44
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
|
-
export default _default;
|
|
46
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
-
new (): {
|
|
48
|
-
$slots: S;
|
|
49
|
-
};
|
|
50
|
-
};
|