@dckj-npm/dc-material 0.1.378 → 0.1.379
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/custom-form/requirements.html +3 -3
- package/build/docs/custom-form.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/teletext-list.html +3 -3
- package/build/docs/{umi.e6e366c9.js → umi.80bcbda5.js} +1 -1
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/docs/~demos/teletext-list-demo-1.html +3 -3
- package/build/docs/~demos/teletext-list-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/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.js +1 -1
- package/dist/BizComps.js.map +1 -1
- package/es/components/custom-form/custom-form.d.ts +26 -6
- package/es/components/custom-form/custom-form.js +95 -35
- package/lib/components/custom-form/custom-form.d.ts +26 -6
- package/lib/components/custom-form/custom-form.js +95 -35
- package/lowcode/custom-form/meta.ts +182 -5
- package/lowcode_es/custom-form/meta.js +206 -19
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/custom-form/meta.js +206 -19
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -725,7 +725,7 @@ const CustomFormMeta: IPublicTypeComponentMetadata = {
|
|
|
725
725
|
extraProps: {
|
|
726
726
|
getValue: (target: any) => {
|
|
727
727
|
const t = target.parent?.getPropValue?.('componentType')
|
|
728
|
-
return target.parent?.getPropValue?.('componentProps')?.format || (t === 'DateTimePicker' ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD')
|
|
728
|
+
return target.parent?.getPropValue?.('componentProps')?.format || (t === 'DateTimePicker' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')
|
|
729
729
|
},
|
|
730
730
|
setValue: (target: any, value: string) => {
|
|
731
731
|
const cp = { ...(target.parent?.getPropValue?.('componentProps') || {}) }
|
|
@@ -1395,6 +1395,174 @@ const CustomFormMeta: IPublicTypeComponentMetadata = {
|
|
|
1395
1395
|
},
|
|
1396
1396
|
},
|
|
1397
1397
|
// ─────────────────────────────────────────────────────────────────────
|
|
1398
|
+
// 提交参数配置
|
|
1399
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
1400
|
+
{
|
|
1401
|
+
title: {
|
|
1402
|
+
label: '提交参数配置',
|
|
1403
|
+
tip: '控制表单提交时如何将字段值构建为请求参数,支持三种模式:\n\n① 直接透传(passthrough,默认)\n字段名与接口参数名完全一致时无需配置——表单字段值直接作为请求 body,零配置即可工作。\n\n② 字段重命名(rename)\n表单字段名与接口参数名不一致时使用,按规则将指定字段重命名,其余字段仍按原名透传。\n例如:表单字段 user_name → 接口参数 username\n\n③ 动态表单格式(itemList)\n后端接口接收 itemList:[{columnName,columnValue},...] 格式时使用,适合 /dynamicFormTableRecord/ 等接口。\n例如:{user_name:"张三"} → [{columnName:"user_name",columnValue:"张三"}]',
|
|
1404
|
+
},
|
|
1405
|
+
name: 'submitMapping',
|
|
1406
|
+
setter: {
|
|
1407
|
+
componentName: 'ObjectSetter',
|
|
1408
|
+
props: {
|
|
1409
|
+
config: {
|
|
1410
|
+
items: [
|
|
1411
|
+
// ── 模式选择 ──────────────────────────────────────────────
|
|
1412
|
+
{
|
|
1413
|
+
title: {
|
|
1414
|
+
label: '参数构建模式',
|
|
1415
|
+
tip: '选择提交时参数的构建方式:\n· 直接透传:字段名与接口参数名一致,直接发送;最简单,首选。\n· 字段重命名:字段名与接口参数名不一致,在下方按需配置重命名规则即可。\n· 动态表单格式:接口接收 itemList:[{columnName,columnValue}] 格式,需完整配置字段映射列表。',
|
|
1416
|
+
},
|
|
1417
|
+
name: 'mode',
|
|
1418
|
+
setter: {
|
|
1419
|
+
componentName: 'SelectSetter',
|
|
1420
|
+
props: {
|
|
1421
|
+
options: [
|
|
1422
|
+
{ label: '① 直接透传(字段名与接口参数名一致)', value: 'passthrough' },
|
|
1423
|
+
{ label: '② 字段重命名(字段名与接口参数名不一致)', value: 'rename' },
|
|
1424
|
+
{ label: '③ 动态表单格式(itemList 格式)', value: 'itemList' },
|
|
1425
|
+
],
|
|
1426
|
+
},
|
|
1427
|
+
initialValue: 'passthrough',
|
|
1428
|
+
},
|
|
1429
|
+
},
|
|
1430
|
+
// ── rename 模式:字段重命名映射 ───────────────────────────
|
|
1431
|
+
{
|
|
1432
|
+
title: {
|
|
1433
|
+
label: '字段重命名规则',
|
|
1434
|
+
tip: '每行配置一条重命名规则,将表单字段名映射到接口参数名。\n· 来源字段(表单字段名):填写表单项中 field 的值,例如 user_name\n· 目标参数名(接口参数名):接口实际接收的参数名,例如 username\n\n未在此处列出的字段,将按原名透传到请求参数中。\n不需要填写表单中所有字段,只填需要重命名的字段即可。',
|
|
1435
|
+
},
|
|
1436
|
+
name: 'fieldRenameMap',
|
|
1437
|
+
condition: (target: any) =>
|
|
1438
|
+
target.parent?.getPropValue?.('mode') === 'rename',
|
|
1439
|
+
setter: {
|
|
1440
|
+
componentName: 'ArraySetter',
|
|
1441
|
+
props: {
|
|
1442
|
+
itemSetter: {
|
|
1443
|
+
componentName: 'ObjectSetter',
|
|
1444
|
+
props: {
|
|
1445
|
+
config: {
|
|
1446
|
+
items: [
|
|
1447
|
+
{
|
|
1448
|
+
title: {
|
|
1449
|
+
label: '来源字段(表单字段名)',
|
|
1450
|
+
tip: '表单项中 field 的值,即当前使用的字段名,例如:user_name',
|
|
1451
|
+
},
|
|
1452
|
+
name: 'fromField',
|
|
1453
|
+
important: true,
|
|
1454
|
+
display: 'inline',
|
|
1455
|
+
setter: {
|
|
1456
|
+
componentName: 'StringSetter',
|
|
1457
|
+
isRequired: true,
|
|
1458
|
+
initialValue: '',
|
|
1459
|
+
},
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
title: {
|
|
1463
|
+
label: '目标参数名(接口参数名)',
|
|
1464
|
+
tip: '接口实际接收的参数名,例如:username',
|
|
1465
|
+
},
|
|
1466
|
+
name: 'toField',
|
|
1467
|
+
important: true,
|
|
1468
|
+
display: 'inline',
|
|
1469
|
+
setter: {
|
|
1470
|
+
componentName: 'StringSetter',
|
|
1471
|
+
isRequired: true,
|
|
1472
|
+
initialValue: '',
|
|
1473
|
+
},
|
|
1474
|
+
},
|
|
1475
|
+
],
|
|
1476
|
+
},
|
|
1477
|
+
},
|
|
1478
|
+
initialValue: () => ({ fromField: '', toField: '' }),
|
|
1479
|
+
},
|
|
1480
|
+
},
|
|
1481
|
+
initialValue: [],
|
|
1482
|
+
},
|
|
1483
|
+
},
|
|
1484
|
+
// ── itemList 模式:目标字段名 ──────────────────────────────
|
|
1485
|
+
{
|
|
1486
|
+
title: {
|
|
1487
|
+
label: '目标字段名(itemList 写入位置)',
|
|
1488
|
+
tip: '组装后的 [{columnName,columnValue},...] 数组写入 finalValues 的字段名,默认 itemList。\n需与数据源静态 options.params 中预设的字段名一致,提交时该值会被组装结果覆盖。\n通常保持默认值 itemList 即可。',
|
|
1489
|
+
},
|
|
1490
|
+
name: 'targetField',
|
|
1491
|
+
condition: (target: any) =>
|
|
1492
|
+
target.parent?.getPropValue?.('mode') === 'itemList',
|
|
1493
|
+
setter: {
|
|
1494
|
+
componentName: 'StringSetter',
|
|
1495
|
+
initialValue: 'itemList',
|
|
1496
|
+
},
|
|
1497
|
+
},
|
|
1498
|
+
// ── itemList 模式:字段映射列表 ────────────────────────────
|
|
1499
|
+
{
|
|
1500
|
+
title: {
|
|
1501
|
+
label: '字段映射列表',
|
|
1502
|
+
tip: '每行定义一条映射规则,决定哪些字段进入 itemList,以及每项的 columnName。\n\n· 接口字段名(columnName):dynamicFormTableRecord 表的字段标识,与后端 schema 一致。\n· 来源字段(field):从哪个表单字段取值,填写表单项的 field 名,例如 user_name。\n· 模板(template):用 {字段名} 引用并拼接多个表单字段,与 field 二选一。\n 例如:{banquet_date} {banquet_time} → "2026-03-12 18:00"(将日期和时间合并为一个值)\n\n来源字段与模板只需填一项,两者都填时 field 优先。\n未在此处列出的表单字段不会进入 itemList(也不会出现在请求参数里)。',
|
|
1503
|
+
},
|
|
1504
|
+
name: 'items',
|
|
1505
|
+
condition: (target: any) =>
|
|
1506
|
+
target.parent?.getPropValue?.('mode') === 'itemList',
|
|
1507
|
+
setter: {
|
|
1508
|
+
componentName: 'ArraySetter',
|
|
1509
|
+
props: {
|
|
1510
|
+
itemSetter: {
|
|
1511
|
+
componentName: 'ObjectSetter',
|
|
1512
|
+
props: {
|
|
1513
|
+
config: {
|
|
1514
|
+
items: [
|
|
1515
|
+
{
|
|
1516
|
+
title: {
|
|
1517
|
+
label: '接口字段名(columnName)',
|
|
1518
|
+
tip: 'dynamicFormTableRecord 中的字段标识,例如:user_name、banquet_time、guest_count',
|
|
1519
|
+
},
|
|
1520
|
+
name: 'columnName',
|
|
1521
|
+
important: true,
|
|
1522
|
+
display: 'inline',
|
|
1523
|
+
setter: {
|
|
1524
|
+
componentName: 'StringSetter',
|
|
1525
|
+
isRequired: true,
|
|
1526
|
+
initialValue: '',
|
|
1527
|
+
},
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
title: {
|
|
1531
|
+
label: '来源字段',
|
|
1532
|
+
tip: '从哪个表单字段取值,填写表单项的 field 名,例如:user_name\n与「模板」二选一,只需填一项。',
|
|
1533
|
+
},
|
|
1534
|
+
name: 'field',
|
|
1535
|
+
setter: {
|
|
1536
|
+
componentName: 'StringSetter',
|
|
1537
|
+
initialValue: '',
|
|
1538
|
+
},
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
title: {
|
|
1542
|
+
label: '模板',
|
|
1543
|
+
tip: '用 {字段名} 引用并拼接多个字段值,例如:{banquet_date} {banquet_time}\n与「来源字段」二选一,只需填一项。',
|
|
1544
|
+
},
|
|
1545
|
+
name: 'template',
|
|
1546
|
+
setter: {
|
|
1547
|
+
componentName: 'StringSetter',
|
|
1548
|
+
initialValue: '',
|
|
1549
|
+
},
|
|
1550
|
+
},
|
|
1551
|
+
],
|
|
1552
|
+
},
|
|
1553
|
+
},
|
|
1554
|
+
initialValue: () => ({ columnName: '', field: '' }),
|
|
1555
|
+
},
|
|
1556
|
+
},
|
|
1557
|
+
initialValue: [],
|
|
1558
|
+
},
|
|
1559
|
+
},
|
|
1560
|
+
],
|
|
1561
|
+
},
|
|
1562
|
+
},
|
|
1563
|
+
},
|
|
1564
|
+
},
|
|
1565
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
1398
1566
|
// 分组六:操作按钮
|
|
1399
1567
|
// ─────────────────────────────────────────────────────────────────────
|
|
1400
1568
|
{
|
|
@@ -1533,15 +1701,24 @@ const CustomFormMeta: IPublicTypeComponentMetadata = {
|
|
|
1533
1701
|
{
|
|
1534
1702
|
title: {
|
|
1535
1703
|
label: '提交数据源(Fetch)',
|
|
1536
|
-
tip: '
|
|
1704
|
+
tip: '绑定页面级 Fetch 数据源,点击提交按钮校验通过后自动调用该数据源发起请求。\n\n【配置步骤】\n1. 在页面左侧「数据源」面板新建一个 fetch 类型数据源\n · 填写接口地址(URI)、请求方式(POST/PUT)、鉴权 Headers\n · isInit 设为 false(提交时才触发,不需要页面初始化时自动加载)\n2. 在此处点击「变量」按钮,选择 this.dataSourceMap.<数据源ID>\n\n【参数说明】\n表单提交时会将所有字段值(含 computedFields / submitMapping 处理后的 itemList)\n作为覆盖参数传入 .load(values),与数据源静态 params 合并,无需手写 onSubmit。\n\n【多按钮场景】\n每个「提交表单」按钮可绑定独立的数据源,如"保存草稿"绑定草稿接口,"正式提交"绑定提交接口。\n\n仅对「提交表单」类型按钮生效。',
|
|
1537
1705
|
},
|
|
1538
|
-
name: '
|
|
1706
|
+
name: 'dataSource',
|
|
1539
1707
|
condition: (target: any) =>
|
|
1540
1708
|
target.parent?.getPropValue?.('action') === 'submit',
|
|
1541
1709
|
setter: {
|
|
1542
|
-
componentName: '
|
|
1710
|
+
componentName: 'MixedSetter',
|
|
1543
1711
|
props: {
|
|
1544
|
-
|
|
1712
|
+
setters: [
|
|
1713
|
+
{
|
|
1714
|
+
componentName: 'VariableSetter',
|
|
1715
|
+
title: '绑定数据源变量',
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
componentName: 'ExpressionSetter',
|
|
1719
|
+
title: '表达式',
|
|
1720
|
+
},
|
|
1721
|
+
],
|
|
1545
1722
|
},
|
|
1546
1723
|
},
|
|
1547
1724
|
},
|
|
@@ -900,7 +900,7 @@ var CustomFormMeta = {
|
|
|
900
900
|
getValue: function getValue(target) {
|
|
901
901
|
var _target$parent58, _target$parent58$getP, _target$parent59, _target$parent59$getP, _target$parent59$getP2;
|
|
902
902
|
var t = (_target$parent58 = target.parent) === null || _target$parent58 === void 0 ? void 0 : (_target$parent58$getP = _target$parent58.getPropValue) === null || _target$parent58$getP === void 0 ? void 0 : _target$parent58$getP.call(_target$parent58, 'componentType');
|
|
903
|
-
return ((_target$parent59 = target.parent) === null || _target$parent59 === void 0 ? void 0 : (_target$parent59$getP = _target$parent59.getPropValue) === null || _target$parent59$getP === void 0 ? void 0 : (_target$parent59$getP2 = _target$parent59$getP.call(_target$parent59, 'componentProps')) === null || _target$parent59$getP2 === void 0 ? void 0 : _target$parent59$getP2.format) || (t === 'DateTimePicker' ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD');
|
|
903
|
+
return ((_target$parent59 = target.parent) === null || _target$parent59 === void 0 ? void 0 : (_target$parent59$getP = _target$parent59.getPropValue) === null || _target$parent59$getP === void 0 ? void 0 : (_target$parent59$getP2 = _target$parent59$getP.call(_target$parent59, 'componentProps')) === null || _target$parent59$getP2 === void 0 ? void 0 : _target$parent59$getP2.format) || (t === 'DateTimePicker' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD');
|
|
904
904
|
},
|
|
905
905
|
setValue: function setValue(target, value) {
|
|
906
906
|
var _target$parent60, _target$parent60$getP, _target$parent61, _target$parent61$setP;
|
|
@@ -1766,6 +1766,187 @@ var CustomFormMeta = {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
},
|
|
1768
1768
|
// ─────────────────────────────────────────────────────────────────────
|
|
1769
|
+
// 提交参数配置
|
|
1770
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
1771
|
+
{
|
|
1772
|
+
title: {
|
|
1773
|
+
label: '提交参数配置',
|
|
1774
|
+
tip: '控制表单提交时如何将字段值构建为请求参数,支持三种模式:\n\n① 直接透传(passthrough,默认)\n字段名与接口参数名完全一致时无需配置——表单字段值直接作为请求 body,零配置即可工作。\n\n② 字段重命名(rename)\n表单字段名与接口参数名不一致时使用,按规则将指定字段重命名,其余字段仍按原名透传。\n例如:表单字段 user_name → 接口参数 username\n\n③ 动态表单格式(itemList)\n后端接口接收 itemList:[{columnName,columnValue},...] 格式时使用,适合 /dynamicFormTableRecord/ 等接口。\n例如:{user_name:"张三"} → [{columnName:"user_name",columnValue:"张三"}]'
|
|
1775
|
+
},
|
|
1776
|
+
name: 'submitMapping',
|
|
1777
|
+
setter: {
|
|
1778
|
+
componentName: 'ObjectSetter',
|
|
1779
|
+
props: {
|
|
1780
|
+
config: {
|
|
1781
|
+
items: [
|
|
1782
|
+
// ── 模式选择 ──────────────────────────────────────────────
|
|
1783
|
+
{
|
|
1784
|
+
title: {
|
|
1785
|
+
label: '参数构建模式',
|
|
1786
|
+
tip: '选择提交时参数的构建方式:\n· 直接透传:字段名与接口参数名一致,直接发送;最简单,首选。\n· 字段重命名:字段名与接口参数名不一致,在下方按需配置重命名规则即可。\n· 动态表单格式:接口接收 itemList:[{columnName,columnValue}] 格式,需完整配置字段映射列表。'
|
|
1787
|
+
},
|
|
1788
|
+
name: 'mode',
|
|
1789
|
+
setter: {
|
|
1790
|
+
componentName: 'SelectSetter',
|
|
1791
|
+
props: {
|
|
1792
|
+
options: [{
|
|
1793
|
+
label: '① 直接透传(字段名与接口参数名一致)',
|
|
1794
|
+
value: 'passthrough'
|
|
1795
|
+
}, {
|
|
1796
|
+
label: '② 字段重命名(字段名与接口参数名不一致)',
|
|
1797
|
+
value: 'rename'
|
|
1798
|
+
}, {
|
|
1799
|
+
label: '③ 动态表单格式(itemList 格式)',
|
|
1800
|
+
value: 'itemList'
|
|
1801
|
+
}]
|
|
1802
|
+
},
|
|
1803
|
+
initialValue: 'passthrough'
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
// ── rename 模式:字段重命名映射 ───────────────────────────
|
|
1807
|
+
{
|
|
1808
|
+
title: {
|
|
1809
|
+
label: '字段重命名规则',
|
|
1810
|
+
tip: '每行配置一条重命名规则,将表单字段名映射到接口参数名。\n· 来源字段(表单字段名):填写表单项中 field 的值,例如 user_name\n· 目标参数名(接口参数名):接口实际接收的参数名,例如 username\n\n未在此处列出的字段,将按原名透传到请求参数中。\n不需要填写表单中所有字段,只填需要重命名的字段即可。'
|
|
1811
|
+
},
|
|
1812
|
+
name: 'fieldRenameMap',
|
|
1813
|
+
condition: function condition(target) {
|
|
1814
|
+
var _target$parent123, _target$parent123$get;
|
|
1815
|
+
return ((_target$parent123 = target.parent) === null || _target$parent123 === void 0 ? void 0 : (_target$parent123$get = _target$parent123.getPropValue) === null || _target$parent123$get === void 0 ? void 0 : _target$parent123$get.call(_target$parent123, 'mode')) === 'rename';
|
|
1816
|
+
},
|
|
1817
|
+
setter: {
|
|
1818
|
+
componentName: 'ArraySetter',
|
|
1819
|
+
props: {
|
|
1820
|
+
itemSetter: {
|
|
1821
|
+
componentName: 'ObjectSetter',
|
|
1822
|
+
props: {
|
|
1823
|
+
config: {
|
|
1824
|
+
items: [{
|
|
1825
|
+
title: {
|
|
1826
|
+
label: '来源字段(表单字段名)',
|
|
1827
|
+
tip: '表单项中 field 的值,即当前使用的字段名,例如:user_name'
|
|
1828
|
+
},
|
|
1829
|
+
name: 'fromField',
|
|
1830
|
+
important: true,
|
|
1831
|
+
display: 'inline',
|
|
1832
|
+
setter: {
|
|
1833
|
+
componentName: 'StringSetter',
|
|
1834
|
+
isRequired: true,
|
|
1835
|
+
initialValue: ''
|
|
1836
|
+
}
|
|
1837
|
+
}, {
|
|
1838
|
+
title: {
|
|
1839
|
+
label: '目标参数名(接口参数名)',
|
|
1840
|
+
tip: '接口实际接收的参数名,例如:username'
|
|
1841
|
+
},
|
|
1842
|
+
name: 'toField',
|
|
1843
|
+
important: true,
|
|
1844
|
+
display: 'inline',
|
|
1845
|
+
setter: {
|
|
1846
|
+
componentName: 'StringSetter',
|
|
1847
|
+
isRequired: true,
|
|
1848
|
+
initialValue: ''
|
|
1849
|
+
}
|
|
1850
|
+
}]
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
initialValue: function initialValue() {
|
|
1854
|
+
return {
|
|
1855
|
+
fromField: '',
|
|
1856
|
+
toField: ''
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
initialValue: []
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
// ── itemList 模式:目标字段名 ──────────────────────────────
|
|
1865
|
+
{
|
|
1866
|
+
title: {
|
|
1867
|
+
label: '目标字段名(itemList 写入位置)',
|
|
1868
|
+
tip: '组装后的 [{columnName,columnValue},...] 数组写入 finalValues 的字段名,默认 itemList。\n需与数据源静态 options.params 中预设的字段名一致,提交时该值会被组装结果覆盖。\n通常保持默认值 itemList 即可。'
|
|
1869
|
+
},
|
|
1870
|
+
name: 'targetField',
|
|
1871
|
+
condition: function condition(target) {
|
|
1872
|
+
var _target$parent124, _target$parent124$get;
|
|
1873
|
+
return ((_target$parent124 = target.parent) === null || _target$parent124 === void 0 ? void 0 : (_target$parent124$get = _target$parent124.getPropValue) === null || _target$parent124$get === void 0 ? void 0 : _target$parent124$get.call(_target$parent124, 'mode')) === 'itemList';
|
|
1874
|
+
},
|
|
1875
|
+
setter: {
|
|
1876
|
+
componentName: 'StringSetter',
|
|
1877
|
+
initialValue: 'itemList'
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
// ── itemList 模式:字段映射列表 ────────────────────────────
|
|
1881
|
+
{
|
|
1882
|
+
title: {
|
|
1883
|
+
label: '字段映射列表',
|
|
1884
|
+
tip: '每行定义一条映射规则,决定哪些字段进入 itemList,以及每项的 columnName。\n\n· 接口字段名(columnName):dynamicFormTableRecord 表的字段标识,与后端 schema 一致。\n· 来源字段(field):从哪个表单字段取值,填写表单项的 field 名,例如 user_name。\n· 模板(template):用 {字段名} 引用并拼接多个表单字段,与 field 二选一。\n 例如:{banquet_date} {banquet_time} → "2026-03-12 18:00"(将日期和时间合并为一个值)\n\n来源字段与模板只需填一项,两者都填时 field 优先。\n未在此处列出的表单字段不会进入 itemList(也不会出现在请求参数里)。'
|
|
1885
|
+
},
|
|
1886
|
+
name: 'items',
|
|
1887
|
+
condition: function condition(target) {
|
|
1888
|
+
var _target$parent125, _target$parent125$get;
|
|
1889
|
+
return ((_target$parent125 = target.parent) === null || _target$parent125 === void 0 ? void 0 : (_target$parent125$get = _target$parent125.getPropValue) === null || _target$parent125$get === void 0 ? void 0 : _target$parent125$get.call(_target$parent125, 'mode')) === 'itemList';
|
|
1890
|
+
},
|
|
1891
|
+
setter: {
|
|
1892
|
+
componentName: 'ArraySetter',
|
|
1893
|
+
props: {
|
|
1894
|
+
itemSetter: {
|
|
1895
|
+
componentName: 'ObjectSetter',
|
|
1896
|
+
props: {
|
|
1897
|
+
config: {
|
|
1898
|
+
items: [{
|
|
1899
|
+
title: {
|
|
1900
|
+
label: '接口字段名(columnName)',
|
|
1901
|
+
tip: 'dynamicFormTableRecord 中的字段标识,例如:user_name、banquet_time、guest_count'
|
|
1902
|
+
},
|
|
1903
|
+
name: 'columnName',
|
|
1904
|
+
important: true,
|
|
1905
|
+
display: 'inline',
|
|
1906
|
+
setter: {
|
|
1907
|
+
componentName: 'StringSetter',
|
|
1908
|
+
isRequired: true,
|
|
1909
|
+
initialValue: ''
|
|
1910
|
+
}
|
|
1911
|
+
}, {
|
|
1912
|
+
title: {
|
|
1913
|
+
label: '来源字段',
|
|
1914
|
+
tip: '从哪个表单字段取值,填写表单项的 field 名,例如:user_name\n与「模板」二选一,只需填一项。'
|
|
1915
|
+
},
|
|
1916
|
+
name: 'field',
|
|
1917
|
+
setter: {
|
|
1918
|
+
componentName: 'StringSetter',
|
|
1919
|
+
initialValue: ''
|
|
1920
|
+
}
|
|
1921
|
+
}, {
|
|
1922
|
+
title: {
|
|
1923
|
+
label: '模板',
|
|
1924
|
+
tip: '用 {字段名} 引用并拼接多个字段值,例如:{banquet_date} {banquet_time}\n与「来源字段」二选一,只需填一项。'
|
|
1925
|
+
},
|
|
1926
|
+
name: 'template',
|
|
1927
|
+
setter: {
|
|
1928
|
+
componentName: 'StringSetter',
|
|
1929
|
+
initialValue: ''
|
|
1930
|
+
}
|
|
1931
|
+
}]
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
initialValue: function initialValue() {
|
|
1935
|
+
return {
|
|
1936
|
+
columnName: '',
|
|
1937
|
+
field: ''
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1942
|
+
initialValue: []
|
|
1943
|
+
}
|
|
1944
|
+
}]
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
// ─────────────────────────────────────────────────────────────────────
|
|
1769
1950
|
// 分组六:操作按钮
|
|
1770
1951
|
// ─────────────────────────────────────────────────────────────────────
|
|
1771
1952
|
{
|
|
@@ -1855,28 +2036,28 @@ var CustomFormMeta = {
|
|
|
1855
2036
|
},
|
|
1856
2037
|
extraProps: {
|
|
1857
2038
|
setValue: function setValue(target, value) {
|
|
1858
|
-
var _target$
|
|
2039
|
+
var _target$parent126, _target$parent126$get, _target$parent128, _target$parent128$get, _target$parent130, _target$parent130$set;
|
|
1859
2040
|
// 根据操作类型自动填充默认文字(仅当文字为空时)
|
|
1860
2041
|
var textMap = {
|
|
1861
2042
|
submit: '立即预订',
|
|
1862
2043
|
reset: '重置',
|
|
1863
2044
|
custom: '按钮'
|
|
1864
2045
|
};
|
|
1865
|
-
if (!((_target$
|
|
1866
|
-
var _target$
|
|
1867
|
-
(_target$
|
|
2046
|
+
if (!((_target$parent126 = target.parent) !== null && _target$parent126 !== void 0 && (_target$parent126$get = _target$parent126.getPropValue) !== null && _target$parent126$get !== void 0 && _target$parent126$get.call(_target$parent126, 'text'))) {
|
|
2047
|
+
var _target$parent127, _target$parent127$set;
|
|
2048
|
+
(_target$parent127 = target.parent) === null || _target$parent127 === void 0 ? void 0 : (_target$parent127$set = _target$parent127.setPropValue) === null || _target$parent127$set === void 0 ? void 0 : _target$parent127$set.call(_target$parent127, 'text', textMap[value] || '按钮');
|
|
1868
2049
|
}
|
|
1869
2050
|
// 根据操作类型自动设置默认样式
|
|
1870
|
-
if (!((_target$
|
|
1871
|
-
var _target$
|
|
2051
|
+
if (!((_target$parent128 = target.parent) !== null && _target$parent128 !== void 0 && (_target$parent128$get = _target$parent128.getPropValue) !== null && _target$parent128$get !== void 0 && _target$parent128$get.call(_target$parent128, 'type'))) {
|
|
2052
|
+
var _target$parent129, _target$parent129$set;
|
|
1872
2053
|
var typeMap = {
|
|
1873
2054
|
submit: 'primary',
|
|
1874
2055
|
reset: 'normal',
|
|
1875
2056
|
custom: 'normal'
|
|
1876
2057
|
};
|
|
1877
|
-
(_target$
|
|
2058
|
+
(_target$parent129 = target.parent) === null || _target$parent129 === void 0 ? void 0 : (_target$parent129$set = _target$parent129.setPropValue) === null || _target$parent129$set === void 0 ? void 0 : _target$parent129$set.call(_target$parent129, 'type', typeMap[value] || 'normal');
|
|
1878
2059
|
}
|
|
1879
|
-
(_target$
|
|
2060
|
+
(_target$parent130 = target.parent) === null || _target$parent130 === void 0 ? void 0 : (_target$parent130$set = _target$parent130.setPropValue) === null || _target$parent130$set === void 0 ? void 0 : _target$parent130$set.call(_target$parent130, 'action', value);
|
|
1880
2061
|
}
|
|
1881
2062
|
}
|
|
1882
2063
|
},
|
|
@@ -1912,8 +2093,8 @@ var CustomFormMeta = {
|
|
|
1912
2093
|
},
|
|
1913
2094
|
name: 'submitValidate',
|
|
1914
2095
|
condition: function condition(target) {
|
|
1915
|
-
var _target$
|
|
1916
|
-
return ((_target$
|
|
2096
|
+
var _target$parent131, _target$parent131$get;
|
|
2097
|
+
return ((_target$parent131 = target.parent) === null || _target$parent131 === void 0 ? void 0 : (_target$parent131$get = _target$parent131.getPropValue) === null || _target$parent131$get === void 0 ? void 0 : _target$parent131$get.call(_target$parent131, 'action')) === 'submit';
|
|
1917
2098
|
},
|
|
1918
2099
|
setter: {
|
|
1919
2100
|
componentName: 'BoolSetter',
|
|
@@ -1924,17 +2105,23 @@ var CustomFormMeta = {
|
|
|
1924
2105
|
{
|
|
1925
2106
|
title: {
|
|
1926
2107
|
label: '提交数据源(Fetch)',
|
|
1927
|
-
tip: '
|
|
2108
|
+
tip: '绑定页面级 Fetch 数据源,点击提交按钮校验通过后自动调用该数据源发起请求。\n\n【配置步骤】\n1. 在页面左侧「数据源」面板新建一个 fetch 类型数据源\n · 填写接口地址(URI)、请求方式(POST/PUT)、鉴权 Headers\n · isInit 设为 false(提交时才触发,不需要页面初始化时自动加载)\n2. 在此处点击「变量」按钮,选择 this.dataSourceMap.<数据源ID>\n\n【参数说明】\n表单提交时会将所有字段值(含 computedFields / submitMapping 处理后的 itemList)\n作为覆盖参数传入 .load(values),与数据源静态 params 合并,无需手写 onSubmit。\n\n【多按钮场景】\n每个「提交表单」按钮可绑定独立的数据源,如"保存草稿"绑定草稿接口,"正式提交"绑定提交接口。\n\n仅对「提交表单」类型按钮生效。'
|
|
1928
2109
|
},
|
|
1929
|
-
name: '
|
|
2110
|
+
name: 'dataSource',
|
|
1930
2111
|
condition: function condition(target) {
|
|
1931
|
-
var _target$
|
|
1932
|
-
return ((_target$
|
|
2112
|
+
var _target$parent132, _target$parent132$get;
|
|
2113
|
+
return ((_target$parent132 = target.parent) === null || _target$parent132 === void 0 ? void 0 : (_target$parent132$get = _target$parent132.getPropValue) === null || _target$parent132$get === void 0 ? void 0 : _target$parent132$get.call(_target$parent132, 'action')) === 'submit';
|
|
1933
2114
|
},
|
|
1934
2115
|
setter: {
|
|
1935
|
-
componentName: '
|
|
2116
|
+
componentName: 'MixedSetter',
|
|
1936
2117
|
props: {
|
|
1937
|
-
|
|
2118
|
+
setters: [{
|
|
2119
|
+
componentName: 'VariableSetter',
|
|
2120
|
+
title: '绑定数据源变量'
|
|
2121
|
+
}, {
|
|
2122
|
+
componentName: 'ExpressionSetter',
|
|
2123
|
+
title: '表达式'
|
|
2124
|
+
}]
|
|
1938
2125
|
}
|
|
1939
2126
|
}
|
|
1940
2127
|
},
|
|
@@ -1946,8 +2133,8 @@ var CustomFormMeta = {
|
|
|
1946
2133
|
},
|
|
1947
2134
|
name: 'onClick',
|
|
1948
2135
|
condition: function condition(target) {
|
|
1949
|
-
var _target$
|
|
1950
|
-
return ((_target$
|
|
2136
|
+
var _target$parent133, _target$parent133$get;
|
|
2137
|
+
return ((_target$parent133 = target.parent) === null || _target$parent133 === void 0 ? void 0 : (_target$parent133$get = _target$parent133.getPropValue) === null || _target$parent133$get === void 0 ? void 0 : _target$parent133$get.call(_target$parent133, 'action')) === 'custom';
|
|
1951
2138
|
},
|
|
1952
2139
|
setter: {
|
|
1953
2140
|
componentName: 'FunctionSetter'
|
package/lowcode_es/meta.js
CHANGED
|
@@ -117,7 +117,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
117
117
|
packageName = '@dckj-npm/dc-material';
|
|
118
118
|
}
|
|
119
119
|
if (version === void 0) {
|
|
120
|
-
version = '0.1.
|
|
120
|
+
version = '0.1.379';
|
|
121
121
|
}
|
|
122
122
|
if (basicLibraryVersion === void 0) {
|
|
123
123
|
basicLibraryVersion = {
|