@silver-formily/element-plus 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +32 -0
- package/README.md +32 -35
- package/esm/__builtins__/index.mjs +15 -16
- package/esm/__builtins__/shared/index.mjs +11 -12
- package/esm/__builtins__/shared/transform-component.d.ts +2 -6
- package/esm/__builtins__/shared/transform-component.mjs +16 -33
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +10 -10
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +58 -58
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-cards/index.mjs +44 -44
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +59 -58
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-items/index.mjs +46 -43
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/index.mjs +15 -14
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-table/array-table.d.ts +28 -0
- package/esm/array-table/index.d.ts +28 -0
- package/esm/array-table/index.mjs +113 -111
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/types.d.ts +1 -0
- package/esm/cascader/index.mjs +19 -20
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts +1 -4
- package/esm/checkbox/index.d.ts +442 -379
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/editable/editable.d.ts +16 -12
- package/esm/editable/index.d.ts +8 -6
- package/esm/editable/index.mjs +110 -112
- package/esm/editable/index.mjs.map +1 -1
- package/esm/form-button-group/index.mjs +29 -28
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +42 -43
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-dialog/index.d.ts +1 -1
- package/esm/form-dialog/index.mjs +4 -4
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +6 -6
- package/esm/form-drawer/index.d.ts +1 -1
- package/esm/form-drawer/index.mjs +4 -4
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +6 -6
- package/esm/form-grid/index.d.ts +1 -183
- package/esm/form-grid/index.mjs +1 -1
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/form-item.d.ts +2 -1
- package/esm/form-item/index.d.ts +12 -6
- package/esm/form-item/index.mjs +163 -155
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +0 -1
- package/esm/form-layout/form-layout.d.ts +0 -1
- package/esm/form-layout/form-layout.mjs +53 -52
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/types.d.ts +0 -2
- package/esm/form-layout/utils.d.ts +3 -3
- package/esm/form-layout/utils.mjs +48 -43
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +27 -25
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +1 -26
- package/esm/form-tab/index.mjs +30 -30
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.mjs +44 -38
- package/esm/index.mjs.map +1 -1
- package/esm/input/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +258 -147
- package/esm/pagination/pagination.mjs +109 -110
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/index.d.ts +5 -0
- package/esm/preview-text/index.mjs +165 -141
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/rate.d.ts +5 -0
- package/esm/preview-text/utils.d.ts +5 -5
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/radio/index.d.ts +344 -194
- package/esm/radio/index.mjs.map +1 -1
- package/esm/rate/index.d.ts +187 -0
- package/esm/rate/index.mjs +14 -0
- package/esm/rate/index.mjs.map +1 -0
- package/esm/reset/index.d.ts +1 -62
- package/esm/reset/index.mjs +1 -1
- package/esm/reset/index.mjs.map +1 -1
- package/esm/segmented/index.d.ts +26 -0
- package/esm/segmented/index.mjs +37 -0
- package/esm/segmented/index.mjs.map +1 -0
- package/esm/segmented/segmented.d.ts +25 -0
- package/esm/select/index.mjs +8 -8
- package/esm/select/index.mjs.map +1 -1
- package/esm/select-table/index.d.ts +28 -0
- package/esm/select-table/index.mjs +48 -47
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +56 -0
- package/esm/slider/index.d.ts +177 -0
- package/esm/slider/index.mjs +14 -0
- package/esm/slider/index.mjs.map +1 -0
- package/esm/submit/index.d.ts +1 -47
- package/esm/submit/index.mjs +1 -1
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +225 -189
- package/esm/time-select/index.d.ts +163 -103
- package/esm/transfer/index.d.ts +196 -115
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.mjs +26 -26
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/upload/index.d.ts +404 -399
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +800 -790
- package/esm/vendor/icon.mjs.map +1 -1
- package/esm/vendor/lodash.mjs +12 -20
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/runtime.mjs +29 -24
- package/esm/vendor/runtime.mjs.map +1 -1
- package/esm/vendor/shared.esm-bundler.mjs +2 -2
- package/esm/vendor/sizes.mjs.map +1 -1
- package/esm/vendor/types.mjs +5 -5
- package/esm/vendor/types.mjs.map +1 -1
- package/package.json +8 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ArrayBase as r } from "../array-base/index.mjs";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { stylePrefix as
|
|
4
|
-
import { autorun as
|
|
5
|
-
import { isArr as
|
|
6
|
-
import { useField as U, useFieldSchema as K, RecursionField as
|
|
2
|
+
import { defineComponent as S, createElementBlock as n, openBlock as t, normalizeClass as h, renderSlot as V, ref as $, mergeProps as B, unref as e, createBlock as f, withCtx as y, createVNode as C, Fragment as v, renderList as R, createCommentVNode as D } from "vue";
|
|
3
|
+
import { stylePrefix as I } from "../__builtins__/configs/index.mjs";
|
|
4
|
+
import { autorun as E } from "@formily/reactive";
|
|
5
|
+
import { isArr as _ } from "@formily/shared";
|
|
6
|
+
import { useField as U, useFieldSchema as K, RecursionField as F } from "@silver-formily/vue";
|
|
7
7
|
import { VueDraggable as P } from "vue-draggable-plus";
|
|
8
8
|
import { useKey as b, getArrayItemSchema as H, isAdditionComponent as N } from "../array-base/utils.mjs";
|
|
9
9
|
import { useCleanAttrs as z, composeExport as L } from "../__builtins__/shared/utils.mjs";
|
|
10
|
-
import '../styles/array-items/index.css';const j = /* @__PURE__ */
|
|
10
|
+
import '../styles/array-items/index.css';const j = /* @__PURE__ */ S({
|
|
11
11
|
name: "FArrayItemsItem",
|
|
12
12
|
__name: "array-items-item",
|
|
13
13
|
props: {
|
|
@@ -16,53 +16,56 @@ import '../styles/array-items/index.css';const j = /* @__PURE__ */ R({
|
|
|
16
16
|
default: "card"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
return (
|
|
22
|
-
class:
|
|
19
|
+
setup(A) {
|
|
20
|
+
const u = A, l = `${I}-array-items`;
|
|
21
|
+
return (s, c) => (t(), n("div", {
|
|
22
|
+
class: h(`${l}-${u.type}`)
|
|
23
23
|
}, [
|
|
24
|
-
|
|
24
|
+
V(s.$slots, "default")
|
|
25
25
|
], 2));
|
|
26
26
|
}
|
|
27
|
-
}), q = ["index"], G = /* @__PURE__ */
|
|
27
|
+
}), q = ["index"], G = /* @__PURE__ */ S({
|
|
28
28
|
name: "FArrayItems",
|
|
29
29
|
inheritAttrs: !1,
|
|
30
30
|
__name: "array-items",
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
setup(A) {
|
|
32
|
+
const u = U(), l = K(), s = u.value, c = l.value, i = `${I}-array-items`, { getKey: g, keyMap: m } = b(l.value), d = $(_(s.value) ? s.value : []), k = $(0);
|
|
33
|
+
E(() => {
|
|
34
|
+
d.value = _(s.value) ? [...s.value] : [];
|
|
35
35
|
});
|
|
36
|
-
async function
|
|
37
|
-
const { oldIndex: p, newIndex:
|
|
38
|
-
|
|
36
|
+
async function w(x) {
|
|
37
|
+
const { oldIndex: p, newIndex: a } = x;
|
|
38
|
+
_(m) && m.splice(a, 0, m.splice(p, 1)[0]), await s.move(p, a), k.value++;
|
|
39
39
|
}
|
|
40
|
-
const { props:
|
|
41
|
-
return (
|
|
42
|
-
|
|
40
|
+
const { props: M } = z(["value", "modelValue", "onUpdate:modelValue"]);
|
|
41
|
+
return (x, p) => (t(), n("div", B({ class: i }, e(M)), [
|
|
42
|
+
(t(), f(e(r), {
|
|
43
|
+
key: k.value,
|
|
44
|
+
"key-map": e(m)
|
|
45
|
+
}, {
|
|
43
46
|
default: y(() => [
|
|
44
|
-
|
|
45
|
-
class:
|
|
46
|
-
"model-value":
|
|
47
|
-
handle: `.${e(
|
|
47
|
+
C(e(P), {
|
|
48
|
+
class: h(`${i}-list`),
|
|
49
|
+
"model-value": d.value,
|
|
50
|
+
handle: `.${e(I)}-array-base-sort-handle`,
|
|
48
51
|
animation: 150,
|
|
49
|
-
onEnd:
|
|
52
|
+
onEnd: w
|
|
50
53
|
}, {
|
|
51
54
|
default: y(() => [
|
|
52
|
-
(
|
|
53
|
-
key: e(
|
|
54
|
-
index:
|
|
55
|
-
record:
|
|
55
|
+
(t(!0), n(v, null, R(d.value, (a, o) => (t(), f(e(r).Item, {
|
|
56
|
+
key: e(g)(a, o),
|
|
57
|
+
index: o,
|
|
58
|
+
record: a
|
|
56
59
|
}, {
|
|
57
60
|
default: y(() => [
|
|
58
|
-
(
|
|
59
|
-
key: e(
|
|
60
|
-
class:
|
|
61
|
-
index:
|
|
61
|
+
(t(), n("div", {
|
|
62
|
+
key: e(g)(a, o),
|
|
63
|
+
class: h([`${i}-item-inner`]),
|
|
64
|
+
index: o
|
|
62
65
|
}, [
|
|
63
|
-
|
|
64
|
-
schema: e(H)(e(
|
|
65
|
-
name:
|
|
66
|
+
C(e(F), {
|
|
67
|
+
schema: e(H)(e(c), o),
|
|
68
|
+
name: o
|
|
66
69
|
}, null, 8, ["schema", "name"])
|
|
67
70
|
], 10, q))
|
|
68
71
|
]),
|
|
@@ -71,16 +74,16 @@ import '../styles/array-items/index.css';const j = /* @__PURE__ */ R({
|
|
|
71
74
|
]),
|
|
72
75
|
_: 1
|
|
73
76
|
}, 8, ["class", "model-value", "handle"]),
|
|
74
|
-
(
|
|
75
|
-
e(N)(
|
|
77
|
+
(t(!0), n(v, null, R(e(c).properties, (a, o) => (t(), n(v, { key: o }, [
|
|
78
|
+
e(N)(a) ? (t(), f(e(F), {
|
|
76
79
|
key: 0,
|
|
77
|
-
schema:
|
|
80
|
+
schema: a,
|
|
78
81
|
name: "addition"
|
|
79
|
-
}, null, 8, ["schema"])) :
|
|
82
|
+
}, null, 8, ["schema"])) : D("", !0)
|
|
80
83
|
], 64))), 128))
|
|
81
84
|
]),
|
|
82
85
|
_: 1
|
|
83
|
-
}, 8, ["key-map"])
|
|
86
|
+
}, 8, ["key-map"]))
|
|
84
87
|
], 16));
|
|
85
88
|
}
|
|
86
89
|
}), re = L(G, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/array-items/array-items-item.vue","../../src/array-items/array-items.vue","../../src/array-items/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { PropType } from 'vue'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\n\r\ndefineOptions({\r\n name: 'FArrayItemsItem',\r\n})\r\n\r\nconst props = defineProps({\r\n type: {\r\n type: String as PropType<'card' | 'divide'>,\r\n default: 'card',\r\n },\r\n})\r\n\r\nconst prefixCls = `${stylePrefix}-array-items`\r\n</script>\r\n\r\n<template>\r\n <div\r\n :class=\"`${prefixCls}-${props.type}`\"\r\n >\r\n <slot />\r\n </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport type { ArrayField } from '@formily/core'\r\nimport { autorun } from '@formily/reactive'\r\nimport { isArr } from '@formily/shared'\r\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\r\nimport { ref } from 'vue'\r\nimport { VueDraggable } from 'vue-draggable-plus'\r\nimport { useCleanAttrs } from '../__builtins__'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\nimport { ArrayBase } from '../array-base'\r\nimport { getArrayItemSchema, isAdditionComponent, useKey } from '../array-base/utils'\r\n\r\ndefineOptions({\r\n name: 'FArrayItems',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst fieldRef = useField<ArrayField>()\r\nconst schemaRef = useFieldSchema()\r\nconst field = fieldRef.value\r\nconst schema = schemaRef.value\r\n\r\nconst prefixCls = `${stylePrefix}-array-items`\r\nconst { getKey, keyMap } = useKey(schemaRef.value)\r\nconst dataSource = ref(field.value)\r\nconst triggerUpdateKey = ref(0)\r\n\r\nautorun(() => {\r\n dataSource.value = [...field.value]\r\n})\r\n\r\nasync function handleDragEnd(evt: { oldIndex: number, newIndex: number }) {\r\n const { oldIndex, newIndex } = evt\r\n if (isArr(keyMap)) {\r\n keyMap.splice(newIndex, 0, keyMap.splice(oldIndex, 1)[0])\r\n }\r\n await field.move(oldIndex, newIndex)\r\n triggerUpdateKey.value++\r\n}\r\nconst { props: arrayItemsProps } = useCleanAttrs(['value', 'modelValue', 'onUpdate:modelValue'])\r\n</script>\r\n\r\n<template>\r\n <div :class=\"prefixCls\" v-bind=\"arrayItemsProps\">\r\n <ArrayBase :key-map=\"keyMap\">\r\n <VueDraggable\r\n :class=\"`${prefixCls}-list`\"\r\n :model-value=\"dataSource\"\r\n :handle=\"`.${stylePrefix}-array-base-sort-handle`\"\r\n :animation=\"150\"\r\n @end=\"handleDragEnd\"\r\n >\r\n <ArrayBase.Item\r\n v-for=\"(element, index) of dataSource\"\r\n :key=\"getKey(element, index)\"\r\n :index=\"index\"\r\n :record=\"element\"\r\n >\r\n <div :key=\"getKey(element, index)\" :class=\"[`${prefixCls}-item-inner`]\" :index=\"index\">\r\n <RecursionField :schema=\"getArrayItemSchema(schema, index)\" :name=\"index\" />\r\n </div>\r\n </ArrayBase.Item>\r\n </VueDraggable>\r\n\r\n <template v-for=\"(itemSchema, key) of schema.properties\" :key=\"key\">\r\n <RecursionField v-if=\"isAdditionComponent(itemSchema)\" :schema=\"itemSchema\" name=\"addition\" />\r\n </template>\r\n </ArrayBase>\r\n </div>\r\n</template>\r\n","import { composeExport } from '../__builtins__/shared'\r\nimport { ArrayBase } from '../array-base'\r\nimport ArrayItemsItem from './array-items-item.vue'\r\nimport ArrayItemsInner from './array-items.vue'\r\nimport './style.scss'\r\n\r\nexport const ArrayItems = composeExport(ArrayItemsInner, {\r\n Item: ArrayItemsItem,\r\n Index: ArrayBase.Index,\r\n SortHandle: ArrayBase.SortHandle,\r\n Addition: ArrayBase.Addition,\r\n Remove: ArrayBase.Remove,\r\n MoveDown: ArrayBase.MoveDown,\r\n MoveUp: ArrayBase.MoveUp,\r\n useArray: ArrayBase.useArray,\r\n useIndex: ArrayBase.useIndex,\r\n useRecord: ArrayBase.useRecord,\r\n})\r\n\r\nexport default ArrayItems\r\n"],"names":["props","__props","prefixCls","stylePrefix","_createElementBlock","_normalizeClass","_renderSlot","_ctx","fieldRef","useField","schemaRef","useFieldSchema","field","schema","getKey","keyMap","useKey","dataSource","ref","triggerUpdateKey","autorun","handleDragEnd","evt","oldIndex","newIndex","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/array-items/array-items-item.vue","../../src/array-items/array-items.vue","../../src/array-items/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { PropType } from 'vue'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\n\r\ndefineOptions({\r\n name: 'FArrayItemsItem',\r\n})\r\n\r\nconst props = defineProps({\r\n type: {\r\n type: String as PropType<'card' | 'divide'>,\r\n default: 'card',\r\n },\r\n})\r\n\r\nconst prefixCls = `${stylePrefix}-array-items`\r\n</script>\r\n\r\n<template>\r\n <div\r\n :class=\"`${prefixCls}-${props.type}`\"\r\n >\r\n <slot />\r\n </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport type { ArrayField } from '@formily/core'\r\nimport { autorun } from '@formily/reactive'\r\nimport { isArr } from '@formily/shared'\r\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\r\nimport { ref } from 'vue'\r\nimport { VueDraggable } from 'vue-draggable-plus'\r\nimport { useCleanAttrs } from '../__builtins__'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\nimport { ArrayBase } from '../array-base'\r\nimport { getArrayItemSchema, isAdditionComponent, useKey } from '../array-base/utils'\r\n\r\ndefineOptions({\r\n name: 'FArrayItems',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst fieldRef = useField<ArrayField>()\r\nconst schemaRef = useFieldSchema()\r\nconst field = fieldRef.value\r\nconst schema = schemaRef.value\r\n\r\nconst prefixCls = `${stylePrefix}-array-items`\r\nconst { getKey, keyMap } = useKey(schemaRef.value)\r\nconst dataSource = ref(isArr(field.value) ? field.value : [])\r\nconst triggerUpdateKey = ref(0)\r\n\r\nautorun(() => {\r\n dataSource.value = isArr(field.value) ? [...field.value] : []\r\n})\r\n\r\nasync function handleDragEnd(evt: { oldIndex: number, newIndex: number }) {\r\n const { oldIndex, newIndex } = evt\r\n if (isArr(keyMap)) {\r\n keyMap.splice(newIndex, 0, keyMap.splice(oldIndex, 1)[0])\r\n }\r\n await field.move(oldIndex, newIndex)\r\n triggerUpdateKey.value++\r\n}\r\nconst { props: arrayItemsProps } = useCleanAttrs(['value', 'modelValue', 'onUpdate:modelValue'])\r\n</script>\r\n\r\n<template>\r\n <div :class=\"prefixCls\" v-bind=\"arrayItemsProps\">\r\n <ArrayBase :key=\"triggerUpdateKey\" :key-map=\"keyMap\">\r\n <VueDraggable\r\n :class=\"`${prefixCls}-list`\"\r\n :model-value=\"dataSource\"\r\n :handle=\"`.${stylePrefix}-array-base-sort-handle`\"\r\n :animation=\"150\"\r\n @end=\"handleDragEnd\"\r\n >\r\n <ArrayBase.Item\r\n v-for=\"(element, index) of dataSource\"\r\n :key=\"getKey(element, index)\"\r\n :index=\"index\"\r\n :record=\"element\"\r\n >\r\n <div :key=\"getKey(element, index)\" :class=\"[`${prefixCls}-item-inner`]\" :index=\"index\">\r\n <RecursionField :schema=\"getArrayItemSchema(schema, index)\" :name=\"index\" />\r\n </div>\r\n </ArrayBase.Item>\r\n </VueDraggable>\r\n\r\n <template v-for=\"(itemSchema, key) of schema.properties\" :key=\"key\">\r\n <RecursionField v-if=\"isAdditionComponent(itemSchema)\" :schema=\"itemSchema\" name=\"addition\" />\r\n </template>\r\n </ArrayBase>\r\n </div>\r\n</template>\r\n","import { composeExport } from '../__builtins__/shared'\r\nimport { ArrayBase } from '../array-base'\r\nimport ArrayItemsItem from './array-items-item.vue'\r\nimport ArrayItemsInner from './array-items.vue'\r\nimport './style.scss'\r\n\r\nexport const ArrayItems = composeExport(ArrayItemsInner, {\r\n Item: ArrayItemsItem,\r\n Index: ArrayBase.Index,\r\n SortHandle: ArrayBase.SortHandle,\r\n Addition: ArrayBase.Addition,\r\n Remove: ArrayBase.Remove,\r\n MoveDown: ArrayBase.MoveDown,\r\n MoveUp: ArrayBase.MoveUp,\r\n useArray: ArrayBase.useArray,\r\n useIndex: ArrayBase.useIndex,\r\n useRecord: ArrayBase.useRecord,\r\n})\r\n\r\nexport default ArrayItems\r\n"],"names":["props","__props","prefixCls","stylePrefix","_createElementBlock","_normalizeClass","_renderSlot","_ctx","fieldRef","useField","schemaRef","useFieldSchema","field","schema","getKey","keyMap","useKey","dataSource","ref","isArr","triggerUpdateKey","autorun","handleDragEnd","evt","oldIndex","newIndex","arrayItemsProps","useCleanAttrs","_openBlock","_mergeProps","_unref","_createBlock","ArrayBase","_createVNode","VueDraggable","_Fragment","_renderList","element","index","RecursionField","getArrayItemSchema","itemSchema","key","isAdditionComponent","ArrayItems","composeExport","ArrayItemsInner","ArrayItemsItem"],"mappings":";;;;;;;;;;;;;;;;;;;AAQA,UAAMA,IAAQC,GAORC,IAAY,GAAGC,CAAW;2BAI9BC,EAIM,OAAA;AAAA,MAHH,OAAKC,EAAA,GAAKH,CAAS,IAAIF,EAAM,IAAI,EAAA;AAAA,IAAA;MAElCM,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;ACLZ,UAAMC,IAAWC,EAAA,GACXC,IAAYC,EAAA,GACZC,IAAQJ,EAAS,OACjBK,IAASH,EAAU,OAEnBR,IAAY,GAAGC,CAAW,gBAC1B,EAAE,QAAAW,GAAQ,QAAAC,EAAA,IAAWC,EAAON,EAAU,KAAK,GAC3CO,IAAaC,EAAIC,EAAMP,EAAM,KAAK,IAAIA,EAAM,QAAQ,EAAE,GACtDQ,IAAmBF,EAAI,CAAC;AAE9B,IAAAG,EAAQ,MAAM;AACZ,MAAAJ,EAAW,QAAQE,EAAMP,EAAM,KAAK,IAAI,CAAC,GAAGA,EAAM,KAAK,IAAI,CAAA;AAAA,IAC7D,CAAC;AAED,mBAAeU,EAAcC,GAA6C;AACxE,YAAM,EAAE,UAAAC,GAAU,UAAAC,EAAA,IAAaF;AAC/B,MAAIJ,EAAMJ,CAAM,KACdA,EAAO,OAAOU,GAAU,GAAGV,EAAO,OAAOS,GAAU,CAAC,EAAE,CAAC,CAAC,GAE1D,MAAMZ,EAAM,KAAKY,GAAUC,CAAQ,GACnCL,EAAiB;AAAA,IACnB;AACA,UAAM,EAAE,OAAOM,MAAoBC,EAAc,CAAC,SAAS,cAAc,qBAAqB,CAAC;sBAI7FC,EAAA,GAAAxB,EAyBM,OAzBNyB,EAyBM,EAzBA,OAAO3B,EAAA,GAAmB4B,EAAAJ,CAAA,CAAe,GAAA;AAAA,YAC7CK,EAuBYD,EAA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A,EACpB,QAAQA,EAAU;AAAA,EAClB,UAAUA,EAAU;AAAA,EACpB,QAAQA,EAAU;AAAA,EAClB,UAAUA,EAAU;AAAA,EACpB,UAAUA,EAAU;AAAA,EACpB,WAAWA,EAAU;AACvB,CAAC;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ArrayBase as y } from "../array-base/index.mjs";
|
|
2
|
-
import { defineComponent as P, ref as A, createElementBlock as s, openBlock as a, normalizeClass as i, unref as e, createBlock as d, withCtx as h, createElementVNode as I, createCommentVNode as k, createVNode as T, Fragment as
|
|
3
|
-
import {
|
|
2
|
+
import { defineComponent as P, ref as A, createElementBlock as s, openBlock as a, normalizeClass as i, unref as e, createBlock as d, withCtx as h, createElementVNode as I, createCommentVNode as k, createVNode as T, Fragment as b, renderList as F, toDisplayString as q, normalizeStyle as z } from "vue";
|
|
3
|
+
import { autorun as V } from "@formily/reactive";
|
|
4
4
|
import { isArr as w } from "@formily/shared";
|
|
5
|
+
import { formilyComputed as K } from "@silver-formily/reactive-vue";
|
|
5
6
|
import { useField as N, useFieldSchema as D, RecursionField as _ } from "@silver-formily/vue";
|
|
6
7
|
import { ElScrollbar as M, ElBadge as G, ElEmpty as H } from "element-plus";
|
|
7
8
|
import { isRemoveComponent as B, isAdditionComponent as J, getArrayItemSchema as O } from "../array-base/utils.mjs";
|
|
@@ -25,7 +26,7 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
setup(R) {
|
|
28
|
-
const o = R, S = N(), g = D(), l = S.value, p = g.value, f = A(0), { getKey: C, keyMap: j } = y.useKey(g.value),
|
|
29
|
+
const o = R, S = N(), g = D(), l = S.value, p = g.value, f = A(0), { getKey: C, keyMap: j } = y.useKey(g.value), v = K(() => o.showTitleFieldInTab ? l.value.map((m, u) => {
|
|
29
30
|
const r = l.path.concat(u);
|
|
30
31
|
return l.form.queryFeedbacks({
|
|
31
32
|
type: "error",
|
|
@@ -42,14 +43,14 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
42
43
|
if (o.showTitleFieldInTab) {
|
|
43
44
|
const m = l.value.map((u, r) => [
|
|
44
45
|
r,
|
|
45
|
-
|
|
46
|
+
v.value[r]
|
|
46
47
|
].join("|")).join(",");
|
|
47
48
|
$.value = m;
|
|
48
49
|
} else {
|
|
49
50
|
const m = l.value.map((u, r) => [
|
|
50
51
|
r,
|
|
51
52
|
u?.[o.tabTitleField],
|
|
52
|
-
|
|
53
|
+
v.value[r]
|
|
53
54
|
].join("|")).join(",");
|
|
54
55
|
$.value = m;
|
|
55
56
|
}
|
|
@@ -74,7 +75,7 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
74
75
|
class: i(`${e(n)}_list--scroll-wrapper`)
|
|
75
76
|
}, {
|
|
76
77
|
default: h(() => [
|
|
77
|
-
(a(!0), s(
|
|
78
|
+
(a(!0), s(b, null, F(o.modelValue, (r, t) => (a(), d(e(y).Item, {
|
|
78
79
|
key: t,
|
|
79
80
|
index: t,
|
|
80
81
|
record: r
|
|
@@ -96,12 +97,12 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
96
97
|
}, [
|
|
97
98
|
T(e(G), {
|
|
98
99
|
class: i([`${e(n)}-errors-badge`]),
|
|
99
|
-
value: e(
|
|
100
|
+
value: e(v)[t],
|
|
100
101
|
offset: [5, 0],
|
|
101
|
-
hidden: e(
|
|
102
|
+
hidden: e(v)[t] === 0
|
|
102
103
|
}, {
|
|
103
104
|
default: h(() => [
|
|
104
|
-
o.showTitleFieldInTab ? (a(), s(
|
|
105
|
+
o.showTitleFieldInTab ? (a(), s(b, { key: 1 }, [
|
|
105
106
|
e(w)(e(p).items) ? k("", !0) : (a(), d(e(_), {
|
|
106
107
|
key: 0,
|
|
107
108
|
schema: e(p).items,
|
|
@@ -131,7 +132,7 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
131
132
|
]),
|
|
132
133
|
_: 1
|
|
133
134
|
}, 8, ["class"]),
|
|
134
|
-
(a(!0), s(
|
|
135
|
+
(a(!0), s(b, null, F(e(p).properties, (r, t) => (a(), s(b, { key: t }, [
|
|
135
136
|
e(J)(r) ? (a(), d(e(_), {
|
|
136
137
|
key: 0,
|
|
137
138
|
schema: r,
|
|
@@ -145,7 +146,7 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
145
146
|
}, [
|
|
146
147
|
T(e(H), { "image-size": 100 })
|
|
147
148
|
], 2)) : k("", !0),
|
|
148
|
-
(a(!0), s(
|
|
149
|
+
(a(!0), s(b, null, F(o.modelValue, (r, t) => (a(), d(e(y).Item, {
|
|
149
150
|
key: e(C)(r, t),
|
|
150
151
|
index: t,
|
|
151
152
|
record: r
|
|
@@ -174,12 +175,12 @@ import '../styles/array-list-tabs/index.css';const U = ["id", "aria-controls", "
|
|
|
174
175
|
}, 8, ["key-map"]))
|
|
175
176
|
], 2));
|
|
176
177
|
}
|
|
177
|
-
}),
|
|
178
|
+
}), ie = Q(X, {
|
|
178
179
|
Addition: y.Addition,
|
|
179
180
|
Remove: y.Remove
|
|
180
181
|
});
|
|
181
182
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
ie as ArrayListTabs,
|
|
184
|
+
ie as default
|
|
184
185
|
};
|
|
185
186
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/array-list-tabs/array-list-tabs.vue","../../src/array-list-tabs/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { ArrayField } from '@formily/core'\r\nimport type { ISchema } from '@formily/json-schema'\r\nimport { autorun, observable } from '@formily/reactive'\r\nimport { isArr } from '@formily/shared'\r\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\r\nimport { ElBadge, ElEmpty, ElScrollbar } from 'element-plus'\r\nimport { ref } from 'vue'\r\nimport { ArrayBase } from '../array-base'\r\nimport { getArrayItemSchema, isAdditionComponent, isRemoveComponent } from '../array-base/utils'\r\nimport { isTabTitleComponent, prefixCls } from './utils'\r\nimport './style.scss'\r\n\r\ndefineOptions({\r\n name: 'FArrayListTabs',\r\n})\r\n\r\nconst props = defineProps({\r\n tabTitleField: {\r\n required: true,\r\n type: String,\r\n },\r\n showTitleFieldInTab: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n modelValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n})\r\n\r\nconst fieldRef = useField<ArrayField>()\r\nconst schemaRef = useFieldSchema()\r\nconst field = fieldRef.value\r\nconst schema = schemaRef.value\r\n\r\nconst activeIndex = ref(0)\r\nconst { getKey, keyMap } = ArrayBase.useKey(schemaRef.value)\r\n\r\nconst errorCountList = observable.computed(() => {\r\n if (props.showTitleFieldInTab) {\r\n return field.value.map((item, index) => {\r\n const path = field.path.concat(index)\r\n return field.form.queryFeedbacks({\r\n type: 'error',\r\n path: `${path}.*(!${props.tabTitleField})`,\r\n }).length\r\n })\r\n }\r\n return field.value.map((item, index) => {\r\n const path = field.path.concat(index)\r\n return field.form.queryFeedbacks({\r\n type: 'error',\r\n path: `${path}.**`,\r\n }).length\r\n })\r\n})\r\n\r\n// 保证arrayBase在必要时重新渲染\r\nconst arrayBaseKey = ref()\r\n\r\nautorun(() => {\r\n if (props.showTitleFieldInTab) {\r\n const key = field.value.map((item, index) => {\r\n const keyParts = [\r\n index,\r\n errorCountList.value[index],\r\n ]\r\n return keyParts.join('|')\r\n }).join(',')\r\n arrayBaseKey.value = key\r\n }\r\n else {\r\n const key = field.value.map((item, index) => {\r\n const keyParts = [\r\n index,\r\n item?.[props.tabTitleField],\r\n errorCountList.value[index],\r\n ]\r\n return keyParts.join('|')\r\n }).join(',')\r\n arrayBaseKey.value = key\r\n }\r\n})\r\n\r\nautorun(() => {\r\n if (field.value.length > 0 && activeIndex.value >= field.value.length) {\r\n activeIndex.value = field.value.length - 1\r\n }\r\n})\r\n\r\nfunction getTabTitle(item) {\r\n return `${item?.[props.tabTitleField] || '未命名条目'}`\r\n}\r\n</script>\r\n\r\n<template>\r\n <div :class=\"prefixCls\">\r\n <ArrayBase :key=\"props.modelValue.length\" :key-map=\"keyMap\">\r\n <ul :class=\"`${prefixCls}_list`\">\r\n <ElScrollbar :class=\"`${prefixCls}_list--scroll-wrapper`\">\r\n <ArrayBase.Item\r\n v-for=\"(item, index) in props.modelValue\"\r\n :key=\"index\"\r\n :index=\"index\"\r\n :record=\"item\"\r\n >\r\n <li\r\n :id=\"`${field.props.name}-tab-${index}`\"\r\n :key=\"arrayBaseKey\"\r\n :class=\"[\r\n `${prefixCls}_list-item`,\r\n activeIndex === index && 'is-active',\r\n ]\"\r\n role=\"tab\"\r\n :aria-controls=\"`${field.props.name}-tab-panel-${index}`\"\r\n @click=\"() => activeIndex = index\"\r\n >\r\n <div :class=\"`${prefixCls}_list-item--content`\">\r\n <ElBadge\r\n :class=\"[`${prefixCls}-errors-badge`]\"\r\n :value=\"errorCountList.value[index]\"\r\n :offset=\"[5, 0]\"\r\n :hidden=\"errorCountList.value[index] === 0\"\r\n >\r\n <template v-if=\"!props.showTitleFieldInTab\">\r\n <span :class=\"`${prefixCls}_list-item--title`\">{{ getTabTitle(item) }}</span>\r\n </template>\r\n <template v-else>\r\n <RecursionField\r\n v-if=\"!isArr(schema.items)\"\r\n :schema=\"schema.items\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => isTabTitleComponent(schema, props.tabTitleField)\"\r\n only-render-properties\r\n />\r\n </template>\r\n </ElBadge>\r\n </div>\r\n <!-- remove icon -->\r\n <RecursionField\r\n v-if=\"!isArr(schema.items)\"\r\n :schema=\"schema.items\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => isRemoveComponent(schema)\"\r\n only-render-properties\r\n />\r\n </li>\r\n </ArrayBase.Item>\r\n </ElScrollbar>\r\n <template v-for=\"(property, key) in schema.properties\" :key=\"key\">\r\n <RecursionField\r\n v-if=\"isAdditionComponent(property)\"\r\n :schema=\"property\"\r\n name=\"addition\"\r\n />\r\n </template>\r\n </ul>\r\n <div v-if=\"props.modelValue.length === 0\" :class=\"`${prefixCls}-tabpane`\">\r\n <ElEmpty :image-size=\"100\" />\r\n </div>\r\n <ArrayBase.Item\r\n v-for=\"(item, index) in props.modelValue\"\r\n :key=\"getKey(item, index)\"\r\n :index=\"index\"\r\n :record=\"item\"\r\n >\r\n <!-- tab-panel -->\r\n <div\r\n :id=\"`${field.props.name}-tab-panel-${index}`\"\r\n :key=\"getKey(item, index)\"\r\n :class=\"`${prefixCls}-tabpane`\"\r\n :style=\"{ display: activeIndex === index ? undefined : 'none' }\"\r\n role=\"tabpanel\"\r\n :aria-labelledby=\"`${field.props.name}-tab-${index}`\"\r\n >\r\n <RecursionField\r\n :schema=\"getArrayItemSchema(schema, index)\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => {\r\n if (isRemoveComponent(schema)) {\r\n return false\r\n }\r\n if (props.showTitleFieldInTab) {\r\n return !isTabTitleComponent(schema, props.tabTitleField)\r\n }\r\n return true\r\n }\"\r\n only-render-properties\r\n />\r\n </div>\r\n </ArrayBase.Item>\r\n </ArrayBase>\r\n </div>\r\n</template>\r\n","import { composeExport } from '../__builtins__/shared'\r\nimport { ArrayBase } from '../array-base'\r\nimport ArrayListTabsInner from './array-list-tabs.vue'\r\nimport './style.scss'\r\n\r\nexport const ArrayListTabs = composeExport(ArrayListTabsInner, {\r\n Addition: ArrayBase.Addition,\r\n Remove: ArrayBase.Remove,\r\n})\r\n\r\nexport default ArrayListTabs\r\n"],"names":["props","__props","fieldRef","useField","schemaRef","useFieldSchema","field","schema","activeIndex","ref","getKey","keyMap","ArrayBase","errorCountList","observable","item","index","path","arrayBaseKey","autorun","key","getTabTitle","_createElementBlock","_unref","prefixCls","_createBlock","_createElementVNode","_createVNode","ElScrollbar","_openBlock","_Fragment","_normalizeClass","ElBadge","isArr","RecursionField","isTabTitleComponent","_toDisplayString","isRemoveComponent","property","isAdditionComponent","ElEmpty","_normalizeStyle","getArrayItemSchema","ArrayListTabs","composeExport","ArrayListTabsInner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAMA,IAAQC,GAeRC,IAAWC,EAAA,GACXC,IAAYC,EAAA,GACZC,IAAQJ,EAAS,OACjBK,IAASH,EAAU,OAEnBI,IAAcC,EAAI,CAAC,GACnB,EAAE,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAU,OAAOR,EAAU,KAAK,GAErDS,IAAiBC,EAAW,SAAS,MACrCd,EAAM,sBACDM,EAAM,MAAM,IAAI,CAACS,GAAMC,MAAU;AACtC,YAAMC,IAAOX,EAAM,KAAK,OAAOU,CAAK;AACpC,aAAOV,EAAM,KAAK,eAAe;AAAA,QAC/B,MAAM;AAAA,QACN,MAAM,GAAGW,CAAI,OAAOjB,EAAM,aAAa;AAAA,MAAA,CACxC,EAAE;AAAA,IACL,CAAC,IAEIM,EAAM,MAAM,IAAI,CAACS,GAAMC,MAAU;AACtC,YAAMC,IAAOX,EAAM,KAAK,OAAOU,CAAK;AACpC,aAAOV,EAAM,KAAK,eAAe;AAAA,QAC/B,MAAM;AAAA,QACN,MAAM,GAAGW,CAAI;AAAA,MAAA,CACd,EAAE;AAAA,IACL,CAAC,CACF,GAGKC,IAAeT,EAAA;AAErB,IAAAU,EAAQ,MAAM;AACZ,UAAInB,EAAM,qBAAqB;AAC7B,cAAMoB,IAAMd,EAAM,MAAM,IAAI,CAACS,GAAMC,MAChB;AAAA,UACfA;AAAA,UACAH,EAAe,MAAMG,CAAK;AAAA,QAAA,EAEZ,KAAK,GAAG,CACzB,EAAE,KAAK,GAAG;AACX,QAAAE,EAAa,QAAQE;AAAA,MACvB,OACK;AACH,cAAMA,IAAMd,EAAM,MAAM,IAAI,CAACS,GAAMC,MAChB;AAAA,UACfA;AAAA,UACAD,IAAOf,EAAM,aAAa;AAAA,U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AQP,EAAM,aAAa;kBASlQ,0BAAA;AAAA,gBAAA;;;;;;;;;;ICxLC2C,KAAgBC,EAAcC,GAAoB;AAAA,EAC7D,UAAUjC,EAAU;AAAA,EACpB,QAAQA,EAAU;AACpB,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/array-list-tabs/array-list-tabs.vue","../../src/array-list-tabs/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { ArrayField } from '@formily/core'\r\nimport type { ISchema } from '@formily/json-schema'\r\nimport { autorun } from '@formily/reactive'\r\nimport { isArr } from '@formily/shared'\r\nimport { formilyComputed } from '@silver-formily/reactive-vue'\r\nimport { RecursionField, useField, useFieldSchema } from '@silver-formily/vue'\r\nimport { ElBadge, ElEmpty, ElScrollbar } from 'element-plus'\r\nimport { ref } from 'vue'\r\nimport { ArrayBase } from '../array-base'\r\nimport { getArrayItemSchema, isAdditionComponent, isRemoveComponent } from '../array-base/utils'\r\nimport { isTabTitleComponent, prefixCls } from './utils'\r\nimport './style.scss'\r\n\r\ndefineOptions({\r\n name: 'FArrayListTabs',\r\n})\r\n\r\nconst props = defineProps({\r\n tabTitleField: {\r\n required: true,\r\n type: String,\r\n },\r\n showTitleFieldInTab: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n modelValue: {\r\n type: Array,\r\n default: () => [],\r\n },\r\n})\r\n\r\nconst fieldRef = useField<ArrayField>()\r\nconst schemaRef = useFieldSchema()\r\nconst field = fieldRef.value\r\nconst schema = schemaRef.value\r\n\r\nconst activeIndex = ref(0)\r\nconst { getKey, keyMap } = ArrayBase.useKey(schemaRef.value)\r\n\r\nconst errorCountList = formilyComputed(() => {\r\n if (props.showTitleFieldInTab) {\r\n return field.value.map((item, index) => {\r\n const path = field.path.concat(index)\r\n return field.form.queryFeedbacks({\r\n type: 'error',\r\n path: `${path}.*(!${props.tabTitleField})`,\r\n }).length\r\n })\r\n }\r\n return field.value.map((item, index) => {\r\n const path = field.path.concat(index)\r\n return field.form.queryFeedbacks({\r\n type: 'error',\r\n path: `${path}.**`,\r\n }).length\r\n })\r\n})\r\n\r\n// 保证arrayBase在必要时重新渲染\r\nconst arrayBaseKey = ref()\r\n\r\nautorun(() => {\r\n if (props.showTitleFieldInTab) {\r\n const key = field.value.map((item, index) => {\r\n const keyParts = [\r\n index,\r\n errorCountList.value[index],\r\n ]\r\n return keyParts.join('|')\r\n }).join(',')\r\n arrayBaseKey.value = key\r\n }\r\n else {\r\n const key = field.value.map((item, index) => {\r\n const keyParts = [\r\n index,\r\n item?.[props.tabTitleField],\r\n errorCountList.value[index],\r\n ]\r\n return keyParts.join('|')\r\n }).join(',')\r\n arrayBaseKey.value = key\r\n }\r\n})\r\n\r\nautorun(() => {\r\n if (field.value.length > 0 && activeIndex.value >= field.value.length) {\r\n activeIndex.value = field.value.length - 1\r\n }\r\n})\r\n\r\nfunction getTabTitle(item) {\r\n return `${item?.[props.tabTitleField] || '未命名条目'}`\r\n}\r\n</script>\r\n\r\n<template>\r\n <div :class=\"prefixCls\">\r\n <ArrayBase :key=\"props.modelValue.length\" :key-map=\"keyMap\">\r\n <ul :class=\"`${prefixCls}_list`\">\r\n <ElScrollbar :class=\"`${prefixCls}_list--scroll-wrapper`\">\r\n <ArrayBase.Item\r\n v-for=\"(item, index) in props.modelValue\"\r\n :key=\"index\"\r\n :index=\"index\"\r\n :record=\"item\"\r\n >\r\n <li\r\n :id=\"`${field.props.name}-tab-${index}`\"\r\n :key=\"arrayBaseKey\"\r\n :class=\"[\r\n `${prefixCls}_list-item`,\r\n activeIndex === index && 'is-active',\r\n ]\"\r\n role=\"tab\"\r\n :aria-controls=\"`${field.props.name}-tab-panel-${index}`\"\r\n @click=\"() => activeIndex = index\"\r\n >\r\n <div :class=\"`${prefixCls}_list-item--content`\">\r\n <ElBadge\r\n :class=\"[`${prefixCls}-errors-badge`]\"\r\n :value=\"errorCountList[index]\"\r\n :offset=\"[5, 0]\"\r\n :hidden=\"errorCountList[index] === 0\"\r\n >\r\n <template v-if=\"!props.showTitleFieldInTab\">\r\n <span :class=\"`${prefixCls}_list-item--title`\">{{ getTabTitle(item) }}</span>\r\n </template>\r\n <template v-else>\r\n <RecursionField\r\n v-if=\"!isArr(schema.items)\"\r\n :schema=\"schema.items\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => isTabTitleComponent(schema, props.tabTitleField)\"\r\n only-render-properties\r\n />\r\n </template>\r\n </ElBadge>\r\n </div>\r\n <!-- remove icon -->\r\n <RecursionField\r\n v-if=\"!isArr(schema.items)\"\r\n :schema=\"schema.items\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => isRemoveComponent(schema)\"\r\n only-render-properties\r\n />\r\n </li>\r\n </ArrayBase.Item>\r\n </ElScrollbar>\r\n <template v-for=\"(property, key) in schema.properties\" :key=\"key\">\r\n <RecursionField\r\n v-if=\"isAdditionComponent(property)\"\r\n :schema=\"property\"\r\n name=\"addition\"\r\n />\r\n </template>\r\n </ul>\r\n <div v-if=\"props.modelValue.length === 0\" :class=\"`${prefixCls}-tabpane`\">\r\n <ElEmpty :image-size=\"100\" />\r\n </div>\r\n <ArrayBase.Item\r\n v-for=\"(item, index) in props.modelValue\"\r\n :key=\"getKey(item, index)\"\r\n :index=\"index\"\r\n :record=\"item\"\r\n >\r\n <!-- tab-panel -->\r\n <div\r\n :id=\"`${field.props.name}-tab-panel-${index}`\"\r\n :key=\"getKey(item, index)\"\r\n :class=\"`${prefixCls}-tabpane`\"\r\n :style=\"{ display: activeIndex === index ? undefined : 'none' }\"\r\n role=\"tabpanel\"\r\n :aria-labelledby=\"`${field.props.name}-tab-${index}`\"\r\n >\r\n <RecursionField\r\n :schema=\"getArrayItemSchema(schema, index)\"\r\n :name=\"index\"\r\n :filter-properties=\"(schema: ISchema) => {\r\n if (isRemoveComponent(schema)) {\r\n return false\r\n }\r\n if (props.showTitleFieldInTab) {\r\n return !isTabTitleComponent(schema, props.tabTitleField)\r\n }\r\n return true\r\n }\"\r\n only-render-properties\r\n />\r\n </div>\r\n </ArrayBase.Item>\r\n </ArrayBase>\r\n </div>\r\n</template>\r\n","import { composeExport } from '../__builtins__/shared'\r\nimport { ArrayBase } from '../array-base'\r\nimport ArrayListTabsInner from './array-list-tabs.vue'\r\nimport './style.scss'\r\n\r\nexport const ArrayListTabs = composeExport(ArrayListTabsInner, {\r\n Addition: ArrayBase.Addition,\r\n Remove: ArrayBase.Remove,\r\n})\r\n\r\nexport default ArrayListTabs\r\n"],"names":["props","__props","fieldRef","useField","schemaRef","useFieldSchema","field","schema","activeIndex","ref","getKey","keyMap","ArrayBase","errorCountList","formilyComputed","item","index","path","arrayBaseKey","autorun","key","getTabTitle","_createElementBlock","_unref","prefixCls","_createBlock","_createElementVNode","_createVNode","ElScrollbar","_openBlock","_Fragment","_normalizeClass","ElBadge","isArr","RecursionField","isTabTitleComponent","_toDisplayString","isRemoveComponent","property","isAdditionComponent","ElEmpty","_normalizeStyle","getArrayItemSchema","ArrayListTabs","composeExport","ArrayListTabsInner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,UAAMA,IAAQC,GAeRC,IAAWC,EAAA,GACXC,IAAYC,EAAA,GACZC,IAAQJ,EAAS,OACjBK,IAASH,EAAU,OAEnBI,IAAcC,EAAI,CAAC,GACnB,EAAE,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAU,OAAOR,EAAU,KAAK,GAErDS,IAAiBC,EAAgB,MACjCd,EAAM,sBACDM,EAAM,MAAM,IAAI,CAACS,GAAMC,MAAU;AACtC,YAAMC,IAAOX,EAAM,KAAK,OAAOU,CAAK;AACpC,aAAOV,EAAM,KAAK,eAAe;AAAA,QAC/B,MAAM;AAAA,QACN,MAAM,GAAGW,CAAI,OAAOjB,EAAM,aAAa;AAAA,MAAA,CACxC,EAAE;AAAA,IACL,CAAC,IAEIM,EAAM,MAAM,IAAI,CAACS,GAAMC,MAAU;AACtC,YAAMC,IAAOX,EAAM,KAAK,OAAOU,CAAK;AACp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CAAA,EAAOK,GAAMC,CAAK;AAAA,gBACvB,YAAUO,EAAAC,CAAA,CAAS,UAAA;AAAA,gBACnB,OAAKiB,EAAA,EAAA,SAAajC,EAAA,UAAgBQ,IAAQ,SAAS,QAAA;AAAA,gBACpD,MAAK;AAAA,gBACJ,sBAAoBO,EAAAjB,CAAA,EAAM,MAAM,IAAI,QAAQU,CAAK;AAAA,cAAA;gBAElDW,EAaEJ,EAAAW,CAAA,GAAA;AAAA,kBAZC,QAAQX,EAAAmB,CAAA,EAAmBnB,EAAAhB,CAAA,GAAQS,CAAK;AAAA,kBACxC,MAAMA;AAAA,kBACN,sBAAoBT,MAAyCgB,EAAAc,CAAA,EAAkB9B,CAAM,SAAuEP,EAAM,sBAAgD,CAAAuB,EAAAY,CAAA,EAAoB5B,GAAQP,EAAM,aAAa;kBASlQ,0BAAA;AAAA,gBAAA;;;;;;;;;;ICzLC2C,KAAgBC,EAAcC,GAAoB;AAAA,EAC7D,UAAUjC,EAAU;AAAA,EACpB,QAAQA,EAAU;AACpB,CAAC;"}
|
|
@@ -44,6 +44,9 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
44
44
|
emptyText: StringConstructor;
|
|
45
45
|
expandRowKeys: import('vue').PropType<import('element-plus').TableProps<any>["expandRowKeys"]>;
|
|
46
46
|
defaultExpandAll: BooleanConstructor;
|
|
47
|
+
rowExpandable: {
|
|
48
|
+
type: import('vue').PropType<import('element-plus').TableProps<any>["rowExpandable"]>;
|
|
49
|
+
};
|
|
47
50
|
defaultSort: import('vue').PropType<import('element-plus').TableProps<any>["defaultSort"]>;
|
|
48
51
|
tooltipEffect: StringConstructor;
|
|
49
52
|
tooltipOptions: import('vue').PropType<import('element-plus').TableProps<any>["tooltipOptions"]>;
|
|
@@ -170,6 +173,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
170
173
|
reserveSelection: import('vue').Ref<boolean>;
|
|
171
174
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
172
175
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
176
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
173
177
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
174
178
|
filteredData: import('vue').Ref<any[] | null>;
|
|
175
179
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -212,6 +216,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
212
216
|
reserveSelection: import('vue').Ref<boolean>;
|
|
213
217
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
214
218
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
219
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
215
220
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
216
221
|
filteredData: import('vue').Ref<any[] | null>;
|
|
217
222
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -254,6 +259,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
254
259
|
reserveSelection: import('vue').Ref<boolean>;
|
|
255
260
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
256
261
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
262
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
257
263
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
258
264
|
filteredData: import('vue').Ref<any[] | null>;
|
|
259
265
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -296,6 +302,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
296
302
|
reserveSelection: import('vue').Ref<boolean>;
|
|
297
303
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
298
304
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
305
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
299
306
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
300
307
|
filteredData: import('vue').Ref<any[] | null>;
|
|
301
308
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -338,6 +345,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
338
345
|
reserveSelection: import('vue').Ref<boolean>;
|
|
339
346
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
340
347
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
348
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
341
349
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
342
350
|
filteredData: import('vue').Ref<any[] | null>;
|
|
343
351
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -380,6 +388,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
380
388
|
reserveSelection: import('vue').Ref<boolean>;
|
|
381
389
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
382
390
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
391
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
383
392
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
384
393
|
filteredData: import('vue').Ref<any[] | null>;
|
|
385
394
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -422,6 +431,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
422
431
|
reserveSelection: import('vue').Ref<boolean>;
|
|
423
432
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
424
433
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
434
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
425
435
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
426
436
|
filteredData: import('vue').Ref<any[] | null>;
|
|
427
437
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -465,6 +475,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
465
475
|
reserveSelection: import('vue').Ref<boolean>;
|
|
466
476
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
467
477
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
478
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
468
479
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
469
480
|
filteredData: import('vue').Ref<any[] | null>;
|
|
470
481
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -507,6 +518,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
507
518
|
reserveSelection: import('vue').Ref<boolean>;
|
|
508
519
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
509
520
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
521
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
510
522
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
511
523
|
filteredData: import('vue').Ref<any[] | null>;
|
|
512
524
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -549,6 +561,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
549
561
|
reserveSelection: import('vue').Ref<boolean>;
|
|
550
562
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
551
563
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
564
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
552
565
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
553
566
|
filteredData: import('vue').Ref<any[] | null>;
|
|
554
567
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -625,6 +638,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
625
638
|
reserveSelection: import('vue').Ref<boolean>;
|
|
626
639
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
627
640
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
641
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
628
642
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
629
643
|
filteredData: import('vue').Ref<any[] | null>;
|
|
630
644
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -782,6 +796,9 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
782
796
|
emptyText: StringConstructor;
|
|
783
797
|
expandRowKeys: import('vue').PropType<import('element-plus').TableProps<any>["expandRowKeys"]>;
|
|
784
798
|
defaultExpandAll: BooleanConstructor;
|
|
799
|
+
rowExpandable: {
|
|
800
|
+
type: import('vue').PropType<import('element-plus').TableProps<any>["rowExpandable"]>;
|
|
801
|
+
};
|
|
785
802
|
defaultSort: import('vue').PropType<import('element-plus').TableProps<any>["defaultSort"]>;
|
|
786
803
|
tooltipEffect: StringConstructor;
|
|
787
804
|
tooltipOptions: import('vue').PropType<import('element-plus').TableProps<any>["tooltipOptions"]>;
|
|
@@ -908,6 +925,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
908
925
|
reserveSelection: import('vue').Ref<boolean>;
|
|
909
926
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
910
927
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
928
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
911
929
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
912
930
|
filteredData: import('vue').Ref<any[] | null>;
|
|
913
931
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -950,6 +968,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
950
968
|
reserveSelection: import('vue').Ref<boolean>;
|
|
951
969
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
952
970
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
971
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
953
972
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
954
973
|
filteredData: import('vue').Ref<any[] | null>;
|
|
955
974
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -992,6 +1011,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
992
1011
|
reserveSelection: import('vue').Ref<boolean>;
|
|
993
1012
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
994
1013
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1014
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
995
1015
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
996
1016
|
filteredData: import('vue').Ref<any[] | null>;
|
|
997
1017
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1034,6 +1054,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1034
1054
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1035
1055
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1036
1056
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1057
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1037
1058
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1038
1059
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1039
1060
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1076,6 +1097,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1076
1097
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1077
1098
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1078
1099
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1100
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1079
1101
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1080
1102
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1081
1103
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1118,6 +1140,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1118
1140
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1119
1141
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1120
1142
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1143
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1121
1144
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1122
1145
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1123
1146
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1160,6 +1183,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1160
1183
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1161
1184
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1162
1185
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1186
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1163
1187
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1164
1188
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1165
1189
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1203,6 +1227,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1203
1227
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1204
1228
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1205
1229
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1230
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1206
1231
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1207
1232
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1208
1233
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1245,6 +1270,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1245
1270
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1246
1271
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1247
1272
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1273
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1248
1274
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1249
1275
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1250
1276
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1287,6 +1313,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1287
1313
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1288
1314
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1289
1315
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1316
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1290
1317
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1291
1318
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1292
1319
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|
|
@@ -1363,6 +1390,7 @@ declare const _default: import('vue').DefineComponent<IArrayTableProps, {}, {},
|
|
|
1363
1390
|
reserveSelection: import('vue').Ref<boolean>;
|
|
1364
1391
|
selectOnIndeterminate: import('vue').Ref<boolean>;
|
|
1365
1392
|
selectable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1393
|
+
rowExpandable: import('vue').Ref<((row: any, index: number) => boolean) | null>;
|
|
1366
1394
|
filters: import('vue').Ref<import('element-plus/es/components/table/src/store/index.mjs').StoreFilter>;
|
|
1367
1395
|
filteredData: import('vue').Ref<any[] | null>;
|
|
1368
1396
|
sortingColumn: import('vue').Ref<import('element-plus').TableColumnCtx<any> | null>;
|