@wibetter/json-editor 5.1.8 → 5.1.10

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/lib/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.8
2
+ * @wibetter/json-editor v5.1.10
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Sun Jan 12 2025 20:46:54 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 16 2025 14:24:23 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
@@ -1176,6 +1176,9 @@
1176
1176
  .select-box .ant-select-single {
1177
1177
  min-width: 150px;
1178
1178
  }
1179
+ .select-box .ant-select-selection-item {
1180
+ max-width: 120px;
1181
+ }
1179
1182
  .select-box .ant-select-selection-item-content {
1180
1183
  max-width: 100px;
1181
1184
  }
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.8
2
+ * @wibetter/json-editor v5.1.10
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Sun Jan 12 2025 20:46:54 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 16 2025 14:24:23 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -478,7 +478,7 @@ var MappingRender = function MappingRender(props) {
478
478
  var parentKeyRoute = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.getParentKeyRoute)(keyRoute);
479
479
  var parentData = parentKeyRoute ? getJSONDataByKeyRoute(parentKeyRoute) || {} : {}; // 获取当前父级数据域
480
480
  var curData = Object.assign({}, JSONEditorObj, parentData);
481
- if ((0,$utils_index__WEBPACK_IMPORTED_MODULE_3__.hasProperties)(targetJsonSchema.onShow) && targetJsonSchema.onShow !== '' && ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
481
+ if ((0,$utils_index__WEBPACK_IMPORTED_MODULE_3__.hasProperties)(targetJsonSchema.onShow) && targetJsonSchema.onShow !== '' && (targetJsonSchema.onShow === 'false' || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
482
482
  return;
483
483
  }
484
484
  var curType = targetJsonSchema.typeOn ? (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.typeOn, curData) : targetJsonSchema.type;
@@ -503,6 +503,8 @@ var MappingRender = function MappingRender(props) {
503
503
  key: curNodeKey
504
504
  }));
505
505
  case 'dynamic-config':
506
+ case 'dynamic-object':
507
+ case 'dynamic-array':
506
508
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement($renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_29__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, newProps, {
507
509
  key: curNodeKey
508
510
  }));
@@ -787,7 +789,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
787
789
  for (var index = 0, size = arrItemKeys.length; index < size; index++) {
788
790
  var itemVal = arrItem[arrItemKeys[index]];
789
791
  // 只有不为空时才赋值(忽略URL类型数值)
790
- if (itemVal && ((0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isNumber)(itemVal) || (0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isString)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isURL)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isColor)(itemVal))) {
792
+ if (itemVal && (0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isString)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isURL)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isColor)(itemVal)) {
791
793
  return itemVal;
792
794
  }
793
795
  }
@@ -880,7 +882,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
880
882
  var showCodeViewBtn = (_targetJsonSchema$sho = targetJsonSchema.showCodeViewBtn) != null ? _targetJsonSchema$sho : true;
881
883
  // 从jsonData中获取对应的数值
882
884
  var curJsonData = getJSONDataByKeyRoute(keyRoute); // json内容数据
883
- if (!curJsonData || curJsonData.length === 0) {
885
+ if (!curJsonData || curJsonData.length === 0 || !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_11__.isArray)(curJsonData)) {
884
886
  // 添加一个默认的数组数据
885
887
  curJsonData = [{}];
886
888
  }
