@silver-formily/element-plus 0.0.1-beta.0 → 1.0.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/esm/__builtins__/configs/index.d.ts +1 -0
- package/esm/__builtins__/configs/index.mjs +5 -0
- package/esm/__builtins__/configs/index.mjs.map +1 -0
- package/esm/__builtins__/index.d.ts +2 -0
- package/esm/__builtins__/index.mjs +27 -0
- package/esm/__builtins__/index.mjs.map +1 -0
- package/esm/__builtins__/shared/hooks.d.ts +7 -0
- package/esm/__builtins__/shared/hooks.mjs +59 -0
- package/esm/__builtins__/shared/hooks.mjs.map +1 -0
- package/esm/__builtins__/shared/index.d.ts +7 -0
- package/esm/__builtins__/shared/index.mjs +25 -0
- package/esm/__builtins__/shared/index.mjs.map +1 -0
- package/esm/__builtins__/shared/load-config-provider.d.ts +2 -0
- package/esm/__builtins__/shared/load-config-provider.mjs +12 -0
- package/esm/__builtins__/shared/load-config-provider.mjs.map +1 -0
- package/esm/__builtins__/shared/loading.d.ts +12 -0
- package/esm/__builtins__/shared/loading.mjs +49 -0
- package/esm/__builtins__/shared/loading.mjs.map +1 -0
- package/esm/__builtins__/shared/simple-version-compare.d.ts +2 -0
- package/esm/__builtins__/shared/simple-version-compare.mjs +18 -0
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -0
- package/esm/__builtins__/shared/transform-component.d.ts +8 -0
- package/esm/__builtins__/shared/transform-component.mjs +49 -0
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -0
- package/esm/__builtins__/shared/types.d.ts +2 -0
- package/esm/__builtins__/shared/types.mjs +2 -0
- package/esm/__builtins__/shared/types.mjs.map +1 -0
- package/esm/__builtins__/shared/utils.d.ts +8 -0
- package/esm/__builtins__/shared/utils.mjs +34 -0
- package/esm/__builtins__/shared/utils.mjs.map +1 -0
- package/esm/array-base/array-base-addition.d.ts +5 -0
- package/esm/array-base/array-base-index.d.ts +19 -0
- package/esm/array-base/array-base-inner.d.ts +18 -0
- package/esm/array-base/array-base-item.d.ts +18 -0
- package/esm/array-base/array-base-move-down.d.ts +18 -0
- package/esm/array-base/array-base-move-up.d.ts +18 -0
- package/esm/array-base/array-base-remove.d.ts +18 -0
- package/esm/array-base/array-base-sort-handle.d.ts +2 -0
- package/esm/array-base/index.d.ts +114 -0
- package/esm/array-base/index.mjs +209 -0
- package/esm/array-base/index.mjs.map +1 -0
- package/esm/array-base/symbols.d.ts +4 -0
- package/esm/array-base/symbols.mjs +6 -0
- package/esm/array-base/symbols.mjs.map +1 -0
- package/esm/array-base/types.d.ts +28 -0
- package/esm/array-base/types.mjs +2 -0
- package/esm/array-base/types.mjs.map +1 -0
- package/esm/array-base/utils.d.ts +18 -0
- package/esm/array-base/utils.mjs +79 -0
- package/esm/array-base/utils.mjs.map +1 -0
- package/esm/array-cards/array-cards.d.ts +13 -0
- package/esm/array-cards/index.d.ts +122 -0
- package/esm/array-cards/index.mjs +119 -0
- package/esm/array-cards/index.mjs.map +1 -0
- package/esm/array-collapse/array-collapse-item.d.ts +18 -0
- package/esm/array-collapse/array-collapse.d.ts +16 -0
- package/esm/array-collapse/index.d.ts +134 -0
- package/esm/array-collapse/index.mjs +177 -0
- package/esm/array-collapse/index.mjs.map +1 -0
- package/esm/array-collapse/utils.d.ts +1 -0
- package/esm/array-collapse/utils.mjs +12 -0
- package/esm/array-collapse/utils.mjs.map +1 -0
- package/esm/array-items/array-items-item.d.ts +30 -0
- package/esm/array-items/array-items.d.ts +2 -0
- package/esm/array-items/index.d.ts +130 -0
- package/esm/array-items/index.mjs +105 -0
- package/esm/array-items/index.mjs.map +1 -0
- package/esm/array-list-tabs/array-list-tabs.d.ts +31 -0
- package/esm/array-list-tabs/index.d.ts +83 -0
- package/esm/array-list-tabs/index.mjs +183 -0
- package/esm/array-list-tabs/index.mjs.map +1 -0
- package/esm/array-list-tabs/utils.d.ts +3 -0
- package/esm/array-list-tabs/utils.mjs +16 -0
- package/esm/array-list-tabs/utils.mjs.map +1 -0
- package/esm/array-table/array-table.d.ts +1477 -0
- package/esm/array-table/index.d.ts +1573 -0
- package/esm/array-table/index.mjs +225 -0
- package/esm/array-table/index.mjs.map +1 -0
- package/esm/array-table/types.d.ts +6 -0
- package/esm/array-table/types.mjs +2 -0
- package/esm/array-table/types.mjs.map +1 -0
- package/esm/array-table/utils.d.ts +5 -0
- package/esm/array-table/utils.mjs +25 -0
- package/esm/array-table/utils.mjs.map +1 -0
- package/esm/array-tabs/array-tabs.d.ts +2 -0
- package/esm/array-tabs/index.d.ts +2 -0
- package/esm/array-tabs/index.mjs +87 -0
- package/esm/array-tabs/index.mjs.map +1 -0
- package/esm/cascader/cascader.d.ts +30 -0
- package/esm/cascader/index.d.ts +41 -0
- package/esm/cascader/index.mjs +54 -0
- package/esm/cascader/index.mjs.map +1 -0
- package/esm/checkbox/checkbox-group.d.ts +58 -0
- package/esm/checkbox/index.d.ts +779 -0
- package/esm/checkbox/index.mjs +83 -0
- package/esm/checkbox/index.mjs.map +1 -0
- package/esm/date-picker/index.d.ts +2 -0
- package/esm/date-picker/index.mjs +57 -0
- package/esm/date-picker/index.mjs.map +1 -0
- package/esm/editable/editable-popover.d.ts +25 -0
- package/esm/editable/editable.d.ts +187 -0
- package/esm/editable/index.d.ts +147 -0
- package/esm/editable/index.mjs +225 -0
- package/esm/editable/index.mjs.map +1 -0
- package/esm/form/form.d.ts +46 -0
- package/esm/form/form.mjs +71 -0
- package/esm/form/form.mjs.map +1 -0
- package/esm/form/index.d.ts +1 -0
- package/esm/form/index.mjs +6 -0
- package/esm/form/index.mjs.map +1 -0
- package/esm/form-button-group/form-button-group-sticky.d.ts +17 -0
- package/esm/form-button-group/form-button-group.d.ts +48 -0
- package/esm/form-button-group/index.d.ts +87 -0
- package/esm/form-button-group/index.mjs +87 -0
- package/esm/form-button-group/index.mjs.map +1 -0
- package/esm/form-button-group/utils.d.ts +1 -0
- package/esm/form-button-group/utils.mjs +12 -0
- package/esm/form-button-group/utils.mjs.map +1 -0
- package/esm/form-collapse/form-collapse.d.ts +18 -0
- package/esm/form-collapse/index.d.ts +45 -0
- package/esm/form-collapse/index.mjs +87 -0
- package/esm/form-collapse/index.mjs.map +1 -0
- package/esm/form-collapse/utils.d.ts +31 -0
- package/esm/form-collapse/utils.mjs +50 -0
- package/esm/form-collapse/utils.mjs.map +1 -0
- package/esm/form-dialog/dialog-content.d.ts +60 -0
- package/esm/form-dialog/index.d.ts +4 -0
- package/esm/form-dialog/index.mjs +208 -0
- package/esm/form-dialog/index.mjs.map +1 -0
- package/esm/form-dialog/types.d.ts +32 -0
- package/esm/form-dialog/types.mjs +2 -0
- package/esm/form-dialog/types.mjs.map +1 -0
- package/esm/form-drawer/drawer-content.d.ts +60 -0
- package/esm/form-drawer/index.d.ts +4 -0
- package/esm/form-drawer/index.mjs +202 -0
- package/esm/form-drawer/index.mjs.map +1 -0
- package/esm/form-drawer/types.d.ts +32 -0
- package/esm/form-drawer/types.mjs +2 -0
- package/esm/form-drawer/types.mjs.map +1 -0
- package/esm/form-grid/form-grid-column.d.ts +29 -0
- package/esm/form-grid/form-grid.d.ts +101 -0
- package/esm/form-grid/hooks.d.ts +5 -0
- package/esm/form-grid/hooks.mjs +14 -0
- package/esm/form-grid/hooks.mjs.map +1 -0
- package/esm/form-grid/index.d.ts +184 -0
- package/esm/form-grid/index.mjs +107 -0
- package/esm/form-grid/index.mjs.map +1 -0
- package/esm/form-item/form-item.d.ts +18 -0
- package/esm/form-item/index.d.ts +70 -0
- package/esm/form-item/index.mjs +331 -0
- package/esm/form-item/index.mjs.map +1 -0
- package/esm/form-item/types.d.ts +25 -0
- package/esm/form-item/types.mjs +2 -0
- package/esm/form-item/types.mjs.map +1 -0
- package/esm/form-item/utils.d.ts +3 -0
- package/esm/form-item/utils.mjs +17 -0
- package/esm/form-item/utils.mjs.map +1 -0
- package/esm/form-layout/form-layout.d.ts +32 -0
- package/esm/form-layout/form-layout.mjs +83 -0
- package/esm/form-layout/form-layout.mjs.map +1 -0
- package/esm/form-layout/index.d.ts +1 -0
- package/esm/form-layout/index.mjs +6 -0
- package/esm/form-layout/index.mjs.map +1 -0
- package/esm/form-layout/types.d.ts +43 -0
- package/esm/form-layout/types.mjs +2 -0
- package/esm/form-layout/types.mjs.map +1 -0
- package/esm/form-layout/utils.d.ts +57 -0
- package/esm/form-layout/utils.mjs +109 -0
- package/esm/form-layout/utils.mjs.map +1 -0
- package/esm/form-step/form-step-pane.d.ts +2 -0
- package/esm/form-step/form-step.d.ts +5 -0
- package/esm/form-step/index.d.ts +24 -0
- package/esm/form-step/index.mjs +92 -0
- package/esm/form-step/index.mjs.map +1 -0
- package/esm/form-step/types.d.ts +21 -0
- package/esm/form-step/types.mjs +2 -0
- package/esm/form-step/types.mjs.map +1 -0
- package/esm/form-step/utils.d.ts +11 -0
- package/esm/form-step/utils.mjs +64 -0
- package/esm/form-step/utils.mjs.map +1 -0
- package/esm/form-tab/form-tab.d.ts +7 -0
- package/esm/form-tab/hooks.d.ts +7 -0
- package/esm/form-tab/hooks.mjs +24 -0
- package/esm/form-tab/hooks.mjs.map +1 -0
- package/esm/form-tab/index.d.ts +28 -0
- package/esm/form-tab/index.mjs +77 -0
- package/esm/form-tab/index.mjs.map +1 -0
- package/esm/form-tab/types.d.ts +12 -0
- package/esm/form-tab/types.mjs +2 -0
- package/esm/form-tab/types.mjs.map +1 -0
- package/esm/form-tab/utils.d.ts +4 -0
- package/esm/form-tab/utils.mjs +14 -0
- package/esm/form-tab/utils.mjs.map +1 -0
- package/esm/index.d.ts +37 -0
- package/esm/index.mjs +81 -0
- package/esm/index.mjs.map +1 -0
- package/esm/input/index.d.ts +84 -0
- package/esm/input/index.mjs +77 -0
- package/esm/input/index.mjs.map +1 -0
- package/esm/input/input.d.ts +32 -0
- package/esm/input-number/index.d.ts +4 -0
- package/esm/input-number/index.mjs +30 -0
- package/esm/input-number/index.mjs.map +1 -0
- package/esm/pagination/components/jumper.d.ts +16 -0
- package/esm/pagination/components/jumper.mjs +12 -0
- package/esm/pagination/components/jumper.mjs.map +1 -0
- package/esm/pagination/components/next.d.ts +42 -0
- package/esm/pagination/components/next.mjs +23 -0
- package/esm/pagination/components/next.mjs.map +1 -0
- package/esm/pagination/components/pager.d.ts +42 -0
- package/esm/pagination/components/pager.mjs +23 -0
- package/esm/pagination/components/pager.mjs.map +1 -0
- package/esm/pagination/components/prev.d.ts +39 -0
- package/esm/pagination/components/prev.mjs +22 -0
- package/esm/pagination/components/prev.mjs.map +1 -0
- package/esm/pagination/components/sizes.d.ts +56 -0
- package/esm/pagination/components/sizes.mjs +7 -0
- package/esm/pagination/components/sizes.mjs.map +1 -0
- package/esm/pagination/components/total.d.ts +8 -0
- package/esm/pagination/components/total.mjs +11 -0
- package/esm/pagination/components/total.mjs.map +1 -0
- package/esm/pagination/pagination.d.ts +128 -0
- package/esm/pagination/pagination.mjs +629 -0
- package/esm/pagination/pagination.mjs.map +1 -0
- package/esm/password/index.d.ts +86 -0
- package/esm/password/index.mjs +14 -0
- package/esm/password/index.mjs.map +1 -0
- package/esm/preview-text/cascader.d.ts +5 -0
- package/esm/preview-text/date-picker.d.ts +5 -0
- package/esm/preview-text/index.d.ts +102 -0
- package/esm/preview-text/index.mjs +314 -0
- package/esm/preview-text/index.mjs.map +1 -0
- package/esm/preview-text/input.d.ts +28 -0
- package/esm/preview-text/preview.d.ts +18 -0
- package/esm/preview-text/select.d.ts +5 -0
- package/esm/preview-text/time-picker.d.ts +5 -0
- package/esm/preview-text/tree.d.ts +22 -0
- package/esm/preview-text/utils.d.ts +14 -0
- package/esm/preview-text/utils.mjs +16 -0
- package/esm/preview-text/utils.mjs.map +1 -0
- package/esm/radio/index.d.ts +370 -0
- package/esm/radio/index.mjs +80 -0
- package/esm/radio/index.mjs.map +1 -0
- package/esm/radio/radio-group.d.ts +44 -0
- package/esm/reset/index.d.ts +63 -0
- package/esm/reset/index.mjs +44 -0
- package/esm/reset/index.mjs.map +1 -0
- package/esm/reset/reset.d.ts +45 -0
- package/esm/select/index.d.ts +142 -0
- package/esm/select/index.mjs +132 -0
- package/esm/select/index.mjs.map +1 -0
- package/esm/select/select.d.ts +50 -0
- package/esm/select-table/index.d.ts +1530 -0
- package/esm/select-table/index.mjs +205 -0
- package/esm/select-table/index.mjs.map +1 -0
- package/esm/select-table/select-table.d.ts +2974 -0
- package/esm/select-table/types.d.ts +17 -0
- package/esm/select-table/types.mjs +2 -0
- package/esm/select-table/types.mjs.map +1 -0
- package/esm/space/index.d.ts +1 -0
- package/esm/space/index.mjs +6 -0
- package/esm/space/index.mjs.map +1 -0
- package/esm/styles/array-base/index.css +1 -0
- package/esm/styles/array-cards/index.css +1 -0
- package/esm/styles/array-collapse/index.css +1 -0
- package/esm/styles/array-items/index.css +1 -0
- package/esm/styles/array-list-tabs/index.css +1 -0
- package/esm/styles/array-table/index.css +1 -0
- package/esm/styles/array-tabs/index.css +1 -0
- package/esm/styles/editable/index.css +1 -0
- package/esm/styles/form-button-group/index.css +1 -0
- package/esm/styles/form-collapse/index.css +1 -0
- package/esm/styles/form-grid/index.css +1 -0
- package/esm/styles/form-item/index.css +1 -0
- package/esm/styles/form-tab/index.css +1 -0
- package/esm/styles/preview-text/index.css +1 -0
- package/esm/styles/radio/index.css +1 -0
- package/esm/styles/select-table/index.css +1 -0
- package/esm/submit/index.d.ts +48 -0
- package/esm/submit/index.mjs +40 -0
- package/esm/submit/index.mjs.map +1 -0
- package/esm/submit/submit.d.ts +36 -0
- package/esm/switch/index.d.ts +4 -0
- package/esm/switch/index.mjs +19 -0
- package/esm/switch/index.mjs.map +1 -0
- package/esm/time-picker/index.d.ts +4 -0
- package/esm/time-picker/index.mjs +21 -0
- package/esm/time-picker/index.mjs.map +1 -0
- package/esm/time-select/index.d.ts +2 -0
- package/esm/time-select/index.mjs +21 -0
- package/esm/time-select/index.mjs.map +1 -0
- package/esm/transfer/index.d.ts +186 -0
- package/esm/transfer/index.mjs +11 -0
- package/esm/transfer/index.mjs.map +1 -0
- package/esm/tree/index.d.ts +42 -0
- package/esm/tree/index.mjs +104 -0
- package/esm/tree/index.mjs.map +1 -0
- package/esm/tree/tree.d.ts +20 -0
- package/esm/tree/types.d.ts +13 -0
- package/esm/tree/types.mjs +2 -0
- package/esm/tree/types.mjs.map +1 -0
- package/esm/tree/utils.d.ts +45 -0
- package/esm/tree/utils.mjs +161 -0
- package/esm/tree/utils.mjs.map +1 -0
- package/esm/tree-select/index.d.ts +32 -0
- package/esm/tree-select/index.mjs +47 -0
- package/esm/tree-select/index.mjs.map +1 -0
- package/esm/tree-select/tree-select.d.ts +17 -0
- package/esm/upload/index.d.ts +707 -0
- package/esm/upload/index.mjs +175 -0
- package/esm/upload/index.mjs.map +1 -0
- package/esm/upload/upload.d.ts +1249 -0
- package/esm/vendor/icon.mjs +11 -0
- package/esm/vendor/icon.mjs.map +1 -0
- package/esm/vendor/lodash.mjs +1400 -0
- package/esm/vendor/lodash.mjs.map +1 -0
- package/esm/vendor/runtime.mjs +35 -0
- package/esm/vendor/runtime.mjs.map +1 -0
- package/esm/vendor/shared.esm-bundler.mjs +14 -0
- package/esm/vendor/shared.esm-bundler.mjs.map +1 -0
- package/esm/vendor/sizes.mjs +27 -0
- package/esm/vendor/sizes.mjs.map +1 -0
- package/esm/vendor/types.mjs +19 -0
- package/esm/vendor/types.mjs.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { useField as x, connect as E, mapProps as h } from "@formily/vue";
|
|
2
|
+
import { defineComponent as R, ref as m, createElementBlock as f, openBlock as u, normalizeClass as n, createVNode as d, unref as t, mergeProps as P, withCtx as s, withDirectives as z, createBlock as _, createElementVNode as C, createTextVNode as S, toDisplayString as V, renderSlot as T, computed as w, createCommentVNode as q, Fragment as I, nextTick as g } from "vue";
|
|
3
|
+
import { ElPopover as N, ElText as D, ClickOutside as W } from "element-plus";
|
|
4
|
+
import { reaction as M } from "@formily/reactive";
|
|
5
|
+
import "@formily/core";
|
|
6
|
+
import "@formily/reactive-vue";
|
|
7
|
+
import { composeExport as j } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { FormBaseItem as c, fieldFeedbackMapper as A } from "../form-item/index.mjs";
|
|
9
|
+
import { Edit as F, Close as G } from "@element-plus/icons-vue";
|
|
10
|
+
import { isValid as B, isPlainObj as H } from "@formily/shared";
|
|
11
|
+
import { stylePrefix as L } from "../__builtins__/configs/index.mjs";
|
|
12
|
+
import { o as k } from "../vendor/lodash.mjs";
|
|
13
|
+
import '../styles/editable/index.css';const J = /* @__PURE__ */ R({
|
|
14
|
+
name: "FEditablePopover",
|
|
15
|
+
inheritAttrs: !1,
|
|
16
|
+
__name: "editable-popover",
|
|
17
|
+
props: {
|
|
18
|
+
label: null,
|
|
19
|
+
for: null,
|
|
20
|
+
tooltip: null,
|
|
21
|
+
addonBefore: null,
|
|
22
|
+
addonAfter: null,
|
|
23
|
+
extra: null,
|
|
24
|
+
feedbackText: null,
|
|
25
|
+
feedbackStatus: null,
|
|
26
|
+
asterisk: { type: Boolean },
|
|
27
|
+
colon: { type: Boolean },
|
|
28
|
+
labelAlign: null,
|
|
29
|
+
wrapperAlign: null,
|
|
30
|
+
labelWrap: { type: Boolean },
|
|
31
|
+
labelWidth: null,
|
|
32
|
+
wrapperWidth: null,
|
|
33
|
+
wrapperWrap: { type: Boolean },
|
|
34
|
+
labelCol: null,
|
|
35
|
+
wrapperCol: null,
|
|
36
|
+
fullness: { type: Boolean },
|
|
37
|
+
size: { default: "default" },
|
|
38
|
+
layout: null,
|
|
39
|
+
feedbackLayout: { default: "popover" },
|
|
40
|
+
tooltipLayout: null
|
|
41
|
+
},
|
|
42
|
+
setup(b) {
|
|
43
|
+
const l = b, e = x(), r = `${L}-editable`, i = m(), o = m(!1);
|
|
44
|
+
if (B(e.value.data)) {
|
|
45
|
+
/* istanbul ignore else -- @preserve */
|
|
46
|
+
B(e.value.data.readPretty) || (e.value.data.readPretty = !0);
|
|
47
|
+
} else
|
|
48
|
+
e.value.data = {}, e.value.data.readPretty = !0;
|
|
49
|
+
function y(a) {
|
|
50
|
+
const p = i.value.parentElement;
|
|
51
|
+
/* istanbul ignore else -- @preserve */
|
|
52
|
+
p.contains(a.target) || (o.value = !1);
|
|
53
|
+
}
|
|
54
|
+
function v() {
|
|
55
|
+
o.value = !0;
|
|
56
|
+
}
|
|
57
|
+
return M(
|
|
58
|
+
() => e.value.form.queryFeedbacks({
|
|
59
|
+
type: "error",
|
|
60
|
+
address: `${e.value.address.entire}.*`
|
|
61
|
+
}),
|
|
62
|
+
(a) => {
|
|
63
|
+
a.length > 0 && (o.value = !0);
|
|
64
|
+
}
|
|
65
|
+
), (a, p) => (u(), f("div", {
|
|
66
|
+
class: n(r)
|
|
67
|
+
}, [
|
|
68
|
+
d(t(N), P(a.$attrs, {
|
|
69
|
+
visible: o.value,
|
|
70
|
+
title: a.$attrs.title || t(e).title,
|
|
71
|
+
trigger: "click",
|
|
72
|
+
width: "auto"
|
|
73
|
+
}), {
|
|
74
|
+
default: s(() => [
|
|
75
|
+
C("div", {
|
|
76
|
+
ref_key: "contentRef",
|
|
77
|
+
ref: i,
|
|
78
|
+
class: n(`${r}-popover-wrapper`)
|
|
79
|
+
}, [
|
|
80
|
+
T(a.$slots, "default")
|
|
81
|
+
], 2)
|
|
82
|
+
]),
|
|
83
|
+
reference: s(() => [
|
|
84
|
+
z((u(), _(t(c), P(l, {
|
|
85
|
+
class: `${r}-trigger`
|
|
86
|
+
}), {
|
|
87
|
+
default: s(() => [
|
|
88
|
+
C("div", {
|
|
89
|
+
class: n(`${r}-content`),
|
|
90
|
+
onClick: v
|
|
91
|
+
}, [
|
|
92
|
+
d(t(D), null, {
|
|
93
|
+
default: s(() => [
|
|
94
|
+
S(V(t(e).title), 1)
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}),
|
|
98
|
+
d(t(F), {
|
|
99
|
+
class: n(`${r}-edit-btn`)
|
|
100
|
+
}, null, 8, ["class"])
|
|
101
|
+
], 2)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 16, ["class"])), [
|
|
105
|
+
[t(W), y]
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
_: 3
|
|
109
|
+
}, 16, ["visible", "title"])
|
|
110
|
+
]));
|
|
111
|
+
}
|
|
112
|
+
}), K = /* @__PURE__ */ R({
|
|
113
|
+
name: "FEditable",
|
|
114
|
+
__name: "editable",
|
|
115
|
+
props: {
|
|
116
|
+
label: null,
|
|
117
|
+
for: null,
|
|
118
|
+
tooltip: null,
|
|
119
|
+
addonBefore: null,
|
|
120
|
+
addonAfter: null,
|
|
121
|
+
extra: null,
|
|
122
|
+
feedbackText: null,
|
|
123
|
+
feedbackStatus: null,
|
|
124
|
+
asterisk: { type: Boolean },
|
|
125
|
+
colon: { type: Boolean },
|
|
126
|
+
labelAlign: null,
|
|
127
|
+
wrapperAlign: null,
|
|
128
|
+
labelWrap: { type: Boolean },
|
|
129
|
+
labelWidth: null,
|
|
130
|
+
wrapperWidth: null,
|
|
131
|
+
wrapperWrap: { type: Boolean },
|
|
132
|
+
labelCol: null,
|
|
133
|
+
wrapperCol: null,
|
|
134
|
+
fullness: { type: Boolean },
|
|
135
|
+
size: { default: "default" },
|
|
136
|
+
layout: null,
|
|
137
|
+
feedbackLayout: { default: "popover" },
|
|
138
|
+
tooltipLayout: null,
|
|
139
|
+
editProps: null
|
|
140
|
+
},
|
|
141
|
+
setup(b) {
|
|
142
|
+
const l = b, e = x(), r = m(null), i = `${L}-editable`, o = m(null), y = w(() => k(l, "editProps")), v = w(() => H(l.editProps) ? { ...k(l, "editProps"), ...l.editProps } : k(l, "editProps"));
|
|
143
|
+
function a() {
|
|
144
|
+
B(e.value.data) || (e.value.data = {});
|
|
145
|
+
}
|
|
146
|
+
a(), e.value.data.readPretty = !0;
|
|
147
|
+
async function p() {
|
|
148
|
+
e.value.disabled || (a(), e.value.data.readPretty = !1, await g(), o.value.feedbackTooltipRef.updatePopper(), r.value?.querySelector("input")?.focus());
|
|
149
|
+
}
|
|
150
|
+
function $() {
|
|
151
|
+
e.value.data?.readPretty !== !0 && (a(), setTimeout(async () => {
|
|
152
|
+
e.value.data.readPretty = !0, await g(), o.value?.feedbackTooltipRef.updatePopper();
|
|
153
|
+
}, 0));
|
|
154
|
+
}
|
|
155
|
+
return (O, X) => (u(), f("div", {
|
|
156
|
+
ref_key: "innerRef",
|
|
157
|
+
ref: r,
|
|
158
|
+
class: n([i, t(e).disabled && "is-disabled"])
|
|
159
|
+
}, [
|
|
160
|
+
z((u(), f("div", {
|
|
161
|
+
class: n(`${i}-content`)
|
|
162
|
+
}, [
|
|
163
|
+
d(t(c), P({
|
|
164
|
+
ref_key: "formItemRef",
|
|
165
|
+
ref: o
|
|
166
|
+
}, t(e).data?.readPretty === !1 ? v.value : y.value, { onClick: p }), {
|
|
167
|
+
default: s(() => [
|
|
168
|
+
C("div", null, [
|
|
169
|
+
T(O.$slots, "default")
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
_: 3
|
|
173
|
+
}, 16),
|
|
174
|
+
t(e).disabled ? q("", !0) : (u(), f(I, { key: 0 }, [
|
|
175
|
+
t(e).data?.readPretty === !0 ? (u(), _(t(c), {
|
|
176
|
+
key: 0,
|
|
177
|
+
size: l.size,
|
|
178
|
+
"feedback-layout": l.feedbackLayout
|
|
179
|
+
}, {
|
|
180
|
+
default: s(() => [
|
|
181
|
+
d(t(F), {
|
|
182
|
+
class: n(`${i}-edit-btn`),
|
|
183
|
+
onClick: p
|
|
184
|
+
}, null, 8, ["class"])
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
}, 8, ["size", "feedback-layout"])) : (u(), _(t(c), {
|
|
188
|
+
key: 1,
|
|
189
|
+
size: l.size,
|
|
190
|
+
"feedback-layout": l.feedbackLayout
|
|
191
|
+
}, {
|
|
192
|
+
default: s(() => [
|
|
193
|
+
d(t(G), {
|
|
194
|
+
class: n(`${i}-close-btn`),
|
|
195
|
+
onClick: $
|
|
196
|
+
}, null, 8, ["class"])
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}, 8, ["size", "feedback-layout"]))
|
|
200
|
+
], 64))
|
|
201
|
+
], 2)), [
|
|
202
|
+
[t(W), $]
|
|
203
|
+
])
|
|
204
|
+
], 2));
|
|
205
|
+
}
|
|
206
|
+
}), Q = E(K, h(
|
|
207
|
+
{
|
|
208
|
+
required: !0,
|
|
209
|
+
description: "extra"
|
|
210
|
+
},
|
|
211
|
+
A
|
|
212
|
+
)), U = E(J, h(
|
|
213
|
+
{
|
|
214
|
+
required: !0,
|
|
215
|
+
description: "extra"
|
|
216
|
+
},
|
|
217
|
+
A
|
|
218
|
+
)), de = j(Q, {
|
|
219
|
+
Popover: U
|
|
220
|
+
});
|
|
221
|
+
export {
|
|
222
|
+
de as Editable,
|
|
223
|
+
de as default
|
|
224
|
+
};
|
|
225
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/editable/editable-popover.vue","../../src/editable/editable.vue","../../src/editable/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Edit } from '@element-plus/icons-vue'\nimport { reaction } from '@formily/reactive'\nimport { isValid } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\nimport { ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditablePopover',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n label: null,\n for: null,\n tooltip: null,\n addonBefore: null,\n addonAfter: null,\n extra: null,\n feedbackText: null,\n feedbackStatus: null,\n asterisk: { type: Boolean },\n colon: { type: Boolean },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean },\n size: { default: 'default' },\n layout: null,\n feedbackLayout: { default: 'popover' },\n tooltipLayout: null\n})\n\nconst fieldRef = useField<Field>()\nconst prefixCls = `${stylePrefix}-editable`\nconst contentRef = ref<HTMLElement>()\nconst visible = ref(false)\n\nif (isValid(fieldRef.value.data)) {\n /* istanbul ignore else -- @preserve */\n if (!isValid(fieldRef.value.data.readPretty)) {\n fieldRef.value.data.readPretty = true\n }\n}\nelse {\n fieldRef.value.data = {}\n fieldRef.value.data.readPretty = true\n}\n\nfunction onClickOutside(e) {\n const popoverDOM = contentRef.value.parentElement\n /* istanbul ignore else -- @preserve */\n if (!popoverDOM.contains(e.target)) {\n visible.value = false\n }\n}\nfunction onClick() {\n visible.value = true\n}\n\nreaction(\n () => fieldRef.value.form.queryFeedbacks({\n type: 'error',\n address: `${fieldRef.value.address.entire}.*`,\n }),\n (errorList) => {\n if (errorList.length > 0) {\n visible.value = true\n }\n },\n)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElPopover\n v-bind=\"$attrs\"\n :visible=\"visible\"\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\n >\n <template #default>\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\n <slot />\n </div>\n </template>\n <template #reference>\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\n <ElText>\n {{ fieldRef.title }}\n </ElText>\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\n </div>\n </FormBaseItem>\n </template>\n </ElPopover>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Close, Edit } from '@element-plus/icons-vue'\nimport { isPlainObj, isValid } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { ClickOutside as vClickOutside } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, nextTick, ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditable',\n})\n\nconst props = defineProps({\n label: null,\n for: null,\n tooltip: null,\n addonBefore: null,\n addonAfter: null,\n extra: null,\n feedbackText: null,\n feedbackStatus: null,\n asterisk: { type: Boolean },\n colon: { type: Boolean },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean },\n size: { default: 'default' },\n layout: null,\n feedbackLayout: { default: 'popover' },\n tooltipLayout: null,\n editProps: null\n})\n\nconst fieldRef = useField<Field>()\nconst innerRef = ref<HTMLElement>(null)\nconst prefixCls = `${stylePrefix}-editable`\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\n\nconst commonProps = computed(() => omit(props, 'editProps'))\nconst editProps = computed(() => {\n if (isPlainObj(props.editProps)) {\n return { ...omit(props, 'editProps'), ...props.editProps }\n }\n return omit(props, 'editProps')\n})\n\nfunction handleEnsureReadPretty() {\n if (!isValid(fieldRef.value.data)) {\n fieldRef.value.data = {}\n }\n}\n\nhandleEnsureReadPretty()\nfieldRef.value.data.readPretty = true\n\nasync function onClick() {\n if (fieldRef.value.disabled)\n return\n handleEnsureReadPretty()\n fieldRef.value.data.readPretty = false\n await nextTick()\n formItemRef.value.feedbackTooltipRef.updatePopper()\n innerRef.value?.querySelector('input')?.focus()\n}\n\nfunction onClickOutside() {\n if (fieldRef.value.data?.readPretty === true)\n return\n handleEnsureReadPretty()\n // 使用下拉菜单等触发的事件完成应有的操作\n setTimeout(async () => {\n fieldRef.value.data.readPretty = true\n await nextTick()\n formItemRef.value?.feedbackTooltipRef.updatePopper()\n }, 0)\n}\n</script>\n\n<template>\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\n <div>\n <slot />\n </div>\n </FormBaseItem>\n <template v-if=\"!fieldRef.disabled\">\n <template v-if=\"fieldRef.data?.readPretty === true\">\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\n </FormBaseItem>\n </template>\n <template v-else>\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\n </FormBaseItem>\n </template>\n </template>\n </div>\n </div>\n</template>\n","import type { ElPopover } from 'element-plus'\nimport type { IFormItemProps } from '../form-item/types'\nimport { connect, mapProps } from '@formily/vue'\nimport { composeExport } from '../__builtins__/shared'\nimport { fieldFeedbackMapper } from '../form-item'\nimport FEditablePopover from './editable-popover.vue'\nimport FEditable from './editable.vue'\nimport './style.scss'\n\nexport type EditableProps = IFormItemProps\nexport type EditablePopoverProps = typeof ElPopover\n\nconst EditableInner = connect(FEditable, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nconst EditablePopover = connect(FEditablePopover, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nexport const Editable = composeExport(EditableInner, {\n Popover: EditablePopover,\n})\n\nexport default Editable\n"],"names":["props","__props","fieldRef","useField","prefixCls","stylePrefix","contentRef","ref","visible","isValid","onClickOutside","e","popoverDOM","onClick","reaction","errorList","_createElementBlock","_createVNode","_unref","ElPopover","_mergeProps","_ctx","$attrs","_createElementVNode","_renderSlot","_createBlock","FormBaseItem","ElText","_createTextVNode","_toDisplayString","Edit","innerRef","formItemRef","commonProps","computed","omit","editProps","isPlainObj","handleEnsureReadPretty","nextTick","_normalizeClass","_Fragment","Close","EditableInner","connect","FEditable","mapProps","fieldFeedbackMapper","EditablePopover","FEditablePopover","Editable","composeExport"],"mappings":"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"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Form as FormType, IFormFeedback } from '@formily/core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
14
|
+
form: {
|
|
15
|
+
type: PropType<FormType>;
|
|
16
|
+
};
|
|
17
|
+
previewTextPlaceholder: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
onAutoSubmit: {
|
|
21
|
+
type: PropType<(values: FormType["values"]) => Promise<any>>;
|
|
22
|
+
};
|
|
23
|
+
onAutoSubmitFailed: {
|
|
24
|
+
type: PropType<(error: IFormFeedback[]) => void>;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
form: {
|
|
28
|
+
type: PropType<FormType>;
|
|
29
|
+
};
|
|
30
|
+
previewTextPlaceholder: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
onAutoSubmit: {
|
|
34
|
+
type: PropType<(values: FormType["values"]) => Promise<any>>;
|
|
35
|
+
};
|
|
36
|
+
onAutoSubmitFailed: {
|
|
37
|
+
type: PropType<(error: IFormFeedback[]) => void>;
|
|
38
|
+
};
|
|
39
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as h, createBlock as f, createCommentVNode as S, openBlock as p, unref as t, withCtx as i, createVNode as n, mergeProps as d, renderSlot as s, withModifiers as F } from "vue";
|
|
2
|
+
import { useForm as v, FormProvider as w } from "@formily/vue";
|
|
3
|
+
import { _ as c } from "../form-layout/form-layout.mjs";
|
|
4
|
+
import { PreviewText as b } from "../preview-text/index.mjs";
|
|
5
|
+
const $ = /* @__PURE__ */ h({
|
|
6
|
+
name: "FForm",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "form",
|
|
9
|
+
props: {
|
|
10
|
+
form: {
|
|
11
|
+
type: Object
|
|
12
|
+
},
|
|
13
|
+
previewTextPlaceholder: {
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
onAutoSubmit: {
|
|
17
|
+
type: Function
|
|
18
|
+
},
|
|
19
|
+
onAutoSubmitFailed: {
|
|
20
|
+
type: Function
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(l) {
|
|
24
|
+
const o = l, u = v();
|
|
25
|
+
function a(m, r) {
|
|
26
|
+
r.submit((e) => o.onAutoSubmit?.(e)).catch((e) => o.onAutoSubmitFailed?.(e));
|
|
27
|
+
}
|
|
28
|
+
return (m, r) => o.form ? (p(), f(t(w), {
|
|
29
|
+
key: 0,
|
|
30
|
+
form: o.form
|
|
31
|
+
}, {
|
|
32
|
+
default: i(() => [
|
|
33
|
+
n(t(b), {
|
|
34
|
+
placeholder: o.previewTextPlaceholder
|
|
35
|
+
}, {
|
|
36
|
+
default: i(() => [
|
|
37
|
+
n(t(c), d(m.$attrs, {
|
|
38
|
+
onSubmit: r[0] || (r[0] = (e) => a(e, l.form))
|
|
39
|
+
}), {
|
|
40
|
+
default: i(() => [
|
|
41
|
+
s(m.$slots, "default")
|
|
42
|
+
]),
|
|
43
|
+
_: 3
|
|
44
|
+
}, 16)
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 8, ["placeholder"])
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 8, ["form"])) : t(u) ? (p(), f(t(b), {
|
|
51
|
+
key: 1,
|
|
52
|
+
placeholder: o.previewTextPlaceholder
|
|
53
|
+
}, {
|
|
54
|
+
default: i(() => [
|
|
55
|
+
n(t(c), d(m.$attrs, {
|
|
56
|
+
onSubmit: r[1] || (r[1] = F((e) => a(e, t(u)), ["prevent", "stop"]))
|
|
57
|
+
}), {
|
|
58
|
+
default: i(() => [
|
|
59
|
+
s(m.$slots, "default")
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
}, 16)
|
|
63
|
+
]),
|
|
64
|
+
_: 3
|
|
65
|
+
}, 8, ["placeholder"])) : S("", !0);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
$ as _
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.mjs","sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"names":["props","__props","top","useForm","handleSubmit","e","form","values","error","_createBlock","_unref","FormProvider","_createVNode","PreviewText","FormLayout","_mergeProps","_ctx","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAeRC,IAAMC,EAAA;AAEZ,aAASC,EAAaC,GAAUC,GAAgB;AAC9C,MAAAA,EACG,OAAO,CAAAC,MAAUP,EAAM,eAAeO,CAAM,CAAC,EAC7C,MAAM,CAAAC,MAASR,EAAM,qBAAqBQ,CAAK,CAAC;AAAA,IACrD;qBAIsBR,EAAM,aAA1BS,EAMeC,EAAAC,CAAA,GAAA;AAAA;MANkB,MAAMX,EAAM;AAAA,IAAA;iBAC3C,MAIc;AAAA,QAJdY,EAIcF,EAAAG,CAAA,GAAA;AAAA,UAJA,aAAab,EAAM;AAAA,QAAA;qBAC/B,MAEa;AAAA,YAFbY,EAEaF,EAAAI,CAAA,GAFbC,EAEaC,EAAA,QAFa;AAAA,cAAG,2BAAS,MAAMZ,EAAa,GAAGH,EAAA,IAAI;AAAA,YAAA;yBAC9D,MAAQ;AAAA,gBAARgB,EAAQD,EAAA,QAAA,SAAA;AAAA,cAAA;;;;;;;;uBAION,EAAAR,CAAA,UACnBO,EAOcC,EAAAG,CAAA,GAAA;AAAA;MAPA,aAAab,EAAM;AAAA,IAAA;iBAC/B,MAKa;AAAA,QALbY,EAKaF,EAAAI,CAAA,GALbC,EAKaC,EAAA,QAJG;AAAA,UACb,6BAAsB,MAAMZ,EAAa,GAAGM,EAAAR,CAAA,CAAG,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA,QAAA;qBAEhD,MAAQ;AAAA,YAARe,EAAQD,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, default as Form } from './form';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
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
|
+
align: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
gutter: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
alignFormItem: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
25
|
+
align: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
gutter: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
alignFormItem: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
gutter: number;
|
|
39
|
+
align: string;
|
|
40
|
+
alignFormItem: boolean;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
42
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const FormButtonGroup: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
align: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
gutter: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
alignFormItem: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
16
|
+
gutter: number;
|
|
17
|
+
align: string;
|
|
18
|
+
alignFormItem: boolean;
|
|
19
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
20
|
+
P: {};
|
|
21
|
+
B: {};
|
|
22
|
+
D: {};
|
|
23
|
+
C: {};
|
|
24
|
+
M: {};
|
|
25
|
+
Defaults: {};
|
|
26
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
align: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
gutter: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
alignFormItem: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
40
|
+
gutter: number;
|
|
41
|
+
align: string;
|
|
42
|
+
alignFormItem: boolean;
|
|
43
|
+
}>;
|
|
44
|
+
__isFragment?: never;
|
|
45
|
+
__isTeleport?: never;
|
|
46
|
+
__isSuspense?: never;
|
|
47
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
48
|
+
align: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
gutter: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
default: number;
|
|
55
|
+
};
|
|
56
|
+
alignFormItem: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
61
|
+
gutter: number;
|
|
62
|
+
align: string;
|
|
63
|
+
alignFormItem: boolean;
|
|
64
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
65
|
+
$slots: {
|
|
66
|
+
default?(_: {}): any;
|
|
67
|
+
default?(_: {}): any;
|
|
68
|
+
};
|
|
69
|
+
}) & {
|
|
70
|
+
Sticky: {
|
|
71
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
72
|
+
P: {};
|
|
73
|
+
B: {};
|
|
74
|
+
D: {};
|
|
75
|
+
C: {};
|
|
76
|
+
M: {};
|
|
77
|
+
Defaults: {};
|
|
78
|
+
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
79
|
+
__isFragment?: never;
|
|
80
|
+
__isTeleport?: never;
|
|
81
|
+
__isSuspense?: never;
|
|
82
|
+
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
83
|
+
$slots: {
|
|
84
|
+
default?(_: {}): any;
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as u, createBlock as s, openBlock as l, unref as t, mergeProps as a, withCtx as r, renderSlot as i, createVNode as c } from "vue";
|
|
2
|
+
import { useAttrs as d, ElAffix as g, ElSpace as p } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@formily/core";
|
|
5
|
+
import "@formily/reactive-vue";
|
|
6
|
+
import { useForm as _ } from "@formily/vue";
|
|
7
|
+
import { composeExport as y } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { prefixCls as n } from "./utils.mjs";
|
|
9
|
+
import { FormItem as $ } from "../form-item/index.mjs";
|
|
10
|
+
import '../styles/form-button-group/index.css';const k = /* @__PURE__ */ u({
|
|
11
|
+
__name: "form-button-group-sticky",
|
|
12
|
+
setup(m) {
|
|
13
|
+
const e = d(), o = _();
|
|
14
|
+
return (f, h) => (l(), s(t(g), a({
|
|
15
|
+
class: `${t(n)}__sticky`
|
|
16
|
+
}, t(e), {
|
|
17
|
+
position: t(e).position ?? "bottom",
|
|
18
|
+
target: t(e).target ?? `#formily-${t(o)?.id}`
|
|
19
|
+
}), {
|
|
20
|
+
default: r(() => [
|
|
21
|
+
i(f.$slots, "default")
|
|
22
|
+
]),
|
|
23
|
+
_: 3
|
|
24
|
+
}, 16, ["class", "position", "target"]));
|
|
25
|
+
}
|
|
26
|
+
}), F = /* @__PURE__ */ u({
|
|
27
|
+
name: "FFormButtonGroup",
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "form-button-group",
|
|
30
|
+
props: {
|
|
31
|
+
align: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "left"
|
|
34
|
+
},
|
|
35
|
+
gutter: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: 8
|
|
38
|
+
},
|
|
39
|
+
alignFormItem: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
setup(m) {
|
|
45
|
+
const e = m;
|
|
46
|
+
return (o, f) => e.alignFormItem ? (l(), s(t($), a({
|
|
47
|
+
key: 0,
|
|
48
|
+
colon: !1,
|
|
49
|
+
label: " "
|
|
50
|
+
}, o.$attrs, {
|
|
51
|
+
class: t(n),
|
|
52
|
+
style: {
|
|
53
|
+
width: "100%"
|
|
54
|
+
}
|
|
55
|
+
}), {
|
|
56
|
+
default: r(() => [
|
|
57
|
+
c(t(p), {
|
|
58
|
+
size: e.gutter
|
|
59
|
+
}, {
|
|
60
|
+
default: r(() => [
|
|
61
|
+
i(o.$slots, "default")
|
|
62
|
+
]),
|
|
63
|
+
_: 3
|
|
64
|
+
}, 8, ["size"])
|
|
65
|
+
]),
|
|
66
|
+
_: 3
|
|
67
|
+
}, 16, ["class"])) : (l(), s(t(p), a({ key: 1 }, o.$attrs, {
|
|
68
|
+
class: t(n),
|
|
69
|
+
style: {
|
|
70
|
+
justifyContent: e.align === "left" ? "flex-start" : e.align === "right" ? "flex-end" : "center",
|
|
71
|
+
display: "flex"
|
|
72
|
+
},
|
|
73
|
+
size: e.gutter
|
|
74
|
+
}), {
|
|
75
|
+
default: r(() => [
|
|
76
|
+
i(o.$slots, "default")
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}, 16, ["class", "style", "size"]));
|
|
80
|
+
}
|
|
81
|
+
}), w = y(F, {
|
|
82
|
+
Sticky: k
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
w as FormButtonGroup
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/form-button-group/form-button-group-sticky.vue","../../src/form-button-group/form-button-group.vue","../../src/form-button-group/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AffixProps } from 'element-plus'\nimport type { ComputedRef } from 'vue'\nimport { useForm } from '@formily/vue'\nimport { ElAffix, useAttrs } from 'element-plus'\nimport { prefixCls } from './utils'\n\nconst attrs = useAttrs() as ComputedRef<Partial<AffixProps>>\nconst formRef = useForm()\n</script>\n\n<template>\n <ElAffix\n :class=\"`${prefixCls}__sticky`\"\n v-bind=\"attrs\"\n :position=\"attrs.position ?? 'bottom'\"\n :target=\"attrs.target ?? `#formily-${formRef?.id}`\"\n >\n <slot />\n </ElAffix>\n</template>\n","<script lang=\"ts\" setup>\nimport { ElSpace } from 'element-plus'\nimport FormItem from '../form-item/index'\nimport { prefixCls } from './utils'\n\ndefineOptions({\n name: 'FFormButtonGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n align: {\n type: String,\n default: 'left',\n },\n gutter: {\n type: Number,\n default: 8,\n },\n alignFormItem: {\n type: Boolean,\n default: false,\n },\n})\n</script>\n\n<template>\n <FormItem\n v-if=\"props.alignFormItem\"\n :colon=\"false\"\n label=\" \"\n v-bind=\"$attrs\"\n :class=\"prefixCls\"\n :style=\"{\n width: '100%',\n }\"\n >\n <ElSpace :size=\"props.gutter\">\n <slot />\n </ElSpace>\n </FormItem>\n <ElSpace\n v-else\n v-bind=\"$attrs\"\n :class=\"prefixCls\"\n :style=\"{\n justifyContent: props.align === 'left'\n ? 'flex-start'\n : (props.align === 'right'\n ? 'flex-end'\n : 'center'),\n display: 'flex',\n }\"\n :size=\"props.gutter\"\n >\n <slot />\n </ElSpace>\n</template>\n","import { composeExport } from '../__builtins__/shared'\nimport FormButtonGroupSticky from './form-button-group-sticky.vue'\nimport FormButtonGroupInner from './form-button-group.vue'\nimport './style.scss'\n\nexport const FormButtonGroup = composeExport(FormButtonGroupInner, {\n Sticky: FormButtonGroupSticky,\n})\n"],"names":["attrs","useAttrs","formRef","useForm","_openBlock","_createBlock","_unref","_mergeProps","prefixCls","_renderSlot","_ctx","props","__props","$attrs","_createVNode","ElSpace","FormButtonGroup","composeExport","FormButtonGroupInner","FormButtonGroupSticky"],"mappings":";;;;;;;;;;;;AAOA,UAAMA,IAAQC,EAAA,GACRC,IAAUC,EAAA;sBAIdC,KAAAC,EAOUC,MAPVC,EAOU;AAAA,MANP,UAAUD,EAAAE,CAAA,CAAS;AAAA,IAAA,GACZF,EAAAN,CAAA,GAAK;AAAA,MACZ,UAAUM,EAAAN,CAAA,EAAM,YAAQ;AAAA,MACxB,QAAQM,EAAAN,CAAA,EAAM,UAAM,YAAgBM,EAAAJ,CAAA,GAAS,EAAE;AAAA,IAAA;iBAEhD,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;ACRZ,UAAMC,IAAQC;qBAkBJD,EAAM,iBADdP,EAAA,GAAAC,EAaWC,MAbXC,EAaW;AAAA;MAXR,OAAO;AAAA,MACR,OAAM;AAAA,IAAA,GACEM,EAAAA,QAAM;AAAA,MACb,OAAOP,EAAAE,CAAA;AAAA,MACP,OAAO;AAAA;;IAEP;iBAED,MAEU;AAAA,QAFVM,EAEUR,EAAAS,CAAA,GAAA;AAAA,UAFA,MAAMJ,EAAM;AAAA,QAAA;qBACpB,MAAQ;AAAA,YAARF,EAAQC,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;+BAGZL,EAeUC,EAAAS,CAAA,GAfVR,EAeU,EAAA,KAAA,EAAA,GAbAM,EAAAA,QAAM;AAAA,MACb,OAAOP,EAAAE,CAAA;AAAA,MACP,OAAK;AAAA,QAA0B,gBAAAG,EAAM,UAAK,wBAA8CA,EAAM,UAAK;;;MAQnG,MAAMA,EAAM;AAAA,IAAA;iBAEb,MAAQ;AAAA,QAARF,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;IClDCM,IAAkBC,EAAcC,GAAsB;AAAA,EACjE,QAAQC;AACV,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const prefixCls = "formily-element-plus-form-button-group";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { stylePrefix as o } from "../__builtins__/configs/index.mjs";
|
|
2
|
+
import "vue";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "@formily/reactive";
|
|
5
|
+
import "@formily/core";
|
|
6
|
+
import "@formily/reactive-vue";
|
|
7
|
+
import "@formily/vue";
|
|
8
|
+
const s = `${o}-form-button-group`;
|
|
9
|
+
export {
|
|
10
|
+
s as prefixCls
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/form-button-group/utils.ts"],"sourcesContent":["import { stylePrefix } from '../__builtins__'\n\nexport const prefixCls = `${stylePrefix}-form-button-group`\n"],"names":["prefixCls","stylePrefix"],"mappings":";;;;;;;AAEO,MAAMA,IAAY,GAAGC,CAAW;"}
|