@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,321 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, createElementBlock as d, openBlock as r, normalizeClass as H, createBlock as u, unref as e, normalizeProps as m, mergeProps as p, withCtx as n, createTextVNode as c, toDisplayString as a, Fragment as P, renderList as j, computed as R, useSlots as Q, renderSlot as b, createCommentVNode as K, createVNode as G, guardReactiveProps as U, provide as X, reactive as Z } from "vue";
|
|
2
|
-
import { ElText as k, ElSpace as V, ElTag as I, dayjs as D, ElScrollbar as ee, ElTree as te } from "element-plus";
|
|
3
|
-
import "@formily/reactive";
|
|
4
|
-
import "@formily/core";
|
|
5
|
-
import "@formily/reactive-vue";
|
|
6
|
-
import { useField as N } from "@formily/vue";
|
|
7
|
-
import { useCleanAttrs as A, composeExport as re } from "../__builtins__/shared/utils.mjs";
|
|
8
|
-
import { stylePrefix as S } from "../__builtins__/configs/index.mjs";
|
|
9
|
-
import { usePreviewConfig as C, previewTextConfigKey as ae } from "./utils.mjs";
|
|
10
|
-
import { isFn as se, isValid as J, isArr as le } from "@formily/shared";
|
|
11
|
-
import { getSelectedPath as oe } from "../tree/utils.mjs";
|
|
12
|
-
import '../styles/preview-text/index.css';const ne = /* @__PURE__ */ $({
|
|
13
|
-
name: "FPreviewTextCascader",
|
|
14
|
-
inheritAttrs: !1,
|
|
15
|
-
__name: "cascader",
|
|
16
|
-
props: {
|
|
17
|
-
value: null
|
|
18
|
-
},
|
|
19
|
-
setup(_) {
|
|
20
|
-
var W, z, q;
|
|
21
|
-
const t = _, l = `${S}-preview-text`, v = N().value, { props: s } = A(), y = !!((W = s.value.props) != null && W.multiple), f = s.value.showAllLevels ?? !0, o = (v == null ? void 0 : v.dataSource) ?? [], { spaceProps: i, textProps: g, tagProps: F, placeholder: Y } = C(), w = ((z = s.value.props) == null ? void 0 : z.value) || "value", E = ((q = s.value.props) == null ? void 0 : q.label) || "label";
|
|
22
|
-
function M(B, L) {
|
|
23
|
-
const T = L.find((x) => (x == null ? void 0 : x[w]) === B);
|
|
24
|
-
return T ? T[E] : L.map((x) => x != null && x.children ? M(B, x.children) : void 0).find((x) => x !== void 0);
|
|
25
|
-
}
|
|
26
|
-
return (B, L) => (r(), d("div", {
|
|
27
|
-
class: H(l)
|
|
28
|
-
}, [
|
|
29
|
-
Array.isArray(t.value) ? y && Array.isArray(t.value[0]) ? (r(), u(e(V), m(p({ key: 1 }, e(i))), {
|
|
30
|
-
default: n(() => [
|
|
31
|
-
(r(!0), d(P, null, j(t.value, (T, x) => (r(), u(e(I), p({ key: x }, { ref_for: !0 }, e(F)), {
|
|
32
|
-
default: n(() => [
|
|
33
|
-
e(f) ? (r(), d(P, { key: 0 }, [
|
|
34
|
-
c(a(T.map((O) => M(O, e(o)) || e(Y)).join(` ${e(s).separator ?? "/"} `)), 1)
|
|
35
|
-
], 64)) : (r(), d(P, { key: 1 }, [
|
|
36
|
-
c(a(M(T[T.length - 1], e(o)) || e(Y)), 1)
|
|
37
|
-
], 64))
|
|
38
|
-
]),
|
|
39
|
-
_: 2
|
|
40
|
-
}, 1040))), 128))
|
|
41
|
-
]),
|
|
42
|
-
_: 1
|
|
43
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 2 }, e(g))), {
|
|
44
|
-
default: n(() => [
|
|
45
|
-
e(f) ? (r(), d(P, { key: 0 }, [
|
|
46
|
-
c(a(t.value.map((T) => M(T, e(o)) || e(Y)).join(` ${e(s).separator ?? "/"} `)), 1)
|
|
47
|
-
], 64)) : (r(), d(P, { key: 1 }, [
|
|
48
|
-
c(a(M(t.value[t.value.length - 1], e(o)) || e(Y)), 1)
|
|
49
|
-
], 64))
|
|
50
|
-
]),
|
|
51
|
-
_: 1
|
|
52
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 0 }, e(g))), {
|
|
53
|
-
default: n(() => [
|
|
54
|
-
c(a(e(Y)), 1)
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 16))
|
|
58
|
-
]));
|
|
59
|
-
}
|
|
60
|
-
}), ue = /* @__PURE__ */ $({
|
|
61
|
-
name: "FPreviewTextDatePicker",
|
|
62
|
-
inheritAttrs: !1,
|
|
63
|
-
__name: "date-picker",
|
|
64
|
-
props: {
|
|
65
|
-
value: null
|
|
66
|
-
},
|
|
67
|
-
setup(_) {
|
|
68
|
-
const t = _, { props: l } = A(), h = `${S}-preview-text`, { spaceProps: v, textProps: s, tagProps: y, placeholder: f } = C();
|
|
69
|
-
function o(F) {
|
|
70
|
-
switch (F) {
|
|
71
|
-
case "year":
|
|
72
|
-
return "YYYY";
|
|
73
|
-
case "years":
|
|
74
|
-
return "YYYY";
|
|
75
|
-
case "month":
|
|
76
|
-
return "YYYY-MM";
|
|
77
|
-
case "months":
|
|
78
|
-
return "YYYY-MM";
|
|
79
|
-
case "week":
|
|
80
|
-
return "[Week] ww";
|
|
81
|
-
case "date":
|
|
82
|
-
return "YYYY-MM-DD";
|
|
83
|
-
case "dates":
|
|
84
|
-
return "YYYY-MM-DD";
|
|
85
|
-
case "datetime":
|
|
86
|
-
return "YYYY-MM-DD HH:mm:ss";
|
|
87
|
-
case "daterange":
|
|
88
|
-
return "YYYY-MM-DD";
|
|
89
|
-
case "monthrange":
|
|
90
|
-
return "YYYY-MM";
|
|
91
|
-
case "yearrange":
|
|
92
|
-
return "YYYY";
|
|
93
|
-
case "datetimerange":
|
|
94
|
-
return "YYYY-MM-DD HH:mm:ss";
|
|
95
|
-
default:
|
|
96
|
-
return "YYYY-MM-DD";
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
const i = R(() => l.value.type || "date"), g = R(() => l.value.format || o(i.value));
|
|
100
|
-
return (F, Y) => (r(), d("div", {
|
|
101
|
-
class: H(h)
|
|
102
|
-
}, [
|
|
103
|
-
t.value ? (r(), d(P, { key: 0 }, [
|
|
104
|
-
i.value.endsWith("range") ? (r(), u(e(k), m(p({ key: 0 }, e(s))), {
|
|
105
|
-
default: n(() => [
|
|
106
|
-
c(a(t.value[0] ? e(D)(t.value[0]).format(g.value) : e(f)) + " " + a(e(l).rangeSeparator ?? "~") + " " + a(t.value[1] ? e(D)(t.value[1]).format(g.value) : e(f)), 1)
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 16)) : i.value.endsWith("s") ? (r(), u(e(V), m(p({ key: 1 }, e(v))), {
|
|
110
|
-
default: n(() => [
|
|
111
|
-
(r(!0), d(P, null, j(t.value, (w) => (r(), u(e(I), p({ key: w }, { ref_for: !0 }, e(y)), {
|
|
112
|
-
default: n(() => [
|
|
113
|
-
c(a(e(D)(w).format(g.value)), 1)
|
|
114
|
-
]),
|
|
115
|
-
_: 2
|
|
116
|
-
}, 1040))), 128))
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 2 }, e(s))), {
|
|
120
|
-
default: n(() => [
|
|
121
|
-
c(a(e(D)(t.value).format(g.value)), 1)
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 16))
|
|
125
|
-
], 64)) : (r(), u(e(k), m(p({ key: 1 }, e(s))), {
|
|
126
|
-
default: n(() => [
|
|
127
|
-
c(a(e(f)), 1)
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 16))
|
|
131
|
-
]));
|
|
132
|
-
}
|
|
133
|
-
}), pe = /* @__PURE__ */ $({
|
|
134
|
-
name: "FPreviewTextInput",
|
|
135
|
-
inheritAttrs: !1,
|
|
136
|
-
__name: "input",
|
|
137
|
-
props: {
|
|
138
|
-
value: null
|
|
139
|
-
},
|
|
140
|
-
setup(_) {
|
|
141
|
-
const t = _, l = Q(), { props: h } = A(), v = `${S}-preview-text`, { spaceProps: s, textProps: y, placeholder: f } = C();
|
|
142
|
-
return (o, i) => (r(), u(e(V), p({ class: v }, e(s)), {
|
|
143
|
-
default: n(() => [
|
|
144
|
-
l.prepend ? b(o.$slots, "prepend", { key: 0 }) : K("", !0),
|
|
145
|
-
l.prefix ? b(o.$slots, "prefix", { key: 1 }) : K("", !0),
|
|
146
|
-
G(e(k), m(U(e(y))), {
|
|
147
|
-
default: n(() => [
|
|
148
|
-
e(se)(e(h).formatter) ? (r(), d(P, { key: 0 }, [
|
|
149
|
-
c(a(e(h).formatter(t.value)), 1)
|
|
150
|
-
], 64)) : e(J)(t.value) ? (r(), d(P, { key: 1 }, [
|
|
151
|
-
c(a(t.value === "" ? " " : t.value), 1)
|
|
152
|
-
], 64)) : (r(), d(P, { key: 2 }, [
|
|
153
|
-
c(a(e(f)), 1)
|
|
154
|
-
], 64))
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
157
|
-
}, 16),
|
|
158
|
-
l.suffix ? b(o.$slots, "suffix", { key: 2 }) : K("", !0),
|
|
159
|
-
l.append ? b(o.$slots, "append", { key: 3 }) : K("", !0)
|
|
160
|
-
]),
|
|
161
|
-
_: 3
|
|
162
|
-
}, 16));
|
|
163
|
-
}
|
|
164
|
-
}), ce = /* @__PURE__ */ $({
|
|
165
|
-
name: "FPreviewTextProvider",
|
|
166
|
-
inheritAttrs: !1,
|
|
167
|
-
__name: "preview",
|
|
168
|
-
props: {
|
|
169
|
-
placeholder: null,
|
|
170
|
-
tagProps: null,
|
|
171
|
-
spaceProps: null,
|
|
172
|
-
textProps: null
|
|
173
|
-
},
|
|
174
|
-
setup(_) {
|
|
175
|
-
const t = _;
|
|
176
|
-
return X(ae, Z({
|
|
177
|
-
placeholder: t.placeholder,
|
|
178
|
-
tagProps: t.tagProps,
|
|
179
|
-
spaceProps: t.spaceProps,
|
|
180
|
-
textProps: t.textProps
|
|
181
|
-
})), (l, h) => b(l.$slots, "default");
|
|
182
|
-
}
|
|
183
|
-
}), ie = /* @__PURE__ */ $({
|
|
184
|
-
name: "FPreviewTextSelect",
|
|
185
|
-
__name: "select",
|
|
186
|
-
props: {
|
|
187
|
-
value: null
|
|
188
|
-
},
|
|
189
|
-
setup(_) {
|
|
190
|
-
const t = _, l = `${S}-preview-text`, h = N(), { props: v } = A(), s = h.value.dataSource ?? [], { spaceProps: y, textProps: f, tagProps: o, placeholder: i } = C();
|
|
191
|
-
return (g, F) => (r(), d("div", {
|
|
192
|
-
class: H(l)
|
|
193
|
-
}, [
|
|
194
|
-
e(J)(t.value) ? e(v).multiple ? (r(), u(e(V), m(p({ key: 2 }, e(y))), {
|
|
195
|
-
default: n(() => [
|
|
196
|
-
(r(!0), d(P, null, j(t.value, (Y, w) => (r(), u(e(I), p({ key: w }, { ref_for: !0 }, e(o)), {
|
|
197
|
-
default: n(() => {
|
|
198
|
-
var E;
|
|
199
|
-
return [
|
|
200
|
-
c(a(((E = e(s).find((M) => M.value === Y)) == null ? void 0 : E.label) ?? Y), 1)
|
|
201
|
-
];
|
|
202
|
-
}),
|
|
203
|
-
_: 2
|
|
204
|
-
}, 1040))), 128))
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 1 }, e(f))), {
|
|
208
|
-
default: n(() => {
|
|
209
|
-
var Y;
|
|
210
|
-
return [
|
|
211
|
-
c(a(((Y = e(s).find((w) => w.value === t.value)) == null ? void 0 : Y.label) ?? t.value), 1)
|
|
212
|
-
];
|
|
213
|
-
}),
|
|
214
|
-
_: 1
|
|
215
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 0 }, e(f))), {
|
|
216
|
-
default: n(() => [
|
|
217
|
-
c(a(e(i)), 1)
|
|
218
|
-
]),
|
|
219
|
-
_: 1
|
|
220
|
-
}, 16))
|
|
221
|
-
]));
|
|
222
|
-
}
|
|
223
|
-
}), de = /* @__PURE__ */ $({
|
|
224
|
-
name: "FPreviewTextTimePicker",
|
|
225
|
-
inheritAttrs: !1,
|
|
226
|
-
__name: "time-picker",
|
|
227
|
-
props: {
|
|
228
|
-
value: null
|
|
229
|
-
},
|
|
230
|
-
setup(_) {
|
|
231
|
-
const t = _, { props: l } = A(), h = `${S}-preview-text`, { textProps: v, placeholder: s } = C(), y = l.value.format || "HH:mm:ss", f = l.value.valueFormat || "HH:mm:ss";
|
|
232
|
-
function o(i) {
|
|
233
|
-
if (i) {
|
|
234
|
-
if (i instanceof Date)
|
|
235
|
-
return D(i).format(y);
|
|
236
|
-
if (typeof i == "string")
|
|
237
|
-
return D(i, f).format(y);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return (i, g) => (r(), d("div", {
|
|
241
|
-
class: H(h)
|
|
242
|
-
}, [
|
|
243
|
-
e(le)(t.value) ? (r(), u(e(k), m(p({ key: 0 }, e(v))), {
|
|
244
|
-
default: n(() => [
|
|
245
|
-
c(a(o(t.value[0]) || e(s)) + " " + a(e(l).rangeSeparator ?? "~") + " " + a(o(t.value[1]) || e(s)), 1)
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 16)) : (r(), u(e(k), m(p({ key: 1 }, e(v))), {
|
|
249
|
-
default: n(() => [
|
|
250
|
-
c(a(o(t.value) || e(s)), 1)
|
|
251
|
-
]),
|
|
252
|
-
_: 1
|
|
253
|
-
}, 16))
|
|
254
|
-
]));
|
|
255
|
-
}
|
|
256
|
-
}), fe = /* @__PURE__ */ $({
|
|
257
|
-
name: "FPreviewTree",
|
|
258
|
-
inheritAttrs: !1,
|
|
259
|
-
__name: "tree",
|
|
260
|
-
props: {
|
|
261
|
-
nodeKey: null,
|
|
262
|
-
value: null,
|
|
263
|
-
valueType: { default: "all" },
|
|
264
|
-
data: null,
|
|
265
|
-
props: { default: () => ({
|
|
266
|
-
children: "children",
|
|
267
|
-
label: "label",
|
|
268
|
-
disabled: "disabled"
|
|
269
|
-
}) },
|
|
270
|
-
height: null,
|
|
271
|
-
maxHeight: null
|
|
272
|
-
},
|
|
273
|
-
setup(_) {
|
|
274
|
-
const t = _, l = `${S}-preview-tree`, h = N(), { props: v } = A(), { textProps: s, placeholder: y } = C(), f = R(() => h.value.dataSource ?? t.data ?? []), o = R(() => {
|
|
275
|
-
if (!t.value || !Array.isArray(t.value) || t.value.length === 0)
|
|
276
|
-
return [];
|
|
277
|
-
switch (t.valueType) {
|
|
278
|
-
case "path":
|
|
279
|
-
return t.value;
|
|
280
|
-
default:
|
|
281
|
-
return oe(f.value, t.value, t.nodeKey, t.props);
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
return (i, g) => (r(), d("div", {
|
|
285
|
-
class: H(l)
|
|
286
|
-
}, [
|
|
287
|
-
o.value.length > 0 ? (r(), u(e(ee), {
|
|
288
|
-
key: 0,
|
|
289
|
-
height: t.height,
|
|
290
|
-
"max-height": t.maxHeight
|
|
291
|
-
}, {
|
|
292
|
-
default: n(() => [
|
|
293
|
-
G(e(te), p({
|
|
294
|
-
data: o.value,
|
|
295
|
-
"node-key": t.nodeKey,
|
|
296
|
-
props: t.props,
|
|
297
|
-
"default-expand-all": !0
|
|
298
|
-
}, e(v)), null, 16, ["data", "node-key", "props"])
|
|
299
|
-
]),
|
|
300
|
-
_: 1
|
|
301
|
-
}, 8, ["height", "max-height"])) : (r(), u(e(k), m(p({ key: 1 }, e(s))), {
|
|
302
|
-
default: n(() => [
|
|
303
|
-
c(a(e(y)), 1)
|
|
304
|
-
]),
|
|
305
|
-
_: 1
|
|
306
|
-
}, 16))
|
|
307
|
-
]));
|
|
308
|
-
}
|
|
309
|
-
}), Te = re(ce, {
|
|
310
|
-
Input: pe,
|
|
311
|
-
Select: ie,
|
|
312
|
-
Cascader: ne,
|
|
313
|
-
DatePicker: ue,
|
|
314
|
-
TimePicker: de,
|
|
315
|
-
Tree: fe
|
|
316
|
-
});
|
|
317
|
-
export {
|
|
318
|
-
Te as PreviewText,
|
|
319
|
-
Te as default
|
|
320
|
-
};
|
|
321
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/preview-text/cascader.vue","../../src/preview-text/date-picker.vue","../../src/preview-text/input.vue","../../src/preview-text/preview.vue","../../src/preview-text/select.vue","../../src/preview-text/time-picker.vue","../../src/preview-text/tree.vue","../../src/preview-text/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Field } from '@formily/core'\nimport { useField } from '@formily/vue'\nimport { ElSpace, ElTag, ElText } from 'element-plus'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextCascader',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n value: null\n})\nconst prefixCls = `${stylePrefix}-preview-text`\nconst fieldRef = useField<Field>()\nconst field = fieldRef.value\nconst { props: attrs } = useCleanAttrs()\nconst isMultiple = !!attrs.value.props?.multiple\nconst isShowAllLevels = attrs.value.showAllLevels ?? true\nconst dataSource: any[] = field?.dataSource ?? []\nconst { spaceProps, textProps, tagProps, placeholder } = usePreviewConfig()\n\nconst valueKey = attrs.value.props?.value || 'value'\nconst labelKey = attrs.value.props?.label || 'label'\n\nfunction findLabel(value: any, dataSource: any[]): any {\n const foundItem = dataSource.find(item => item?.[valueKey] === value)\n if (foundItem)\n return foundItem[labelKey]\n return dataSource\n .map(item => item?.children ? findLabel(value, item.children) : undefined)\n .find(label => label !== undefined)\n}\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <template v-if=\"!Array.isArray(props.value)\">\n <ElText v-bind=\"textProps\">\n {{ placeholder }}\n </ElText>\n </template>\n <template v-else-if=\"isMultiple && Array.isArray(props.value[0])\">\n <ElSpace v-bind=\"spaceProps\">\n <ElTag v-for=\"(item, key) of props.value\" :key=\"key\" v-bind=\"tagProps\">\n <template v-if=\"isShowAllLevels\">\n {{ item.map(val => findLabel(val, dataSource) || placeholder).join(` ${attrs.separator ?? '/'} `) }}\n </template>\n <template v-else>\n {{ findLabel(item[item.length - 1], dataSource) || placeholder }}\n </template>\n </ElTag>\n </ElSpace>\n </template>\n <template v-else>\n <ElText v-bind=\"textProps\">\n <template v-if=\"isShowAllLevels\">\n {{ props.value.map(val => findLabel(val, dataSource) || placeholder).join(` ${attrs.separator ?? '/'} `) }}\n </template>\n <template v-else>\n {{ findLabel(props.value[props.value.length - 1], dataSource) || placeholder }}\n </template>\n </ElText>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { dayjs, ElSpace, ElTag, ElText } from 'element-plus'\nimport { computed } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextDatePicker',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n value: null\n})\nconst { props: attrs } = useCleanAttrs()\nconst prefixCls = `${stylePrefix}-preview-text`\nconst { spaceProps, textProps, tagProps, placeholder } = usePreviewConfig()\n\nfunction getFormatByType(type: string): string {\n switch (type) {\n case 'year': {\n return 'YYYY'\n }\n case 'years': {\n return 'YYYY'\n }\n case 'month': {\n return 'YYYY-MM'\n }\n case 'months': {\n return 'YYYY-MM'\n }\n case 'week': {\n return '[Week] ww'\n }\n case 'date': {\n return 'YYYY-MM-DD'\n }\n case 'dates': {\n return 'YYYY-MM-DD'\n }\n case 'datetime': {\n return 'YYYY-MM-DD HH:mm:ss'\n }\n case 'daterange': {\n return 'YYYY-MM-DD'\n }\n case 'monthrange': {\n return 'YYYY-MM'\n }\n case 'yearrange': {\n return 'YYYY'\n }\n case 'datetimerange': {\n return 'YYYY-MM-DD HH:mm:ss'\n }\n default: {\n return 'YYYY-MM-DD'\n }\n }\n}\nconst type = computed(() => attrs.value.type || 'date')\nconst format = computed(() => attrs.value.format || getFormatByType(type.value))\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <template v-if=\"props.value\">\n <template v-if=\"type.endsWith('range')\">\n <ElText v-bind=\"textProps\">\n {{ props.value[0] ? dayjs(props.value[0]).format(format) : placeholder }}\n {{ attrs.rangeSeparator ?? '~' }}\n {{ props.value[1] ? dayjs(props.value[1]).format(format) : placeholder }}\n </ElText>\n </template>\n <template v-else-if=\"type.endsWith('s')\">\n <ElSpace v-bind=\"spaceProps\">\n <ElTag v-for=\"i of props.value\" :key=\"i\" v-bind=\"tagProps\">\n {{ dayjs(i).format(format) }}\n </ElTag>\n </ElSpace>\n </template>\n <template v-else>\n <ElText v-bind=\"textProps\">\n {{ dayjs(props.value).format(format) }}\n </ElText>\n </template>\n </template>\n <template v-else>\n <ElText v-bind=\"textProps\">\n {{ placeholder }}\n </ElText>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { isFn, isValid } from '@formily/shared'\nimport { ElSpace, ElText } from 'element-plus'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextInput',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n value: null\n})\n\nconst slots = defineSlots<{\n prepend?: () => any\n prefix?: () => any\n suffix?: () => any\n append?: () => any\n}>()\nconst { props: attrs } = useCleanAttrs()\nconst prefixCls = `${stylePrefix}-preview-text`\nconst { spaceProps, textProps, placeholder } = usePreviewConfig()\n</script>\n\n<template>\n <ElSpace :class=\"prefixCls\" v-bind=\"spaceProps\">\n <slot v-if=\"slots.prepend\" name=\"prepend\" />\n <slot v-if=\"slots.prefix\" name=\"prefix\" />\n <ElText v-bind=\"textProps\">\n <template v-if=\"isFn(attrs.formatter)\">\n {{ attrs.formatter(props.value) }}\n </template>\n <template v-else-if=\"isValid(props.value)\">\n {{ props.value === '' ? ' ' : props.value }}\n </template>\n <template v-else>\n {{ placeholder }}\n </template>\n </ElText>\n <slot v-if=\"slots.suffix\" name=\"suffix\" />\n <slot v-if=\"slots.append\" name=\"append\" />\n </ElSpace>\n</template>\n","<script setup lang=\"ts\">\nimport type { PreviewTextProps } from './utils'\nimport { provide, reactive } from 'vue'\nimport { previewTextConfigKey } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextProvider',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n placeholder: null,\n tagProps: null,\n spaceProps: null,\n textProps: null\n})\n\nprovide(previewTextConfigKey, reactive({\n placeholder: props.placeholder,\n tagProps: props.tagProps,\n spaceProps: props.spaceProps,\n textProps: props.textProps,\n}))\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport type { Field } from '@formily/core'\nimport { isValid } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { ElSpace, ElTag, ElText } from 'element-plus'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextSelect',\n})\n\nconst props = defineProps({\n value: null\n})\n\nconst prefixCls = `${stylePrefix}-preview-text`\n\nconst fieldRef = useField<Field>()\nconst { props: attrs } = useCleanAttrs()\nconst dataSource = fieldRef.value.dataSource ?? []\nconst { spaceProps, textProps, tagProps, placeholder } = usePreviewConfig()\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <template v-if=\"!isValid(props.value)\">\n <ElText v-bind=\"textProps\">\n {{ placeholder }}\n </ElText>\n </template>\n <template v-else-if=\"!attrs.multiple\">\n <ElText v-bind=\"textProps\">\n {{ dataSource.find(i => i.value === props.value)?.label ?? props.value }}\n </ElText>\n </template>\n <ElSpace v-else v-bind=\"spaceProps\">\n <ElTag v-for=\"(item, key) of props.value\" :key=\"key\" v-bind=\"tagProps\">\n {{ dataSource.find(i => i.value === item)?.label ?? item }}\n </ElTag>\n </ElSpace>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { isArr } from '@formily/shared'\nimport { dayjs, ElText } from 'element-plus'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTextTimePicker',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n value: null\n})\nconst { props: attrs } = useCleanAttrs()\nconst prefixCls = `${stylePrefix}-preview-text`\nconst { textProps, placeholder } = usePreviewConfig()\nconst format = attrs.value.format || 'HH:mm:ss'\nconst parseFormat = attrs.value.valueFormat || 'HH:mm:ss'\n\nfunction formatTimeValue(value: any): string | void {\n if (!value)\n return\n if (value instanceof Date) {\n return dayjs(value).format(format)\n }\n if (typeof value === 'string') {\n return dayjs(value, parseFormat).format(format)\n }\n}\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <template v-if=\"isArr(props.value)\">\n <ElText v-bind=\"textProps\">\n {{ formatTimeValue(props.value[0]) || placeholder }}\n {{ attrs.rangeSeparator ?? '~' }}\n {{ formatTimeValue(props.value[1]) || placeholder }}\n </ElText>\n </template>\n <template v-else>\n <ElText v-bind=\"textProps\">\n {{ formatTimeValue(props.value) || placeholder }}\n </ElText>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { ArrayField } from '@formily/core'\nimport { useField } from '@formily/vue'\nimport { ElScrollbar, ElText, ElTree } from 'element-plus'\nimport { computed } from 'vue'\nimport { stylePrefix, useCleanAttrs } from '../__builtins__'\nimport { getSelectedPath } from '../tree/utils'\nimport { usePreviewConfig } from './utils'\n\ndefineOptions({\n name: 'FPreviewTree',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n nodeKey: null,\n value: null,\n valueType: { default: 'all' },\n data: null,\n props: { default: () => ({\n children: 'children',\n label: 'label',\n disabled: 'disabled',\n }) },\n height: null,\n maxHeight: null\n})\n\nconst prefixCls = `${stylePrefix}-preview-tree`\nconst fieldRef = useField<ArrayField>()\nconst { props: attrs } = useCleanAttrs()\nconst { textProps, placeholder } = usePreviewConfig()\n\nconst dataSource = computed(() => {\n return fieldRef.value.dataSource ?? props.data ?? []\n})\n\nconst previewData = computed(() => {\n if (!props.value || !Array.isArray(props.value) || props.value.length === 0) {\n return []\n }\n switch (props.valueType) {\n case 'path': {\n return props.value\n }\n default: {\n const selectedPath = getSelectedPath(dataSource.value, props.value, props.nodeKey, props.props)\n return selectedPath\n }\n }\n})\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElScrollbar\n v-if=\"previewData.length > 0\"\n :height=\"props.height\"\n :max-height=\"props.maxHeight\"\n >\n <ElTree\n :data=\"previewData\"\n :node-key=\"props.nodeKey\"\n :props=\"props.props\"\n :default-expand-all=\"true\"\n v-bind=\"attrs\"\n />\n </ElScrollbar>\n <ElText v-else v-bind=\"textProps\">\n {{ placeholder }}\n </ElText>\n </div>\n</template>\n","import { composeExport } from '../__builtins__/shared'\nimport Cascader from './cascader.vue'\nimport DatePicker from './date-picker.vue'\nimport Input from './input.vue'\nimport Preview from './preview.vue'\nimport Select from './select.vue'\nimport TimePicker from './time-picker.vue'\nimport Tree from './tree.vue'\nimport './style.scss'\n\nexport const PreviewText = composeExport(Preview, {\n Input,\n Select,\n Cascader,\n DatePicker,\n TimePicker,\n Tree,\n})\n\nexport default PreviewText\n"],"names":["props","__props","prefixCls","stylePrefix","field","useField","attrs","useCleanAttrs","isMultiple","_a","isShowAllLevels","dataSource","spaceProps","textProps","tagProps","placeholder","usePreviewConfig","valueKey","_b","labelKey","_c","findLabel","value","foundItem","item","label","_createElementBlock","_openBlock","_createBlock","_unref","_Fragment","key","_mergeProps","_createTextVNode","_toDisplayString","val","getFormatByType","type","computed","format","dayjs","_renderList","i","slots","_useSlots","_renderSlot","_ctx","_createVNode","isFn","isValid","provide","previewTextConfigKey","reactive","fieldRef","parseFormat","formatTimeValue","isArr","previewData","getSelectedPath","ElScrollbar","PreviewText","composeExport","Preview","Input","Select","Cascader","DatePicker","TimePicker","Tree"],"mappings":";;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAGRC,IAAY,GAAGC,CAAW,iBAE1BC,IADWC,EAAA,EACM,OACjB,EAAE,OAAOC,EAAA,IAAUC,EAAA,GACnBC,IAAa,CAAC,GAACC,IAAAH,EAAM,MAAM,UAAZ,QAAAG,EAAmB,WAClCC,IAAkBJ,EAAM,MAAM,iBAAiB,IAC/CK,KAAoBP,KAAA,gBAAAA,EAAO,eAAc,CAAA,GACzC,EAAE,YAAAQ,GAAY,WAAAC,GAAW,UAAAC,GAAU,aAAAC,EAAA,IAAgBC,EAAA,GAEnDC,MAAWC,IAAAZ,EAAM,MAAM,UAAZ,gBAAAY,EAAmB,UAAS,SACvCC,MAAWC,IAAAd,EAAM,MAAM,UAAZ,gBAAAc,EAAmB,UAAS;AAE7C,aAASC,EAAUC,GAAYX,GAAwB;AACrD,YAAMY,IAAYZ,EAAW,KAAK,QAAQa,KAAA,gBAAAA,EAAOP,QAAcK,CAAK;AACpE,aAAIC,IACKA,EAAUJ,CAAQ,IACpBR,EACJ,IAAI,CAAAa,MAAQA,KAAA,QAAAA,EAAM,WAAWH,EAAUC,GAAOE,EAAK,QAAQ,IAAI,MAAS,EACxE,KAAK,CAAAC,MAASA,MAAU,MAAS;AAAA,IACtC;2BAIEC,EA4BM,OAAA;AAAA,MA5BA,SAAOxB,CAAS;AAAA,IAAA;MACH,MAAM,QAAQF,EAAM,KAAK,IAKrBQ,KAAc,MAAM,QAAQR,EAAM,MAAK,CAAA,CAAA,KAC1D2B,KAAAC,EASUC,sBATOA,EAAAj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-1,28 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
value?: any;
|
|
3
|
-
};
|
|
4
|
-
declare function __VLS_template(): {
|
|
5
|
-
attrs: Partial<{}>;
|
|
6
|
-
slots: Readonly<{
|
|
7
|
-
prepend?: () => any;
|
|
8
|
-
prefix?: () => any;
|
|
9
|
-
suffix?: () => any;
|
|
10
|
-
append?: () => any;
|
|
11
|
-
}> & {
|
|
12
|
-
prepend?: () => any;
|
|
13
|
-
prefix?: () => any;
|
|
14
|
-
suffix?: () => any;
|
|
15
|
-
append?: () => any;
|
|
16
|
-
};
|
|
17
|
-
refs: {};
|
|
18
|
-
rootEl: any;
|
|
19
|
-
};
|
|
20
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
-
new (): {
|
|
26
|
-
$slots: S;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PreviewTextProps } from './utils';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {};
|
|
8
|
-
rootEl: any;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<PreviewTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PreviewTextProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
-
new (): {
|
|
16
|
-
$slots: S;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
value?: any;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
5
|
-
export default _default;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
value?: any;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
nodeKey: string;
|
|
3
|
-
value?: any;
|
|
4
|
-
valueType?: string;
|
|
5
|
-
data?: any[];
|
|
6
|
-
props?: {
|
|
7
|
-
children?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
disabled?: string;
|
|
10
|
-
};
|
|
11
|
-
height?: number;
|
|
12
|
-
maxHeight?: number;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
-
props: {
|
|
16
|
-
children?: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
disabled?: string;
|
|
19
|
-
};
|
|
20
|
-
valueType: string;
|
|
21
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SpaceProps, TagProps, TextProps } from 'element-plus';
|
|
2
|
-
export interface PreviewTextProps {
|
|
3
|
-
placeholder?: string;
|
|
4
|
-
tagProps?: Partial<TagProps>;
|
|
5
|
-
spaceProps?: Partial<SpaceProps>;
|
|
6
|
-
textProps?: Partial<TextProps>;
|
|
7
|
-
}
|
|
8
|
-
export declare const previewTextConfigKey: unique symbol;
|
|
9
|
-
export declare function usePreviewConfig(): {
|
|
10
|
-
placeholder: import('vue').ComputedRef<string>;
|
|
11
|
-
tagProps: import('vue').ComputedRef<Partial<TagProps>>;
|
|
12
|
-
spaceProps: import('vue').ComputedRef<Partial<SpaceProps>>;
|
|
13
|
-
textProps: import('vue').ComputedRef<Partial<TextProps>>;
|
|
14
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { inject as r, computed as o } from "vue";
|
|
2
|
-
const n = Symbol("previewTextConfig");
|
|
3
|
-
function a() {
|
|
4
|
-
const t = r(n, {}), s = o(() => (t == null ? void 0 : t.placeholder) || "N/A"), c = o(() => (t == null ? void 0 : t.tagProps) ?? { type: "info" }), e = o(() => (t == null ? void 0 : t.spaceProps) || {}), p = o(() => (t == null ? void 0 : t.textProps) || {});
|
|
5
|
-
return {
|
|
6
|
-
placeholder: s,
|
|
7
|
-
tagProps: c,
|
|
8
|
-
spaceProps: e,
|
|
9
|
-
textProps: p
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
n as previewTextConfigKey,
|
|
14
|
-
a as usePreviewConfig
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/preview-text/utils.ts"],"sourcesContent":["import type { SpaceProps, TagProps, TextProps } from 'element-plus'\nimport { computed, inject } from 'vue'\n\nexport interface PreviewTextProps {\n placeholder?: string\n tagProps?: Partial<TagProps>\n spaceProps?: Partial<SpaceProps>\n textProps?: Partial<TextProps>\n}\n\nexport const previewTextConfigKey = Symbol('previewTextConfig')\n\nexport function usePreviewConfig() {\n const previewConfig = inject(previewTextConfigKey, {}) as PreviewTextProps\n const placeholder = computed(() => previewConfig?.placeholder || 'N/A')\n const tagProps = computed<Partial<TagProps>>(() => previewConfig?.tagProps ?? { type: 'info' })\n const spaceProps = computed(() => previewConfig?.spaceProps || {})\n const textProps = computed(() => previewConfig?.textProps || {})\n return {\n placeholder,\n tagProps,\n spaceProps,\n textProps,\n }\n}\n"],"names":["previewTextConfigKey","usePreviewConfig","previewConfig","inject","placeholder","computed","tagProps","spaceProps","textProps"],"mappings":";AAUO,MAAMA,IAAuB,OAAO,mBAAmB;AAEvD,SAASC,IAAmB;AACjC,QAAMC,IAAgBC,EAAOH,GAAsB,EAAE,GAC/CI,IAAcC,EAAS,OAAMH,KAAA,gBAAAA,EAAe,gBAAe,KAAK,GAChEI,IAAWD,EAA4B,OAAMH,KAAA,gBAAAA,EAAe,aAAY,EAAE,MAAM,QAAQ,GACxFK,IAAaF,EAAS,OAAMH,KAAA,gBAAAA,EAAe,eAAc,CAAA,CAAE,GAC3DM,IAAYH,EAAS,OAAMH,KAAA,gBAAAA,EAAe,cAAa,CAAA,CAAE;AAC/D,SAAO;AAAA,IACL,aAAAE;AAAA,IACA,UAAAE;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAEJ;"}
|