@pisell/materials 1.0.111 → 1.0.112
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/designer.html +2 -2
- package/build/lowcode/index.html +2 -2
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +12 -12
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/lowcode/classic-layout/meta.ts +115 -0
- package/lowcode/classic-layout/snippets.ts +65 -0
- package/lowcode/list/meta.ts +89 -4
- package/lowcode/list/snippets.ts +241 -60
- package/package.json +3 -3
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import snippets from "./snippets";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: "ClassicLayout",
|
|
6
|
+
title: "layout布局组件",
|
|
7
|
+
category: "布局",
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "ClassicLayout",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "className",
|
|
22
|
+
title: { label: "容器 className", tip: "容器 className" },
|
|
23
|
+
setter: "StringSetter",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "fixedHeader",
|
|
27
|
+
title: { label: "固定顶部", tip: "是否固定顶部|fixedHeader" },
|
|
28
|
+
setter: "BoolSetter",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "fixedFooter",
|
|
32
|
+
title: { label: "固定底部", tip: "是否固定底部|fixedFooter" },
|
|
33
|
+
setter: "BoolSetter",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "header",
|
|
37
|
+
title: {
|
|
38
|
+
label: "顶部渲染函数",
|
|
39
|
+
tip: "顶部渲染函数 |header",
|
|
40
|
+
},
|
|
41
|
+
propType: "func",
|
|
42
|
+
setter: [
|
|
43
|
+
{
|
|
44
|
+
componentName: "SlotSetter",
|
|
45
|
+
title: "顶部渲染函数插槽",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
componentName: "FunctionSetter",
|
|
49
|
+
props: {
|
|
50
|
+
template: "header(){\n// 自定义渲染顶部\nreturn `Header`;\n}",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
"VariableSetter",
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "content",
|
|
58
|
+
title: {
|
|
59
|
+
label: "内容渲染函数",
|
|
60
|
+
tip: "内容渲染函数 |content",
|
|
61
|
+
},
|
|
62
|
+
propType: "func",
|
|
63
|
+
setter: [
|
|
64
|
+
{
|
|
65
|
+
componentName: "SlotSetter",
|
|
66
|
+
title: "内容渲染插槽",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
componentName: "FunctionSetter",
|
|
70
|
+
props: {
|
|
71
|
+
template: "content(){\n// 自定义渲染内容\nreturn `Content`;\n}",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
"VariableSetter",
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "footer",
|
|
79
|
+
title: {
|
|
80
|
+
label: "底部渲染函数",
|
|
81
|
+
tip: "底部渲染函数 |footer",
|
|
82
|
+
},
|
|
83
|
+
propType: "func",
|
|
84
|
+
setter: [
|
|
85
|
+
{
|
|
86
|
+
componentName: "SlotSetter",
|
|
87
|
+
title: "底部函数插槽",
|
|
88
|
+
initialValue: {
|
|
89
|
+
type: "JSSlot",
|
|
90
|
+
value: [],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
componentName: "FunctionSetter",
|
|
95
|
+
props: {
|
|
96
|
+
template: "footer(){\n// 自定义渲染底部\nreturn `Footer`;\n}",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
"VariableSetter",
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
configure: {
|
|
104
|
+
component: {
|
|
105
|
+
// isContainer: true,
|
|
106
|
+
// nestingRule: {
|
|
107
|
+
// childWhitelist: [],
|
|
108
|
+
// parentWhitelist: [],
|
|
109
|
+
// },
|
|
110
|
+
},
|
|
111
|
+
supports: {
|
|
112
|
+
style: true,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: "layout布局组件",
|
|
4
|
+
schema: {
|
|
5
|
+
componentName: "ClassicLayout",
|
|
6
|
+
props: {
|
|
7
|
+
header: {
|
|
8
|
+
type: "JSSlot",
|
|
9
|
+
value: [
|
|
10
|
+
{
|
|
11
|
+
componentName: "Div",
|
|
12
|
+
props: {
|
|
13
|
+
style: {
|
|
14
|
+
textAlign: 'center',
|
|
15
|
+
color: '#fff',
|
|
16
|
+
height: 64,
|
|
17
|
+
paddingInline: 50,
|
|
18
|
+
lineHeight: '64px',
|
|
19
|
+
backgroundColor: '#7dbcea',
|
|
20
|
+
},
|
|
21
|
+
children: "Header",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
content: {
|
|
27
|
+
type: "JSSlot",
|
|
28
|
+
value: [
|
|
29
|
+
{
|
|
30
|
+
componentName: "Div",
|
|
31
|
+
props: {
|
|
32
|
+
style: {
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
minHeight: 120,
|
|
35
|
+
lineHeight: '120px',
|
|
36
|
+
color: '#fff',
|
|
37
|
+
backgroundColor: '#108ee9',
|
|
38
|
+
},
|
|
39
|
+
children: "Content",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
footer: {
|
|
45
|
+
type: "JSSlot",
|
|
46
|
+
value: [
|
|
47
|
+
{
|
|
48
|
+
componentName: "Div",
|
|
49
|
+
props: {
|
|
50
|
+
style: {
|
|
51
|
+
textAlign: 'center',
|
|
52
|
+
color: '#fff',
|
|
53
|
+
backgroundColor: '#7dbcea',
|
|
54
|
+
height: 70,
|
|
55
|
+
lineHeight: '70px',
|
|
56
|
+
},
|
|
57
|
+
children: "Footer",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
package/lowcode/list/meta.ts
CHANGED
|
@@ -156,7 +156,8 @@ export default {
|
|
|
156
156
|
node.setPropValue('grid', false);
|
|
157
157
|
return
|
|
158
158
|
}
|
|
159
|
-
target.node.setPropValue('grid.column',4)
|
|
159
|
+
target.node.setPropValue('grid.column',4);
|
|
160
|
+
target.node.setPropValue('grid.oneLine',false);
|
|
160
161
|
},
|
|
161
162
|
},
|
|
162
163
|
},
|
|
@@ -171,14 +172,98 @@ export default {
|
|
|
171
172
|
},
|
|
172
173
|
},
|
|
173
174
|
{
|
|
174
|
-
name: '
|
|
175
|
-
title: {
|
|
175
|
+
name: 'h-gutter',
|
|
176
|
+
title: {
|
|
177
|
+
label: '水平间隔',
|
|
178
|
+
tip: '栅格水平间隔,单位为像素(px)',
|
|
179
|
+
},
|
|
176
180
|
propType: 'number',
|
|
177
|
-
setter:
|
|
181
|
+
setter: {
|
|
182
|
+
componentName: 'NumberSetter',
|
|
183
|
+
props: {
|
|
184
|
+
min: 0,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
defaultValue: 0,
|
|
188
|
+
extraProps: {
|
|
189
|
+
getValue(target) {
|
|
190
|
+
const { node } = target;
|
|
191
|
+
const gutter = node.getPropValue('grid.gutter');
|
|
192
|
+
if (typeof gutter === 'number') {
|
|
193
|
+
return gutter;
|
|
194
|
+
} else if (Array.isArray(gutter)) {
|
|
195
|
+
return gutter[0];
|
|
196
|
+
}
|
|
197
|
+
return 0;
|
|
198
|
+
},
|
|
199
|
+
setValue(target, value) {
|
|
200
|
+
const { node } = target;
|
|
201
|
+
const gutter = node.getPropValue('grid.gutter');
|
|
202
|
+
if (Array.isArray(gutter)) {
|
|
203
|
+
gutter[0] = value;
|
|
204
|
+
node.setPropValue('grid.gutter', gutter);
|
|
205
|
+
} else {
|
|
206
|
+
node.setPropValue('grid.gutter', [value, 0]);
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'v-gutter',
|
|
213
|
+
title: {
|
|
214
|
+
label: '垂直间隔',
|
|
215
|
+
tip: '栅格垂直间隔,单位为像素(px)',
|
|
216
|
+
},
|
|
217
|
+
propType: 'number',
|
|
218
|
+
setter: {
|
|
219
|
+
componentName: 'NumberSetter',
|
|
220
|
+
props: {
|
|
221
|
+
min: 0,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
defaultValue: 0,
|
|
225
|
+
extraProps: {
|
|
226
|
+
getValue(target) {
|
|
227
|
+
const { node } = target;
|
|
228
|
+
const gutter = node.getPropValue('grid.gutter');
|
|
229
|
+
if (typeof gutter === 'number') {
|
|
230
|
+
return 0;
|
|
231
|
+
} else if (Array.isArray(gutter)) {
|
|
232
|
+
return gutter[1];
|
|
233
|
+
}
|
|
234
|
+
return 0;
|
|
235
|
+
},
|
|
236
|
+
setValue(target, value) {
|
|
237
|
+
const { node } = target;
|
|
238
|
+
const gutter = node.getPropValue('grid.gutter');
|
|
239
|
+
if (Array.isArray(gutter)) {
|
|
240
|
+
gutter[1] = value;
|
|
241
|
+
node.setPropValue('grid.gutter', gutter);
|
|
242
|
+
} else {
|
|
243
|
+
node.setPropValue('grid.gutter', [gutter, value]);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
// {
|
|
249
|
+
// name: 'grid.gutter',
|
|
250
|
+
// title: { label: '间隔', tip: 'grid.gutter | 栅格的间隔' },
|
|
251
|
+
// propType: 'number',
|
|
252
|
+
// setter: 'NumberSetter',
|
|
253
|
+
// condition: {
|
|
254
|
+
// type: 'JSFunction',
|
|
255
|
+
// value: 'target => !!target.getProps().getPropValue("gridEnable")',
|
|
256
|
+
// },
|
|
257
|
+
// },
|
|
258
|
+
{
|
|
259
|
+
name: 'grid.oneLine',
|
|
260
|
+
title: { label: '一行展示', tip: 'grid.oneLine | 一行展示' },
|
|
261
|
+
propType: 'boolean',
|
|
178
262
|
condition: {
|
|
179
263
|
type: 'JSFunction',
|
|
180
264
|
value: 'target => !!target.getProps().getPropValue("gridEnable")',
|
|
181
265
|
},
|
|
266
|
+
setter: 'BoolSetter',
|
|
182
267
|
},
|
|
183
268
|
],
|
|
184
269
|
},
|