@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
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { connect as O, mapProps as W } from "@formily/vue";
|
|
2
|
-
import { defineComponent as z, ref as v, computed as G, watch as A, nextTick as h, createElementBlock as w, openBlock as s, normalizeClass as C, unref as r, createCommentVNode as U, withDirectives as j, createElementVNode as J, createVNode as S, toDisplayString as Q, withCtx as f, createTextVNode as E, createBlock as y, mergeProps as k, renderSlot as X, Fragment as Y, renderList as Z } from "vue";
|
|
3
|
-
import { isValid as ee, isEqual as te } from "@formily/shared";
|
|
4
|
-
import { useAttrs as le, ElLink as oe, version as _, ElTable as ae, ElTableColumn as b, ElRadioGroup as ne, ElRadio as re, vLoading as ie } from "element-plus";
|
|
5
|
-
import { stylePrefix as x } from "../__builtins__/configs/index.mjs";
|
|
6
|
-
import "@formily/reactive";
|
|
7
|
-
import { lt as K } from "../__builtins__/shared/simple-version-compare.mjs";
|
|
8
|
-
import "@formily/core";
|
|
9
|
-
import "@formily/reactive-vue";
|
|
10
|
-
import { u as L, x as ue, d as se, a as ce, r as de } from "../vendor/lodash.mjs";
|
|
11
|
-
import '../styles/select-table/index.css';const me = /* @__PURE__ */ z({
|
|
12
|
-
name: "FSelectTable",
|
|
13
|
-
inheritAttrs: !1,
|
|
14
|
-
__name: "select-table",
|
|
15
|
-
props: {
|
|
16
|
-
columns: { default: () => [] },
|
|
17
|
-
mode: { default: "multiple" },
|
|
18
|
-
dataSource: { default: () => [] },
|
|
19
|
-
optionAsValue: { type: Boolean, default: !1 },
|
|
20
|
-
valueType: { default: "all" },
|
|
21
|
-
loading: { type: Boolean, default: !1 },
|
|
22
|
-
rowKey: null,
|
|
23
|
-
clickRowToSelect: { type: Boolean, default: !0 },
|
|
24
|
-
showAlertToolbar: { type: Boolean, default: !0 },
|
|
25
|
-
value: null,
|
|
26
|
-
data: null
|
|
27
|
-
},
|
|
28
|
-
emits: ["change"],
|
|
29
|
-
setup(B, { emit: D }) {
|
|
30
|
-
const e = B, c = D, q = le();
|
|
31
|
-
function M(l) {
|
|
32
|
-
return K(_, "2.6.0") ? { label: l } : { value: l };
|
|
33
|
-
}
|
|
34
|
-
const d = v(), o = e.rowKey;
|
|
35
|
-
function N() {
|
|
36
|
-
var l;
|
|
37
|
-
return e.mode === "multiple" ? ((l = e.value) == null ? void 0 : l.map((n) => e.optionAsValue ? n : {
|
|
38
|
-
[o]: n
|
|
39
|
-
})) ?? [] : e.optionAsValue ? [e.value] : [{ [o]: e.value }];
|
|
40
|
-
}
|
|
41
|
-
const P = N(), i = v(P);
|
|
42
|
-
let p = [];
|
|
43
|
-
const m = v(), T = G(() => e.mode === "multiple" ? Array.isArray(e.value) ? e.value.length : 0 : ee(m.value) ? 1 : 0);
|
|
44
|
-
A(
|
|
45
|
-
() => e.dataSource,
|
|
46
|
-
async () => {
|
|
47
|
-
var n;
|
|
48
|
-
const l = L(
|
|
49
|
-
i.value.map((t) => t[o])
|
|
50
|
-
);
|
|
51
|
-
await h();
|
|
52
|
-
for (const t of e.dataSource)
|
|
53
|
-
l.includes(t[o]) && (e.mode === "multiple" ? d.value.toggleRowSelection(t, !0) : (d.value.setCurrentRow(t), R(t))), await h(), p = (n = d.value) == null ? void 0 : n.getSelectionRows();
|
|
54
|
-
},
|
|
55
|
-
{ immediate: !0 }
|
|
56
|
-
), A(
|
|
57
|
-
() => [e.value, e.loading],
|
|
58
|
-
async ([l, n]) => {
|
|
59
|
-
var t;
|
|
60
|
-
if (!n)
|
|
61
|
-
if (e.mode === "single")
|
|
62
|
-
m.value = e.optionAsValue ? l[o] : l;
|
|
63
|
-
else {
|
|
64
|
-
await h();
|
|
65
|
-
const a = (t = d.value) == null ? void 0 : t.getSelectionRows().map((u) => u[o]), g = e.optionAsValue ? l == null ? void 0 : l.map((u) => u[o]) : l ?? [];
|
|
66
|
-
if (i.value = i.value.filter(
|
|
67
|
-
(u) => g.includes(u[o])
|
|
68
|
-
), te(g, a))
|
|
69
|
-
return;
|
|
70
|
-
const H = ue(g, a);
|
|
71
|
-
for (const u of e.dataSource)
|
|
72
|
-
if (H.includes(u[o])) {
|
|
73
|
-
const I = g.includes(u[o]);
|
|
74
|
-
d.value.toggleRowSelection(u, I);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
immediate: !0
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
function V(l) {
|
|
83
|
-
/* istanbul ignore if -- @preserve */
|
|
84
|
-
if (!o)
|
|
85
|
-
throw new Error("rowKey is required");
|
|
86
|
-
const n = p.length > l.length ? se(
|
|
87
|
-
p,
|
|
88
|
-
l,
|
|
89
|
-
(t, a) => t[o] === a[o]
|
|
90
|
-
) : [];
|
|
91
|
-
if (p = [...l], i.value = ce(
|
|
92
|
-
[...i.value, ...l],
|
|
93
|
-
(t, a) => t[o] === a[o]
|
|
94
|
-
), n.length > 0) {
|
|
95
|
-
const t = L(n.map((a) => a[o]));
|
|
96
|
-
de(i.value, (a) => t.includes(a[o]));
|
|
97
|
-
}
|
|
98
|
-
if (e.optionAsValue)
|
|
99
|
-
c("change", i.value);
|
|
100
|
-
else {
|
|
101
|
-
const t = i.value.map(
|
|
102
|
-
(a) => a[o]
|
|
103
|
-
);
|
|
104
|
-
c("change", t);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function R(l) {
|
|
108
|
-
m.value = l[o], e.optionAsValue ? c("change", l) : c("change", l[o]);
|
|
109
|
-
}
|
|
110
|
-
function F(l, n, t) {
|
|
111
|
-
if (e.clickRowToSelect)
|
|
112
|
-
if (e.mode === "multiple") {
|
|
113
|
-
const a = t.target.closest("tr").querySelector('input[type="checkbox"]');
|
|
114
|
-
a instanceof HTMLElement && a.click();
|
|
115
|
-
} else {
|
|
116
|
-
const a = t.target.closest("tr").querySelector('input[type="radio"]');
|
|
117
|
-
a instanceof HTMLElement && a.click();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function $() {
|
|
121
|
-
e.mode === "multiple" ? (c("change", []), i.value = []) : (m.value = null, c("change", null));
|
|
122
|
-
}
|
|
123
|
-
return (l, n) => (s(), w("div", {
|
|
124
|
-
class: C(`${r(x)}-select-table`)
|
|
125
|
-
}, [
|
|
126
|
-
T.value > 0 && e.showAlertToolbar ? (s(), w("div", {
|
|
127
|
-
key: 0,
|
|
128
|
-
class: C(`${r(x)}-select-table-alert-container`)
|
|
129
|
-
}, [
|
|
130
|
-
J("span", null, "已选择 " + Q(T.value) + " 项", 1),
|
|
131
|
-
S(r(oe), {
|
|
132
|
-
type: "primary",
|
|
133
|
-
underline: r(K)(r(_), "2.9.9") ? !1 : "never",
|
|
134
|
-
style: { "margin-left": "8px" },
|
|
135
|
-
onClick: $
|
|
136
|
-
}, {
|
|
137
|
-
default: f(() => n[1] || (n[1] = [
|
|
138
|
-
E(" 取消选择 ", -1)
|
|
139
|
-
])),
|
|
140
|
-
_: 1,
|
|
141
|
-
__: [1]
|
|
142
|
-
}, 8, ["underline"])
|
|
143
|
-
], 2)) : U("", !0),
|
|
144
|
-
j((s(), y(r(ae), k({
|
|
145
|
-
ref_key: "elTableRef",
|
|
146
|
-
ref: d
|
|
147
|
-
}, r(q), {
|
|
148
|
-
"row-key": r(o),
|
|
149
|
-
"row-class-name": e.clickRowToSelect ? "--click-row-select" : "",
|
|
150
|
-
data: e.dataSource,
|
|
151
|
-
"highlight-current-row": e.mode === "single",
|
|
152
|
-
onSelect: V,
|
|
153
|
-
onSelectAll: V,
|
|
154
|
-
onRowClick: F
|
|
155
|
-
}), {
|
|
156
|
-
default: f(() => [
|
|
157
|
-
e.mode === "multiple" ? (s(), y(r(b), {
|
|
158
|
-
key: 0,
|
|
159
|
-
type: "selection"
|
|
160
|
-
})) : (s(), y(r(b), {
|
|
161
|
-
key: 1,
|
|
162
|
-
width: "46"
|
|
163
|
-
}, {
|
|
164
|
-
default: f(({ row: t }) => [
|
|
165
|
-
S(r(ne), {
|
|
166
|
-
modelValue: m.value,
|
|
167
|
-
"onUpdate:modelValue": n[0] || (n[0] = (a) => m.value = a),
|
|
168
|
-
style: { width: "100%" }
|
|
169
|
-
}, {
|
|
170
|
-
default: f(() => [
|
|
171
|
-
S(r(re), k(M(t[r(o)]), {
|
|
172
|
-
onChange: () => R(t)
|
|
173
|
-
}), {
|
|
174
|
-
default: f(() => n[2] || (n[2] = [
|
|
175
|
-
E(" ", -1)
|
|
176
|
-
])),
|
|
177
|
-
_: 2,
|
|
178
|
-
__: [2]
|
|
179
|
-
}, 1040, ["onChange"])
|
|
180
|
-
]),
|
|
181
|
-
_: 2
|
|
182
|
-
}, 1032, ["modelValue"])
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
})),
|
|
186
|
-
e.columns.length === 0 ? X(l.$slots, "default", { key: 2 }) : (s(!0), w(Y, { key: 3 }, Z(e.columns, (t) => (s(), y(r(b), k({ ref_for: !0 }, t, {
|
|
187
|
-
key: t.prop || t.type
|
|
188
|
-
}), null, 16))), 128))
|
|
189
|
-
]),
|
|
190
|
-
_: 3
|
|
191
|
-
}, 16, ["row-key", "row-class-name", "data", "highlight-current-row"])), [
|
|
192
|
-
[r(ie), e.loading]
|
|
193
|
-
])
|
|
194
|
-
], 2));
|
|
195
|
-
}
|
|
196
|
-
}), Te = O(
|
|
197
|
-
me,
|
|
198
|
-
W({ dataSource: "dataSource", loading: "loading" })
|
|
199
|
-
);
|
|
200
|
-
export {
|
|
201
|
-
Te as SelectTable,
|
|
202
|
-
Te as default
|
|
203
|
-
};
|
|
204
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/select-table/select-table.vue","../../src/select-table/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { TableInstance } from 'element-plus'\nimport type { ISelectTableProps } from './types'\nimport { isEqual, isValid } from '@formily/shared'\nimport {\n ElLink,\n ElRadio,\n ElRadioGroup,\n ElTable,\n ElTableColumn,\n useAttrs,\n version,\n vLoading,\n} from 'element-plus'\nimport { differenceWith, remove, uniq, uniqWith, xor } from 'lodash-es'\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { lt, stylePrefix } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelectTable',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n columns: { default: () => [] },\n mode: { default: 'multiple' },\n dataSource: { default: () => [] },\n optionAsValue: { type: Boolean, default: false },\n valueType: { default: 'all' },\n loading: { type: Boolean, default: false },\n rowKey: null,\n clickRowToSelect: { type: Boolean, default: true },\n showAlertToolbar: { type: Boolean, default: true },\n value: null,\n data: null\n})\n\nconst emit = defineEmits(['change'])\n\nconst elTableProps = useAttrs()\n\nfunction compatibleRadioValue(key: string) {\n return lt(version, '2.6.0') ? { label: key } : { value: key }\n}\n\nconst elTableRef = ref<TableInstance>()\nconst rowKey = props.rowKey\nfunction getInitialSelectedList() {\n if (props.mode === 'multiple') {\n return props.value?.map((item) => {\n if (!props.optionAsValue) {\n return {\n [rowKey]: item,\n }\n }\n return item\n }) ?? []\n }\n else {\n return props.optionAsValue ? [props.value] : [{ [rowKey]: props.value }]\n }\n}\nconst initialSelectedList = getInitialSelectedList()\nconst selectedFlatDataSource = ref(initialSelectedList)\n// 为了获取移除的项而缓存的当前页面的前一次选择。由于element-plus没有获取移除项的方法,需要通过这种方式移除field中移除的项\nlet prevSelection = []\n\nconst radioSelectedKey = ref()\n\nconst currentSelectLength = computed(() => {\n if (props.mode === 'multiple') {\n return Array.isArray(props.value) ? props.value.length : 0\n }\n else {\n return isValid(radioSelectedKey.value) ? 1 : 0\n }\n})\n\n// 当前页面是否是树形表格\n// const isTree = computed(() => {\n// const treeProps = attrs.treeProps as TreeProps\n// if (treeProps?.children) {\n// return props.dataSource.some(item => item[treeProps.children])\n// }\n// return props.dataSource.some(item => item.children)\n// })\n\nwatch(\n () => props.dataSource,\n async () => {\n const selectedKeys = uniq(\n selectedFlatDataSource.value.map(item => item[rowKey]),\n )\n await nextTick()\n for (const item of props.dataSource) {\n if (selectedKeys.includes(item[rowKey])) {\n if (props.mode === 'multiple') {\n elTableRef.value.toggleRowSelection(item, true)\n }\n else {\n elTableRef.value.setCurrentRow(item)\n onRadioClick(item)\n }\n }\n await nextTick()\n prevSelection = elTableRef.value?.getSelectionRows()\n }\n },\n { immediate: true },\n)\n\nwatch(\n () => [props.value, props.loading],\n async ([value, loading]) => {\n if (loading) {\n return\n }\n if (props.mode === 'single') {\n radioSelectedKey.value = props.optionAsValue ? value[rowKey] : value\n }\n else {\n await nextTick()\n const currentDisplayDataKeys = elTableRef.value\n ?.getSelectionRows()\n .map(item => item[rowKey])\n const valueKeys = props.optionAsValue\n ? value?.map(item => item[rowKey])\n : value ?? []\n selectedFlatDataSource.value = selectedFlatDataSource.value.filter(\n item => valueKeys.includes(item[rowKey]),\n )\n if (isEqual(valueKeys, currentDisplayDataKeys)) {\n return\n }\n const diffItems = xor(valueKeys, currentDisplayDataKeys)\n for (const tableItem of props.dataSource) {\n if (diffItems.includes(tableItem[rowKey])) {\n const shouldSelect = valueKeys.includes(tableItem[rowKey])\n elTableRef.value.toggleRowSelection(tableItem, shouldSelect)\n }\n }\n }\n },\n {\n immediate: true,\n },\n)\n\nfunction onSelect(newSelection: Record<string, any>[]) {\n /* istanbul ignore if -- @preserve */\n if (!rowKey) {\n throw new Error('rowKey is required')\n }\n\n const removedItemList\n = prevSelection.length > newSelection.length\n ? differenceWith(\n prevSelection,\n newSelection,\n (itemPrev, itemNext) => {\n return itemPrev[rowKey] === itemNext[rowKey]\n },\n )\n : []\n prevSelection = [...newSelection]\n selectedFlatDataSource.value = uniqWith(\n [...selectedFlatDataSource.value, ...newSelection],\n (itemPrev, itemNext) => {\n return itemPrev[rowKey] === itemNext[rowKey]\n },\n )\n if (removedItemList.length > 0) {\n const removedKeys = uniq(removedItemList.map(item => item[rowKey]))\n remove(selectedFlatDataSource.value, item =>\n removedKeys.includes(item[rowKey]))\n }\n\n if (props.optionAsValue) {\n emit('change', selectedFlatDataSource.value)\n }\n else {\n const selectedKeys = selectedFlatDataSource.value.map(\n item => item[rowKey],\n )\n emit('change', selectedKeys)\n }\n}\n\nfunction onRadioClick(item) {\n radioSelectedKey.value = item[rowKey]\n if (props.optionAsValue) {\n emit('change', item)\n }\n else {\n emit('change', item[rowKey])\n }\n}\n\nfunction onRowClick(row: Record<string, any>, _, event: Event) {\n if (!props.clickRowToSelect)\n return\n\n if (props.mode === 'multiple') {\n const checkboxDOM = (event.target as Element)\n .closest('tr')\n .querySelector('input[type=\"checkbox\"]')\n if (checkboxDOM instanceof HTMLElement) {\n checkboxDOM.click()\n }\n }\n else {\n const radioDOM = (event.target as Element)\n .closest('tr')\n .querySelector('input[type=\"radio\"]')\n if (radioDOM instanceof HTMLElement) {\n radioDOM.click()\n }\n }\n}\n\nfunction onClearSelectionClick() {\n if (props.mode === 'multiple') {\n emit('change', [])\n selectedFlatDataSource.value = []\n }\n else {\n radioSelectedKey.value = null\n emit('change', null)\n }\n}\n</script>\n\n<template>\n <div :class=\"`${stylePrefix}-select-table`\">\n <div\n v-if=\"currentSelectLength > 0 && props.showAlertToolbar\"\n :class=\"`${stylePrefix}-select-table-alert-container`\"\n >\n <span>已选择 {{ currentSelectLength }} 项</span>\n <ElLink\n type=\"primary\"\n :underline=\"lt(version, '2.9.9') ? false : 'never'\"\n style=\"margin-left: 8px;\"\n @click=\"onClearSelectionClick\"\n >\n 取消选择\n </ElLink>\n </div>\n <ElTable\n ref=\"elTableRef\"\n v-loading=\"props.loading\"\n v-bind=\"elTableProps\"\n :row-key=\"rowKey\"\n :row-class-name=\"props.clickRowToSelect ? `--click-row-select` : ''\"\n :data=\"props.dataSource\"\n :highlight-current-row=\"props.mode === 'single'\"\n @select=\"onSelect\"\n @select-all=\"onSelect\"\n @row-click=\"onRowClick\"\n >\n <ElTableColumn\n v-if=\"props.mode === 'multiple'\"\n type=\"selection\"\n />\n <ElTableColumn\n v-else\n width=\"46\"\n >\n <template #default=\"{ row }\">\n <ElRadioGroup v-model=\"radioSelectedKey\" style=\"width: 100%;\">\n <ElRadio\n v-bind=\"compatibleRadioValue(row[rowKey])\"\n @change=\"() => onRadioClick(row)\"\n >\n \n </ElRadio>\n </ElRadioGroup>\n </template>\n </ElTableColumn>\n <template v-if=\"props.columns.length === 0\">\n <slot />\n </template>\n <template v-else>\n <ElTableColumn\n v-for=\"colItem of props.columns\"\n v-bind=\"colItem\"\n :key=\"colItem.prop || colItem.type\"\n />\n </template>\n </ElTable>\n </div>\n</template>\n","import { connect, mapProps } from '@formily/vue'\r\nimport InnerSelectTable from './select-table.vue'\r\nimport './style.scss'\r\n\r\nconst SelectTable = connect(\r\n InnerSelectTable,\r\n mapProps({ dataSource: 'dataSource', loading: 'loading' }),\r\n)\r\n\r\nexport { SelectTable }\r\n\r\nexport default SelectTable\r\n"],"names":["props","__props","emit","__emit","elTableProps","useAttrs","compatibleRadioValue","key","lt","version","elTableRef","ref","rowKey","getInitialSelectedList","_a","item","initialSelectedList","selectedFlatDataSource","prevSelection","radioSelectedKey","currentSelectLength","computed","isValid","watch","selectedKeys","uniq","nextTick","onRadioClick","value","loading","currentDisplayDataKeys","valueKeys","isEqual","diffItems","xor","tableItem","shouldSelect","onSelect","newSelection","removedItemList","differenceWith","itemPrev","itemNext","uniqWith","removedKeys","remove","onRowClick","row","_","event","checkboxDOM","radioDOM","onClearSelectionClick","_createElementBlock","_unref","stylePrefix","_createElementVNode","_toDisplayString","_createVNode","ElLink","_cache","_withDirectives","_openBlock","_createBlock","_mergeProps","ElTableColumn","_withCtx","ElRadioGroup","$event","_renderSlot","_ctx","_Fragment","_renderList","colItem","vLoading","SelectTable","connect","InnerSelectTable","mapProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,UAAMA,IAAQC,GAcRC,IAAOC,GAEPC,IAAeC,GAAA;AAErB,aAASC,EAAqBC,GAAa;AACzC,aAAOC,EAAGC,GAAS,OAAO,IAAI,EAAE,OAAOF,EAAA,IAAQ,EAAE,OAAOA,EAAA;AAAA,IAC1D;AAEA,UAAMG,IAAaC,EAAA,GACbC,IAASZ,EAAM;AACrB,aAASa,IAAyB;;AAChC,aAAIb,EAAM,SAAS,eACVc,IAAAd,EAAM,UAAN,gBAAAc,EAAa,IAAI,CAACC,MAClBf,EAAM,gBAKJe,IAJE;AAAA,QACL,CAACH,CAAM,GAAGG;AAAA,MAAA,OAIV,CAAA,IAGCf,EAAM,gBAAgB,CAACA,EAAM,KAAK,IAAI,CAAC,EAAE,CAACY,CAAM,GAAGZ,EAAM,OAAO;AAAA,IAE3E;AACA,UAAMgB,IAAsBH,EAAA,GACtBI,IAAyBN,EAAIK,CAAmB;AAEtD,QAAIE,IAAgB,CAAA;AAEpB,UAAMC,IAAmBR,EAAA,GAEnBS,IAAsBC,EAAS,MAC/BrB,EAAM,SAAS,aACV,MAAM,QAAQA,EAAM,KAAK,IAAIA,E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;ICtPxB2E,KAAcC;AAAA,EAClBC;AAAAA,EACAC,EAAS,EAAE,YAAY,cAAc,SAAS,WAAW;AAC3D;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Column } from 'element-plus';
|
|
2
|
-
export interface ISelectTableProps {
|
|
3
|
-
columns?: Column<any>[];
|
|
4
|
-
mode?: 'multiple' | 'single';
|
|
5
|
-
dataSource?: any[];
|
|
6
|
-
optionAsValue?: boolean;
|
|
7
|
-
valueType?: 'all' | 'parent' | 'child' | 'path';
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
rowKey?: string;
|
|
10
|
-
clickRowToSelect?: boolean;
|
|
11
|
-
showAlertToolbar?: boolean;
|
|
12
|
-
value?: any;
|
|
13
|
-
data?: Record<string, any>[];
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/space/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ElSpace as default, ElSpace as Space } from 'element-plus';
|
package/esm/space/index.mjs
DELETED
package/esm/space/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-base-addition{transition:var(--el-transition-duration);-webkit-user-select:none;user-select:none;width:100%;border:1px dashed var(--el-border-color);border-radius:var(--el-border-radius-small);line-height:32px}.formily-element-plus-array-base-addition:hover{background-color:var(--el-button-hover-text-color);border-color:var(--el-primary-color)}.formily-element-plus-array-base-addition:active{background-color:var(--el-button-active-bg-color);border-color:var(--el-color-primary)}.formily-element-plus-array-base-addition .el-icon+.el-link__inner{margin-left:8px}.formily-element-plus-array-base-remove i,.formily-element-plus-array-base-move-down i,.formily-element-plus-array-base-move-up i{font-size:var(--el-font-size-base)}.formily-element-plus-array-base-sort-handle i{font-size:var(--el-font-size-base);cursor:move}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-cards{width:100%}.formily-element-plus-array-cards .el-card__header{padding-top:12.5px;padding-bottom:12.5px}.formily-element-plus-array-cards .el-empty{padding:0}.formily-element-plus-array-cards .formily-element-plus-array-cards-item+.formily-element-plus-array-cards-item{margin-top:8px}.formily-element-plus-array-cards .formily-element-plus-array-cards-extra-container{display:inline-flex;gap:8px}.formily-element-plus-array-cards .formily-element-plus-array-base-addition{margin-top:8px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-collapse{width:100%}.formily-element-plus-array-collapse .el-card__header{padding-top:12.5px;padding-bottom:12.5px}.formily-element-plus-array-collapse .el-empty{padding:0}.formily-element-plus-array-collapse .formily-element-plus-array-collapse-item{margin-bottom:10px}.formily-element-plus-array-collapse .formily-element-plus-array-collapse-errors-badge{line-height:1;vertical-align:initial}.formily-element-plus-array-collapse .el-collapse-item__title{display:flex}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-items{width:100%}.formily-element-plus-array-items .formily-element-plus-array-items-item-inner:last-child .formily-element-plus-array-items-divide{border-bottom:none}.formily-element-plus-array-items-card{display:flex;border:1px solid var(--el-border-color);margin-bottom:10px;padding:3px 6px;background:var(--el-bg-color-overlay);justify-content:space-between}.formily-element-plus-array-items-divide{display:flex;border-bottom:1px solid var(--el-border-color);padding-top:10px;justify-content:space-between}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-list-tabs{display:flex;border:1px solid var(--el-border-color);border-radius:var(--el-border-radius-base);width:100%}.formily-element-plus-array-list-tabs .el-empty{padding:0}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list{width:220px;border-right:1px solid var(--el-border-color);display:flex;flex-direction:column;list-style-type:none;margin:0;padding:0}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list--scroll-wrapper{padding:12px;display:flex;flex-direction:column;flex:1}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item{padding:0 12px;height:40px;line-height:40px;border-radius:var(--el-border-radius-base);box-sizing:border-box;display:flex;align-items:center;justify-content:center;list-style:none;font-size:var(--el-font-size-base);font-weight:500;color:var(--el-text-color-regular);transition:all .3s}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item--content{height:100%;flex:1;display:flex;align-items:center;overflow:hidden}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item--title{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;user-select:none}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item--close{visibility:hidden;border-radius:2px}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item--close:hover{background-color:var(--el-fill-color-dark)}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item:hover{color:var(--el-color-primary);background-color:var(--el-fill-color-light);cursor:pointer}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item:hover .formily-element-plus-array-list-tabs_list-item--close{visibility:visible}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item.is-active{color:var(--el-color-primary);background-color:var(--el-fill-color-light)}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs_list-item.is-active .formily-element-plus-array-list-tabs_list-item--title{font-weight:700}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs-tabpane{flex:1;box-sizing:border-box;padding:15px}.formily-element-plus-array-list-tabs .formily-element-plus-array-list-tabs-errors-badge{line-height:1;vertical-align:initial;max-width:90%}.formily-element-plus-array-list-tabs .formily-element-plus-array-base-addition{width:auto;margin:6px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-table{width:100%}.formily-element-plus-array-table .formily-element-plus-form-item:not(.formily-element-plus-form-item-feedback-layout-popover){margin-bottom:0!important}.formily-element-plus-array-table .el-table .cell{overflow:visible}.formily-element-plus-array-table .el-table .cell.el-tooltip{overflow:hidden}.formily-element-plus-array-table .formily-element-plus-array-base-addition{margin-top:8px}.formily-element-plus-array-table .el-pagination{margin-top:16px;text-align:right}.formily-element-plus-array-table .el-pagination .el-pagination__total{flex:1;text-align:left}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-array-tabs{width:100%}.formily-element-plus-array-tabs .formily-element-plus-array-tabs-errors-badge{line-height:1;vertical-align:initial}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-editable{cursor:pointer;display:inline-block!important}.formily-element-plus-editable.is-disabled{cursor:not-allowed}.formily-element-plus-editable-content{display:flex;align-items:center}.formily-element-plus-editable-content>*{margin-right:3px}.formily-element-plus-editable-content>*:last-child{margin-right:0}.formily-element-plus-editable .formily-element-plus-editable-edit-btn,.formily-element-plus-editable .formily-element-plus-editable-close-btn{transition:all .25s ease-in-out;width:14px;height:14px;display:inline;vertical-align:sub}.formily-element-plus-editable .formily-element-plus-editable-edit-btn:hover,.formily-element-plus-editable .formily-element-plus-editable-close-btn:hover{color:var(--el-color-primary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-button-group{padding:10px 0;background-color:var(--el-bg-color)}.formily-element-plus-form-button-group__sticky .el-affix--fixed{border-top:1px solid var(--el-border-color)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-collapse{width:100%}.formily-element-plus-form-collapse-errors-badge{line-height:1;vertical-align:initial}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-grid{display:grid}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-item .el-form-item__content{display:block}.formily-element-plus-form-item.el-form-item--label-top .el-form-item__label{display:inline-flex;align-items:center}.formily-element-plus-form-item .formily-element-plus-form-item-col-0{display:none}.formily-element-plus-form-item .formily-element-plus-form-item-col-1{flex:0 0 4.1666666667%;max-width:4.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-2{flex:0 0 8.3333333333%;max-width:8.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-3{flex:0 0 12.5%;max-width:12.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-4{flex:0 0 16.6666666667%;max-width:16.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-5{flex:0 0 20.8333333333%;max-width:20.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-6{flex:0 0 25%;max-width:25%}.formily-element-plus-form-item .formily-element-plus-form-item-col-7{flex:0 0 29.1666666667%;max-width:29.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-8{flex:0 0 33.3333333333%;max-width:33.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-9{flex:0 0 37.5%;max-width:37.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-10{flex:0 0 41.6666666667%;max-width:41.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-11{flex:0 0 45.8333333333%;max-width:45.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-12{flex:0 0 50%;max-width:50%}.formily-element-plus-form-item .formily-element-plus-form-item-col-13{flex:0 0 54.1666666667%;max-width:54.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-14{flex:0 0 58.3333333333%;max-width:58.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-15{flex:0 0 62.5%;max-width:62.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-16{flex:0 0 66.6666666667%;max-width:66.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-17{flex:0 0 70.8333333333%;max-width:70.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-18{flex:0 0 75%;max-width:75%}.formily-element-plus-form-item .formily-element-plus-form-item-col-19{flex:0 0 79.1666666667%;max-width:79.1666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-20{flex:0 0 83.3333333333%;max-width:83.3333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-21{flex:0 0 87.5%;max-width:87.5%}.formily-element-plus-form-item .formily-element-plus-form-item-col-22{flex:0 0 91.6666666667%;max-width:91.6666666667%}.formily-element-plus-form-item .formily-element-plus-form-item-col-23{flex:0 0 95.8333333333%;max-width:95.8333333333%}.formily-element-plus-form-item .formily-element-plus-form-item-col-24{flex:0 0 100%;max-width:100%}.formily-element-plus-form-item-label__wrapper{display:flex;overflow:hidden}.is-warp .formily-element-plus-form-item-label-content>span{overflow:visible;white-space:wrap}.is-warp .el-form-item__content{align-items:flex-start;flex-direction:column}.is-warp .el-form-item__label{height:auto}.formily-element-plus-form-item-label-content{display:flex;align-items:center;flex:1;overflow:hidden}.formily-element-plus-form-item-label-content>span{display:inline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.formily-element-plus-form-item-label-content.is-tooltip{border-bottom:1px dashed;border-color:var(--el-border-color)}.formily-element-plus-form-item-label-tooltip{margin-left:4px;color:var(--el-text-color-secondary);display:flex;align-items:center;height:32px;cursor:pointer}.formily-element-plus-form-item-colon{display:flex;margin-left:2px;line-height:2.3}.formily-element-plus-form-item-content__wrapper{display:flex;flex:1}.formily-element-plus-form-item-content__wrapper .is-fullness>div{width:100%}.formily-element-plus-form-item-addon-before{margin-right:8px;font-size:var(--el-font-size-base)}.formily-element-plus-form-item-addon-after{margin-left:8px}.formily-element-plus-form-item-addon-before,.formily-element-plus-form-item-addon-after{display:inline-flex;align-items:center;min-height:32px;flex-shrink:0;font-size:var(--el-font-size-base);color:var(--el-text-color-regular)}.el-form-item__content.is-addon-after{flex:unset}.formily-element-plus-form-item-feedback{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item-feedback.is-error{color:var(--el-color-danger)}.formily-element-plus-form-item-feedback.is-success{color:var(--el-color-success)}.formily-element-plus-form-item-feedback.is-warning{color:var(--el-color-warning)}.formily-element-plus-form-item-feedback.is-loose{position:absolute;top:100%;left:0}.formily-element-plus-form-item-feedback.is-tooltip{font-size:var(--el-font-size-base);display:inline-flex}.formily-element-plus-form-item-feedback.is-tooltip i{margin-right:4px}.formily-element-plus-form-item-extra{color:var(--el-text-color-secondary);font-size:12px;line-height:1;padding-top:2px}.formily-element-plus-form-item{margin-bottom:6px}.formily-element-plus-form-item.is-loose{margin-bottom:18px}.el-form-item.is-warning .el-input__wrapper,.el-form-item.is-warning .el-input__wrapper:hover,.el-form-item.is-warning .el-input__wrapper:focus,.el-form-item.is-warning .el-input__wrapper.is-focus,.el-form-item.is-warning .el-textarea__inner,.el-form-item.is-warning .el-textarea__inner:hover,.el-form-item.is-warning .el-textarea__inner:focus,.el-form-item.is-warning .el-textarea__inner.is-focus,.el-form-item.is-warning .el-select__wrapper,.el-form-item.is-warning .el-select__wrapper:hover,.el-form-item.is-warning .el-select__wrapper:focus,.el-form-item.is-warning .el-select__wrapper.is-focus,.el-form-item.is-warning .el-input-tag__wrapper,.el-form-item.is-warning .el-input-tag__wrapper:hover,.el-form-item.is-warning .el-input-tag__wrapper:focus,.el-form-item.is-warning .el-input-tag__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-warning) inset}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-tab-errors-badge{line-height:1;vertical-align:initial}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-preview-text{display:flex;align-items:center;height:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-form-item-control-content-component .el-radio-group{vertical-align:bottom}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.formily-element-plus-select-table .--click-row-select{cursor:pointer}.formily-element-plus-select-table-alert-container{margin-bottom:8px;padding-block:8px;padding-inline:16px;display:flex;align-items:center;font-size:var(--el-font-size-base);color:var(--el-color-info);background-color:var(--el-color-info-light-9);border-radius:var(--el-border-radius-base)}
|
package/esm/submit/index.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const Submit: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
-
onClick: import('vue').PropType<(e: MouseEvent) => any>;
|
|
4
|
-
onSubmit: import('vue').PropType<(values: any) => Promise<any>>;
|
|
5
|
-
onSubmitSuccess: import('vue').PropType<(payload: any) => void>;
|
|
6
|
-
onSubmitFailed: import('vue').PropType<(feedbacks: import('@formily/core').IFormFeedback[]) => void>;
|
|
7
|
-
submit: BooleanConstructor;
|
|
8
|
-
loading: BooleanConstructor;
|
|
9
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
10
|
-
submit: boolean;
|
|
11
|
-
loading: boolean;
|
|
12
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
13
|
-
P: {};
|
|
14
|
-
B: {};
|
|
15
|
-
D: {};
|
|
16
|
-
C: {};
|
|
17
|
-
M: {};
|
|
18
|
-
Defaults: {};
|
|
19
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
-
onClick: import('vue').PropType<(e: MouseEvent) => any>;
|
|
21
|
-
onSubmit: import('vue').PropType<(values: any) => Promise<any>>;
|
|
22
|
-
onSubmitSuccess: import('vue').PropType<(payload: any) => void>;
|
|
23
|
-
onSubmitFailed: import('vue').PropType<(feedbacks: import('@formily/core').IFormFeedback[]) => void>;
|
|
24
|
-
submit: BooleanConstructor;
|
|
25
|
-
loading: BooleanConstructor;
|
|
26
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
27
|
-
submit: boolean;
|
|
28
|
-
loading: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
__isFragment?: never;
|
|
31
|
-
__isTeleport?: never;
|
|
32
|
-
__isSuspense?: never;
|
|
33
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
34
|
-
onClick: import('vue').PropType<(e: MouseEvent) => any>;
|
|
35
|
-
onSubmit: import('vue').PropType<(values: any) => Promise<any>>;
|
|
36
|
-
onSubmitSuccess: import('vue').PropType<(payload: any) => void>;
|
|
37
|
-
onSubmitFailed: import('vue').PropType<(feedbacks: import('@formily/core').IFormFeedback[]) => void>;
|
|
38
|
-
submit: BooleanConstructor;
|
|
39
|
-
loading: BooleanConstructor;
|
|
40
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
41
|
-
submit: boolean;
|
|
42
|
-
loading: boolean;
|
|
43
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
44
|
-
$slots: {
|
|
45
|
-
default?(_: {}): any;
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
export default Submit;
|
package/esm/submit/index.mjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { observer as s } from "@formily/reactive-vue";
|
|
2
|
-
import { defineComponent as a, createBlock as c, openBlock as l, unref as u, mergeProps as b, withCtx as p, renderSlot as d } from "vue";
|
|
3
|
-
import { useParentForm as f } from "@formily/vue";
|
|
4
|
-
import { ElButton as S } from "element-plus";
|
|
5
|
-
const F = /* @__PURE__ */ a({
|
|
6
|
-
name: "FSubmit",
|
|
7
|
-
inheritAttrs: !1,
|
|
8
|
-
__name: "submit",
|
|
9
|
-
props: {
|
|
10
|
-
onClick: Function,
|
|
11
|
-
onSubmit: Function,
|
|
12
|
-
onSubmitSuccess: Function,
|
|
13
|
-
onSubmitFailed: Function,
|
|
14
|
-
submit: Boolean,
|
|
15
|
-
loading: Boolean
|
|
16
|
-
},
|
|
17
|
-
setup(m) {
|
|
18
|
-
const t = m, o = f();
|
|
19
|
-
function r(i) {
|
|
20
|
-
var e;
|
|
21
|
-
if (((e = t.onClick) == null ? void 0 : e.call(t, i)) !== !1 && t.onSubmit) {
|
|
22
|
-
const n = o == null ? void 0 : o.value;
|
|
23
|
-
n == null || n.submit(t.onSubmit).then(t.onSubmitSuccess).catch(t.onSubmitFailed ?? console.log);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return (i, e) => {
|
|
27
|
-
var n;
|
|
28
|
-
return l(), c(u(S), b({
|
|
29
|
-
"native-type": t.submit ? "button" : "submit",
|
|
30
|
-
type: "primary"
|
|
31
|
-
}, i.$attrs, {
|
|
32
|
-
loading: ((n = u(o)) == null ? void 0 : n.submitting) ?? t.loading,
|
|
33
|
-
onClick: r
|
|
34
|
-
}), {
|
|
35
|
-
default: p(() => [
|
|
36
|
-
d(i.$slots, "default")
|
|
37
|
-
]),
|
|
38
|
-
_: 3
|
|
39
|
-
}, 16, ["native-type", "loading"]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}), B = s(F);
|
|
43
|
-
export {
|
|
44
|
-
B as Submit,
|
|
45
|
-
B as default
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=index.mjs.map
|
package/esm/submit/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/submit/submit.vue","../../src/submit/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FSubmit',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => any>,\n onSubmit: Function as PropType<(values: any) => Promise<any>>,\n onSubmitSuccess: Function as PropType<(payload: any) => void>,\n onSubmitFailed: Function as PropType<(feedbacks: IFormFeedback[]) => void>,\n submit: Boolean,\n loading: Boolean,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick?.(e) === false)\n return\n if (props.onSubmit) {\n const form = formRef?.value\n form?.submit(props.onSubmit)\n .then(props.onSubmitSuccess)\n .catch(props.onSubmitFailed ?? console.log)\n }\n}\n</script>\n\n<template>\n <ElButton\n :native-type=\"props.submit ? 'button' : 'submit'\"\n type=\"primary\"\n v-bind=\"$attrs\"\n :loading=\"formRef?.submitting ?? props.loading\"\n @click=\"handleClick\"\n >\n <template #default>\n <slot />\n </template>\n </ElButton>\n</template>\n","import { observer } from '@formily/reactive-vue'\nimport FSubmit from './submit.vue'\n\nexport const Submit = observer(FSubmit)\n\nexport default Submit\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","_a","form","_openBlock","_createBlock","_unref","_mergeProps","$attrs","_renderSlot","_ctx","Submit","observer","FSubmit"],"mappings":";;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GASRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;;AAClC,YAAIC,IAAAN,EAAM,YAAN,gBAAAM,EAAA,KAAAN,GAAgBK,QAAO,MAEvBL,EAAM,UAAU;AAClB,cAAMO,IAAOL,KAAA,gBAAAA,EAAS;AACtB,QAAAK,KAAA,QAAAA,EAAM,OAAOP,EAAM,UAChB,KAAKA,EAAM,iBACX,MAAMA,EAAM,kBAAkB,QAAQ;AAAA,MAC3C;AAAA,IACF;;;AAIE,aAAAQ,KAAAC,EAUWC,MAVXC,EAUW;AAAA,QATR,eAAaX,EAAM,SAAM,WAAA;AAAA,QAC1B,MAAK;AAAA,MAAA,GACGY,EAAAA,QAAM;AAAA,QACb,WAASF,IAAAA,EAAAR,CAAA,MAAAQ,gBAAAA,EAAS,eAAcV,EAAM;AAAA,QACtC,SAAOI;AAAA,MAAA;QAEG,WACT,MAAQ;AAAA,UAARS,EAAQC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;ICxCDC,IAASC,EAASC,CAAO;"}
|
package/esm/submit/submit.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IFormFeedback } from '@formily/core';
|
|
2
|
-
import { PropType } from 'vue';
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
attrs: Partial<{}>;
|
|
5
|
-
slots: {
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {};
|
|
9
|
-
rootEl: any;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
-
onClick: PropType<(e: MouseEvent) => any>;
|
|
14
|
-
onSubmit: PropType<(values: any) => Promise<any>>;
|
|
15
|
-
onSubmitSuccess: PropType<(payload: any) => void>;
|
|
16
|
-
onSubmitFailed: PropType<(feedbacks: IFormFeedback[]) => void>;
|
|
17
|
-
submit: BooleanConstructor;
|
|
18
|
-
loading: BooleanConstructor;
|
|
19
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
-
onClick: PropType<(e: MouseEvent) => any>;
|
|
21
|
-
onSubmit: PropType<(values: any) => Promise<any>>;
|
|
22
|
-
onSubmitSuccess: PropType<(payload: any) => void>;
|
|
23
|
-
onSubmitFailed: PropType<(feedbacks: IFormFeedback[]) => void>;
|
|
24
|
-
submit: BooleanConstructor;
|
|
25
|
-
loading: BooleanConstructor;
|
|
26
|
-
}>> & Readonly<{}>, {
|
|
27
|
-
submit: boolean;
|
|
28
|
-
loading: boolean;
|
|
29
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
-
export default _default;
|
|
32
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
-
new (): {
|
|
34
|
-
$slots: S;
|
|
35
|
-
};
|
|
36
|
-
};
|
package/esm/switch/index.d.ts
DELETED
package/esm/switch/index.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { connect as o, mapProps as r } from "@formily/vue";
|
|
2
|
-
import { ElSwitch as t } from "element-plus";
|
|
3
|
-
import "vue";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import { transformComponent as m } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
-
const e = m(t, {
|
|
7
|
-
change: "update:modelValue"
|
|
8
|
-
}), i = o(
|
|
9
|
-
e,
|
|
10
|
-
r({
|
|
11
|
-
value: "modelValue",
|
|
12
|
-
readOnly: "readonly"
|
|
13
|
-
})
|
|
14
|
-
);
|
|
15
|
-
export {
|
|
16
|
-
i as Switch,
|
|
17
|
-
i as default
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=index.mjs.map
|
package/esm/switch/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/switch/index.ts"],"sourcesContent":["import { connect, mapProps } from '@formily/vue'\nimport { ElSwitch } from 'element-plus'\nimport { transformComponent } from '../__builtins__'\n\nexport type SwitchProps = typeof ElSwitch\n\nconst TransformElSwitch = transformComponent<SwitchProps>(ElSwitch, {\n change: 'update:modelValue',\n})\n\nexport const Switch = connect(\n TransformElSwitch,\n mapProps({\n value: 'modelValue',\n readOnly: 'readonly',\n }),\n)\n\nexport default Switch\n"],"names":["TransformElSwitch","transformComponent","ElSwitch","Switch","connect","mapProps"],"mappings":";;;;;AAMA,MAAMA,IAAoBC,EAAgCC,GAAU;AAAA,EAClE,QAAQ;AACV,CAAC,GAEYC,IAASC;AAAA,EACpBJ;AAAA,EACAK,EAAS;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,EAAA,CACX;AACH;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { connect as e, mapProps as r } from "@formily/vue";
|
|
2
|
-
import { ElTimePicker as o } from "element-plus";
|
|
3
|
-
import "vue";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import { transformComponent as m, mapReadPretty as t } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
-
import { PreviewText as i } from "../preview-text/index.mjs";
|
|
7
|
-
const a = m(
|
|
8
|
-
o,
|
|
9
|
-
{
|
|
10
|
-
change: "update:modelValue"
|
|
11
|
-
}
|
|
12
|
-
), P = e(
|
|
13
|
-
a,
|
|
14
|
-
r({ readOnly: "readonly", value: "modelValue" }),
|
|
15
|
-
t(i.TimePicker)
|
|
16
|
-
);
|
|
17
|
-
export {
|
|
18
|
-
P as TimePicker,
|
|
19
|
-
P as default
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/time-picker/index.ts"],"sourcesContent":["import { connect, mapProps } from '@formily/vue'\nimport { ElTimePicker } from 'element-plus'\nimport { mapReadPretty, transformComponent } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type TimePickerProps = typeof ElTimePicker\n\nconst TransformElTimePicker = transformComponent<TimePickerProps>(\n ElTimePicker,\n {\n change: 'update:modelValue',\n },\n)\n\nexport const TimePicker = connect(\n TransformElTimePicker,\n mapProps({ readOnly: 'readonly', value: 'modelValue' }),\n mapReadPretty(PreviewText.TimePicker),\n)\n\nexport default TimePicker\n"],"names":["TransformElTimePicker","transformComponent","ElTimePicker","TimePicker","connect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;AAOA,MAAMA,IAAwBC;AAAA,EAC5BC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,EAAA;AAEZ,GAEaC,IAAaC;AAAA,EACxBJ;AAAA,EACAK,EAAS,EAAE,UAAU,YAAY,OAAO,cAAc;AAAA,EACtDC,EAAcC,EAAY,UAAU;AACtC;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { connect as e, mapProps as t } from "@formily/vue";
|
|
2
|
-
import { ElTimeSelect as o } from "element-plus";
|
|
3
|
-
import "vue";
|
|
4
|
-
import "@formily/reactive";
|
|
5
|
-
import { transformComponent as m, mapReadPretty as r } from "../__builtins__/shared/transform-component.mjs";
|
|
6
|
-
import { PreviewText as a } from "../preview-text/index.mjs";
|
|
7
|
-
const l = m(
|
|
8
|
-
o,
|
|
9
|
-
{
|
|
10
|
-
change: "update:modelValue"
|
|
11
|
-
}
|
|
12
|
-
), f = e(
|
|
13
|
-
l,
|
|
14
|
-
t({ value: "modelValue", disabled: "disabled", editable: "editable" }),
|
|
15
|
-
r(a.Input)
|
|
16
|
-
);
|
|
17
|
-
export {
|
|
18
|
-
f as TimeSelect,
|
|
19
|
-
f as default
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/time-select/index.ts"],"sourcesContent":["import type { TimeSelectProps } from 'element-plus'\r\nimport { connect, mapProps } from '@formily/vue'\r\nimport { ElTimeSelect } from 'element-plus'\r\nimport { mapReadPretty, transformComponent } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\n\r\nconst TransformElTimeSelect = transformComponent<TimeSelectProps>(\r\n ElTimeSelect,\r\n {\r\n change: 'update:modelValue',\r\n },\r\n)\r\n\r\nexport const TimeSelect = connect(\r\n TransformElTimeSelect,\r\n mapProps({ value: 'modelValue', disabled: 'disabled', editable: 'editable' }),\r\n mapReadPretty(PreviewText.Input),\r\n)\r\n\r\nexport default TimeSelect\r\n"],"names":["TransformElTimeSelect","transformComponent","ElTimeSelect","TimeSelect","connect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;AAMA,MAAMA,IAAwBC;AAAA,EAC5BC;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,EAAA;AAEZ,GAEaC,IAAaC;AAAA,EACxBJ;AAAA,EACAK,EAAS,EAAE,OAAO,cAAc,UAAU,YAAY,UAAU,YAAY;AAAA,EAC5EC,EAAcC,EAAY,KAAK;AACjC;"}
|