@pisell/materials 6.0.6 → 6.0.8
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 +7 -7
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -53
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/config-provider/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +46 -25
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +28 -5
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +360 -0
- package/es/components/login-and-register/index.less +211 -0
- package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/es/components/organizationTenantSwitcher/index.js +96 -0
- package/es/components/organizationTenantSwitcher/index.less +88 -0
- package/es/components/page/index.js +4 -4
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +36 -0
- package/es/components/page-header/index.less +45 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +89 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/pisellViewGrid/index.d.ts +16 -0
- package/es/components/pisellViewGrid/index.js +66 -0
- package/es/components/pisellViewGrid/index.less +31 -0
- package/es/components/profileMenu/index.d.ts +26 -0
- package/es/components/profileMenu/index.js +115 -0
- package/es/components/profileMenu/index.less +135 -0
- package/es/components/table/Header/index.js +8 -11
- package/es/index.d.ts +7 -0
- package/es/index.js +8 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/config-provider/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +15 -4
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +24 -3
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +261 -0
- package/lib/components/login-and-register/index.less +211 -0
- package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/lib/components/organizationTenantSwitcher/index.js +119 -0
- package/lib/components/organizationTenantSwitcher/index.less +88 -0
- package/lib/components/page/index.js +4 -4
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/index.js +63 -0
- package/lib/components/page-header/index.less +45 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/pisellViewGrid/index.d.ts +16 -0
- package/lib/components/pisellViewGrid/index.js +98 -0
- package/lib/components/pisellViewGrid/index.less +31 -0
- package/lib/components/profileMenu/index.d.ts +26 -0
- package/lib/components/profileMenu/index.js +113 -0
- package/lib/components/profileMenu/index.less +135 -0
- package/lib/components/table/Header/index.js +11 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.js +21 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/_utils/defaultSchema.ts +64 -0
- package/lowcode/data-source-form/meta.ts +130 -0
- package/lowcode/data-source-form/utils.ts +33 -3
- package/lowcode/data-source-table/meta.ts +139 -3
- package/lowcode/data-source-table/utils.tsx +6 -0
- package/lowcode/form-item-date-picker/snippets.ts +3 -0
- package/lowcode/form-item-input/snippets.ts +3 -1
- package/lowcode/form-item-input-number/snippets.ts +4 -0
- package/lowcode/form-item-input.email/snippets.ts +3 -0
- package/lowcode/form-item-input.json/snippets.ts +4 -1
- package/lowcode/form-item-input.password/snippets.ts +3 -0
- package/lowcode/form-item-input.phone/snippets.ts +3 -0
- package/lowcode/form-item-input.text-area/snippets.ts +3 -1
- package/lowcode/form-item-input.url/snippets.ts +3 -0
- package/lowcode/form-item-select/meta.ts +2 -1
- package/lowcode/form-item-select/snippets.ts +6 -0
- package/lowcode/form-item-time-picker/snippets.ts +3 -0
- package/lowcode/form-item-translation/snippets.ts +3 -1
- package/lowcode/login-and-register/meta.ts +541 -0
- package/lowcode/login-and-register/snippets.ts +38 -0
- package/lowcode/organization-tenant-switch/meta.ts +127 -0
- package/lowcode/page-header/meta.ts +68 -124
- package/lowcode/page-header/snippets.ts +1 -1
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
- package/lowcode/pisell-tags/meta.ts +123 -0
- package/lowcode/pisell-tags/snippets.ts +14 -0
- package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-view-grid/meta.ts +167 -0
- package/lowcode/pisell-view-grid/snippets.ts +54 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +71 -0
- package/lowcode/submit-button/meta.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
|
|
2
|
+
|
|
3
|
+
const DivMeta: ComponentMetadata = {
|
|
4
|
+
componentName: "OrganizationTenantSwitcher",
|
|
5
|
+
title: "企业租户切换",
|
|
6
|
+
docUrl: "",
|
|
7
|
+
screenshot: "",
|
|
8
|
+
devMode: "proCode",
|
|
9
|
+
npm: {
|
|
10
|
+
package: "@pisell/materials",
|
|
11
|
+
version: "1.0.3",
|
|
12
|
+
exportName: "OrganizationTenantSwitcher",
|
|
13
|
+
main: "src/index.tsx",
|
|
14
|
+
destructuring: true,
|
|
15
|
+
subName: "",
|
|
16
|
+
},
|
|
17
|
+
props: [
|
|
18
|
+
{
|
|
19
|
+
name: "showLogo",
|
|
20
|
+
title: "显示商标",
|
|
21
|
+
setter: "BoolSetter",
|
|
22
|
+
defaultValue: true,
|
|
23
|
+
supportVariable: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "showName",
|
|
27
|
+
title: "显示企业名称",
|
|
28
|
+
setter: "BoolSetter",
|
|
29
|
+
defaultValue: true,
|
|
30
|
+
supportVariable: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "readOnly",
|
|
34
|
+
title: "是否只读",
|
|
35
|
+
setter: "BoolSetter",
|
|
36
|
+
defaultValue: false,
|
|
37
|
+
supportVariable: true
|
|
38
|
+
},
|
|
39
|
+
/*
|
|
40
|
+
{
|
|
41
|
+
name: "options",
|
|
42
|
+
title: "企业列表",
|
|
43
|
+
setter: {
|
|
44
|
+
componentName: "ArraySetter",
|
|
45
|
+
props: {
|
|
46
|
+
itemSetter: {
|
|
47
|
+
componentName: "ObjectSetter",
|
|
48
|
+
props: {
|
|
49
|
+
config: {
|
|
50
|
+
items: [
|
|
51
|
+
{
|
|
52
|
+
name: "label",
|
|
53
|
+
title: "企业名称",
|
|
54
|
+
propType: "string",
|
|
55
|
+
setter: "StringSetter",
|
|
56
|
+
isRequired: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "value",
|
|
60
|
+
title: "企业ID",
|
|
61
|
+
propType: "string",
|
|
62
|
+
setter: "StringSetter",
|
|
63
|
+
isRequired: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "logo",
|
|
67
|
+
title: "企业Logo",
|
|
68
|
+
propType: "string",
|
|
69
|
+
setter: "StringSetter",
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultValue: [],
|
|
78
|
+
supportVariable: true
|
|
79
|
+
}
|
|
80
|
+
*/
|
|
81
|
+
],
|
|
82
|
+
configure: {
|
|
83
|
+
supports: {
|
|
84
|
+
style: true,
|
|
85
|
+
events: [
|
|
86
|
+
{
|
|
87
|
+
name: "onClick",
|
|
88
|
+
template:
|
|
89
|
+
"onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
component: {
|
|
94
|
+
isContainer: true,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
const snippets: Snippet[] = [
|
|
99
|
+
{
|
|
100
|
+
title: "企业租户切换",
|
|
101
|
+
screenshot: "",
|
|
102
|
+
schema: {
|
|
103
|
+
title: "企业租户切换",
|
|
104
|
+
componentName: "OrganizationTenantSwitcher",
|
|
105
|
+
props: {
|
|
106
|
+
showLogo: true,
|
|
107
|
+
showName: true,
|
|
108
|
+
options: [
|
|
109
|
+
{
|
|
110
|
+
label: "企业1",
|
|
111
|
+
value: "1",
|
|
112
|
+
logo: 'https://pisell2-dev.s3.cn-north-1.amazonaws.com.cn/media/tenant-0/2025/01/10/01jh7vas0ga68jgajsarv9g46c.png'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: "企业2",
|
|
116
|
+
value: "2",
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
export default {
|
|
125
|
+
...DivMeta,
|
|
126
|
+
snippets,
|
|
127
|
+
};
|
|
@@ -3,155 +3,99 @@ import snippets from './snippets';
|
|
|
3
3
|
export default {
|
|
4
4
|
snippets,
|
|
5
5
|
componentName: 'PageHeader',
|
|
6
|
-
title: '
|
|
6
|
+
title: '页面头部',
|
|
7
7
|
category: '导航',
|
|
8
|
-
docUrl:
|
|
9
|
-
screenshot:
|
|
10
|
-
devMode:
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
11
|
npm: {
|
|
12
|
-
package:
|
|
13
|
-
version:
|
|
14
|
-
exportName:
|
|
15
|
-
main:
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'PageHeader',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
16
|
destructuring: true,
|
|
17
|
-
subName:
|
|
17
|
+
subName: '',
|
|
18
18
|
},
|
|
19
19
|
props: [
|
|
20
20
|
{
|
|
21
21
|
name: 'title',
|
|
22
|
-
title: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
title: {
|
|
23
|
+
label: {
|
|
24
|
+
type: 'i18n',
|
|
25
|
+
'zh-CN': '标题',
|
|
26
|
+
'en-US': 'Title',
|
|
27
|
+
'zh-HK': '標題',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
setter: ['PisellI18nSetter', 'SlotSetter'],
|
|
29
31
|
},
|
|
30
32
|
{
|
|
31
|
-
name: '
|
|
32
|
-
title: {
|
|
33
|
-
|
|
33
|
+
name: 'showTitle',
|
|
34
|
+
title: {
|
|
35
|
+
label: {
|
|
36
|
+
type: 'i18n',
|
|
37
|
+
'zh-CN': '是否显示标题',
|
|
38
|
+
'en-US': 'Show Title',
|
|
39
|
+
'zh-HK': '是否顯示標題',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
34
42
|
defaultValue: true,
|
|
35
|
-
|
|
36
|
-
// {
|
|
37
|
-
// name: 'backIcon',
|
|
38
|
-
// title: {
|
|
39
|
-
// label: '返回按钮',
|
|
40
|
-
// tip: '自定义 back icon ,如果为 false 不渲染 back icon',
|
|
41
|
-
// },
|
|
42
|
-
// propType: { type: 'oneOfType', value: ['node', 'bool'] },
|
|
43
|
-
// },
|
|
44
|
-
{
|
|
45
|
-
name: 'tags',
|
|
46
|
-
title: { label: 'tag 列表', tip: 'title 旁的 tag 列表' },
|
|
47
|
-
propType: 'node',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'extra',
|
|
51
|
-
title: { label: '操作区', tip: '操作区,位于 title 行的行尾' },
|
|
52
|
-
propType: 'node',
|
|
43
|
+
setter: 'BoolSetter',
|
|
53
44
|
},
|
|
54
45
|
{
|
|
55
|
-
name: '
|
|
56
|
-
title: {
|
|
57
|
-
|
|
46
|
+
name: 'subTitle',
|
|
47
|
+
title: {
|
|
48
|
+
label: {
|
|
49
|
+
type: 'i18n',
|
|
50
|
+
'zh-CN': '副标题',
|
|
51
|
+
'en-US': 'Sub Title',
|
|
52
|
+
'zh-HK': '副標題',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
setter: ['PisellI18nSetter', 'SlotSetter'],
|
|
58
56
|
},
|
|
59
57
|
{
|
|
60
|
-
name: '
|
|
61
|
-
title: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
props: {
|
|
68
|
-
config: {
|
|
69
|
-
items: [
|
|
70
|
-
{
|
|
71
|
-
name: 'src',
|
|
72
|
-
title: { label: '地址', tip: '头像地址' },
|
|
73
|
-
setter: {
|
|
74
|
-
componentName: 'StringSetter',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
58
|
+
name: 'showSubTitle',
|
|
59
|
+
title: {
|
|
60
|
+
label: {
|
|
61
|
+
type: 'i18n',
|
|
62
|
+
'zh-CN': '是否显示副标题',
|
|
63
|
+
'en-US': 'Show Sub Title',
|
|
64
|
+
'zh-HK': '是否顯示副標題',
|
|
80
65
|
},
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
},
|
|
67
|
+
defaultValue: true,
|
|
68
|
+
setter: 'BoolSetter',
|
|
83
69
|
},
|
|
84
70
|
{
|
|
85
|
-
name: '
|
|
86
|
-
title: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
props: {
|
|
93
|
-
config: {
|
|
94
|
-
items: [
|
|
95
|
-
{
|
|
96
|
-
name: 'routes',
|
|
97
|
-
title: { label: '路由栈信息', tip: '路由栈信息' },
|
|
98
|
-
setter: {
|
|
99
|
-
componentName: 'ArraySetter',
|
|
100
|
-
props: {
|
|
101
|
-
itemSetter: {
|
|
102
|
-
componentName: 'ObjectSetter',
|
|
103
|
-
initialValue: {
|
|
104
|
-
path: 'path',
|
|
105
|
-
breadcrumbName: 'pathName',
|
|
106
|
-
},
|
|
107
|
-
isRequired: true,
|
|
108
|
-
props: {
|
|
109
|
-
config: {
|
|
110
|
-
items: [
|
|
111
|
-
{
|
|
112
|
-
name: 'path',
|
|
113
|
-
defaultValue: 'path',
|
|
114
|
-
title: { label: '路径', tip: 'path | 路径' },
|
|
115
|
-
setter: 'StringSetter',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: 'breadcrumbName',
|
|
119
|
-
defaultValue: 'pathName',
|
|
120
|
-
title: {
|
|
121
|
-
label: '名称',
|
|
122
|
-
tip: 'breadcrumbName | 名称',
|
|
123
|
-
},
|
|
124
|
-
setter: 'StringSetter',
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
71
|
+
name: 'showDivider',
|
|
72
|
+
title: {
|
|
73
|
+
label: {
|
|
74
|
+
type: 'i18n',
|
|
75
|
+
'zh-CN': '是否显示分割线',
|
|
76
|
+
'en-US': 'Show Divider',
|
|
77
|
+
'zh-HK': '是否顯示分割線',
|
|
136
78
|
},
|
|
137
|
-
|
|
138
|
-
|
|
79
|
+
},
|
|
80
|
+
setter: 'BoolSetter',
|
|
139
81
|
},
|
|
140
82
|
{
|
|
141
|
-
name: '
|
|
142
|
-
title: {
|
|
143
|
-
|
|
83
|
+
name: 'extra',
|
|
84
|
+
title: {
|
|
85
|
+
label: {
|
|
86
|
+
type: 'i18n',
|
|
87
|
+
'zh-CN': '额外内容',
|
|
88
|
+
'en-US': 'Extra',
|
|
89
|
+
'zh-HK': '額外內容',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
setter: ['PisellI18nSetter', 'SlotSetter'],
|
|
144
93
|
},
|
|
145
94
|
],
|
|
146
95
|
configure: {
|
|
147
96
|
supports: {
|
|
148
97
|
style: true,
|
|
149
|
-
events: [
|
|
150
|
-
{
|
|
151
|
-
name: 'onBack',
|
|
152
|
-
template: "onBack(${extParams}){\n// 返回按钮的点击事件\nconsole.log('onBack');}",
|
|
153
|
-
},
|
|
154
|
-
],
|
|
98
|
+
events: [],
|
|
155
99
|
},
|
|
156
100
|
},
|
|
157
101
|
};
|
|
Binary file
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import snippets from "./snippets";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: "PisellAvatar",
|
|
6
|
+
title: "头像",
|
|
7
|
+
category: "数据展示",
|
|
8
|
+
devMode: "proCode",
|
|
9
|
+
npm: {
|
|
10
|
+
package: "@pisell/materials",
|
|
11
|
+
version: "1.0.1",
|
|
12
|
+
exportName: "PisellAvatar",
|
|
13
|
+
main: "src/index.tsx",
|
|
14
|
+
destructuring: true,
|
|
15
|
+
subName: "",
|
|
16
|
+
},
|
|
17
|
+
props: [
|
|
18
|
+
{
|
|
19
|
+
name: "icon",
|
|
20
|
+
title: { label: "头像图标", tip: "icon | 设置头像的自定义图标" },
|
|
21
|
+
propType: "node",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "shape",
|
|
25
|
+
title: { label: "头像形状", tip: "shape | 指定头像的形状" },
|
|
26
|
+
propType: { type: "oneOf", value: ["circle", "square"] },
|
|
27
|
+
defaultValue: "circle",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "borderRadius",
|
|
31
|
+
title: { label: "圆角度数", tip: "borderRadius | 方形头像的圆角大小" },
|
|
32
|
+
propType: "number",
|
|
33
|
+
defaultValue: 4,
|
|
34
|
+
condition: {
|
|
35
|
+
type: "JSFunction",
|
|
36
|
+
value: "target => target.getProps().getPropValue('shape') === 'square'",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "size",
|
|
41
|
+
title: { label: "尺寸", tip: "size | 设置头像的大小" },
|
|
42
|
+
propType: {
|
|
43
|
+
type: "oneOf",
|
|
44
|
+
value: ["xs", "sm", "md", "lg", "xl", "xxl"],
|
|
45
|
+
},
|
|
46
|
+
defaultValue: "xs",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "useTextAvatar",
|
|
50
|
+
title: { label: "使用文本头像", tip: "useTextAvatar | 是否使用文本作为头像" },
|
|
51
|
+
propType: "bool",
|
|
52
|
+
defaultValue: false,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "children",
|
|
56
|
+
title: { label: "文本内容", tip: "children | 文本头像的内容" },
|
|
57
|
+
propType: "string",
|
|
58
|
+
condition: {
|
|
59
|
+
type: "JSFunction",
|
|
60
|
+
value: "target => target.getProps().getPropValue('useTextAvatar')",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "src",
|
|
65
|
+
title: { label: "图片地址", tip: "src | 图片类头像的资源地址" },
|
|
66
|
+
propType: "string",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "alt",
|
|
70
|
+
title: {
|
|
71
|
+
label: "替代文本",
|
|
72
|
+
tip: "alt | 图像无法显示时的替代文本",
|
|
73
|
+
},
|
|
74
|
+
propType: "string",
|
|
75
|
+
setter: "PisellI18nSetter",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "onError",
|
|
79
|
+
title: {
|
|
80
|
+
label: "图片加载失败的事件",
|
|
81
|
+
tip: "图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为",
|
|
82
|
+
},
|
|
83
|
+
propType: "func",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "gap",
|
|
87
|
+
title: {
|
|
88
|
+
label: "文字边距",
|
|
89
|
+
tip: "gap | 字符类型距离左右两侧边界单位像素",
|
|
90
|
+
},
|
|
91
|
+
propType: "number",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
configure: {
|
|
95
|
+
supports: {
|
|
96
|
+
style: true,
|
|
97
|
+
events: [
|
|
98
|
+
{
|
|
99
|
+
name: "onError",
|
|
100
|
+
template:
|
|
101
|
+
"onError(${extParams}){\n// 图片加载失败的事件\nconsole.log('onError');}",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "onClick",
|
|
105
|
+
template:
|
|
106
|
+
"onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '头像',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/avatar-1.jpg',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'PisellAvatar',
|
|
7
|
+
props: {
|
|
8
|
+
src: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
|
9
|
+
borderRadius: 4,
|
|
10
|
+
size: 'xs'
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
];
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import snippets from "./snippets";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: "PisellTags",
|
|
6
|
+
title: "标签",
|
|
7
|
+
category: "数据展示",
|
|
8
|
+
docUrl: "",
|
|
9
|
+
screenshot: "",
|
|
10
|
+
devMode: "proCode",
|
|
11
|
+
npm: {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
version: "1.0.1",
|
|
14
|
+
exportName: "PisellTags",
|
|
15
|
+
main: "src/index.tsx",
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: "",
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "children",
|
|
22
|
+
title: { label: "内容" },
|
|
23
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
24
|
+
setter: ['PisellI18nSetter', 'SlotSetter']
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'type',
|
|
28
|
+
title: { label: '展示类型' },
|
|
29
|
+
setter: {
|
|
30
|
+
componentName: 'RadioGroupSetter',
|
|
31
|
+
props: {
|
|
32
|
+
options: [
|
|
33
|
+
{
|
|
34
|
+
title: '填充',
|
|
35
|
+
value: 'pill_color',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '边框',
|
|
39
|
+
value: 'pill_outline',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
propType: { type: 'oneOf', value: ['pill_color', 'pill_outline'] },
|
|
45
|
+
defaultValue: 'pill_color',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "icon",
|
|
49
|
+
title: {
|
|
50
|
+
label: {
|
|
51
|
+
type: "i18n",
|
|
52
|
+
"en-US": "icon",
|
|
53
|
+
"zh-CN": "图标",
|
|
54
|
+
},
|
|
55
|
+
tip: "icon | Set the icon component of the button",
|
|
56
|
+
},
|
|
57
|
+
propType: { type: "oneOfType", value: ["node"] },
|
|
58
|
+
setter: [{
|
|
59
|
+
componentName: "SlotSetter",
|
|
60
|
+
initialValue: {
|
|
61
|
+
type: "JSSlot",
|
|
62
|
+
value: [
|
|
63
|
+
{
|
|
64
|
+
componentName: "Icon",
|
|
65
|
+
props: {
|
|
66
|
+
type: "SmileOutlined",
|
|
67
|
+
size: 20,
|
|
68
|
+
rotate: 0,
|
|
69
|
+
spin: false,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
defaultValue: null
|
|
75
|
+
}],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'color',
|
|
79
|
+
title: { label: '颜色' },
|
|
80
|
+
setter: [
|
|
81
|
+
{
|
|
82
|
+
componentName: 'RadioGroupSetter',
|
|
83
|
+
props: {
|
|
84
|
+
options: [
|
|
85
|
+
{
|
|
86
|
+
title: 'Success',
|
|
87
|
+
value: 'success',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: 'Warning',
|
|
91
|
+
value: 'warning',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: 'Error',
|
|
95
|
+
value: 'error',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: 'Gray',
|
|
99
|
+
value: 'gray',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
'ColorSetter', "StringSetter"
|
|
105
|
+
],
|
|
106
|
+
propType: { type: 'oneOf', value: ['success', 'warning', 'error', 'gray'] },
|
|
107
|
+
defaultValue: 'success',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
configure: {
|
|
111
|
+
component: { isContainer: true },
|
|
112
|
+
supports: {
|
|
113
|
+
style: true,
|
|
114
|
+
events: [
|
|
115
|
+
{
|
|
116
|
+
name: "onClick",
|
|
117
|
+
template:
|
|
118
|
+
"onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '标签',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/tag-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'PisellTags',
|
|
7
|
+
props: {
|
|
8
|
+
children: '标签',
|
|
9
|
+
type: "pill_color",
|
|
10
|
+
color: 'success'
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
];
|
|
Binary file
|