@pisell/materials 3.0.1 → 3.0.2
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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +14 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/MultipleContainersSortList/index.js +2 -1
- package/es/components/dropdown/index.d.ts +2 -2
- package/es/components/dropdown/index.js +4 -2
- package/es/components/filter/components/Dropdown/index.less +3 -1
- package/es/components/filter/components/FilterButton/index.js +3 -1
- package/es/components/filter/index.js +30 -2
- package/es/components/list/index.js +2 -1
- package/es/components/segmented/index.d.ts +4 -0
- package/es/components/segmented/index.js +6 -0
- package/es/components/sort/index.js +3 -2
- package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.js +4 -2
- package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.less +4 -0
- package/es/components/table/Actions/index.js +10 -2
- package/es/components/table/Gallery/components/VirtualGrid/index.js +9 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGenGridProps.js +1 -1
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/Buttons/index.d.ts +1 -1
- package/es/components/table/Header/Buttons/index.js +12 -2
- package/es/components/table/Table/fields/image/Edit/index.js +8 -3
- package/es/components/table/Table/fields/number/Edit/index.js +8 -3
- package/es/components/table/Table/fields/search/filterUtil/index.js +3 -2
- package/es/components/table/Table/index.js +1 -0
- package/es/components/table/Table/utils.d.ts +2 -1
- package/es/components/table/Table/utils.js +8 -0
- package/es/components/table/hooks/useTransFilterSetting.js +3 -1
- package/es/components/table/index.js +8 -5
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +7 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +2 -1
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/es/utils/platform.js +1 -1
- package/lib/components/MultipleContainersSortList/index.js +2 -1
- package/lib/components/dropdown/index.d.ts +2 -2
- package/lib/components/dropdown/index.js +4 -2
- package/lib/components/filter/components/Dropdown/index.less +3 -1
- package/lib/components/filter/components/FilterButton/index.js +3 -1
- package/lib/components/filter/index.js +25 -1
- package/lib/components/list/index.js +2 -1
- package/lib/components/segmented/index.d.ts +4 -0
- package/lib/components/segmented/index.js +40 -0
- package/lib/components/sort/index.js +3 -2
- package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.js +2 -2
- package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.less +4 -0
- package/lib/components/table/Actions/index.js +23 -1
- package/lib/components/table/Gallery/components/VirtualGrid/index.js +4 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGenGridProps.js +1 -1
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/Buttons/index.d.ts +1 -1
- package/lib/components/table/Header/Buttons/index.js +2 -2
- package/lib/components/table/Table/fields/image/Edit/index.js +2 -1
- package/lib/components/table/Table/fields/number/Edit/index.js +2 -1
- package/lib/components/table/Table/fields/search/filterUtil/index.js +3 -2
- package/lib/components/table/Table/index.js +1 -0
- package/lib/components/table/Table/utils.d.ts +2 -1
- package/lib/components/table/Table/utils.js +12 -2
- package/lib/components/table/hooks/useTransFilterSetting.js +3 -1
- package/lib/components/table/index.js +4 -4
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +5 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +2 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/lib/utils/platform.js +1 -1
- package/lowcode/date-picker.range-picker/meta.ts +19 -10
- package/lowcode/dropdown.button/__screenshots__/dropdown.button.png +0 -0
- package/lowcode/dropdown.button/meta.ts +221 -0
- package/lowcode/dropdown.button/snippets.ts +42 -0
- package/lowcode/segmented/meta.ts +165 -0
- package/lowcode/segmented/snippets.ts +25 -0
- package/lowcode/tabs/meta.ts +8 -0
- package/package.json +3 -3
|
@@ -75,16 +75,25 @@ export default {
|
|
|
75
75
|
propType: "string",
|
|
76
76
|
setter: "PisellI18nSetter",
|
|
77
77
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
{
|
|
79
|
+
name: "allowClear",
|
|
80
|
+
title: {
|
|
81
|
+
label: "支持清除",
|
|
82
|
+
tip: "allowClear | 是否允许清除",
|
|
83
|
+
},
|
|
84
|
+
propType: "bool",
|
|
85
|
+
defaultValue: true,
|
|
86
|
+
setter: "BoolSetter",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "inputReadOnly",
|
|
90
|
+
title: {
|
|
91
|
+
label: "设置输入框为只读",
|
|
92
|
+
tip: "inputReadOnly | 设置输入框为只读",
|
|
93
|
+
},
|
|
94
|
+
propType: "bool",
|
|
95
|
+
setter: "BoolSetter",
|
|
96
|
+
},
|
|
88
97
|
{
|
|
89
98
|
name: "bordered",
|
|
90
99
|
title: {
|
|
Binary file
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'Dropdown.Button',
|
|
6
|
+
title: '下拉菜单',
|
|
7
|
+
category: '导航',
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "Dropdown",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "Button",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'open',
|
|
22
|
+
title: { label: '菜单是否显示', tip: '菜单是否显示' },
|
|
23
|
+
propType: { type: 'oneOf', value: [true, false, '-'] },
|
|
24
|
+
defaultValue: '-',
|
|
25
|
+
setter: {
|
|
26
|
+
componentName: 'RadioGroupSetter',
|
|
27
|
+
props: {
|
|
28
|
+
options: [
|
|
29
|
+
{
|
|
30
|
+
title: '默认非受控',
|
|
31
|
+
value: '-',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: '显示',
|
|
35
|
+
value: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '不显示',
|
|
39
|
+
value: false,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
extraProps: {
|
|
45
|
+
getValue(target, fieldValue) {
|
|
46
|
+
const { node } = target;
|
|
47
|
+
let value = node.getPropValue('open');
|
|
48
|
+
if (value === undefined) {
|
|
49
|
+
value = '-';
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
},
|
|
53
|
+
setValue(target, value) {
|
|
54
|
+
const { node } = target;
|
|
55
|
+
if (value === '-') {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
node.clearPropValue('open');
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'arrow',
|
|
65
|
+
title: { label: '显示下拉箭头', tip: '是否显示下拉箭头' },
|
|
66
|
+
propType: 'bool',
|
|
67
|
+
defaultValue: false,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'disabled',
|
|
71
|
+
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
72
|
+
propType: 'bool',
|
|
73
|
+
},
|
|
74
|
+
// {
|
|
75
|
+
// name: 'getPopupContainer',
|
|
76
|
+
// title: {
|
|
77
|
+
// label: '渲染父节点',
|
|
78
|
+
// tip:
|
|
79
|
+
// '菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codepen.io/afc163/pen/zEjNOy?editors=0010)',
|
|
80
|
+
// },
|
|
81
|
+
// propType: 'func',
|
|
82
|
+
// },
|
|
83
|
+
{
|
|
84
|
+
name: 'overlay',
|
|
85
|
+
title: { label: '菜单', tip: '菜单' },
|
|
86
|
+
propType: { type: 'oneOfType', value: ['node', 'func'] },
|
|
87
|
+
},
|
|
88
|
+
// {
|
|
89
|
+
// name: 'overlayClassName',
|
|
90
|
+
// title: { label: '根元素的类名称', tip: '根元素的类名称' },
|
|
91
|
+
// propType: 'string',
|
|
92
|
+
// },
|
|
93
|
+
// {
|
|
94
|
+
// name: 'overlayStyle',
|
|
95
|
+
// title: { label: '根元素的样式', tip: '根元素的样式' },
|
|
96
|
+
// propType: 'object',
|
|
97
|
+
// },
|
|
98
|
+
|
|
99
|
+
{
|
|
100
|
+
name: "type",
|
|
101
|
+
title: {
|
|
102
|
+
label: "type",
|
|
103
|
+
tip: "set button type",
|
|
104
|
+
},
|
|
105
|
+
propType: {
|
|
106
|
+
type: "oneOf",
|
|
107
|
+
value: ["primary", "ghost", "dashed", "danger", "link", "text"],
|
|
108
|
+
},
|
|
109
|
+
setter: [
|
|
110
|
+
{
|
|
111
|
+
componentName: "SelectSetter",
|
|
112
|
+
props: {
|
|
113
|
+
options: [
|
|
114
|
+
{
|
|
115
|
+
title: "primary button",
|
|
116
|
+
value: "primary",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: "dashed button",
|
|
120
|
+
value: "dashed",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: "danger button",
|
|
124
|
+
value: "danger",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: "link butto",
|
|
128
|
+
value: "link",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: "text button",
|
|
132
|
+
value: "text",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
"VariableSetter",
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "size",
|
|
142
|
+
title: {
|
|
143
|
+
label: "size",
|
|
144
|
+
tip: "set button size",
|
|
145
|
+
},
|
|
146
|
+
propType: { type: "oneOf", value: ["large", "middle", "small"] },
|
|
147
|
+
setter: [
|
|
148
|
+
{
|
|
149
|
+
componentName: "RadioGroupSetter",
|
|
150
|
+
props: {
|
|
151
|
+
options: [
|
|
152
|
+
{
|
|
153
|
+
title: "large",
|
|
154
|
+
value: "large",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
title: "middle",
|
|
158
|
+
value: "middle",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
title: "small",
|
|
162
|
+
value: "small",
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
"VariableSetter",
|
|
168
|
+
],
|
|
169
|
+
defaultValue: "middle",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'placement',
|
|
173
|
+
title: {
|
|
174
|
+
label: '弹出位置',
|
|
175
|
+
tip:
|
|
176
|
+
'菜单弹出位置:`bottomLeft` `bottom` `bottomRight` `topLeft` `top` `topRight`',
|
|
177
|
+
},
|
|
178
|
+
propType: {
|
|
179
|
+
type: 'oneOf',
|
|
180
|
+
value: ['bottomLeft', 'bottom', 'bottomRight', 'topLeft', 'top', 'topRight'],
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'trigger',
|
|
185
|
+
title: {
|
|
186
|
+
label: '触发下拉的行为',
|
|
187
|
+
tip: '触发下拉的行为, 移动端不支持 hover',
|
|
188
|
+
},
|
|
189
|
+
propType: {
|
|
190
|
+
type: 'arrayOf',
|
|
191
|
+
value: { type: 'oneOf', value: ['click', 'hover', 'contextMenu'] },
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'onOpenChange',
|
|
196
|
+
title: {
|
|
197
|
+
label: '显示状态回调',
|
|
198
|
+
tip: '菜单显示状态改变时调用,参数为 `open`',
|
|
199
|
+
},
|
|
200
|
+
propType: 'func',
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
configure: {
|
|
204
|
+
component: { isContainer: true },
|
|
205
|
+
supports: {
|
|
206
|
+
style: true,
|
|
207
|
+
events: [
|
|
208
|
+
{
|
|
209
|
+
name: 'onOpenChange',
|
|
210
|
+
template:
|
|
211
|
+
"onOpenChange(open,${extParams}){\n// 菜单显示状态改变时调用\nconsole.log('onOpenChange',open);}",
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'onClick',
|
|
215
|
+
template:
|
|
216
|
+
"onClick(e,${extParams}){\n// 按钮点击时调用\nconsole.log('onClick',e);}",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: "带下拉框的按钮",
|
|
4
|
+
screenshot:
|
|
5
|
+
"https://alifd.alicdn.com/fusion-cool/icons/icon-antd/dropdown-1.png",
|
|
6
|
+
schema: {
|
|
7
|
+
componentName: "Dropdown.Button",
|
|
8
|
+
props: {
|
|
9
|
+
trigger: ["click"],
|
|
10
|
+
overlay: {
|
|
11
|
+
type: "JSSlot",
|
|
12
|
+
value: [
|
|
13
|
+
{
|
|
14
|
+
componentName: "Menu",
|
|
15
|
+
props: {
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
key: "timeLinei5wd",
|
|
19
|
+
category: "Item",
|
|
20
|
+
title: "菜单名",
|
|
21
|
+
label: "菜单名"
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
{
|
|
31
|
+
componentName: "Typography.Text",
|
|
32
|
+
props: {
|
|
33
|
+
children: "Dropdown",
|
|
34
|
+
style: {
|
|
35
|
+
color: "inherit",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
];
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
import { uuid } from '../_utils/utils';
|
|
4
|
+
import snippets from './snippets';
|
|
5
|
+
const SegmentedMeta: ComponentMetadata = {
|
|
6
|
+
"componentName": "Segmented",
|
|
7
|
+
"title": "Segmented",
|
|
8
|
+
"docUrl": "",
|
|
9
|
+
"screenshot": "",
|
|
10
|
+
"devMode": "proCode",
|
|
11
|
+
"npm": {
|
|
12
|
+
"package": "@pisell/materials",
|
|
13
|
+
"version": "3.0.1",
|
|
14
|
+
"exportName": "Segmented",
|
|
15
|
+
"main": "src/index.tsx",
|
|
16
|
+
"destructuring": true,
|
|
17
|
+
"subName": ""
|
|
18
|
+
},
|
|
19
|
+
"configure": {
|
|
20
|
+
"props": [
|
|
21
|
+
{
|
|
22
|
+
name: 'block',
|
|
23
|
+
title: { label: '将宽度调整为父元素宽度的选项' },
|
|
24
|
+
propType: 'bool',
|
|
25
|
+
defaultValue: false,
|
|
26
|
+
setter: 'BoolSetter',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'className',
|
|
30
|
+
title: { label: 'className', tip: 'className' },
|
|
31
|
+
propType: 'string',
|
|
32
|
+
setter: 'StringSetter',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'defaultValue',
|
|
36
|
+
title: { label: '默认值', tip: '默认内容' },
|
|
37
|
+
propType: 'string',
|
|
38
|
+
setter: 'StringSetter',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'value',
|
|
42
|
+
title: { label: '当前值', tip: '当前值' },
|
|
43
|
+
propType: 'string',
|
|
44
|
+
setter: 'StringSetter'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'disabled',
|
|
48
|
+
title: { label: '是否禁用' },
|
|
49
|
+
propType: 'bool',
|
|
50
|
+
defaultValue: false,
|
|
51
|
+
setter: 'BoolSetter',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'size',
|
|
55
|
+
title: { label: '控件大小', tip: '控件大小' },
|
|
56
|
+
setter: {
|
|
57
|
+
componentName: 'RadioGroupSetter',
|
|
58
|
+
props: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
title: '大',
|
|
62
|
+
value: 'large',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: '中',
|
|
66
|
+
value: 'middle',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: '小',
|
|
70
|
+
value: 'small',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
76
|
+
defaultValue: 'middle',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'options',
|
|
80
|
+
title: { label: '可选项', tip: '可选项' },
|
|
81
|
+
propType: {
|
|
82
|
+
type: 'arrayOf',
|
|
83
|
+
value: {
|
|
84
|
+
type: 'shape',
|
|
85
|
+
value: [
|
|
86
|
+
{
|
|
87
|
+
name: 'label',
|
|
88
|
+
propType: 'string',
|
|
89
|
+
description: '选项名',
|
|
90
|
+
defaultValue: '选项名',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'value',
|
|
94
|
+
propType: ['string', 'number'],
|
|
95
|
+
description: '选项值',
|
|
96
|
+
defaultValue: '选项值',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'disabled',
|
|
100
|
+
propType: 'bool',
|
|
101
|
+
description: '是否禁用',
|
|
102
|
+
defaultValue: false,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
setter: {
|
|
108
|
+
componentName: 'ArraySetter',
|
|
109
|
+
props: {
|
|
110
|
+
itemSetter: {
|
|
111
|
+
componentName: 'ObjectSetter',
|
|
112
|
+
props: {
|
|
113
|
+
config: {
|
|
114
|
+
items: [
|
|
115
|
+
{
|
|
116
|
+
name: 'label',
|
|
117
|
+
title: '选项名',
|
|
118
|
+
setter: ['StringSetter', 'PisellI18nSetter', 'VariableSetter'],
|
|
119
|
+
isRequired: true
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'value',
|
|
123
|
+
title: '选项值',
|
|
124
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
125
|
+
isRequired: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'disabled',
|
|
129
|
+
title: '是否禁用',
|
|
130
|
+
setter: ['BoolSetter', 'VariableSetter'],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
initialValue: () => {
|
|
136
|
+
return {
|
|
137
|
+
label: '选项名',
|
|
138
|
+
value: uuid(),
|
|
139
|
+
disabled: false,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
"supports": {
|
|
148
|
+
style: true,
|
|
149
|
+
events: [
|
|
150
|
+
{
|
|
151
|
+
name: 'onChange',
|
|
152
|
+
template:
|
|
153
|
+
"onChange(event,${extParams}){\n// 选项变化时的回调函数\nconsole.log('onChange',event);}",
|
|
154
|
+
},
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"component": {}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
export default {
|
|
163
|
+
...SegmentedMeta,
|
|
164
|
+
snippets
|
|
165
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '分段器',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/select-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Segmented',
|
|
7
|
+
props: {
|
|
8
|
+
options: [
|
|
9
|
+
{
|
|
10
|
+
label: 'A',
|
|
11
|
+
value: 'A',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'B',
|
|
15
|
+
value: 'B',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'C',
|
|
19
|
+
value: 'C',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|
package/lowcode/tabs/meta.ts
CHANGED
|
@@ -60,6 +60,13 @@ export default {
|
|
|
60
60
|
initialValue: false,
|
|
61
61
|
supportVariable: true,
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
name: "hidden",
|
|
65
|
+
title: "隐藏",
|
|
66
|
+
setter: "BoolSetter",
|
|
67
|
+
initialValue: false,
|
|
68
|
+
supportVariable: true,
|
|
69
|
+
},
|
|
63
70
|
{
|
|
64
71
|
name: "forceRender",
|
|
65
72
|
title: "隐藏时保留",
|
|
@@ -106,6 +113,7 @@ export default {
|
|
|
106
113
|
},
|
|
107
114
|
],
|
|
108
115
|
},
|
|
116
|
+
defaultValue: null
|
|
109
117
|
},
|
|
110
118
|
condition(target) {
|
|
111
119
|
return (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
63
63
|
"crypto-js": "^4.2.0",
|
|
64
64
|
"@pisell/utils": "1.0.23",
|
|
65
|
-
"@pisell/
|
|
66
|
-
"@pisell/
|
|
65
|
+
"@pisell/icon": "0.0.8",
|
|
66
|
+
"@pisell/date-picker": "1.0.68"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^18.0.0",
|