@cloudbase/weda-ui 3.4.3 → 3.4.4
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/dist/configs/components/chart/bar.json +4 -0
- package/dist/configs/components/chart/line.js +14 -10
- package/dist/configs/components/chart/pie.json +4 -0
- package/dist/configs/components/dataView.js +507 -0
- package/dist/configs/components/form/location.json +2 -1
- package/dist/configs/components/form/userTreeSelect.json +55 -0
- package/dist/configs/components/formdetail.json +12 -2
- package/dist/configs/components/grid/col.js +125 -0
- package/dist/configs/components/grid/grid.js +131 -0
- package/dist/configs/components/grid/row.js +143 -0
- package/dist/configs/components/image.js +11 -1
- package/dist/configs/components/link.js +11 -1
- package/dist/configs/components/listView.js +988 -0
- package/dist/configs/components/navigationBar.json +9 -1
- package/dist/configs/components/repeater-item.json +17 -0
- package/dist/configs/components/repeater.js +125 -0
- package/dist/configs/components/table.json +67 -24
- package/dist/configs/components/text.js +12 -1
- package/dist/configs/components/wd-bubble.js +204 -0
- package/dist/configs/components/wd-button.js +417 -0
- package/dist/configs/components/wd-divider.js +89 -0
- package/dist/configs/components/wd-icon.js +126 -0
- package/dist/configs/components/wd-image.js +164 -0
- package/dist/configs/components/wd-link.js +234 -0
- package/dist/configs/components/wd-table.js +59 -0
- package/dist/configs/components/wd-text.js +142 -0
- package/dist/configs/components/wxOpenApi/phone.js +2 -2
- package/dist/configs/components/wxOpenApi/phoneCode.js +2 -2
- package/dist/configs/index.js +34 -3
- package/dist/configs/type-utils/index.js +4 -1
- package/dist/docs/common/componentList.js +144 -0
- package/dist/docs/common/components/classes-view.js +34 -0
- package/dist/docs/common/components/event-view.js +46 -0
- package/dist/docs/common/components/json-schema-view.js +18 -0
- package/dist/docs/common/components/methods-view.js +32 -0
- package/dist/docs/common/components/properties-view.js +45 -0
- package/dist/docs/common/format.js +60 -35
- package/dist/docs/common/helper.js +1 -0
- package/dist/docs/common/tableView.js +61 -50
- package/dist/enum/index.js +521 -0
- package/dist/index.js +1 -1
- package/dist/style/index.scss +1 -0
- package/dist/web/actions/showMessage/index.css +0 -3
- package/dist/web/actions/showMessage/index.js +1 -1
- package/dist/web/actions/showModal/index.css +0 -3
- package/dist/web/components/button/index.css +2 -5
- package/dist/web/components/button/index.js +3 -3
- package/dist/web/components/calendar/index.css +29 -32
- package/dist/web/components/calendar/index.js +37 -35
- package/dist/web/components/carousel/index.css +11 -14
- package/dist/web/components/carousel/index.js +3 -1
- package/dist/web/components/chart/common/core/eChartBar.js +10 -2
- package/dist/web/components/chart/common/core/eChartLine.js +16 -8
- package/dist/web/components/chart/common/core/eChartPie.js +2 -1
- package/dist/web/components/chart/statisticsCard/index.css +12 -15
- package/dist/web/components/chart/statisticsCard/index.js +6 -1
- package/dist/web/components/dataView/index.js +3 -3
- package/dist/web/components/emptyContent/index.css +26 -0
- package/dist/web/components/emptyContent/index.js +46 -0
- package/dist/web/components/flow/components/FlowModuleText/index.css +1 -4
- package/dist/web/components/flow/components/FlowUserSelect/index.css +29 -32
- package/dist/web/components/flow/components/HighlightTextarea/index.css +5 -8
- package/dist/web/components/flow/components/UserSelectModel/UserSelect.js +5 -2
- package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.css +1 -4
- package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.js +8 -5
- package/dist/web/components/flow/components/WedaUserTransfer/index.css +0 -3
- package/dist/web/components/flow/frame/getCommonFlowData.js +3 -1
- package/dist/web/components/flow/frame/index.js +18 -1
- package/dist/web/components/flow/frame/types.js +6 -0
- package/dist/web/components/flow/frame/utils.js +20 -11
- package/dist/web/components/flow/modules/basic/Basic.css +3 -6
- package/dist/web/components/flow/modules/basic/BasicMobile.css +9 -12
- package/dist/web/components/flow/modules/chart/Chart.js +2 -2
- package/dist/web/components/flow/modules/chart/index.css +23 -26
- package/dist/web/components/flow/modules/chart/isString.js +5 -0
- package/dist/web/components/flow/modules/control/ApprovalDrawer.css +44 -47
- package/dist/web/components/flow/modules/control/ApprovalPopup.css +34 -37
- package/dist/web/components/flow/modules/control/ApprovalPopup.js +10 -6
- package/dist/web/components/flow/modules/control/Control.css +7 -10
- package/dist/web/components/flow/modules/control/Control.js +4 -1
- package/dist/web/components/flow/modules/control/ControlMobile.css +10 -13
- package/dist/web/components/flow/modules/control/FlowTaskInfoModal.css +0 -3
- package/dist/web/components/flow/modules/control/provider/useControlModel.js +18 -5
- package/dist/web/components/flow/modules/layout/index.css +0 -3
- package/dist/web/components/flow/modules/process/Process.js +1 -1
- package/dist/web/components/flow/modules/process/ProcessMobile.js +1 -1
- package/dist/web/components/flow/modules/process/index.css +49 -43
- package/dist/web/components/form/form/index.css +2 -5
- package/dist/web/components/form/form/index.js +48 -4
- package/dist/web/components/form/formcell/index.css +29 -17
- package/dist/web/components/form/input/index.css +5 -8
- package/dist/web/components/form/input/index.js +11 -0
- package/dist/web/components/form/location/common/mapChoose.css +88 -91
- package/dist/web/components/form/location/common/selectModal.css +10 -13
- package/dist/web/components/form/location/components/LocationH5/index.css +17 -20
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +2 -3
- package/dist/web/components/form/location/components/LocationH5/location.module.css +0 -3
- package/dist/web/components/form/location/components/LocationPC/index.css +10 -13
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +2 -3
- package/dist/web/components/form/location/index.css +0 -3
- package/dist/web/components/form/radio/index.css +0 -3
- package/dist/web/components/form/select/allTimePicker/calendar.css +15 -18
- package/dist/web/components/form/select/allTimePicker/index.css +53 -27
- package/dist/web/components/form/select/dropdown-select/h5.js +22 -11
- package/dist/web/components/form/select/dropdown-select/index.css +28 -28
- package/dist/web/components/form/select/dropdown-select/index.js +37 -4
- package/dist/web/components/form/select/dropdown-select/pc.js +57 -17
- package/dist/web/components/form/select/dropdown-select/ui.js +5 -2
- package/dist/web/components/form/select/index.css +12 -8
- package/dist/web/components/form/select/index.js +2 -2
- package/dist/web/components/form/select/status/index.css +10 -13
- package/dist/web/components/form/switch/switch.module.css +0 -3
- package/dist/web/components/form/textarea/index.css +1 -4
- package/dist/web/components/form/tips/index.css +11 -2
- package/dist/web/components/form/uploader/index.css +14 -17
- package/dist/web/components/form/uploaderFile/index.css +61 -64
- package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +120 -38
- package/dist/web/components/form/userOrgSelect/common/utils.js +89 -1
- package/dist/web/components/form/userOrgSelect/component/depart-breadcrumb.js +15 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +63 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +96 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +69 -0
- package/dist/web/components/form/userOrgSelect/{user-select-pc → component}/error-tips.js +0 -0
- package/dist/web/components/form/userOrgSelect/component/index.css +323 -0
- package/dist/web/components/form/userOrgSelect/component/input-tags.js +21 -0
- package/dist/web/components/form/userOrgSelect/component/modal-search-h5.js +25 -0
- package/dist/web/components/form/userOrgSelect/component/modal-search.js +11 -0
- package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +201 -0
- package/dist/web/components/form/userOrgSelect/component/org-tree-h5.js +19 -0
- package/dist/web/components/form/userOrgSelect/component/org-tree.js +33 -0
- package/dist/web/components/form/userOrgSelect/component/selected-list-h5.js +44 -0
- package/dist/web/components/form/userOrgSelect/component/selected-list.js +15 -0
- package/dist/web/components/form/userOrgSelect/component/user-org-list.js +55 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +151 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-list-h5.js +107 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +50 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/error-tips.js +11 -0
- package/dist/web/components/form/userOrgSelect/{user-select-pc → component/user-select-pc}/model-user-list.js +9 -9
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/org-tree.js +10 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +75 -0
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +65 -0
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +1160 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +54 -87
- package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +30 -35
- package/dist/web/components/form/userOrgSelect/hooks/use-views-data.js +48 -0
- package/dist/web/components/formdetail/index.css +34 -31
- package/dist/web/components/formdetail/index.js +12 -3
- package/dist/web/components/graphicCard/index.css +15 -18
- package/dist/web/components/grid/_utils.css +67 -0
- package/dist/web/components/grid/col.js +33 -0
- package/dist/web/components/grid/grid.css +1185 -0
- package/dist/web/components/grid/grid.js +19 -0
- package/dist/web/components/grid/row.js +14 -0
- package/dist/web/components/image/image.js +9 -1
- package/dist/web/components/image/index.css +2 -5
- package/dist/web/components/index.js +17 -3
- package/dist/web/components/link/index.css +0 -3
- package/dist/web/components/listView/index.css +21 -23
- package/dist/web/components/listView/index.js +171 -34
- package/dist/web/components/lottery/index.css +72 -75
- package/dist/web/components/modal/h5.css +19 -21
- package/dist/web/components/modal/modal.h5.js +11 -10
- package/dist/web/components/navLayout/index.css +14 -139
- package/dist/web/components/navigationBar/common.js +5 -4
- package/dist/web/components/navigationBar/h5Menu.js +12 -10
- package/dist/web/components/navigationBar/horizontalMenu.js +42 -35
- package/dist/web/components/navigationBar/index.css +130 -86
- package/dist/web/components/navigationBar/index.js +6 -4
- package/dist/web/components/navigationBar/verticalMenu.js +13 -9
- package/dist/web/components/pageLayout/PageContent/index.css +7 -10
- package/dist/web/components/pageLayout/index.css +0 -3
- package/dist/web/components/pageLayout/index.js +2 -1
- package/dist/web/components/repeater/index.js +17 -0
- package/dist/web/components/repeater-item/index.js +9 -0
- package/dist/web/components/richText/index.css +5 -8
- package/dist/web/components/richText/index.js +4 -2
- package/dist/web/components/richText/richtext.module.css +1 -4
- package/dist/web/components/richTextView/index.css +7 -10
- package/dist/web/components/swiper/index.css +10 -13
- package/dist/web/components/swiper/index.js +19 -5
- package/dist/web/components/table/BaseTable.js +352 -283
- package/dist/web/components/table/ExportFileModalByApi/index.css +9 -0
- package/dist/web/components/table/ExportFileModalByApi/index.js +150 -0
- package/dist/web/components/table/FieldRender.js +25 -18
- package/dist/web/components/table/FilterFields.js +17 -11
- package/dist/web/components/table/Form/Location.css +2 -5
- package/dist/web/components/table/ImportFileModal/csvTemplate.json +65 -6
- package/dist/web/components/table/ImportFileModalByApi/index.css +130 -0
- package/dist/web/components/table/ImportFileModalByApi/index.js +321 -0
- package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +115 -0
- package/dist/web/components/table/InOrOutRecordModeal.js +139 -0
- package/dist/web/components/table/SelectableBlock/index.css +0 -2
- package/dist/web/components/table/UserDepartment/viewCell.css +3 -6
- package/dist/web/components/table/baseTable.css +579 -0
- package/dist/web/components/table/hooks/useImportingStatus.js +69 -0
- package/dist/web/components/table/hooks/useInOutFieldsRecords.js +23 -0
- package/dist/web/components/table/index.css +275 -508
- package/dist/web/components/table/index.js +6 -4
- package/dist/web/components/tabs/index.css +19 -18
- package/dist/web/components/tabs/tabs.h5.js +7 -16
- package/dist/web/components/text/index.css +6 -9
- package/dist/web/components/uploaderFileView/index.css +0 -3
- package/dist/web/components/uploaderView/index.css +5 -8
- package/dist/web/components/wd-bubble/index.js +3 -17
- package/dist/web/components/wd-bubble/wd-bubble.js +17 -0
- package/dist/web/components/wd-button/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-button/index.js +3 -0
- package/dist/web/components/wd-button/wd-button.js +89 -0
- package/dist/web/components/wd-config-provider/index.js +1 -0
- package/dist/web/components/wd-config-provider/wd-config-context.js +5 -0
- package/dist/web/components/wd-config-provider/wd-config-provider.js +12 -0
- package/dist/web/components/wd-divider/index.js +3 -0
- package/dist/web/components/wd-divider/wd-divider.js +29 -0
- package/dist/web/components/wd-icon/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-icon/index.js +3 -0
- package/dist/web/components/wd-icon/wd-icon.js +63 -0
- package/dist/web/components/wd-image/image.js +171 -0
- package/dist/web/components/wd-image/index.js +82 -0
- package/dist/web/components/wd-link/index.js +3 -0
- package/dist/web/components/wd-link/wd-link.js +105 -0
- package/dist/web/components/wd-table/index.js +3 -0
- package/dist/web/components/wd-table/wd-table.js +24 -0
- package/dist/web/components/wd-text/convert-legacy-props.js +14 -0
- package/dist/web/components/wd-text/index.js +3 -0
- package/dist/web/components/wd-text/wd-text.js +91 -0
- package/dist/web/components/wedaVideo/index.css +2 -5
- package/dist/web/components/wedaVideo/index.js +8 -6
- package/dist/web/index.js +1 -1
- package/dist/web/utils/config-context/index.js +1 -0
- package/dist/web/utils/config-context/use-config.js +9 -0
- package/dist/web/utils/constant.js +1 -0
- package/dist/web/utils/datasource.js +19 -7
- package/dist/web/utils/file.js +22 -0
- package/dist/web/utils/hooks/CreatePortal.js +6 -0
- package/dist/web/utils/hooks/EnumHoc.js +23 -3
- package/dist/web/utils/hooks/context.js +5 -1
- package/dist/web/utils/platform.js +31 -11
- package/dist/web/utils/pollingInterface.js +61 -0
- package/dist/web/utils/tcb.js +16 -0
- package/dist/web/utils/tool.js +88 -0
- package/dist/web/utils/widget-api/index.js +18 -0
- package/dist/web/weda-ui.css +128 -4
- package/package.json +50 -32
- package/dist/configs/components/dataView.json +0 -305
- package/dist/configs/components/listView.json +0 -515
- package/dist/configs/components/wd-bubble.json +0 -170
- package/dist/web/components/form/userOrgSelect/comTool.js +0 -102
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +0 -155
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/getUserService.js +0 -165
- package/dist/web/components/form/userOrgSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/user-select-pc/index.css +0 -216
- package/dist/web/components/form/userOrgSelect/user-select-pc/index.js +0 -195
- package/dist/web/components/form/userOrgSelect/user-select-pc/org-tree.js +0 -15
- package/dist/web/components/form/userOrgSelect/user-select-pc/search-user.js +0 -80
- package/dist/web/components/form/userOrgSelect/user-select-pc/selected-user-list.js +0 -12
- package/dist/web/components/form/userOrgSelect/user-select-pc/user-model.js +0 -36
- package/dist/web/components/form/userOrgSelect/userOrgSelect.css +0 -824
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +0 -302
- package/dist/web/components/form/userOrgSelect/utils.js +0 -95
- package/dist/web/components/table/ImportFileModal/index.css +0 -263
- package/dist/web/components/wd-bubble/index.css +0 -21
- package/dist/web/utils/hooks/useRequest.js +0 -25
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Type, Tuple, defineConfig } from '../type-utils';
|
|
2
|
+
const data = Type.Object({
|
|
3
|
+
src: Type.Optional(Type.String({
|
|
4
|
+
title: '地址',
|
|
5
|
+
type: 'string',
|
|
6
|
+
default: 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg',
|
|
7
|
+
description: '更改需要展示的图片',
|
|
8
|
+
'x-category': '基础属性',
|
|
9
|
+
'x-index': 1,
|
|
10
|
+
'x-component': 'image',
|
|
11
|
+
'x-rules': [
|
|
12
|
+
{
|
|
13
|
+
message: '请输入合法的图片地址',
|
|
14
|
+
pattern: '^(((https?)://)|/resources/)[^\\s]+$',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
})),
|
|
18
|
+
fit: Type.Optional(Type.StringEnum({
|
|
19
|
+
title: '布局模式',
|
|
20
|
+
type: 'string',
|
|
21
|
+
default: 'widthFix',
|
|
22
|
+
description: '更改图片的布局模式',
|
|
23
|
+
'x-category': '基础属性',
|
|
24
|
+
'x-index': 2,
|
|
25
|
+
enum: Tuple([
|
|
26
|
+
{
|
|
27
|
+
value: 'cover',
|
|
28
|
+
label: '裁剪填满',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: 'contain',
|
|
32
|
+
label: '等比缩放',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: 'fill',
|
|
36
|
+
label: '拉伸填满',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 'widthFix',
|
|
40
|
+
label: '高度自适应',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'heightFix',
|
|
44
|
+
label: '宽度自适应',
|
|
45
|
+
},
|
|
46
|
+
]),
|
|
47
|
+
})),
|
|
48
|
+
imgPreview: Type.Optional(Type.Boolean({
|
|
49
|
+
title: '点击预览大图',
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: false,
|
|
52
|
+
description: '开启后,点击图片后图片会展示为大图',
|
|
53
|
+
'x-category': '基础属性',
|
|
54
|
+
'x-index': 3,
|
|
55
|
+
'x-linkages': [
|
|
56
|
+
{
|
|
57
|
+
type: 'value:visible',
|
|
58
|
+
target: 'maskClosable',
|
|
59
|
+
condition: '{{ $self.value }}',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
})),
|
|
63
|
+
maskClosable: Type.Boolean({
|
|
64
|
+
title: '再次点击关闭预览',
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
default: true,
|
|
67
|
+
description: '开启后,再次点击蒙层会关闭图片预览',
|
|
68
|
+
'x-category': '基础属性',
|
|
69
|
+
'x-index': 4,
|
|
70
|
+
}),
|
|
71
|
+
alt: Type.String({
|
|
72
|
+
title: '替代文字',
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: '[图片]',
|
|
75
|
+
description: '<img> 标签的 alt 属性',
|
|
76
|
+
'x-category': '高级属性',
|
|
77
|
+
'x-index': 5,
|
|
78
|
+
}),
|
|
79
|
+
showMenuByLongpress: Type.Optional(Type.Boolean({
|
|
80
|
+
title: '识别小程序码',
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
default: true,
|
|
83
|
+
description: '小程序专有属性,长按图片可唤起识别小程序码功能',
|
|
84
|
+
'x-category': '高级属性',
|
|
85
|
+
'x-index': 6,
|
|
86
|
+
'x-platforms': ['MP'],
|
|
87
|
+
})),
|
|
88
|
+
lazyLoad: Type.Boolean({
|
|
89
|
+
title: '懒加载',
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
default: false,
|
|
92
|
+
description: '图片按需加载,若图片没有被展示,则不会加载',
|
|
93
|
+
'x-index': 7,
|
|
94
|
+
'x-category': '高级属性',
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
97
|
+
const properties = Type.Pick(data, ['fit', 'src', 'alt']);
|
|
98
|
+
const config = defineConfig({
|
|
99
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
100
|
+
data,
|
|
101
|
+
properties,
|
|
102
|
+
events: [
|
|
103
|
+
{
|
|
104
|
+
name: 'load',
|
|
105
|
+
title: '加载成功',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'error',
|
|
109
|
+
title: '加载失败',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'tap',
|
|
113
|
+
title: '点击',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
classes: [
|
|
117
|
+
{
|
|
118
|
+
name: '根元素',
|
|
119
|
+
selector: '.wd-image',
|
|
120
|
+
description: '图片组件根元素',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'PC 端根元素',
|
|
124
|
+
selector: '.wd-pc-image',
|
|
125
|
+
description: '可以为 PC 端的图片编写样式',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'H5 端根元素',
|
|
129
|
+
selector: '.wd-h5-image',
|
|
130
|
+
description: '可以为 H5 端的按钮编写样式',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: '小程序端根元素',
|
|
134
|
+
selector: '.wd-mp-image',
|
|
135
|
+
description: '可以为小程序端的图片编写样式',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: '预览背景',
|
|
139
|
+
selector: '.wd-image-mask',
|
|
140
|
+
description: '点击预览图片时的蒙层',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: '关闭按钮',
|
|
144
|
+
selector: '.wd-image-mask__icon-close',
|
|
145
|
+
description: '点击预览图片时的右上角的关闭按钮',
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
meta: {
|
|
149
|
+
title: '图片',
|
|
150
|
+
description: '用于在页面进行图片的展示。',
|
|
151
|
+
category: '展示',
|
|
152
|
+
icon: '../icons/Image.svg',
|
|
153
|
+
categoryOrder: 400,
|
|
154
|
+
componentOrder: 230,
|
|
155
|
+
visible: ['APP'],
|
|
156
|
+
},
|
|
157
|
+
configMeta: {
|
|
158
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdImage',
|
|
159
|
+
shortcut: {
|
|
160
|
+
props: ['src'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
export default config;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { defineConfig, Type, Tuple } from '../type-utils';
|
|
2
|
+
import { WD_ICON_ENUM, WD_ICON_TYPE, WD_LINK_ICON_TYPE, WD_LINK_ICON_POSITION, } from '../../enum';
|
|
3
|
+
const btnTemplate = `
|
|
4
|
+
[attributes]
|
|
5
|
+
enableSlot = false
|
|
6
|
+
`;
|
|
7
|
+
// 属性类型定义
|
|
8
|
+
const data = Type.Object({
|
|
9
|
+
content: Type.String({
|
|
10
|
+
title: '文本内容',
|
|
11
|
+
default: '这是一个链接',
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: '跳转的文字',
|
|
14
|
+
'x-category': '基础属性',
|
|
15
|
+
'x-index': 10,
|
|
16
|
+
}),
|
|
17
|
+
url: Type.String({
|
|
18
|
+
title: '跳转页面',
|
|
19
|
+
default: '',
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: '通过下拉选择应用页面,可以实现内部页面跳转',
|
|
22
|
+
'x-component': 'page-list',
|
|
23
|
+
'x-category': '基础属性',
|
|
24
|
+
'x-component-props': {
|
|
25
|
+
hideAddPlatform: ['MP'],
|
|
26
|
+
},
|
|
27
|
+
'x-index': 20,
|
|
28
|
+
}),
|
|
29
|
+
isOpenInNewWindow: Type.Optional(Type.Boolean({
|
|
30
|
+
title: '是否打开新窗口',
|
|
31
|
+
default: false,
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
description: '仅外部链接生效',
|
|
34
|
+
'x-category': '基础属性',
|
|
35
|
+
'x-index': 30,
|
|
36
|
+
})),
|
|
37
|
+
params: Type.Readonly(Type.Array(Type.Object({
|
|
38
|
+
key: Type.String({ title: 'key', default: 'key' }),
|
|
39
|
+
value: Type.String({ title: 'value', default: 'value' }),
|
|
40
|
+
}), {
|
|
41
|
+
title: '携带参数',
|
|
42
|
+
default: [],
|
|
43
|
+
type: 'array',
|
|
44
|
+
description: '填写跳转页面时携带的参数,用于页面传参',
|
|
45
|
+
'x-category': '基础属性',
|
|
46
|
+
'x-index': 40,
|
|
47
|
+
})),
|
|
48
|
+
enableSlot: Type.Optional(Type.Boolean({
|
|
49
|
+
title: '展示内容插槽',
|
|
50
|
+
description: '是否展示链接中插槽的内容',
|
|
51
|
+
'x-category': '基础属性',
|
|
52
|
+
'x-index': 45,
|
|
53
|
+
default: true,
|
|
54
|
+
})),
|
|
55
|
+
// 规范化新增,展示图标
|
|
56
|
+
iconType: Type.Optional(Type.StringEnum({
|
|
57
|
+
title: '展示图标',
|
|
58
|
+
'x-index': 50,
|
|
59
|
+
default: 'none',
|
|
60
|
+
enum: Tuple(WD_LINK_ICON_TYPE),
|
|
61
|
+
'x-linkages': [
|
|
62
|
+
{
|
|
63
|
+
type: 'value:visible',
|
|
64
|
+
target: '*(iconSource)',
|
|
65
|
+
condition: "{{$self.value!=='none' && !$form.values.loading}}",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: 'value:visible',
|
|
69
|
+
target: '*(icon)',
|
|
70
|
+
condition: "{{$self.value!=='none' && !$form.values.loading}}",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'value:visible',
|
|
74
|
+
target: '*(iconPosition)',
|
|
75
|
+
condition: "{{$self.value =='text-with-icon' && !$form.values.loading}}",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
description: '设置图标按钮',
|
|
79
|
+
'x-category': '高级属性',
|
|
80
|
+
})),
|
|
81
|
+
// 规范化新增,图标类型
|
|
82
|
+
iconSource: Type.Optional(Type.StringEnum({
|
|
83
|
+
enum: Tuple(WD_ICON_TYPE),
|
|
84
|
+
title: '图标类型',
|
|
85
|
+
default: 'inner',
|
|
86
|
+
description: '选择图标的类型',
|
|
87
|
+
'x-index': 55,
|
|
88
|
+
'x-linkages': [
|
|
89
|
+
{
|
|
90
|
+
type: 'value:visible',
|
|
91
|
+
target: '*(icon)',
|
|
92
|
+
condition: "{{$self.value=='inner'}}",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'value:visible',
|
|
96
|
+
target: '*(iconSrc)',
|
|
97
|
+
condition: "{{$self.value=='custom'}}",
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
'x-category': '高级属性',
|
|
101
|
+
})),
|
|
102
|
+
// 规范化新增,图标样式
|
|
103
|
+
icon: Type.Optional(Type.StringEnum({
|
|
104
|
+
enum: Tuple(WD_ICON_ENUM.map((item) => ({ label: item, value: item }))),
|
|
105
|
+
title: '图标样式',
|
|
106
|
+
default: 'td:link',
|
|
107
|
+
description: '选择预置图标',
|
|
108
|
+
'x-index': 60,
|
|
109
|
+
'x-component': 'icon2',
|
|
110
|
+
'x-category': '高级属性',
|
|
111
|
+
})),
|
|
112
|
+
// 规范化新增,图标样式 支持自定义图片
|
|
113
|
+
iconSrc: Type.Optional(Type.FormatTypeUnion({
|
|
114
|
+
type: 'image',
|
|
115
|
+
'x-rules': [
|
|
116
|
+
{
|
|
117
|
+
message: '请输入合法的图片地址',
|
|
118
|
+
pattern: '^(((https?)://)|/resources/)[^\\s]+$',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
title: '自定义图标',
|
|
122
|
+
default: '',
|
|
123
|
+
description: '设置自定义图标地址',
|
|
124
|
+
'x-index': 70,
|
|
125
|
+
'x-category': '高级属性',
|
|
126
|
+
})),
|
|
127
|
+
iconPosition: Type.Optional(Type.StringEnum({
|
|
128
|
+
title: '图标位置',
|
|
129
|
+
'x-index': 80,
|
|
130
|
+
default: 'before',
|
|
131
|
+
enum: Tuple(WD_LINK_ICON_POSITION),
|
|
132
|
+
description: '设置图标位置',
|
|
133
|
+
'x-category': '高级属性',
|
|
134
|
+
})),
|
|
135
|
+
disabled: Type.Optional(Type.Boolean({
|
|
136
|
+
title: '是否禁用',
|
|
137
|
+
default: false,
|
|
138
|
+
description: '开启后链接将无法进行点击',
|
|
139
|
+
'x-category': '高级属性',
|
|
140
|
+
'x-index': 90,
|
|
141
|
+
})),
|
|
142
|
+
contentSlot: Type.Optional(Type.Slot()),
|
|
143
|
+
});
|
|
144
|
+
// 组件对外暴露的只读属性
|
|
145
|
+
// 未来可通过 widget API 开放,应用可以获取到组件的实例属性
|
|
146
|
+
// 组件对外先规范定义,暂时不对外开放
|
|
147
|
+
const properties = Type.Pick(data, ['content', 'url', 'disabled']);
|
|
148
|
+
// export default
|
|
149
|
+
const config = defineConfig({
|
|
150
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
151
|
+
// 属性定义
|
|
152
|
+
data,
|
|
153
|
+
// 只读属性定义
|
|
154
|
+
properties,
|
|
155
|
+
// 样式API
|
|
156
|
+
classes: [
|
|
157
|
+
{
|
|
158
|
+
name: '根元素',
|
|
159
|
+
selector: '.wd-link',
|
|
160
|
+
description: '链接组件根元素',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: '图标',
|
|
164
|
+
selector: '.wd-link__icon',
|
|
165
|
+
description: '链接的图标元素(共享样式)',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: '前置图标',
|
|
169
|
+
selector: '.wd-link__before-icon',
|
|
170
|
+
description: '链接内的前置图标',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: '后置图标',
|
|
174
|
+
selector: '.wd-link__after-icon',
|
|
175
|
+
description: '链接内的后置图标',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: '文本',
|
|
179
|
+
selector: '.wd-link__text',
|
|
180
|
+
description: '链接内显示的文本',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: '禁用状态',
|
|
184
|
+
selector: '.wd-link__icon.is-disabled',
|
|
185
|
+
description: '链接禁用状态',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'PC 端链接根元素',
|
|
189
|
+
selector: '.wd-pc-link',
|
|
190
|
+
description: '可以为 PC 端的链接编写样式',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'H5 端链接根元素',
|
|
194
|
+
selector: '.wd-h5-link',
|
|
195
|
+
description: '可以为 H5 端的链接编写样式',
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
// 组件方法
|
|
199
|
+
methods: [],
|
|
200
|
+
// 组件对外暴露事件
|
|
201
|
+
events: [
|
|
202
|
+
{
|
|
203
|
+
title: '点击',
|
|
204
|
+
name: 'tap',
|
|
205
|
+
'x-platforms': ['WEB'],
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
// 组件元信息
|
|
209
|
+
meta: {
|
|
210
|
+
name: 'WdLink',
|
|
211
|
+
title: '链接',
|
|
212
|
+
description: '当操作命令需要用户点击,用以触发特定事件的发生,如点击事件、信息提交等。',
|
|
213
|
+
icon: '../../icons/Link.svg',
|
|
214
|
+
category: '展示',
|
|
215
|
+
categoryOrder: 1,
|
|
216
|
+
componentOrder: 1,
|
|
217
|
+
platform: ['MOBILEWEB', 'PCWEB'],
|
|
218
|
+
visible: ['APP'],
|
|
219
|
+
templates: [
|
|
220
|
+
{
|
|
221
|
+
to: 'contentSlot',
|
|
222
|
+
body: btnTemplate,
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
configMeta: {
|
|
227
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdLink',
|
|
228
|
+
// 快捷编辑时展示在编辑区的属性
|
|
229
|
+
shortcut: {
|
|
230
|
+
props: ['content', 'url'],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
export default config;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineConfig, Tuple, Type } from '../type-utils';
|
|
2
|
+
// 属性类型定义
|
|
3
|
+
const data = Type.Object({
|
|
4
|
+
type: Type.StringEnum({
|
|
5
|
+
title: '风格',
|
|
6
|
+
type: 'string',
|
|
7
|
+
'x-index': 10,
|
|
8
|
+
default: 'solid',
|
|
9
|
+
enum: Tuple([
|
|
10
|
+
{
|
|
11
|
+
label: '实线',
|
|
12
|
+
value: 'solid',
|
|
13
|
+
},
|
|
14
|
+
// default -> secondary
|
|
15
|
+
{
|
|
16
|
+
label: '虚线',
|
|
17
|
+
value: 'dashed',
|
|
18
|
+
},
|
|
19
|
+
]),
|
|
20
|
+
'x-category': '基础属性',
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
const properties = Type.Pick(data, ['type']);
|
|
24
|
+
// export default
|
|
25
|
+
const config = defineConfig({
|
|
26
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
27
|
+
// 属性定义
|
|
28
|
+
data,
|
|
29
|
+
// 只读属性定义
|
|
30
|
+
properties,
|
|
31
|
+
// 样式API
|
|
32
|
+
classes: [
|
|
33
|
+
{
|
|
34
|
+
name: '根元素',
|
|
35
|
+
selector: '.wd-table',
|
|
36
|
+
description: '分割线组件根元素',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
// 组件方法
|
|
40
|
+
methods: [],
|
|
41
|
+
// 组件对外暴露事件
|
|
42
|
+
events: [],
|
|
43
|
+
// 组件元信息
|
|
44
|
+
meta: {
|
|
45
|
+
name: 'WdTable',
|
|
46
|
+
title: '表格',
|
|
47
|
+
description: '用于显示分割线。',
|
|
48
|
+
icon: '../../icons/Divider.svg',
|
|
49
|
+
category: '展示',
|
|
50
|
+
categoryOrder: 1,
|
|
51
|
+
componentOrder: 1,
|
|
52
|
+
// 快捷编辑时展示在编辑区的属性
|
|
53
|
+
shortcut: {
|
|
54
|
+
props: [],
|
|
55
|
+
},
|
|
56
|
+
visible: [],
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
export default config;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineConfig, Type, Tuple } from '../type-utils';
|
|
2
|
+
import { WD_TEXT_LEVEL, WD_TEXT_MAX_LINES } from '../../enum';
|
|
3
|
+
// 属性类型定义
|
|
4
|
+
const data = Type.Object({
|
|
5
|
+
text: Type.String({
|
|
6
|
+
title: '文本内容',
|
|
7
|
+
'x-component': 'textarea',
|
|
8
|
+
default: '文本内容',
|
|
9
|
+
'x-category': '基础属性',
|
|
10
|
+
'x-index': 10,
|
|
11
|
+
description: '设置文本的内容',
|
|
12
|
+
}),
|
|
13
|
+
level: Type.Optional(Type.StringEnum({
|
|
14
|
+
title: '文本格式',
|
|
15
|
+
type: 'string',
|
|
16
|
+
default: 'body-default',
|
|
17
|
+
enum: Tuple(WD_TEXT_LEVEL),
|
|
18
|
+
description: '设置文本格式,支持正文(小,中,大)和标题(H1-H6)',
|
|
19
|
+
'x-category': '基础属性',
|
|
20
|
+
'x-index': 20,
|
|
21
|
+
})),
|
|
22
|
+
overflow: Type.Optional(Type.Boolean({
|
|
23
|
+
title: '溢出省略',
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
default: false,
|
|
26
|
+
'x-linkages': [
|
|
27
|
+
{
|
|
28
|
+
type: 'value:visible',
|
|
29
|
+
target: 'maxLines',
|
|
30
|
+
condition: '{{$self.value === true}}',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'x-category': '高级属性',
|
|
34
|
+
description: '文本长度超过最大行数用省略展示,开启后,会添加display:-webkit-box !import 样式,可能会导致文本布局失效',
|
|
35
|
+
'x-index': 30,
|
|
36
|
+
})),
|
|
37
|
+
maxLines: Type.Optional(Type.StringEnum({
|
|
38
|
+
title: '最大行数',
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: '若文本长度超过最大行数,超出内容以省略号代替;因小程序侧限制,应用发布为小程序时,开启文本可选中会导致最大行数的配置不生效',
|
|
41
|
+
'x-helper-text': '若文本长度超过最大行数,超出内容以省略号代替;因小程序侧限制,应用发布为小程序时,开启文本可选中会导致最大行数的配置不生效',
|
|
42
|
+
default: '1',
|
|
43
|
+
enum: Tuple(WD_TEXT_MAX_LINES),
|
|
44
|
+
'x-index': 40,
|
|
45
|
+
'x-category': '高级属性',
|
|
46
|
+
})),
|
|
47
|
+
tips: Type.Optional(Type.Boolean({
|
|
48
|
+
title: '展示文本气泡',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
description: '开启后鼠标悬停在文本组件上会展示文本气泡,仅PC端有效',
|
|
51
|
+
default: true,
|
|
52
|
+
'x-category': '高级属性',
|
|
53
|
+
'x-index': 50,
|
|
54
|
+
})),
|
|
55
|
+
space: Type.Optional(Type.Boolean({
|
|
56
|
+
title: '连续空格',
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
default: false,
|
|
59
|
+
'x-category': '高级属性',
|
|
60
|
+
description: '是否显示连续空格,开启后文本组件将支持识别多个空格字符,关闭后文本组件仅支持识别单个空格字符(多空格字符会自动转换成单个空格字符)',
|
|
61
|
+
'x-index': 60,
|
|
62
|
+
})),
|
|
63
|
+
userSelect: Type.Optional(Type.Boolean({
|
|
64
|
+
title: '是否可选中',
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
default: true,
|
|
67
|
+
'x-index': 70,
|
|
68
|
+
'x-category': '高级属性',
|
|
69
|
+
description: '是否可选中文本,关闭后文本将不支持进行选中,无法进行复制等常见文本操作',
|
|
70
|
+
})),
|
|
71
|
+
});
|
|
72
|
+
// 组件对外暴露的只读属性
|
|
73
|
+
// 未来可通过 widget API 开放,应用可以获取到组件的实例属性
|
|
74
|
+
// 组件对外先规范定义,暂时不对外开放
|
|
75
|
+
const properties = Type.Pick(data, [
|
|
76
|
+
'text',
|
|
77
|
+
'level',
|
|
78
|
+
'overflow',
|
|
79
|
+
'maxLines',
|
|
80
|
+
'space',
|
|
81
|
+
'userSelect',
|
|
82
|
+
'tips',
|
|
83
|
+
]);
|
|
84
|
+
// export default
|
|
85
|
+
const config = defineConfig({
|
|
86
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
87
|
+
// 属性定义
|
|
88
|
+
data,
|
|
89
|
+
// 只读属性定义
|
|
90
|
+
properties,
|
|
91
|
+
// 样式API
|
|
92
|
+
classes: [
|
|
93
|
+
{
|
|
94
|
+
name: '根元素',
|
|
95
|
+
selector: '.wd-typography',
|
|
96
|
+
description: '文本组件根元素',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'PC 端文本根元素',
|
|
100
|
+
selector: '.wd-pc-typography',
|
|
101
|
+
description: '可以为 PC 端的文本编写样式',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'H5 端文本根元素',
|
|
105
|
+
selector: '.wd-h5-typography',
|
|
106
|
+
description: '可以为 H5 端的文本编写样式',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: '小程序端文本根元素',
|
|
110
|
+
selector: '.wd-mp-typography',
|
|
111
|
+
description: '可以为小程序端的文本编写样式',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
// 组件方法
|
|
115
|
+
methods: [],
|
|
116
|
+
// 组件对外暴露事件
|
|
117
|
+
events: [
|
|
118
|
+
{
|
|
119
|
+
name: 'tap',
|
|
120
|
+
title: '点击',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
// 组件元信息
|
|
124
|
+
meta: {
|
|
125
|
+
name: 'WdText',
|
|
126
|
+
title: '文本',
|
|
127
|
+
description: '用于展示页面中的文本/标题内容。',
|
|
128
|
+
icon: '../../icons/Text.svg',
|
|
129
|
+
category: '展示',
|
|
130
|
+
categoryOrder: 1,
|
|
131
|
+
componentOrder: 1,
|
|
132
|
+
visible: ['APP'],
|
|
133
|
+
},
|
|
134
|
+
configMeta: {
|
|
135
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdText',
|
|
136
|
+
// 快捷编辑时展示在编辑区的属性
|
|
137
|
+
shortcut: {
|
|
138
|
+
props: ['text', 'level'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
export default config;
|
|
@@ -110,8 +110,8 @@ const config = defineConfig({
|
|
|
110
110
|
rule: 'checkBusiness',
|
|
111
111
|
options: {
|
|
112
112
|
allowFailure: true,
|
|
113
|
-
title: '
|
|
114
|
-
description: '
|
|
113
|
+
title: '当前应用使用了「获取用户手机号」组件,该组件在小程序端仅支持企业主体小程序使用,请确保当前应用绑定的小程序为企业主体',
|
|
114
|
+
description: '',
|
|
115
115
|
type: 'mp',
|
|
116
116
|
version: '',
|
|
117
117
|
platform: ['MP'],
|
|
@@ -105,8 +105,8 @@ export default defineConfig({
|
|
|
105
105
|
rule: 'checkBusiness',
|
|
106
106
|
options: {
|
|
107
107
|
allowFailure: true,
|
|
108
|
-
title: '
|
|
109
|
-
description: '
|
|
108
|
+
title: '当前应用开启了「登录功能」,该功能在小程序端仅支持企业主体小程序使用,请确保当前应用绑定的小程序为企业主体',
|
|
109
|
+
description: '',
|
|
110
110
|
type: 'mp',
|
|
111
111
|
version: '',
|
|
112
112
|
platform: ['MP'],
|