@pisell/materials 1.0.69 → 1.0.72
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/lowcode/affix/meta.ts +29 -29
- package/lowcode/alert/meta.ts +3 -0
- package/lowcode/anchor.link/meta.ts +1 -0
- package/lowcode/auto-complete/meta.ts +133 -133
- package/lowcode/avatar/meta.ts +51 -50
- package/lowcode/badge/meta.ts +67 -66
- package/lowcode/breadcrumb/meta.ts +2 -3
- package/lowcode/button/meta.ts +1 -1
- package/lowcode/calendar/meta.ts +92 -92
- package/lowcode/card/meta.ts +67 -65
- package/lowcode/carousel/meta.ts +110 -110
- package/lowcode/cascader/meta.ts +135 -135
- package/lowcode/checkbox/meta.ts +1 -1
- package/lowcode/checkbox.group/meta.ts +1 -0
- package/lowcode/collapse/meta.ts +172 -172
- package/lowcode/collapse.pane/meta.ts +1 -0
- package/lowcode/date-picker/meta.ts +1 -1
- package/lowcode/date-picker.range-picker/meta.ts +1 -1
- package/lowcode/descriptions/meta.ts +197 -193
- package/lowcode/descriptions.item/meta.ts +1 -0
- package/lowcode/divider/meta.ts +44 -44
- package/lowcode/drawer/meta.ts +1 -1
- package/lowcode/dropdown/meta.ts +104 -104
- package/lowcode/empty/meta.ts +1 -0
- package/lowcode/filter/meta.ts +5 -4
- package/lowcode/form.item/meta.ts +8 -5
- package/lowcode/image/meta.ts +1 -0
- package/lowcode/input/meta.ts +5 -1
- package/lowcode/input-number/meta.ts +104 -98
- package/lowcode/input.password/meta.ts +4 -1
- package/lowcode/input.search/meta.ts +99 -92
- package/lowcode/input.text-area/meta.ts +1 -1
- package/lowcode/menu/meta.ts +1 -1
- package/lowcode/menu/snippets.ts +1 -1
- package/lowcode/modal/meta.ts +137 -131
- package/lowcode/popconfirm/meta.ts +3 -4
- package/lowcode/popover/meta.ts +2 -2
- package/lowcode/radio/meta.ts +1 -1
- package/lowcode/rate/meta.ts +1 -0
- package/lowcode/select/meta.ts +3 -3
- package/lowcode/spin/meta.ts +1 -0
- package/lowcode/steps/meta.ts +3 -3
- package/lowcode/switch/meta.ts +2 -2
- package/lowcode/table/meta.ts +4 -4
- package/lowcode/tabs/meta.ts +1 -1
- package/lowcode/tag/meta.ts +1 -0
- package/lowcode/time-picker/meta.ts +1 -0
- package/lowcode/timeline/meta.ts +1 -1
- package/lowcode/tooltip/meta.ts +1 -1
- package/lowcode/transfer/meta.ts +3 -2
- package/lowcode/tree-select/meta.ts +1 -1
- package/lowcode/typography.link/meta.ts +3 -1
- package/lowcode/typography.paragraph/meta.ts +3 -1
- package/lowcode/typography.text/meta.ts +3 -1
- package/lowcode/typography.title/meta.ts +3 -1
- package/package.json +2 -2
package/lowcode/calendar/meta.ts
CHANGED
|
@@ -16,99 +16,99 @@ export default {
|
|
|
16
16
|
destructuring: true,
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "defaultValue",
|
|
22
|
+
title: { label: "默认值", tip: "默认展示的日期" },
|
|
23
|
+
propType: "date",
|
|
24
|
+
setter: "DateSetter",
|
|
25
|
+
},
|
|
26
|
+
// {
|
|
27
|
+
// name: 'dateCellRender',
|
|
28
|
+
// title: {
|
|
29
|
+
// label: '自定义日期追加渲染',
|
|
30
|
+
// tip: '自定义渲染日期单元格,返回内容会被追加到单元格',
|
|
31
|
+
// },
|
|
32
|
+
// propType: 'func',
|
|
33
|
+
// },
|
|
34
|
+
// {
|
|
35
|
+
// name: 'dateFullCellRender',
|
|
36
|
+
// title: {
|
|
37
|
+
// label: '自定义渲染日期单元格,返回内容覆盖单元格',
|
|
38
|
+
// tip: '自定义渲染日期单元格,返回内容覆盖单元格',
|
|
39
|
+
// },
|
|
40
|
+
// propType: 'func',
|
|
41
|
+
// },
|
|
42
|
+
{
|
|
43
|
+
name: "disabledDate",
|
|
44
|
+
title: { label: "不可选日期", tip: "不可选择的日期" },
|
|
45
|
+
propType: "func",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "fullscreen",
|
|
49
|
+
title: { label: "全屏显示", tip: "是否全屏显示" },
|
|
50
|
+
propType: "bool",
|
|
51
|
+
defaultValue: true,
|
|
52
|
+
},
|
|
53
|
+
// {
|
|
54
|
+
// name: 'locale',
|
|
55
|
+
// title: { label: '国际化配置', tip: '国际化配置' },
|
|
56
|
+
// propType: 'object',
|
|
57
|
+
// },
|
|
58
|
+
{
|
|
59
|
+
name: "mode",
|
|
60
|
+
title: { label: "初始模式", tip: "初始模式" },
|
|
61
|
+
propType: { type: "oneOf", value: ["month", "year"] },
|
|
62
|
+
defaultValue: "month",
|
|
63
|
+
},
|
|
64
|
+
// {
|
|
65
|
+
// name: 'monthCellRender',
|
|
66
|
+
// title: {
|
|
67
|
+
// label: '自定义渲染月单元格,返回内容会被追加到单元格',
|
|
68
|
+
// tip: '自定义渲染月单元格,返回内容会被追加到单元格',
|
|
69
|
+
// },
|
|
70
|
+
// propType: 'func',
|
|
71
|
+
// },
|
|
72
|
+
// {
|
|
73
|
+
// name: 'monthFullCellRender',
|
|
74
|
+
// title: {
|
|
75
|
+
// label: '自定义渲染月单元格,返回内容覆盖单元格',
|
|
76
|
+
// tip: '自定义渲染月单元格,返回内容覆盖单元格',
|
|
77
|
+
// },
|
|
78
|
+
// propType: 'func',
|
|
79
|
+
// },
|
|
80
|
+
// {
|
|
81
|
+
// name: 'validRange',
|
|
82
|
+
// title: { label: '设置可以显示的日期', tip: '设置可以显示的日期' },
|
|
83
|
+
// propType: { type: 'arrayOf', value: 'object' },
|
|
84
|
+
// },
|
|
85
|
+
// {
|
|
86
|
+
// name: 'value',
|
|
87
|
+
// title: { label: '当前值', tip: '展示日期' },
|
|
88
|
+
// propType: 'object',
|
|
89
|
+
// },
|
|
90
|
+
{
|
|
91
|
+
name: "onPanelChange",
|
|
92
|
+
title: { label: "日期面板变化回调", tip: "日期面板变化回调" },
|
|
93
|
+
propType: "func",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "onSelect",
|
|
97
|
+
title: { label: "点击选择日期回调", tip: "点击选择日期回调" },
|
|
98
|
+
propType: "func",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "onChange",
|
|
102
|
+
title: { label: "日期变化回调", tip: "日期变化回调" },
|
|
103
|
+
propType: "func",
|
|
104
|
+
},
|
|
105
|
+
// {
|
|
106
|
+
// name: 'headerRender',
|
|
107
|
+
// title: { label: '自定义头部内容', tip: '自定义头部内容' },
|
|
108
|
+
// propType: 'func',
|
|
109
|
+
// },
|
|
110
|
+
],
|
|
19
111
|
configure: {
|
|
20
|
-
props: [
|
|
21
|
-
{
|
|
22
|
-
name: "defaultValue",
|
|
23
|
-
title: { label: "默认值", tip: "默认展示的日期" },
|
|
24
|
-
propType: "date",
|
|
25
|
-
setter: "DateSetter",
|
|
26
|
-
},
|
|
27
|
-
// {
|
|
28
|
-
// name: 'dateCellRender',
|
|
29
|
-
// title: {
|
|
30
|
-
// label: '自定义日期追加渲染',
|
|
31
|
-
// tip: '自定义渲染日期单元格,返回内容会被追加到单元格',
|
|
32
|
-
// },
|
|
33
|
-
// propType: 'func',
|
|
34
|
-
// },
|
|
35
|
-
// {
|
|
36
|
-
// name: 'dateFullCellRender',
|
|
37
|
-
// title: {
|
|
38
|
-
// label: '自定义渲染日期单元格,返回内容覆盖单元格',
|
|
39
|
-
// tip: '自定义渲染日期单元格,返回内容覆盖单元格',
|
|
40
|
-
// },
|
|
41
|
-
// propType: 'func',
|
|
42
|
-
// },
|
|
43
|
-
{
|
|
44
|
-
name: "disabledDate",
|
|
45
|
-
title: { label: "不可选日期", tip: "不可选择的日期" },
|
|
46
|
-
propType: "func",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: "fullscreen",
|
|
50
|
-
title: { label: "全屏显示", tip: "是否全屏显示" },
|
|
51
|
-
propType: "bool",
|
|
52
|
-
defaultValue: true,
|
|
53
|
-
},
|
|
54
|
-
// {
|
|
55
|
-
// name: 'locale',
|
|
56
|
-
// title: { label: '国际化配置', tip: '国际化配置' },
|
|
57
|
-
// propType: 'object',
|
|
58
|
-
// },
|
|
59
|
-
{
|
|
60
|
-
name: "mode",
|
|
61
|
-
title: { label: "初始模式", tip: "初始模式" },
|
|
62
|
-
propType: { type: "oneOf", value: ["month", "year"] },
|
|
63
|
-
defaultValue: "month",
|
|
64
|
-
},
|
|
65
|
-
// {
|
|
66
|
-
// name: 'monthCellRender',
|
|
67
|
-
// title: {
|
|
68
|
-
// label: '自定义渲染月单元格,返回内容会被追加到单元格',
|
|
69
|
-
// tip: '自定义渲染月单元格,返回内容会被追加到单元格',
|
|
70
|
-
// },
|
|
71
|
-
// propType: 'func',
|
|
72
|
-
// },
|
|
73
|
-
// {
|
|
74
|
-
// name: 'monthFullCellRender',
|
|
75
|
-
// title: {
|
|
76
|
-
// label: '自定义渲染月单元格,返回内容覆盖单元格',
|
|
77
|
-
// tip: '自定义渲染月单元格,返回内容覆盖单元格',
|
|
78
|
-
// },
|
|
79
|
-
// propType: 'func',
|
|
80
|
-
// },
|
|
81
|
-
// {
|
|
82
|
-
// name: 'validRange',
|
|
83
|
-
// title: { label: '设置可以显示的日期', tip: '设置可以显示的日期' },
|
|
84
|
-
// propType: { type: 'arrayOf', value: 'object' },
|
|
85
|
-
// },
|
|
86
|
-
// {
|
|
87
|
-
// name: 'value',
|
|
88
|
-
// title: { label: '当前值', tip: '展示日期' },
|
|
89
|
-
// propType: 'object',
|
|
90
|
-
// },
|
|
91
|
-
{
|
|
92
|
-
name: "onPanelChange",
|
|
93
|
-
title: { label: "日期面板变化回调", tip: "日期面板变化回调" },
|
|
94
|
-
propType: "func",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "onSelect",
|
|
98
|
-
title: { label: "点击选择日期回调", tip: "点击选择日期回调" },
|
|
99
|
-
propType: "func",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "onChange",
|
|
103
|
-
title: { label: "日期变化回调", tip: "日期变化回调" },
|
|
104
|
-
propType: "func",
|
|
105
|
-
},
|
|
106
|
-
// {
|
|
107
|
-
// name: 'headerRender',
|
|
108
|
-
// title: { label: '自定义头部内容', tip: '自定义头部内容' },
|
|
109
|
-
// propType: 'func',
|
|
110
|
-
// },
|
|
111
|
-
],
|
|
112
112
|
supports: {
|
|
113
113
|
style: true,
|
|
114
114
|
events: [
|
package/lowcode/card/meta.ts
CHANGED
|
@@ -17,72 +17,74 @@ export default {
|
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
19
|
experimental: { hideSelectTools: true },
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
propType: "bool",
|
|
71
|
-
defaultValue: false,
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: "size",
|
|
75
|
-
title: { label: "尺寸", tip: "card 的尺寸" },
|
|
76
|
-
propType: { type: "oneOf", value: ["default", "small"] },
|
|
77
|
-
defaultValue: "default",
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "type",
|
|
81
|
-
title: { label: "卡片类型", tip: "卡片类型" },
|
|
82
|
-
propType: { type: "oneOf", value: ["default", "inner"] },
|
|
83
|
-
defaultValue: "default",
|
|
20
|
+
props: [
|
|
21
|
+
{
|
|
22
|
+
name: "title",
|
|
23
|
+
title: { label: "卡片标题", tip: "卡片标题" },
|
|
24
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
25
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
26
|
+
},
|
|
27
|
+
// {
|
|
28
|
+
// name: 'actions',
|
|
29
|
+
// title: { label: '卡片操作组', tip: '卡片操作组,位置在卡片底部' },
|
|
30
|
+
// propType: { type: 'arrayOf', value: 'node' },
|
|
31
|
+
// },
|
|
32
|
+
// {
|
|
33
|
+
// name: 'headStyle',
|
|
34
|
+
// title: { label: '标题区域样式', tip: '自定义标题区域样式' },
|
|
35
|
+
// propType: 'object',
|
|
36
|
+
// },
|
|
37
|
+
// {
|
|
38
|
+
// name: 'bodyStyle',
|
|
39
|
+
// title: { label: '内容区域样式', tip: '内容区域自定义样式' },
|
|
40
|
+
// propType: 'object',
|
|
41
|
+
// },
|
|
42
|
+
{
|
|
43
|
+
name: "bordered",
|
|
44
|
+
title: { label: "显示边框", tip: "是否有边框" },
|
|
45
|
+
propType: "bool",
|
|
46
|
+
defaultValue: true,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "cover",
|
|
50
|
+
title: { label: "卡片封面", tip: "卡片封面" },
|
|
51
|
+
propType: "node",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "extra",
|
|
55
|
+
title: { label: "额外元素", tip: "卡片右上角的操作区域" },
|
|
56
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
57
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "hoverable",
|
|
61
|
+
title: { label: "可浮起", tip: "鼠标移过时可浮起" },
|
|
62
|
+
propType: "bool",
|
|
63
|
+
defaultValue: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "loading",
|
|
67
|
+
title: {
|
|
68
|
+
label: "loading",
|
|
69
|
+
tip: "当卡片内容还在加载中时,可以用 loading 展示一个占位",
|
|
84
70
|
},
|
|
85
|
-
|
|
71
|
+
propType: "bool",
|
|
72
|
+
defaultValue: false,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "size",
|
|
76
|
+
title: { label: "尺寸", tip: "card 的尺寸" },
|
|
77
|
+
propType: { type: "oneOf", value: ["default", "small"] },
|
|
78
|
+
defaultValue: "default",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "type",
|
|
82
|
+
title: { label: "卡片类型", tip: "卡片类型" },
|
|
83
|
+
propType: { type: "oneOf", value: ["default", "inner"] },
|
|
84
|
+
defaultValue: "default",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
configure: {
|
|
86
88
|
component: { isContainer: true },
|
|
87
89
|
supports: {
|
|
88
90
|
style: true,
|
package/lowcode/carousel/meta.ts
CHANGED
|
@@ -18,128 +18,128 @@ export default {
|
|
|
18
18
|
destructuring: true,
|
|
19
19
|
subName: "",
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
tip: "面板指示点位置,可选 `top` `bottom` `left` `right`",
|
|
44
|
-
},
|
|
45
|
-
propType: {
|
|
46
|
-
type: "oneOf",
|
|
47
|
-
value: ["top", "bottom", "left", "right"],
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "dots",
|
|
52
|
-
title: {
|
|
53
|
-
label: "显示指示点",
|
|
54
|
-
tip: "是否显示面板指示点",
|
|
55
|
-
},
|
|
56
|
-
propType: { type: "oneOfType", value: ["bool", "object"] },
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: "afterChange",
|
|
24
|
+
title: { label: "切换面板的回调", tip: "切换面板的回调" },
|
|
25
|
+
propType: "func",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "autoplay",
|
|
29
|
+
title: { label: "是否自动切换", tip: "是否自动切换" },
|
|
30
|
+
propType: "bool",
|
|
31
|
+
defaultValue: false,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "beforeChange",
|
|
35
|
+
title: { label: "切换面板的回调", tip: "切换面板的回调" },
|
|
36
|
+
propType: "func",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "dotPosition",
|
|
40
|
+
title: {
|
|
41
|
+
label: "指示点位置",
|
|
42
|
+
tip: "面板指示点位置,可选 `top` `bottom` `left` `right`",
|
|
57
43
|
},
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
propType: "string",
|
|
44
|
+
propType: {
|
|
45
|
+
type: "oneOf",
|
|
46
|
+
value: ["top", "bottom", "left", "right"],
|
|
62
47
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "dots",
|
|
51
|
+
title: {
|
|
52
|
+
label: "显示指示点",
|
|
53
|
+
tip: "是否显示面板指示点",
|
|
67
54
|
},
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
propType: { type: "oneOfType", value: ["bool", "object"] },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "easing",
|
|
59
|
+
title: { label: "动画效果", tip: "动画效果" },
|
|
60
|
+
propType: "string",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "effect",
|
|
64
|
+
title: { label: "动画效果函数", tip: "动画效果函数" },
|
|
65
|
+
propType: { type: "oneOf", value: ["scrollx", "fade"] },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "items",
|
|
69
|
+
title: "折叠项",
|
|
70
|
+
setter: {
|
|
71
|
+
componentName: "ArraySetter",
|
|
72
|
+
props: {
|
|
73
|
+
itemSetter: {
|
|
74
|
+
componentName: "ObjectSetter",
|
|
75
|
+
initialValue: () => {
|
|
76
|
+
return {
|
|
77
|
+
key: uuid(),
|
|
78
|
+
};
|
|
81
79
|
},
|
|
82
80
|
},
|
|
83
81
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
82
|
+
},
|
|
83
|
+
extraProps: {
|
|
84
|
+
getValue(target, fieldValue) {
|
|
85
|
+
console.log("getValue", target.node.children.length);
|
|
86
|
+
const map = target.node.children.map((child) => {
|
|
87
|
+
const key = child.getPropValue("key")
|
|
88
|
+
? String(child.getPropValue("key"))
|
|
89
|
+
: child.id;
|
|
90
|
+
return { key };
|
|
91
|
+
});
|
|
92
|
+
return map;
|
|
93
|
+
},
|
|
94
|
+
setValue(target, value) {
|
|
95
|
+
const { node } = target;
|
|
96
|
+
const map = {};
|
|
97
|
+
if (!Array.isArray(value)) {
|
|
98
|
+
value = [];
|
|
99
|
+
}
|
|
100
|
+
value.forEach((item) => {
|
|
101
|
+
const tabItem = Object.assign({}, item);
|
|
102
|
+
map[item.key] = tabItem;
|
|
103
|
+
});
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
node.children.mergeChildren(
|
|
106
|
+
(child) => {
|
|
107
|
+
const key = String(child.getPropValue("key"));
|
|
108
|
+
if (Object.hasOwnProperty.call(map, key)) {
|
|
109
|
+
delete map[key];
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
},
|
|
114
|
+
() => {
|
|
115
|
+
const items = [];
|
|
116
|
+
for (const key in map) {
|
|
109
117
|
if (Object.hasOwnProperty.call(map, key)) {
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
items.push({
|
|
119
|
+
componentName: "Card",
|
|
120
|
+
props: map[key],
|
|
121
|
+
});
|
|
112
122
|
}
|
|
113
|
-
return true;
|
|
114
|
-
},
|
|
115
|
-
() => {
|
|
116
|
-
const items = [];
|
|
117
|
-
for (const key in map) {
|
|
118
|
-
if (Object.hasOwnProperty.call(map, key)) {
|
|
119
|
-
items.push({
|
|
120
|
-
componentName: "Card",
|
|
121
|
-
props: map[key],
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return items;
|
|
126
|
-
},
|
|
127
|
-
(child1, child2) => {
|
|
128
|
-
const a = value.findIndex(
|
|
129
|
-
(item) =>
|
|
130
|
-
String(item.key) === String(child1.getPropValue("key"))
|
|
131
|
-
);
|
|
132
|
-
const b = value.findIndex(
|
|
133
|
-
(item) =>
|
|
134
|
-
String(item.key) === String(child2.getPropValue("key"))
|
|
135
|
-
);
|
|
136
|
-
return a - b;
|
|
137
123
|
}
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
return items;
|
|
125
|
+
},
|
|
126
|
+
(child1, child2) => {
|
|
127
|
+
const a = value.findIndex(
|
|
128
|
+
(item) =>
|
|
129
|
+
String(item.key) === String(child1.getPropValue("key"))
|
|
130
|
+
);
|
|
131
|
+
const b = value.findIndex(
|
|
132
|
+
(item) =>
|
|
133
|
+
String(item.key) === String(child2.getPropValue("key"))
|
|
134
|
+
);
|
|
135
|
+
return a - b;
|
|
136
|
+
}
|
|
137
|
+
);
|
|
140
138
|
},
|
|
141
139
|
},
|
|
142
|
-
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
configure: {
|
|
143
143
|
supports: { style: true },
|
|
144
144
|
component: {
|
|
145
145
|
isContainer: true,
|