@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { uuid } from
|
|
1
|
+
import { uuid } from "../_utils/utils";
|
|
2
2
|
|
|
3
|
-
import snippets from
|
|
3
|
+
import snippets from "./snippets";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
snippets,
|
|
7
|
-
componentName:
|
|
8
|
-
title:
|
|
9
|
-
category:
|
|
7
|
+
componentName: "Descriptions",
|
|
8
|
+
title: "描述列表",
|
|
9
|
+
category: "数据展示",
|
|
10
10
|
docUrl: "",
|
|
11
11
|
screenshot: "",
|
|
12
12
|
devMode: "proCode",
|
|
@@ -18,213 +18,217 @@ export default {
|
|
|
18
18
|
destructuring: true,
|
|
19
19
|
subName: "",
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
tip: '描述列表的标题,显示在最顶部',
|
|
28
|
-
},
|
|
29
|
-
propType: {
|
|
30
|
-
type: 'oneOfType',
|
|
31
|
-
value: ['string', 'node'],
|
|
32
|
-
},
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: "title",
|
|
24
|
+
title: {
|
|
25
|
+
label: "标题",
|
|
26
|
+
tip: "描述列表的标题,显示在最顶部",
|
|
33
27
|
},
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
28
|
+
propType: {
|
|
29
|
+
type: "oneOfType",
|
|
30
|
+
value: ["string", "node"],
|
|
31
|
+
},
|
|
32
|
+
setter: ["PisellI18nSetter", "SlotSetter"],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "items",
|
|
36
|
+
title: {
|
|
37
|
+
label: "列表项",
|
|
38
|
+
tip: "列表项",
|
|
39
|
+
},
|
|
40
|
+
setter: {
|
|
41
|
+
componentName: "ArraySetter",
|
|
42
|
+
props: {
|
|
43
|
+
itemSetter: {
|
|
44
|
+
componentName: "ObjectSetter",
|
|
45
|
+
props: {
|
|
46
|
+
config: {
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
name: "key",
|
|
50
|
+
title: "key",
|
|
51
|
+
setter: "StringSetter",
|
|
52
|
+
initialValue: (val) => val || uuid(),
|
|
53
|
+
condition: () => false,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "label",
|
|
57
|
+
title: "标题",
|
|
58
|
+
setter: "PisellI18nSetter",
|
|
59
|
+
initialValue: "列表项",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "span",
|
|
63
|
+
title: "所占列数",
|
|
64
|
+
setter: "NumberSetter",
|
|
65
|
+
initialValue: 1,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "children",
|
|
69
|
+
title: "内容",
|
|
70
|
+
setter: {
|
|
71
|
+
componentName: "SlotSetter",
|
|
72
|
+
initialValue: {
|
|
73
|
+
type: "JSSlot",
|
|
74
|
+
value: [],
|
|
76
75
|
},
|
|
77
76
|
},
|
|
78
|
-
],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
initialValue: () => {
|
|
82
|
-
return {
|
|
83
|
-
key: uuid(),
|
|
84
|
-
label: '标签项',
|
|
85
|
-
span: 1,
|
|
86
|
-
children: {
|
|
87
|
-
type: 'JSSlot',
|
|
88
|
-
value: [],
|
|
89
77
|
},
|
|
90
|
-
|
|
78
|
+
],
|
|
91
79
|
},
|
|
92
80
|
},
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
extraProps: {
|
|
96
|
-
getValue(target, fieldValue) {
|
|
97
|
-
const map = target.node.children.map((child) => {
|
|
98
|
-
const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
|
|
81
|
+
initialValue: () => {
|
|
99
82
|
return {
|
|
100
|
-
key,
|
|
101
|
-
label:
|
|
102
|
-
span:
|
|
103
|
-
children:
|
|
83
|
+
key: uuid(),
|
|
84
|
+
label: "标签项",
|
|
85
|
+
span: 1,
|
|
86
|
+
children: {
|
|
87
|
+
type: "JSSlot",
|
|
88
|
+
value: [],
|
|
89
|
+
},
|
|
104
90
|
};
|
|
105
|
-
}
|
|
106
|
-
return map;
|
|
91
|
+
},
|
|
107
92
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
extraProps: {
|
|
96
|
+
getValue(target, fieldValue) {
|
|
97
|
+
const map = target.node.children.map((child) => {
|
|
98
|
+
const key = child.getPropValue("key")
|
|
99
|
+
? String(child.getPropValue("key"))
|
|
100
|
+
: child.id;
|
|
101
|
+
return {
|
|
102
|
+
key,
|
|
103
|
+
label: child.getPropValue("label"),
|
|
104
|
+
span: child.getPropValue("span"),
|
|
105
|
+
children: child.getPropValue("children"),
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
return map;
|
|
109
|
+
},
|
|
110
|
+
setValue(target, value) {
|
|
111
|
+
const { node } = target;
|
|
112
|
+
const map = {};
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
if (!Array.isArray(value)) {
|
|
115
|
+
value = [];
|
|
116
|
+
}
|
|
117
|
+
value.forEach((item) => {
|
|
118
|
+
const tabItem = Object.assign({}, item);
|
|
119
|
+
map[item.key] = tabItem;
|
|
120
|
+
});
|
|
119
121
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
node.children.mergeChildren(
|
|
123
|
+
(child) => {
|
|
124
|
+
const key = String(child.getPropValue("key"));
|
|
125
|
+
if (Object.hasOwnProperty.call(map, key)) {
|
|
126
|
+
child.setPropValue("label", map[key].label);
|
|
127
|
+
child.setPropValue("span", map[key].span);
|
|
128
|
+
child.setPropValue("children", map[key].children);
|
|
129
|
+
delete map[key];
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
},
|
|
134
|
+
() => {
|
|
135
|
+
const items = [];
|
|
136
|
+
for (const key in map) {
|
|
123
137
|
if (Object.hasOwnProperty.call(map, key)) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
return true;
|
|
131
|
-
},
|
|
132
|
-
() => {
|
|
133
|
-
const items = [];
|
|
134
|
-
for (const key in map) {
|
|
135
|
-
if (Object.hasOwnProperty.call(map, key)) {
|
|
136
|
-
items.push({
|
|
137
|
-
componentName: 'Descriptions.Item',
|
|
138
|
-
props: map[key],
|
|
139
|
-
});
|
|
140
|
-
}
|
|
138
|
+
items.push({
|
|
139
|
+
componentName: "Descriptions.Item",
|
|
140
|
+
props: map[key],
|
|
141
|
+
});
|
|
141
142
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
143
|
+
}
|
|
144
|
+
return items;
|
|
145
|
+
},
|
|
146
|
+
(child1, child2) => {
|
|
147
|
+
const a = value.findIndex(
|
|
148
|
+
(item) =>
|
|
149
|
+
String(item.key) === String(child1.getPropValue("key"))
|
|
150
|
+
);
|
|
151
|
+
const b = value.findIndex(
|
|
152
|
+
(item) =>
|
|
153
|
+
String(item.key) === String(child2.getPropValue("key"))
|
|
154
|
+
);
|
|
155
|
+
return a - b;
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
},
|
|
159
|
+
// getValue(target, fieldValue) {
|
|
160
|
+
// // const node = target.nodes[0];
|
|
161
|
+
// // const children = node.getChildren();
|
|
162
|
+
// const map = target.node.children.map(child => {
|
|
163
|
+
// return {
|
|
164
|
+
// key: child.getPropValue('key') || uuid(),
|
|
165
|
+
// label: child.getPropValue('label'),
|
|
166
|
+
// span: child.getPropValue('span'),
|
|
167
|
+
// children: child.getPropValue('children'),
|
|
168
|
+
// };
|
|
169
|
+
// });
|
|
170
|
+
// return map;
|
|
171
|
+
// },
|
|
172
|
+
// setValue(target, value) {
|
|
173
|
+
// const node = target.node;
|
|
170
174
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
// if (!Array.isArray(value)) {
|
|
176
|
+
// value = [];
|
|
177
|
+
// }
|
|
174
178
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
},
|
|
179
|
+
// node.children.mergeChildren(
|
|
180
|
+
// () => true,
|
|
181
|
+
// () => {
|
|
182
|
+
// return value.map(item => ({
|
|
183
|
+
// componentName: 'Descriptions.Item',
|
|
184
|
+
// props: Object.assign({}, item),
|
|
185
|
+
// }));
|
|
186
|
+
// }
|
|
187
|
+
// );
|
|
188
|
+
// },
|
|
186
189
|
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "bordered",
|
|
193
|
+
title: { label: "显示边框", tip: "是否展示边框" },
|
|
194
|
+
propType: "bool",
|
|
195
|
+
defaultValue: false,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "column",
|
|
199
|
+
title: {
|
|
200
|
+
label: "列数",
|
|
201
|
+
tip: "一行的列表项数量",
|
|
192
202
|
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
203
|
+
propType: "number",
|
|
204
|
+
defaultValue: 3,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "size",
|
|
208
|
+
title: {
|
|
209
|
+
label: "尺寸",
|
|
210
|
+
tip: "设置列表的大小。可以设置为 `middle` 、`small`, 或不填(只有设置 `bordered={true}` 生效)",
|
|
201
211
|
},
|
|
202
|
-
{
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
propType: { type: "oneOf", value: ["default", "middle", "small"] },
|
|
213
|
+
defaultValue: "middle",
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "layout",
|
|
217
|
+
title: { label: "布局方向", tip: "描述布局" },
|
|
218
|
+
propType: { type: "oneOf", value: ["horizontal", "vertical"] },
|
|
219
|
+
defaultValue: "horizontal",
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "colon",
|
|
223
|
+
title: {
|
|
224
|
+
label: "展示冒号",
|
|
225
|
+
tip: "配置 `Descriptions.Item` 的 `colon` 的默认值",
|
|
211
226
|
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
name: 'colon',
|
|
220
|
-
title: {
|
|
221
|
-
label: '展示冒号',
|
|
222
|
-
tip: '配置 `Descriptions.Item` 的 `colon` 的默认值',
|
|
223
|
-
},
|
|
224
|
-
propType: 'bool',
|
|
225
|
-
defaultValue: true,
|
|
226
|
-
},
|
|
227
|
-
],
|
|
227
|
+
propType: "bool",
|
|
228
|
+
defaultValue: true,
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
configure: {
|
|
228
232
|
supports: { style: true },
|
|
229
233
|
},
|
|
230
234
|
};
|
package/lowcode/divider/meta.ts
CHANGED
|
@@ -16,52 +16,52 @@ export default {
|
|
|
16
16
|
destructuring: true,
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
tip: "标题和最近 left/right 边框之间的距离,去除了分割线,同时 orientation 必须为 left 或 right",
|
|
42
|
-
},
|
|
43
|
-
propType: { type: "oneOfType", value: ["string", "number"] },
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "style",
|
|
47
|
-
title: { label: "分割线样式对象", tip: "分割线样式对象" },
|
|
48
|
-
propType: "object",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "type",
|
|
52
|
-
title: { label: "方向", tip: "水平还是垂直类型" },
|
|
53
|
-
propType: { type: "oneOf", value: ["horizontal", "vertical"] },
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "className",
|
|
22
|
+
title: { label: "分割线样式类", tip: "分割线样式类" },
|
|
23
|
+
propType: "string",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "dashed",
|
|
27
|
+
title: { label: "是否虚线", tip: "是否虚线" },
|
|
28
|
+
propType: "bool",
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "orientation",
|
|
33
|
+
title: { label: "标题位置", tip: "分割线标题的位置" },
|
|
34
|
+
propType: { type: "oneOf", value: ["left", "right", "center"] },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "orientationMargin",
|
|
38
|
+
title: {
|
|
39
|
+
label: "标题边距",
|
|
40
|
+
tip: "标题和最近 left/right 边框之间的距离,去除了分割线,同时 orientation 必须为 left 或 right",
|
|
54
41
|
},
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
propType: { type: "oneOfType", value: ["string", "number"] },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "style",
|
|
46
|
+
title: { label: "分割线样式对象", tip: "分割线样式对象" },
|
|
47
|
+
propType: "object",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "type",
|
|
51
|
+
title: { label: "方向", tip: "水平还是垂直类型" },
|
|
52
|
+
propType: { type: "oneOf", value: ["horizontal", "vertical"] },
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "plain",
|
|
56
|
+
title: {
|
|
57
|
+
label: "普通正文样式",
|
|
58
|
+
tip: "文字是否显示为普通正文样式",
|
|
63
59
|
},
|
|
64
|
-
|
|
60
|
+
propType: "bool",
|
|
61
|
+
defaultValue: false,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
configure: {
|
|
65
65
|
component: {
|
|
66
66
|
isContainer: true,
|
|
67
67
|
},
|
package/lowcode/drawer/meta.ts
CHANGED