@@ -4000,14 +4002,16 @@ var InputImageSchema = /*#__PURE__*/function (_React$PureComponent) {
4000
4002
  name: 'file',
4001
4003
  // targetJsonSchema.name || jsonKey || 'imgFile',
4002
4004
  action: targetJsonSchema.uploadAction || options.uploadAction,
4003
- accept: targetJsonSchema.accept || options.uploadAccept,
4005
+ accept: targetJsonSchema.accept || options.uploadAccept || '.jpeg,.jpg,.png',
4004
4006
  // multiple: targetJsonSchema.multiple ?? false,
4005
4007
  maxCount: targetJsonSchema.multiple ? targetJsonSchema.maxCount || 1 : 1,
4006
4008
  defaultFileList: defaultFileList,
4007
4009
  // showUploadList: false,
4008
4010
  listType: (_targetJsonSchema$lis = targetJsonSchema.listType) != null ? _targetJsonSchema$lis : 'picture-card',
4011
+ withCredentials: true,
4012
+ method: targetJsonSchema.uploadMethod || options.uploadMethod || 'POST',
4009
4013
  headers: {
4010
- authorization: targetJsonSchema.authorization || 'authorization-content'
4014
+ // authorization: targetJsonSchema.authorization || 'authorization-content', // 会影响默认的图片上传
4011
4015
  },
4012
4016
  onChange: this.handleImageChange,
4013
4017
  onRemove: this.handleDeleteChange
@@ -7531,6 +7535,11 @@ var JSONEditorStore = (_dec = mobx__WEBPACK_IMPORTED_MODULE_4__.action.bound, _d
7531
7535
  _proto.addArrayItem = function addArrayItem(keyRoute, curArrIndex) {
7532
7536
  // 1. 获取数组数据对象
7533
7537
  var arrJsonData = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_6__.getJsonDataByKeyRoute)(keyRoute, this.jsonData);
7538
+ /*
7539
+ if (!isArray(arrJsonData)) {
7540
+ arrJsonData = [];
7541
+ }
7542
+ */
7534
7543
  // const _arrJsonData = toJS(arrJsonData);
7535
7544
  if ((0,$utils_typeof__WEBPACK_IMPORTED_MODULE_8__.isArray)(arrJsonData)) {
7536
7545
  // 2. 获取数组的第一个数据项
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-editor",
3
- "version": "5.1.8",
3
+ "version": "5.1.10",
4
4
  "description": "JSON数据可视化/JSONEditor, 可视化界面编辑json数据",
5
5
  "keywords": [
6
6
  "json",
package/sdk/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.8
2
+ * @wibetter/json-editor v5.1.10
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Sun Jan 12 2025 20:46:39 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 16 2025 14:24:02 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
@@ -1188,6 +1188,9 @@
1188
1188
  .select-box .ant-select-single {
1189
1189
  min-width: 150px;
1190
1190
  }
1191
+ .select-box .ant-select-selection-item {
1192
+ max-width: 120px;
1193
+ }
1191
1194
  .select-box .ant-select-selection-item-content {
1192
1195
  max-width: 100px;
1193
1196
  }
package/sdk/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.8
2
+ * @wibetter/json-editor v5.1.10
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Sun Jan 12 2025 20:46:39 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 16 2025 14:24:02 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -66928,7 +66928,7 @@ var MappingRender = function MappingRender(props) {
66928
66928
  var parentKeyRoute = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.getParentKeyRoute)(keyRoute);
66929
66929
  var parentData = parentKeyRoute ? getJSONDataByKeyRoute(parentKeyRoute) || {} : {}; // 获取当前父级数据域
66930
66930
  var curData = Object.assign({}, JSONEditorObj, parentData);
66931
- if ((0,$utils_index__WEBPACK_IMPORTED_MODULE_3__.hasProperties)(targetJsonSchema.onShow) && targetJsonSchema.onShow !== '' && ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
66931
+ if ((0,$utils_index__WEBPACK_IMPORTED_MODULE_3__.hasProperties)(targetJsonSchema.onShow) && targetJsonSchema.onShow !== '' && (targetJsonSchema.onShow === 'false' || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
66932
66932
  return;
66933
66933
  }
66934
66934
  var curType = targetJsonSchema.typeOn ? (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.typeOn, curData) : targetJsonSchema.type;
@@ -66953,6 +66953,8 @@ var MappingRender = function MappingRender(props) {
66953
66953
  key: curNodeKey
66954
66954
  }));
66955
66955
  case 'dynamic-config':
66956
+ case 'dynamic-object':
66957
+ case 'dynamic-array':
66956
66958
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement($renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_29__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, newProps, {
66957
66959
  key: curNodeKey
66958
66960
  }));
@@ -67238,7 +67240,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
67238
67240
  for (var index = 0, size = arrItemKeys.length; index < size; index++) {
67239
67241
  var itemVal = arrItem[arrItemKeys[index]];
67240
67242
  // 只有不为空时才赋值(忽略URL类型数值)
67241
- if (itemVal && ((0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isNumber)(itemVal) || (0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isString)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isURL)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isColor)(itemVal))) {
67243
+ if (itemVal && (0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isString)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isURL)(itemVal) && !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isColor)(itemVal)) {
67242
67244
  return itemVal;
67243
67245
  }
67244
67246
  }
@@ -67331,7 +67333,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
67331
67333
  var showCodeViewBtn = (_targetJsonSchema$sho = targetJsonSchema.showCodeViewBtn) != null ? _targetJsonSchema$sho : true;
67332
67334
  // 从jsonData中获取对应的数值
67333
67335
  var curJsonData = getJSONDataByKeyRoute(keyRoute); // json内容数据
