@dckj-npm/dc-material 0.1.359 → 0.1.361
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/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/{umi.d22560a0.css → umi.a2a18b22.css} +1 -1
- package/build/docs/umi.e8fefa28.js +1 -0
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +2 -2
- package/dist/BizComps.js.map +1 -1
- package/es/components/custom-form/custom-form.d.ts +37 -0
- package/es/components/custom-form/custom-form.js +158 -0
- package/es/components/custom-form/index.d.ts +6 -0
- package/es/components/custom-form/index.js +6 -0
- package/es/components/custom-form/index.scss +25 -0
- package/es/components/teletext-list/schema.json +1278 -0
- package/es/components/teletext-list/teletext-list-item.js +13 -9
- package/es/components/teletext-list/teletext-list-item.scss +16 -0
- package/es/components/teletext-list/teletext-list.js +2 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -0
- package/es/style.js +8 -0
- package/es/utils/children-node-handle.js +5 -0
- package/lib/components/custom-form/custom-form.d.ts +37 -0
- package/lib/components/custom-form/custom-form.js +164 -0
- package/lib/components/custom-form/index.d.ts +6 -0
- package/lib/components/custom-form/index.js +6 -0
- package/lib/components/custom-form/index.scss +25 -0
- package/lib/components/teletext-list/schema.json +1278 -0
- package/lib/components/teletext-list/teletext-list-item.js +13 -9
- package/lib/components/teletext-list/teletext-list-item.scss +16 -0
- package/lib/components/teletext-list/teletext-list.js +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -1
- package/lib/style.js +8 -0
- package/lib/utils/children-node-handle.js +5 -0
- package/lowcode/custom-form/meta.ts +307 -0
- package/lowcode_es/custom-form/meta.d.ts +22 -0
- package/lowcode_es/custom-form/meta.js +302 -0
- package/lowcode_es/meta.js +3 -2
- package/lowcode_lib/custom-form/meta.d.ts +22 -0
- package/lowcode_lib/custom-form/meta.js +307 -0
- package/lowcode_lib/meta.js +41 -40
- package/package.json +3 -3
- package/build/docs/umi.d7be81d3.js +0 -1
|
@@ -43,8 +43,10 @@ var TeletextListItem = function TeletextListItem(_ref) {
|
|
|
43
43
|
_ref$textImgGap = _ref.textImgGap,
|
|
44
44
|
textImgGap = _ref$textImgGap === void 0 ? 16 : _ref$textImgGap,
|
|
45
45
|
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
46
|
-
//
|
|
47
|
-
var resultImage = image
|
|
46
|
+
// 处理图片地址,兼容字符串和数组,优先取第一个有效字符串
|
|
47
|
+
var resultImage = Array.isArray(image) ? image.find(function (item) {
|
|
48
|
+
return typeof item === 'string' && item.trim();
|
|
49
|
+
}) || '' : typeof image === 'string' ? image : '';
|
|
48
50
|
var _otherProps = otherProps || {};
|
|
49
51
|
var tagColorArray = ['orange', 'green'];
|
|
50
52
|
var tagList = (typeof tags === 'string' ? tags.split(',') : []).map(function (tag) {
|
|
@@ -54,13 +56,17 @@ var TeletextListItem = function TeletextListItem(_ref) {
|
|
|
54
56
|
});
|
|
55
57
|
|
|
56
58
|
// console.log('itemType', itemType)
|
|
57
|
-
var containerClass = "teletext-list__panel__item image-" + imagePlacement + " itemColumns-" + itemColumns;
|
|
59
|
+
var containerClass = "teletext-list__panel__item image-" + imagePlacement + " itemColumns-" + itemColumns + " type-" + type;
|
|
58
60
|
var containerStyle = (0, _extends2["default"])({
|
|
59
61
|
padding: itemPadding + "px",
|
|
60
62
|
backgroundColor: itemBgColor,
|
|
61
63
|
alignItems: textAlign,
|
|
62
64
|
gap: textImgGap + "px"
|
|
63
65
|
}, style);
|
|
66
|
+
var imageStyle = {
|
|
67
|
+
width: imgWidth + "px",
|
|
68
|
+
height: imgHeight + "px"
|
|
69
|
+
};
|
|
64
70
|
|
|
65
71
|
// 生成图标样式
|
|
66
72
|
var getIconStyle = function getIconStyle(icon) {
|
|
@@ -115,10 +121,7 @@ var TeletextListItem = function TeletextListItem(_ref) {
|
|
|
115
121
|
}, _otherProps), resultImage && (imagePlacement === 'left' || imagePlacement === 'top') && type !== 'textOnly' ? (0, _childrenNodeHandle.convertChildren)(children, 'image', {
|
|
116
122
|
imgSrc: resultImage,
|
|
117
123
|
className: 'teletext-list__panel__item_image',
|
|
118
|
-
style:
|
|
119
|
-
width: imgWidth + "px",
|
|
120
|
-
height: imgHeight + "px"
|
|
121
|
-
}
|
|
124
|
+
style: imageStyle
|
|
122
125
|
}) : null, type !== 'imgOnly' && itemType === '开关' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
126
|
className: "teletext-list__panel__item__switch",
|
|
124
127
|
style: {
|
|
@@ -215,8 +218,9 @@ var TeletextListItem = function TeletextListItem(_ref) {
|
|
|
215
218
|
src: "https://51ymb.com/source/api/upload/1075055372064133120/2025/202502/20250207/1085235703970926592.png",
|
|
216
219
|
alt: ""
|
|
217
220
|
}), "Remove"))), resultImage && (imagePlacement === 'right' || imagePlacement === 'bottom') && type !== 'textOnly' ? (0, _childrenNodeHandle.convertChildren)(children, 'image', {
|
|
218
|
-
|
|
219
|
-
className: 'teletext-list__panel__item_image'
|
|
221
|
+
imgSrc: resultImage,
|
|
222
|
+
className: 'teletext-list__panel__item_image',
|
|
223
|
+
style: imageStyle
|
|
220
224
|
}) : null, iconList === null || iconList === void 0 ? void 0 : iconList.map(function (icon, index) {
|
|
221
225
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
226
|
key: index,
|
|
@@ -7,7 +7,22 @@
|
|
|
7
7
|
gap: 5px;
|
|
8
8
|
// padding-bottom: 10px;
|
|
9
9
|
justify-content: flex-start;
|
|
10
|
+
align-items: flex-start;
|
|
10
11
|
background-color: #f8f9fb;
|
|
12
|
+
|
|
13
|
+
&.type-imgOnly {
|
|
14
|
+
.teletext-list__panel__item_image {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.type-textOnly {
|
|
21
|
+
.teletext-list__panel__item__text {
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
11
26
|
|
|
12
27
|
.teletext-list__panel__item_image {
|
|
13
28
|
width: 100px;
|
|
@@ -28,6 +43,7 @@
|
|
|
28
43
|
.teletext-list__panel__item__text {
|
|
29
44
|
display: flex;
|
|
30
45
|
flex-direction: column;
|
|
46
|
+
flex: 1;
|
|
31
47
|
gap: 3px;
|
|
32
48
|
|
|
33
49
|
.teletext-list__panel__item__text__item {
|
|
@@ -78,6 +78,7 @@ var TeletextList = function TeletextList(_ref) {
|
|
|
78
78
|
};
|
|
79
79
|
var getDataList = function getDataList() {
|
|
80
80
|
if (!dataList) return [];
|
|
81
|
+
console.log('dataList2', dataList);
|
|
81
82
|
return Array.isArray(dataList) ? dataList : [dataList];
|
|
82
83
|
};
|
|
83
84
|
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
@@ -107,7 +108,7 @@ var TeletextList = function TeletextList(_ref) {
|
|
|
107
108
|
style: getListStyle()
|
|
108
109
|
}, dataList ? getDataList().map(function (item, index) {
|
|
109
110
|
return /*#__PURE__*/_react["default"].createElement(_teletextListItem["default"], (0, _extends2["default"])({
|
|
110
|
-
key: index,
|
|
111
|
+
key: item.id || index,
|
|
111
112
|
onClick: onClick,
|
|
112
113
|
imagePlacement: imagePlacement,
|
|
113
114
|
style: itemRowAlign === 'row' ? {
|
package/lib/index.d.ts
CHANGED
|
@@ -79,5 +79,7 @@ export type { CollapseSelectorProps } from './components/collapse-selector';
|
|
|
79
79
|
export { CollapseSelector } from './components/collapse-selector';
|
|
80
80
|
export type { CollapseSelectorItemProps } from './components/collapse-selector-item';
|
|
81
81
|
export { CollapseSelectorItem } from './components/collapse-selector-item';
|
|
82
|
+
export type { CustomFormProps, CustomFormItemSchema, CustomFormItemType } from './components/custom-form';
|
|
83
|
+
export { CustomForm } from './components/custom-form';
|
|
82
84
|
declare const bizCssPrefix = "bizpack";
|
|
83
85
|
export { bizCssPrefix };
|
package/lib/index.js
CHANGED
|
@@ -45,9 +45,10 @@ var _exportNames = {
|
|
|
45
45
|
Rating: true,
|
|
46
46
|
CollapseSelector: true,
|
|
47
47
|
CollapseSelectorItem: true,
|
|
48
|
+
CustomForm: true,
|
|
48
49
|
bizCssPrefix: true
|
|
49
50
|
};
|
|
50
|
-
exports.bizCssPrefix = exports.UserCard = exports.Title2 = exports.Title1 = exports.TextDescriptionDetailList = exports.TeletextList = exports.TagC = exports.TabMessage = exports.TabContainerItem = exports.TabContainer = exports.Switch = exports.Swiper = exports.StreamList = exports.ShoppingCart = exports.SearchHistoryList = exports.SearchBar = exports.RichText = exports.ReviewList = exports.Rating = exports.Profile = exports.Position = exports.NoticeBar = exports.Navigation = exports.MessageList = exports.MenuList = exports.MemberCard = exports.IntegralTask = exports.Input = exports.Image = exports.GridNav = exports.GoodsCardListCommon = exports.GoodsCardList = exports.DCSlider = exports.CustomSelect = exports.CustomRadioGroupItem = exports.CustomRadioGroup = exports.CustomDrawer = exports.CollapseSelectorItem = exports.CollapseSelector = exports.Collapse = exports.Button2 = exports.BreadCrumb = exports.AddressList = void 0;
|
|
51
|
+
exports.bizCssPrefix = exports.UserCard = exports.Title2 = exports.Title1 = exports.TextDescriptionDetailList = exports.TeletextList = exports.TagC = exports.TabMessage = exports.TabContainerItem = exports.TabContainer = exports.Switch = exports.Swiper = exports.StreamList = exports.ShoppingCart = exports.SearchHistoryList = exports.SearchBar = exports.RichText = exports.ReviewList = exports.Rating = exports.Profile = exports.Position = exports.NoticeBar = exports.Navigation = exports.MessageList = exports.MenuList = exports.MemberCard = exports.IntegralTask = exports.Input = exports.Image = exports.GridNav = exports.GoodsCardListCommon = exports.GoodsCardList = exports.DCSlider = exports.CustomSelect = exports.CustomRadioGroupItem = exports.CustomRadioGroup = exports.CustomForm = exports.CustomDrawer = exports.CollapseSelectorItem = exports.CollapseSelector = exports.Collapse = exports.Button2 = exports.BreadCrumb = exports.AddressList = void 0;
|
|
51
52
|
var _swiper = _interopRequireDefault(require("./components/swiper"));
|
|
52
53
|
exports.Swiper = _swiper["default"];
|
|
53
54
|
var _dcSlider = _interopRequireDefault(require("./components/dc-slider"));
|
|
@@ -136,6 +137,8 @@ var _collapseSelector = require("./components/collapse-selector");
|
|
|
136
137
|
exports.CollapseSelector = _collapseSelector.CollapseSelector;
|
|
137
138
|
var _collapseSelectorItem = require("./components/collapse-selector-item");
|
|
138
139
|
exports.CollapseSelectorItem = _collapseSelectorItem.CollapseSelectorItem;
|
|
140
|
+
var _customForm = require("./components/custom-form");
|
|
141
|
+
exports.CustomForm = _customForm.CustomForm;
|
|
139
142
|
// 轮播图
|
|
140
143
|
|
|
141
144
|
// 轮播图2号
|
|
@@ -222,4 +225,6 @@ exports.CollapseSelectorItem = _collapseSelectorItem.CollapseSelectorItem;
|
|
|
222
225
|
|
|
223
226
|
// 折叠面板选择器2子项
|
|
224
227
|
|
|
228
|
+
// 自定义表单
|
|
229
|
+
|
|
225
230
|
var bizCssPrefix = exports.bizCssPrefix = 'bizpack';
|
package/lib/style.js
CHANGED
|
@@ -9,4 +9,12 @@ require('@alifd/next/lib/switch/style');
|
|
|
9
9
|
require('@alifd/next/lib/breadcrumb/style');
|
|
10
10
|
require('@alifd/next/lib/collapse/style');
|
|
11
11
|
require('@alifd/next/lib/rating/style');
|
|
12
|
+
require('@alifd/next/lib/upload/style');
|
|
13
|
+
require('@alifd/next/lib/number-picker/style');
|
|
14
|
+
require('@alifd/next/lib/date-picker/style');
|
|
15
|
+
require('@alifd/next/lib/checkbox/style');
|
|
16
|
+
require('@alifd/next/lib/radio/style');
|
|
17
|
+
require('@alifd/next/lib/input/style');
|
|
18
|
+
require('@alifd/next/lib/responsive-grid/style');
|
|
19
|
+
require('@alifd/next/lib/form/style');
|
|
12
20
|
require('./index.scss');
|
|
@@ -19,8 +19,13 @@ function convertChildren(children, key, props) {
|
|
|
19
19
|
for (var i = 0; i < children.length; i++) {
|
|
20
20
|
var child = children[i];
|
|
21
21
|
if (child.key === key) {
|
|
22
|
+
var _child$props;
|
|
22
23
|
// 属性融合
|
|
23
24
|
var propsContact = props ? (0, _extends2["default"])({}, child.props, props) : child.props;
|
|
25
|
+
// 样式融合
|
|
26
|
+
if (props !== null && props !== void 0 && props.style && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.style) {
|
|
27
|
+
propsContact.style = (0, _extends2["default"])({}, child.props.style, props.style);
|
|
28
|
+
}
|
|
24
29
|
node = /*#__PURE__*/_react["default"].cloneElement(child, propsContact);
|
|
25
30
|
break;
|
|
26
31
|
}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'
|
|
2
|
+
|
|
3
|
+
const CustomFormMeta: IPublicTypeComponentMetadata = {
|
|
4
|
+
group: '低代码组件',
|
|
5
|
+
componentName: 'CustomForm',
|
|
6
|
+
title: '自定义表单',
|
|
7
|
+
docUrl: '',
|
|
8
|
+
screenshot: '',
|
|
9
|
+
devMode: 'proCode',
|
|
10
|
+
category: '信息输入',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@dckj-npm/dc-material',
|
|
13
|
+
version: '0.1.359',
|
|
14
|
+
exportName: 'CustomForm',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: '',
|
|
18
|
+
},
|
|
19
|
+
configure: {
|
|
20
|
+
component: {
|
|
21
|
+
isContainer: true,
|
|
22
|
+
},
|
|
23
|
+
props: [
|
|
24
|
+
{
|
|
25
|
+
title: '列数',
|
|
26
|
+
name: 'columns',
|
|
27
|
+
setter: {
|
|
28
|
+
componentName: 'RadioGroupSetter',
|
|
29
|
+
props: {
|
|
30
|
+
dataSource: [
|
|
31
|
+
{ label: '一列', value: 1 },
|
|
32
|
+
{ label: '二列', value: 2 },
|
|
33
|
+
{ label: '三列', value: 3 },
|
|
34
|
+
{ label: '四列', value: 4 },
|
|
35
|
+
],
|
|
36
|
+
options: [
|
|
37
|
+
{ label: '一列', value: 1 },
|
|
38
|
+
{ label: '二列', value: 2 },
|
|
39
|
+
{ label: '三列', value: 3 },
|
|
40
|
+
{ label: '四列', value: 4 },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
initialValue: 1,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: '间距',
|
|
48
|
+
name: 'spacing',
|
|
49
|
+
setter: {
|
|
50
|
+
componentName: 'JsonSetter',
|
|
51
|
+
isRequired: false,
|
|
52
|
+
initialValue: [0, 16, 16, 0],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: '空态文案',
|
|
57
|
+
name: 'emptyContent',
|
|
58
|
+
setter: {
|
|
59
|
+
componentName: 'StringSetter',
|
|
60
|
+
isRequired: false,
|
|
61
|
+
initialValue: '添加表单项',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: '表单项',
|
|
66
|
+
name: 'formItems',
|
|
67
|
+
setter: {
|
|
68
|
+
componentName: 'ArraySetter',
|
|
69
|
+
props: {
|
|
70
|
+
itemSetter: {
|
|
71
|
+
componentName: 'ObjectSetter',
|
|
72
|
+
props: {
|
|
73
|
+
config: {
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
title: '字段名',
|
|
77
|
+
name: 'field',
|
|
78
|
+
setter: {
|
|
79
|
+
componentName: 'StringSetter',
|
|
80
|
+
isRequired: true,
|
|
81
|
+
initialValue: '',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: '标题',
|
|
86
|
+
name: 'label',
|
|
87
|
+
setter: {
|
|
88
|
+
componentName: 'StringSetter',
|
|
89
|
+
isRequired: false,
|
|
90
|
+
initialValue: '',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: '必填',
|
|
95
|
+
name: 'required',
|
|
96
|
+
setter: {
|
|
97
|
+
componentName: 'BoolSetter',
|
|
98
|
+
isRequired: false,
|
|
99
|
+
initialValue: false,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: '组件类型',
|
|
104
|
+
name: 'componentType',
|
|
105
|
+
setter: {
|
|
106
|
+
componentName: 'SelectSetter',
|
|
107
|
+
props: {
|
|
108
|
+
options: [
|
|
109
|
+
{ label: '输入框', value: 'Input' },
|
|
110
|
+
{ label: '多行文本', value: 'TextArea' },
|
|
111
|
+
{ label: '下拉选择', value: 'Select' },
|
|
112
|
+
{ label: '单选组', value: 'RadioGroup' },
|
|
113
|
+
{ label: '复选组', value: 'CheckboxGroup' },
|
|
114
|
+
{ label: '数字输入', value: 'NumberPicker' },
|
|
115
|
+
{ label: '日期选择', value: 'DatePicker' },
|
|
116
|
+
{ label: '上传', value: 'Upload' },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
initialValue: 'Input',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: '选项',
|
|
124
|
+
name: 'options',
|
|
125
|
+
setter: {
|
|
126
|
+
componentName: 'ArraySetter',
|
|
127
|
+
props: {
|
|
128
|
+
itemSetter: {
|
|
129
|
+
componentName: 'ObjectSetter',
|
|
130
|
+
props: {
|
|
131
|
+
config: {
|
|
132
|
+
items: [
|
|
133
|
+
{
|
|
134
|
+
title: '名称',
|
|
135
|
+
name: 'label',
|
|
136
|
+
setter: {
|
|
137
|
+
componentName: 'StringSetter',
|
|
138
|
+
isRequired: true,
|
|
139
|
+
initialValue: '',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
title: '值',
|
|
144
|
+
name: 'value',
|
|
145
|
+
setter: {
|
|
146
|
+
componentName: 'StringSetter',
|
|
147
|
+
isRequired: true,
|
|
148
|
+
initialValue: '',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
initialValue: [],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: '列跨度',
|
|
161
|
+
name: 'columnSpan',
|
|
162
|
+
setter: {
|
|
163
|
+
componentName: 'NumberSetter',
|
|
164
|
+
props: {
|
|
165
|
+
min: 1,
|
|
166
|
+
max: 4,
|
|
167
|
+
},
|
|
168
|
+
initialValue: 1,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: '组件属性',
|
|
173
|
+
name: 'componentProps',
|
|
174
|
+
setter: {
|
|
175
|
+
componentName: 'JsonSetter',
|
|
176
|
+
isRequired: false,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
title: '表单项属性',
|
|
181
|
+
name: 'formItemProps',
|
|
182
|
+
setter: {
|
|
183
|
+
componentName: 'JsonSetter',
|
|
184
|
+
isRequired: false,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
extraSetter: {
|
|
189
|
+
componentName: 'MixedSetter',
|
|
190
|
+
isRequired: false,
|
|
191
|
+
props: {},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
initialValue: [],
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
title: '显示提交按钮',
|
|
202
|
+
name: 'showSubmit',
|
|
203
|
+
setter: {
|
|
204
|
+
componentName: 'BoolSetter',
|
|
205
|
+
initialValue: true,
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: '提交按钮文字',
|
|
210
|
+
name: 'submitText',
|
|
211
|
+
setter: {
|
|
212
|
+
componentName: 'StringSetter',
|
|
213
|
+
initialValue: '提交',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
title: '提交时校验',
|
|
218
|
+
name: 'submitValidate',
|
|
219
|
+
setter: {
|
|
220
|
+
componentName: 'BoolSetter',
|
|
221
|
+
initialValue: true,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
title: '提交数据源',
|
|
226
|
+
name: 'submitDataSource',
|
|
227
|
+
setter: {
|
|
228
|
+
componentName: 'SetterFormVariable',
|
|
229
|
+
props: {
|
|
230
|
+
showAttributesPanel: false,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
title: '显示重置按钮',
|
|
236
|
+
name: 'showReset',
|
|
237
|
+
setter: {
|
|
238
|
+
componentName: 'BoolSetter',
|
|
239
|
+
initialValue: false,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
title: '重置按钮文字',
|
|
244
|
+
name: 'resetText',
|
|
245
|
+
setter: {
|
|
246
|
+
componentName: 'StringSetter',
|
|
247
|
+
initialValue: '重置',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
supports: {
|
|
252
|
+
style: true,
|
|
253
|
+
events: [
|
|
254
|
+
{
|
|
255
|
+
name: 'onSubmit',
|
|
256
|
+
template:
|
|
257
|
+
"onSubmit(values, errors, field,${extParams}){\n// 提交成功(无校验错误)\nconsole.log('onSubmit', values, errors, field);\n}",
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'onSubmitFailed',
|
|
261
|
+
template:
|
|
262
|
+
"onSubmitFailed(values, errors, field,${extParams}){\n// 提交失败(校验错误)\nconsole.log('onSubmitFailed', values, errors, field);\n}",
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const snippets: IPublicTypeSnippet[] = [
|
|
270
|
+
{
|
|
271
|
+
title: '自定义表单',
|
|
272
|
+
screenshot: '',
|
|
273
|
+
schema: {
|
|
274
|
+
componentName: 'CustomForm',
|
|
275
|
+
props: {
|
|
276
|
+
columns: 1,
|
|
277
|
+
formItems: [
|
|
278
|
+
{
|
|
279
|
+
field: 'name',
|
|
280
|
+
label: '姓名',
|
|
281
|
+
required: true,
|
|
282
|
+
componentType: 'Input',
|
|
283
|
+
componentProps: {
|
|
284
|
+
placeholder: '请输入姓名',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
field: 'gender',
|
|
289
|
+
label: '性别',
|
|
290
|
+
componentType: 'RadioGroup',
|
|
291
|
+
options: [
|
|
292
|
+
{ label: '男', value: 'male' },
|
|
293
|
+
{ label: '女', value: 'female' },
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
showSubmit: true,
|
|
298
|
+
submitText: '提交',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
]
|
|
303
|
+
|
|
304
|
+
export default {
|
|
305
|
+
...CustomFormMeta,
|
|
306
|
+
snippets,
|
|
307
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
snippets: IPublicTypeSnippet[];
|
|
4
|
+
componentName: string;
|
|
5
|
+
uri?: string;
|
|
6
|
+
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
+
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
docUrl?: string;
|
|
11
|
+
screenshot?: string;
|
|
12
|
+
devMode?: "proCode" | "lowCode";
|
|
13
|
+
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
+
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
+
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
+
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
+
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
+
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
+
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
+
priority?: number;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|