@pisell/materials 6.0.18 → 6.0.20
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +51 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +51 -20
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/badge/index.js +44 -0
- package/es/components/badge/index.less +2 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupEdit/index.js +408 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/buttonGroupPreview/index.js +74 -0
- package/es/components/cardMetricItem/index.d.ts +12 -0
- package/es/components/cardMetricItem/index.js +39 -0
- package/es/components/cardMetricItem/index.less +39 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/cardPro/index.js +66 -0
- package/es/components/cardPro/index.less +55 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/cropPhoto/index.js +72 -0
- package/es/components/cropPhoto/index.less +15 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +24 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +31 -3
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +31 -3
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +102 -141
- package/es/components/dataSourceComponents/fields/Upload/WithMode.js +6 -3
- package/es/components/dataSourceComponents/fields/Upload/serve.js +13 -3
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.js +396 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/dataSourceComponents/hooks/usePlatform.js +12 -0
- package/es/components/login-and-register/index.js +23 -21
- package/es/components/login-and-register/index.less +7 -7
- package/es/components/page/index.js +23 -57
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAnchor/index.js +303 -0
- package/es/components/pisellAnchor/index.less +197 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +18 -2
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellQrcode/index.js +70 -0
- package/es/components/pisellQrcode/index.less +41 -0
- package/es/components/pisellStatisticList/index.d.ts +3 -0
- package/es/components/pisellStatisticList/index.js +17 -5
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellText/components/Amount/index.d.ts +2 -0
- package/es/components/pisellText/components/Amount/index.js +3 -2
- package/es/components/pisellWalletPassCard/index.d.ts +4 -4
- package/es/components/pisellWalletPassCard/index.js +28 -12
- package/es/components/pisellWalletPassCard/index.less +26 -4
- package/es/components/record-view/index.d.ts +13 -5
- package/es/components/record-view/index.js +81 -30
- package/es/components/record-view/index.less +37 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +25 -7
- package/es/components/tabs/index.less +5 -5
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guest/index.js +83 -0
- package/es/components/walletCard/Guest/index.less +71 -0
- package/es/components/walletCard/index.d.ts +65 -0
- package/es/components/walletCard/index.js +402 -0
- package/es/components/walletCard/index.less +267 -0
- package/es/index.d.ts +10 -1
- package/es/index.js +10 -1
- package/es/locales/en-US.d.ts +38 -2
- package/es/locales/en-US.js +55 -10
- package/es/locales/index.js +4 -2
- package/es/locales/zh-CN.d.ts +36 -0
- package/es/locales/zh-CN.js +41 -1
- package/es/locales/zh-TW.d.ts +36 -0
- package/es/locales/zh-TW.js +41 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +3 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/badge/index.js +70 -0
- package/lib/components/badge/index.less +2 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupEdit/index.js +317 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/buttonGroupPreview/index.js +79 -0
- package/lib/components/cardMetricItem/index.d.ts +12 -0
- package/lib/components/cardMetricItem/index.js +75 -0
- package/lib/components/cardMetricItem/index.less +39 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/cardPro/index.js +98 -0
- package/lib/components/cardPro/index.less +55 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/cropPhoto/index.js +70 -0
- package/lib/components/cropPhoto/index.less +15 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +21 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +37 -3
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +37 -3
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +47 -72
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +11 -9
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +11 -2
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.js +247 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/dataSourceComponents/hooks/usePlatform.js +51 -0
- package/lib/components/login-and-register/index.js +23 -21
- package/lib/components/login-and-register/index.less +7 -7
- package/lib/components/page/index.js +37 -65
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAnchor/index.js +251 -0
- package/lib/components/pisellAnchor/index.less +197 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +24 -3
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellQrcode/index.js +82 -0
- package/lib/components/pisellQrcode/index.less +41 -0
- package/lib/components/pisellStatisticList/index.d.ts +3 -0
- package/lib/components/pisellStatisticList/index.js +35 -15
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellText/components/Amount/index.d.ts +2 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +4 -4
- package/lib/components/pisellWalletPassCard/index.js +17 -9
- package/lib/components/pisellWalletPassCard/index.less +26 -4
- package/lib/components/record-view/index.d.ts +13 -5
- package/lib/components/record-view/index.js +63 -11
- package/lib/components/record-view/index.less +37 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +12 -1
- package/lib/components/tabs/index.less +5 -5
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guest/index.js +138 -0
- package/lib/components/walletCard/Guest/index.less +71 -0
- package/lib/components/walletCard/index.d.ts +65 -0
- package/lib/components/walletCard/index.js +374 -0
- package/lib/components/walletCard/index.less +267 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.js +26 -1
- package/lib/locales/en-US.d.ts +38 -2
- package/lib/locales/en-US.js +41 -3
- package/lib/locales/index.js +4 -2
- package/lib/locales/zh-CN.d.ts +36 -0
- package/lib/locales/zh-CN.js +41 -1
- package/lib/locales/zh-TW.d.ts +36 -0
- package/lib/locales/zh-TW.js +41 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +6 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/badge/meta.ts +20 -11
- package/lowcode/badge/snippets.ts +2 -0
- package/lowcode/button/meta.ts +2 -6
- package/lowcode/button-group/meta.ts +198 -0
- package/lowcode/button-group/snippets.ts +68 -0
- package/lowcode/button-group-edit/meta.ts +32 -0
- package/lowcode/button-group-edit/snippets.ts +98 -0
- package/lowcode/button-group-preview/meta.ts +55 -0
- package/lowcode/button-group-preview/snippets.ts +57 -0
- package/lowcode/card/snippets.ts +55 -55
- package/lowcode/card-metric-item/meta.ts +83 -0
- package/lowcode/card-metric-item/snippets.ts +13 -0
- package/lowcode/card-pro/meta.ts +338 -0
- package/lowcode/card-pro/snippe.ts +39 -0
- package/lowcode/crop-photo/meta.ts +77 -0
- package/lowcode/crop-photo/snippe.ts +12 -0
- package/lowcode/form-item-input/snippets.ts +1 -1
- package/lowcode/form-item-upload/meta.ts +11 -0
- package/lowcode/pisell-anchor/meta.ts +118 -0
- package/lowcode/pisell-anchor/snippets.ts +26 -0
- package/lowcode/pisell-card/meta.ts +63 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/pisell-modal.information/meta.ts +8 -0
- package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-qrcode/meta.ts +46 -0
- package/lowcode/pisell-qrcode/snippets.ts +13 -0
- package/lowcode/pisell-tooltip/meta.ts +1 -1
- package/lowcode/record-view/meta.ts +20 -0
- package/lowcode/section-footers/meta.ts +66 -0
- package/lowcode/section-footers/snippe.ts +21 -0
- package/lowcode/spin/meta.ts +9 -0
- package/lowcode/tag/meta.ts +6 -0
- package/lowcode/timeline/meta.ts +32 -9
- package/lowcode/timeline/snippets.ts +12 -2
- package/lowcode/timeline.item/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +283 -0
- package/lowcode/wallet-card/snippets.ts +44 -0
- package/package.json +5 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
"title": "按钮组-渲染",
|
|
4
|
+
"screenshot": "",
|
|
5
|
+
"schema": {
|
|
6
|
+
"componentName": "ButtonGroupPreview",
|
|
7
|
+
"props": {
|
|
8
|
+
buttonGroupList: [
|
|
9
|
+
[{
|
|
10
|
+
"id": "1-1",
|
|
11
|
+
"children": "按钮1",
|
|
12
|
+
"buttonProps": {
|
|
13
|
+
"id": "primary",
|
|
14
|
+
"type": "default",
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
"id": "1-2",
|
|
18
|
+
"children": "2",
|
|
19
|
+
"isMore": true,
|
|
20
|
+
"menuData": [{
|
|
21
|
+
"label": "下拉菜单1",
|
|
22
|
+
"key": "下拉菜单1"
|
|
23
|
+
}, {
|
|
24
|
+
"label": "下拉菜单2",
|
|
25
|
+
"key": "下拉菜单2"
|
|
26
|
+
}]
|
|
27
|
+
}],
|
|
28
|
+
[{
|
|
29
|
+
"id": "2-1",
|
|
30
|
+
"children": "2",
|
|
31
|
+
"menuData": [{
|
|
32
|
+
"label": "下拉菜单1",
|
|
33
|
+
"key": "下拉菜单1"
|
|
34
|
+
}, {
|
|
35
|
+
"label": "下拉菜单2",
|
|
36
|
+
"key": "下拉菜单2"
|
|
37
|
+
}]
|
|
38
|
+
}, {
|
|
39
|
+
"id": "2-2",
|
|
40
|
+
"children": "jkasjdlkas",
|
|
41
|
+
"buttonProps": {
|
|
42
|
+
"id": "primary",
|
|
43
|
+
"type": "default",
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
],
|
|
47
|
+
buttonConfig: {
|
|
48
|
+
"1-1": {
|
|
49
|
+
"children": "2222",
|
|
50
|
+
"buttonProps": {
|
|
51
|
+
"type": "primary"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}]
|
package/lowcode/card/snippets.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
export default [
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
},
|
|
2
|
+
// {
|
|
3
|
+
// title: '卡片',
|
|
4
|
+
// screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/card-1.png',
|
|
5
|
+
// schema: {
|
|
6
|
+
// componentName: 'Card',
|
|
7
|
+
// props: {
|
|
8
|
+
// title: 'Default size card',
|
|
9
|
+
// },
|
|
10
|
+
// },
|
|
11
|
+
// },
|
|
12
|
+
// {
|
|
13
|
+
// title: '卡片2',
|
|
14
|
+
// screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/card-1.png',
|
|
15
|
+
// schema: {
|
|
16
|
+
// "componentName": "Card",
|
|
17
|
+
// "id": "node_ocljnoao28d",
|
|
18
|
+
// "props": {
|
|
19
|
+
// "title": "Default size card",
|
|
20
|
+
// "bordered": true,
|
|
21
|
+
// "hoverable": false,
|
|
22
|
+
// "loading": false,
|
|
23
|
+
// "size": "default",
|
|
24
|
+
// "type": "default"
|
|
25
|
+
// },
|
|
26
|
+
// "hidden": false,
|
|
27
|
+
// "title": "",
|
|
28
|
+
// "isLocked": false,
|
|
29
|
+
// "ignore": true,
|
|
30
|
+
// "condition": true,
|
|
31
|
+
// "conditionGroup": "",
|
|
32
|
+
// "children": [
|
|
33
|
+
// {
|
|
34
|
+
// "componentName": "Typography.Text",
|
|
35
|
+
// "id": "node_ocljnoao28f",
|
|
36
|
+
// "props": {
|
|
37
|
+
// "children": "text12212",
|
|
38
|
+
// "code": false,
|
|
39
|
+
// "delete": false,
|
|
40
|
+
// "disabled": false,
|
|
41
|
+
// "mark": false,
|
|
42
|
+
// "keyboard": false,
|
|
43
|
+
// "underline": false,
|
|
44
|
+
// "strong": false
|
|
45
|
+
// },
|
|
46
|
+
// "hidden": false,
|
|
47
|
+
// "title": "",
|
|
48
|
+
// "isLocked": true,
|
|
49
|
+
// "locked": true,
|
|
50
|
+
// "ignore": true,
|
|
51
|
+
// "condition": true,
|
|
52
|
+
// "conditionGroup": ""
|
|
53
|
+
// }
|
|
54
|
+
// ]
|
|
55
|
+
// },
|
|
56
|
+
// },
|
|
57
57
|
|
|
58
58
|
];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'CardMetricItem',
|
|
6
|
+
title: '项目统计卡片',
|
|
7
|
+
category: '通用',
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'CardMetricItem',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: '',
|
|
18
|
+
},
|
|
19
|
+
props: [{
|
|
20
|
+
name: 'hint',
|
|
21
|
+
title: { label: 'Hint显示', tip: '是否显示Hint' },
|
|
22
|
+
propType: 'node',
|
|
23
|
+
setter: {
|
|
24
|
+
componentName: 'SlotSetter',
|
|
25
|
+
title: '关闭图标插槽',
|
|
26
|
+
initialValue: {
|
|
27
|
+
type: 'JSSlot',
|
|
28
|
+
value: [
|
|
29
|
+
{
|
|
30
|
+
componentName: 'PisellTooltip',
|
|
31
|
+
props: {
|
|
32
|
+
title: '提示信息',
|
|
33
|
+
},
|
|
34
|
+
children: {
|
|
35
|
+
componentName: 'Icon',
|
|
36
|
+
props: {
|
|
37
|
+
type: 'InfoCircleOutlined',
|
|
38
|
+
size: 16
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}, {
|
|
46
|
+
name: 'tags',
|
|
47
|
+
title: { label: 'Tags显示', tip: '是否显示Tags' },
|
|
48
|
+
propType: 'node',
|
|
49
|
+
setter: {
|
|
50
|
+
componentName: 'SlotSetter',
|
|
51
|
+
initialValue: {
|
|
52
|
+
type: 'JSSlot',
|
|
53
|
+
value: [
|
|
54
|
+
{
|
|
55
|
+
componentName: 'Tag',
|
|
56
|
+
props: {
|
|
57
|
+
color: 'green',
|
|
58
|
+
children: '100%',
|
|
59
|
+
bordered: false
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'title',
|
|
68
|
+
title: {
|
|
69
|
+
label: 'Heading标题',
|
|
70
|
+
tip: '标题',
|
|
71
|
+
},
|
|
72
|
+
propType: 'string',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "number",
|
|
76
|
+
title: {
|
|
77
|
+
label: "Number数字",
|
|
78
|
+
tip: "输入数字",
|
|
79
|
+
},
|
|
80
|
+
propType: "number",
|
|
81
|
+
}],
|
|
82
|
+
configure: { supports: { style: true } },
|
|
83
|
+
};
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { uuid } from "../_utils/utils";
|
|
2
|
+
import snippets from "./snippe";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
snippets,
|
|
6
|
+
componentName: "CardPro",
|
|
7
|
+
title: "卡片",
|
|
8
|
+
category: "通用",
|
|
9
|
+
docUrl: "",
|
|
10
|
+
screenshot: "",
|
|
11
|
+
devMode: "proCode",
|
|
12
|
+
npm: {
|
|
13
|
+
package: "@pisell/materials",
|
|
14
|
+
version: "1.0.1",
|
|
15
|
+
exportName: "CardPro",
|
|
16
|
+
main: "src/index.tsx",
|
|
17
|
+
destructuring: true,
|
|
18
|
+
subName: "",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
props: [
|
|
23
|
+
{
|
|
24
|
+
name: "badge",
|
|
25
|
+
title: {
|
|
26
|
+
label: "启用徽标区域",
|
|
27
|
+
tip: "启用徽标区域"
|
|
28
|
+
},
|
|
29
|
+
propType: "node",
|
|
30
|
+
setter: {
|
|
31
|
+
componentName: "SlotSetter",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "objectFit",
|
|
36
|
+
title: {
|
|
37
|
+
label: "填充类型",
|
|
38
|
+
tip: "媒体区域填充类型",
|
|
39
|
+
},
|
|
40
|
+
propType: { type: "oneOf", value: ["large", "middle", "small"] },
|
|
41
|
+
setter: [
|
|
42
|
+
{
|
|
43
|
+
componentName: "RadioGroupSetter",
|
|
44
|
+
props: {
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
title: "fill",
|
|
48
|
+
value: "fill",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: "contain",
|
|
52
|
+
value: "contain",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "cover",
|
|
56
|
+
value: "cover",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: "none",
|
|
60
|
+
value: "none",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: "scale-down",
|
|
64
|
+
value: "scale-down",
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
"VariableSetter",
|
|
70
|
+
],
|
|
71
|
+
setValue: (target, value) => {
|
|
72
|
+
// 当属性值更新时,手动触发逻辑
|
|
73
|
+
let coverValue = target.getProps().getPropValue("cover") || {};
|
|
74
|
+
coverValue.value[0].props.style.objectFit = value
|
|
75
|
+
target.getProps().setPropValue("cover", coverValue);
|
|
76
|
+
},
|
|
77
|
+
defaultValue: "fill",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "contentHeight",
|
|
81
|
+
title: { label: "内容区域高度", tip: "输入内容区域高度 超出高度出现滚动条" },
|
|
82
|
+
propType: "number",
|
|
83
|
+
setter: "NumberSetter",
|
|
84
|
+
defaultValue: 40,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "coverHeight",
|
|
88
|
+
title: { label: "媒体区域高度", tip: "输入媒体区域高度" },
|
|
89
|
+
propType: "number",
|
|
90
|
+
setter: "NumberSetter",
|
|
91
|
+
defaultValue: 100,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "cover",
|
|
95
|
+
title: {
|
|
96
|
+
label: "启用媒体区域"
|
|
97
|
+
},
|
|
98
|
+
propType: "node",
|
|
99
|
+
setter: {
|
|
100
|
+
componentName: "SlotSetter",
|
|
101
|
+
initialValue: {
|
|
102
|
+
type: "JSSlot",
|
|
103
|
+
value: [
|
|
104
|
+
{
|
|
105
|
+
componentName: "Image",
|
|
106
|
+
props: {
|
|
107
|
+
src: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
|
108
|
+
width: '100%',
|
|
109
|
+
height: '100%',
|
|
110
|
+
style: {
|
|
111
|
+
objectFit: 'fill'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
{
|
|
122
|
+
name: "isShowHead",
|
|
123
|
+
title: { label: "显示头部区域", tip: "是否显示头部区域" },
|
|
124
|
+
propType: "bool",
|
|
125
|
+
setter: "BoolSetter",
|
|
126
|
+
defaultValue: true,
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
{
|
|
130
|
+
name: "isShowFooter",
|
|
131
|
+
title: { label: "显示底部区域", tip: "是否显示底部区域" },
|
|
132
|
+
propType: "bool",
|
|
133
|
+
setter: "BoolSetter",
|
|
134
|
+
defaultValue: true,
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
{
|
|
139
|
+
name: "head",
|
|
140
|
+
title: {
|
|
141
|
+
label: "头部区域",
|
|
142
|
+
},
|
|
143
|
+
condition: (target) => {
|
|
144
|
+
return target.getProps().getPropValue('isShowHead')
|
|
145
|
+
},
|
|
146
|
+
display: 'accordion',
|
|
147
|
+
type: "group",
|
|
148
|
+
items: [{
|
|
149
|
+
name: "headTitle",
|
|
150
|
+
title: {
|
|
151
|
+
label: {
|
|
152
|
+
type: "i18n",
|
|
153
|
+
zh_CN: "主标题",
|
|
154
|
+
en_US: "Main Title",
|
|
155
|
+
},
|
|
156
|
+
tip: {
|
|
157
|
+
type: 'i18n',
|
|
158
|
+
zh_CN: '主标题',
|
|
159
|
+
en_US: 'Please enter the main title'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
propType: "string",
|
|
163
|
+
setter: "StringSetter",
|
|
164
|
+
defaultValue: "这是主标题"
|
|
165
|
+
}, {
|
|
166
|
+
name: "headSubTitle",
|
|
167
|
+
title: {
|
|
168
|
+
label: "副标题",
|
|
169
|
+
placeholder: "请输入副标题"
|
|
170
|
+
},
|
|
171
|
+
propType: "string",
|
|
172
|
+
setter: "StringSetter",
|
|
173
|
+
defaultValue: "这是副标题"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "extra",
|
|
177
|
+
title: { label: "头部操作", tip: "头部操作" },
|
|
178
|
+
propType: { type: "oneOfType", value: ["string", "node"] },
|
|
179
|
+
setter: [
|
|
180
|
+
{
|
|
181
|
+
componentName: "SlotSetter",
|
|
182
|
+
initialValue: {
|
|
183
|
+
type: "JSSlot",
|
|
184
|
+
value: [],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
"VariableSetter",
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "footer",
|
|
195
|
+
title: {
|
|
196
|
+
label: "底部区域",
|
|
197
|
+
},
|
|
198
|
+
condition: (target) => {
|
|
199
|
+
return target.getProps().getPropValue('isShowFooter')
|
|
200
|
+
},
|
|
201
|
+
display: 'accordion',
|
|
202
|
+
type: "group",
|
|
203
|
+
items: [
|
|
204
|
+
{
|
|
205
|
+
name: "actionButtons",
|
|
206
|
+
title: {
|
|
207
|
+
label: "底部按钮",
|
|
208
|
+
},
|
|
209
|
+
setter: {
|
|
210
|
+
componentName: "ArraySetter",
|
|
211
|
+
props: {
|
|
212
|
+
itemSetter: {
|
|
213
|
+
componentName: "ObjectSetter",
|
|
214
|
+
props: {
|
|
215
|
+
config: {
|
|
216
|
+
items: [
|
|
217
|
+
{
|
|
218
|
+
name: "key",
|
|
219
|
+
title: "key",
|
|
220
|
+
setter: "StringSetter",
|
|
221
|
+
initialValue: (val) => val || uuid(),
|
|
222
|
+
supportVariable: true,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "button",
|
|
226
|
+
title: {
|
|
227
|
+
label: {
|
|
228
|
+
type: "i18n",
|
|
229
|
+
"en-US": "button",
|
|
230
|
+
"zh-CN": "按钮",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
propType: "node",
|
|
234
|
+
setter: {
|
|
235
|
+
componentName: "SlotSetter",
|
|
236
|
+
initialValue: {
|
|
237
|
+
type: "JSSlot",
|
|
238
|
+
value: [
|
|
239
|
+
{
|
|
240
|
+
componentName: "Button",
|
|
241
|
+
props: {
|
|
242
|
+
type: "primary",
|
|
243
|
+
children: "kik",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
initialValue: () => {
|
|
254
|
+
return {
|
|
255
|
+
key: uuid(),
|
|
256
|
+
button: {
|
|
257
|
+
type: "JSSlot",
|
|
258
|
+
value: [
|
|
259
|
+
{
|
|
260
|
+
componentName: "Button",
|
|
261
|
+
props: {
|
|
262
|
+
type: "primary",
|
|
263
|
+
children: "按钮"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
{
|
|
278
|
+
name: "fixedFooter",
|
|
279
|
+
title: {
|
|
280
|
+
label: "底部固定"
|
|
281
|
+
},
|
|
282
|
+
propType: "bool",
|
|
283
|
+
setter: "BoolSetter",
|
|
284
|
+
defaultValue: true,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: "buttonPosition",
|
|
288
|
+
title: {
|
|
289
|
+
label: "按钮位置",
|
|
290
|
+
tip: "选择按钮排列位置",
|
|
291
|
+
},
|
|
292
|
+
propType: { type: "oneOf", value: ["large", "middle", "small"] },
|
|
293
|
+
setter: [
|
|
294
|
+
{
|
|
295
|
+
componentName: "RadioGroupSetter",
|
|
296
|
+
props: {
|
|
297
|
+
options: [
|
|
298
|
+
{
|
|
299
|
+
title: "居左",
|
|
300
|
+
value: "start",
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
title: "居中",
|
|
304
|
+
value: "center",
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
title: "居右",
|
|
308
|
+
value: "end",
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
"VariableSetter",
|
|
314
|
+
],
|
|
315
|
+
defaultValue: "center",
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
],
|
|
321
|
+
|
|
322
|
+
configure: {
|
|
323
|
+
component: {
|
|
324
|
+
isContainer: true
|
|
325
|
+
},
|
|
326
|
+
isExeng: true,
|
|
327
|
+
supports: {
|
|
328
|
+
style: true,
|
|
329
|
+
events: [
|
|
330
|
+
{
|
|
331
|
+
name: "onClick",
|
|
332
|
+
template:
|
|
333
|
+
"onClick(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onClick', event);}",
|
|
334
|
+
},
|
|
335
|
+
],
|
|
336
|
+
},
|
|
337
|
+
}
|
|
338
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { uuid } from "../_utils/utils";
|
|
2
|
+
|
|
3
|
+
export default [{
|
|
4
|
+
componentName: 'CardPro',
|
|
5
|
+
title: 'CardPro',
|
|
6
|
+
schema: {
|
|
7
|
+
componentName: 'CardPro',
|
|
8
|
+
props: {
|
|
9
|
+
|
|
10
|
+
actionButtons: [
|
|
11
|
+
{
|
|
12
|
+
key: uuid(),
|
|
13
|
+
button: {
|
|
14
|
+
type: "JSSlot",
|
|
15
|
+
value: {
|
|
16
|
+
componentName: "Button",
|
|
17
|
+
props: {
|
|
18
|
+
children: "主按钮",
|
|
19
|
+
type: "primary"
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
key: uuid(),
|
|
25
|
+
button: {
|
|
26
|
+
type: "JSSlot",
|
|
27
|
+
value: {
|
|
28
|
+
componentName: "Button",
|
|
29
|
+
props: {
|
|
30
|
+
children: "副按钮",
|
|
31
|
+
type: "default"
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}]
|