67334
- if (!curJsonData || curJsonData.length === 0) {
67336
+ if (!curJsonData || curJsonData.length === 0 || !(0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isArray)(curJsonData)) {
67335
67337
  // 添加一个默认的数组数据
67336
67338
  curJsonData = [{}];
67337
67339
  }
@@ -70385,14 +70387,16 @@ var InputImageSchema = /*#__PURE__*/function (_React$PureComponent) {
70385
70387
  name: 'file',
70386
70388
  // targetJsonSchema.name || jsonKey || 'imgFile',
70387
70389
  action: targetJsonSchema.uploadAction || options.uploadAction,
70388
- accept: targetJsonSchema.accept || options.uploadAccept,
70390
+ accept: targetJsonSchema.accept || options.uploadAccept || '.jpeg,.jpg,.png',
70389
70391
  // multiple: targetJsonSchema.multiple ?? false,
70390
70392
  maxCount: targetJsonSchema.multiple ? targetJsonSchema.maxCount || 1 : 1,
70391
70393
  defaultFileList: defaultFileList,
70392
70394
  // showUploadList: false,
70393
70395
  listType: (_targetJsonSchema$lis = targetJsonSchema.listType) != null ? _targetJsonSchema$lis : 'picture-card',
70396
+ withCredentials: true,
70397
+ method: targetJsonSchema.uploadMethod || options.uploadMethod || 'POST',
70394
70398
  headers: {
70395
- authorization: targetJsonSchema.authorization || 'authorization-content'
70399
+ // authorization: targetJsonSchema.authorization || 'authorization-content', // 会影响默认的图片上传
70396
70400
  },
70397
70401
  onChange: this.handleImageChange,
70398
70402
  onRemove: this.handleDeleteChange
@@ -73834,6 +73838,11 @@ var JSONEditorStore = (_dec = mobx__WEBPACK_IMPORTED_MODULE_4__.action.bound, _d
73834
73838
  _proto.addArrayItem = function addArrayItem(keyRoute, curArrIndex) {
73835
73839
  // 1. 获取数组数据对象
73836
73840
  var arrJsonData = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_5__.getJsonDataByKeyRoute)(keyRoute, this.jsonData);
73841
+ /*
73842
+ if (!isArray(arrJsonData)) {
73843
+ arrJsonData = [];
73844
+ }
73845
+ */
73837
73846
  // const _arrJsonData = toJS(arrJsonData);
73838
73847
  if ((0,$utils_typeof__WEBPACK_IMPORTED_MODULE_7__.isArray)(arrJsonData)) {
73839
73848
  // 2. 获取数组的第一个数据项
@@ -269406,7 +269415,7 @@ var initDynamicConfig = {
269406
269415
  ],
269407
269416
  default: 'string',
269408
269417
  isConditionProp: true,
269409
- description: '',
269418
+ description: '在MP后台或资源中心配置时的交互方式,推荐使用"选择"',
269410
269419
  onShow: 'type === "ContentStaticConfig" || type === "ResourceCenter"',
269411
269420
  },
269412
269421
  range: {
@@ -269423,6 +269432,256 @@ var initDynamicConfig = {
269423
269432
  showCodeViewBtn: false,
269424
269433
  };
269425
269434
 
269435
+ /** dynamic-object: 动态对象,支持在json-editor 中动态添加属性。
269436
+ * 【字段属性说明】
269437
+ * title:字段项的label值
269438
+ * properties:存放所有的子字段数据内容
269439
+ * type:用于标识字段项的展示类型(input、date、data-time、url、textarea 等)
269440
+ * readOnly:字段项可设置是否可编辑
269441
+ * propertyOrder:按序存放所有子字段的key值(排序功能)
269442
+ * */
269443
+ var initDynamicObject = {
269444
+ type: 'dynamic-object',
269445
+ title: '动态配置',
269446
+ description: '',
269447
+ isContainer: false,
269448
+ properties: {
269449
+ type: {
269450
+ type: 'select',
269451
+ title: '数据来源',
269452
+ options: [
269453
+ {
269454
+ label: '模板直接设置',
269455
+ value: 'DevDefaults',
269456
+ },
269457
+ {
269458
+ label: 'mp后台配置',
269459
+ value: 'ContentStaticConfig',
269460
+ },
269461
+ {
269462
+ label: '内容Meta数据',
269463
+ value: 'Content',
269464
+ },
269465
+ {
269466
+ label: '全局配置数据',
269467
+ value: 'RuntimeConst',
269468
+ },
269469
+ {
269470
+ label: '资源中心配置',
269471
+ value: 'ResourceCenter',
269472
+ },
269473
+ ],
269474
+ default: 'DevDefaults',
269475
+ isConditionProp: true,
269476
+ description:
269477
+ '目前支持的数据来源包括: 1)模版直接设置: 在模版配置直接生效,支持直接输入或图片上传。 2)mp后台配置: 选择mp后台配置后,属性会出现在mp后台中,支持属性描述的输入。 3)内容meta数据: 支持内容meta数据的获取,页面meta数据。 4)全局配置数据: 目前支持的全局配置包括:全局Tab配置及主题包配置。相关属性会挂载至:window.globalConst',
269478
+ },
269479
+ value: {
269480
+ title: '数据值',
269481
+ type: 'input',
269482
+ default: '',
269483
+ description: '',
269484
+ placeholder: '',
269485
+ onShow: 'type === "Content" || type === "RuntimeConst"',
269486
+ },
269487
+ description: {
269488
+ title: '自定义配置名称',
269489
+ type: 'input',
269490
+ default: '主题包配置',
269491
+ description: '',
269492
+ placeholder: '',
269493
+ onShow: 'type === "ContentStaticConfig" || type === "ResourceCenter"',
269494
+ },
269495
+ attrs: {
269496
+ type: 'array',
269497
+ title: '属性列表',
269498
+ description: 'Tab需要配置的属性',
269499
+ items: {
269500
+ type: 'object',
269501
+ title: '数组项',
269502
+ description: '',
269503
+ properties: {
269504
+ attr: {
269505
+ type: 'input',
269506
+ title: '属性Key',
269507
+ default: '',
269508
+ description: '',
269509
+ placeholder: '',
269510
+ },
269511
+ description: {
269512
+ title: '描述',
269513
+ type: 'input',
269514
+ default: '',
269515
+ description: '',
269516
+ placeholder: '',
269517
+ },
269518
+ value: {
269519
+ title: '数值',
269520
+ typeOn:
269521
+ "type === 'image' ? 'input-image' : type === 'number' ? 'number' : 'input'",
269522
+ default: '',
269523
+ description: '',
269524
+ placeholder: '',
269525
+ },
269526
+ type: {
269527
+ type: 'select',
269528
+ title: '属性类型',
269529
+ options: [
269530
+ {
269531
+ label: '图片类型',
269532
+ value: 'image',
269533
+ },
269534
+ {
269535
+ label: '字符串',
269536
+ value: 'string',
269537
+ },
269538
+ {
269539
+ label: '数字',
269540
+ value: 'number',
269541
+ },
269542
+ ],
269543
+ default: 'string',
269544
+ description: '',
269545
+ },
269546
+ },
269547
+ propertyOrder: ['attr', 'description', 'type', 'value'],
269548
+ },
269549
+ 'minimum-child': 1,
269550
+ showCodeViewBtn: false,
269551
+ onShow:
269552
+ 'type === "DevDefaults" || type === "ContentStaticConfig" || type === "ResourceCenter"',
269553
+ },
269554
+ },
269555
+ propertyOrder: ['type', 'description', 'attrs', 'value'],
269556
+ showCodeViewBtn: false,
269557
+ showKey: true,
269558
+ };
269559
+
269560
+ /** dynamic-array: 动态数组,其对象数值支持在json-editor 中动态添加子属性。
269561
+ * 【字段属性说明】
269562
+ * title:字段项的label值
269563
+ * properties:存放所有的子字段数据内容
269564
+ * type:用于标识字段项的展示类型(input、date、data-time、url、textarea 等)
269565
+ * readOnly:字段项可设置是否可编辑
269566
+ * propertyOrder:按序存放所有子字段的key值(排序功能)
269567
+ * */
269568
+ var initDynamicArray = {
269569
+ type: 'dynamic-array',
269570
+ title: '动态数组',
269571
+ description: '',
269572
+ isContainer: false,
269573
+ properties: {
269574
+ type: {
269575
+ type: 'select',
269576
+ title: '数据来源',
269577
+ options: [
269578
+ {
269579
+ label: '模板直接设置',
269580
+ value: 'DevDefaults',
269581
+ },
269582
+ {
269583
+ label: 'mp后台配置',
269584
+ value: 'ContentStaticConfig',
269585
+ },
269586
+ {
269587
+ label: '资源中心配置',
269588
+ value: 'ResourceCenter',
269589
+ },
269590
+ ],
269591
+ default: 'DevDefaults',
269592
+ isConditionProp: true,
269593
+ description:
269594
+ '目前支持的数据来源包括: 1)模版直接设置:在模版配置直接生效,支持直接输入或图片上传。 2)mp后台配置:选择mp后台配置后,属性会出现在mp后台中,支持属性描述的输入。 3)内容meta数据:支持内容meta数据的获取,页面meta数据。 4)全局配置数据:目前支持的全局配置包括:全局Tab配置及主题包配置。相关属性会挂载至:window.globalConst',
269595
+ },
269596
+ description: {
269597
+ title: '自定义配置名称',
269598
+ type: 'input',
269599
+ default: 'Tab全局配置',
269600
+ description: '',
269601
+ placeholder: '',
269602
+ onShow: 'type === "ContentStaticConfig" || type === "ResourceCenter"',
269603
+ },
269604
+ tabNums: {
269605
+ title: 'Tab配置数',
269606
+ type: 'number',
269607
+ default: 1,
269608
+ description: '需要配置的Tab数量',
269609
+ placeholder: '',
269610
+ onShow: "type === 'ContentStaticConfig' || type === 'ResourceCenter'",
269611
+ },
269612
+ attrs: {
269613
+ type: 'array',
269614
+ title: 'Tab属性',
269615
+ description: 'Tab需要配置的属性',
269616
+ items: {
269617
+ type: 'object',
269618
+ title: '数组项',
269619
+ description: '',
269620
+ properties: {
269621
+ attr: {
269622
+ type: 'input',
269623
+ title: '属性Key',
269624
+ default: '',
269625
+ description: '',
269626
+ placeholder: '',
269627
+ },
269628
+ description: {
269629
+ title: '描述',
269630
+ type: 'input',
269631
+ default: '',
269632
+ description: '',
269633
+ placeholder: '',
269634
+ },
269635
+ },
269636
+ propertyOrder: ['attr', 'description'],
269637
+ },
269638
+ 'minimum-child': 1,
269639
+ onShow: "type === 'ContentStaticConfig' || type === 'ResourceCenter'",
269640
+ showCodeViewBtn: false,
269641
+ },
269642
+ value: {
269643
+ type: 'array',
269644
+ title: 'Tab配置',
269645
+ description: '',
269646
+ items: {
269647
+ type: 'object',
269648
+ title: '数组项',
269649
+ description: '',
269650
+ properties: {
269651
+ title: {
269652
+ type: 'input',
269653
+ title: '名称',
269654
+ default: '',
269655
+ description: '',
269656
+ placeholder: '',
269657
+ },
269658
+ id: {
269659
+ title: 'id',
269660
+ type: 'input',
269661
+ default: '',
269662
+ description: '',
269663
+ placeholder: '',
269664
+ },
269665
+ value: {
269666
+ title: '数值',
269667
+ type: 'input',
269668
+ default: '',
269669
+ description: '',
269670
+ placeholder: '',
269671
+ },
269672
+ },
269673
+ propertyOrder: ['title', 'value', 'id'],
269674
+ },
269675
+ 'minimum-child': 1,
269676
+ onShow: "type === 'DevDefaults'",
269677
+ showCodeViewBtn: false,
269678
+ },
269679
+ },
269680
+ propertyOrder: ['type', 'value', 'description', 'tabNums', 'attrs'],
269681
+ showCodeViewBtn: false,
269682
+ showKey: true,
269683
+ };
269684
+
269426
269685
  var initSohuSourceData = {
269427
269686
  type: 'sohu-source',
269428
269687
  title: '组件动态数据',
@@ -269697,7 +269956,7 @@ var initSohuSourceData = {
269697
269956
  default: 1,
269698
269957
  minimum: 0,
269699
269958
  maximum: 1000,
269700
- description: '',
269959
+ description: '该位置区块需要的内容条数',
269701
269960
  },
269702
269961
  TITLE: {
269703
269962
  title: '标题',
@@ -270457,6 +270716,8 @@ var TypeDataList = {
270457
270716
  datasource: initDataSourceData,
270458
270717
  event: initEventData,
270459
270718
  'dynamic-config': initDynamicConfig,
270719
+ 'dynamic-object': initDynamicObject,
270720
+ 'dynamic-array': initDynamicArray,
270460
270721
  'sohu-source': initSohuSourceData,
270461
270722
  'sohu-event': initSohuEventConfig,
270462
270723
  'sohu-ad': initAdConfigSchema,
@@ -275531,6 +275792,8 @@ var valExpectType =
275531
275792
  (_valExpectType.time = 'string'),
275532
275793
  (_valExpectType.url = 'string'),
275533
275794
  (_valExpectType['dynamic-config'] = 'object'),
275795
+ (_valExpectType['dynamic-object'] = 'object'),
275796
+ (_valExpectType['dynamic-array'] = 'object'),
275534
275797
  (_valExpectType['sohu-source'] = 'object'),
275535
275798
  (_valExpectType['sohu-event'] = 'object'),
275536
275799
  _valExpectType);