@wibetter/json-editor 5.1.10 → 5.1.12
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 +2 -2
- package/lib/index.js +17 -15
- package/package.json +1 -1
- package/sdk/index.css +2 -2
- package/sdk/index.js +24 -35
package/lib/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:17 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:17 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -1678,7 +1678,7 @@ var CascaderSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
1678
1678
|
},
|
|
1679
1679
|
options: options,
|
|
1680
1680
|
onChange: this.handleValueChange,
|
|
1681
|
-
defaultValue: curJsonData
|
|
1681
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
1682
1682
|
disabled: targetJsonSchema.readOnly,
|
|
1683
1683
|
allowClear: (_targetJsonSchema$all = targetJsonSchema.allowClear) != null ? _targetJsonSchema$all : true,
|
|
1684
1684
|
multiple: (_targetJsonSchema$mul = targetJsonSchema.multiple) != null ? _targetJsonSchema$mul : false
|
|
@@ -1820,7 +1820,7 @@ var CheckboxSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
1820
1820
|
display: 'inline-block'
|
|
1821
1821
|
},
|
|
1822
1822
|
onChange: this.handleValueChange,
|
|
1823
|
-
defaultValue: curJsonData
|
|
1823
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
1824
1824
|
disabled: targetJsonSchema.readOnly
|
|
1825
1825
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
1826
1826
|
var optionLabel = item.label || item.name;
|
|
@@ -2185,7 +2185,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2185
2185
|
var SketchPickerContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_color__WEBPACK_IMPORTED_MODULE_6__.SketchPicker, {
|
|
2186
2186
|
className: "color-sketch-picker",
|
|
2187
2187
|
key: nodeKey + "-SketchPicker",
|
|
2188
|
-
color: curJsonData
|
|
2188
|
+
color: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
2189
2189
|
onChange: this.handleValueChange
|
|
2190
2190
|
});
|
|
2191
2191
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
@@ -2226,7 +2226,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2226
2226
|
}, readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
2227
2227
|
className: "ant-input color-btn",
|
|
2228
2228
|
style: {
|
|
2229
|
-
backgroundColor: curJsonData
|
|
2229
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
2230
2230
|
}
|
|
2231
2231
|
}), !readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__.Popover, {
|
|
2232
2232
|
content: SketchPickerContent,
|
|
@@ -2235,7 +2235,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2235
2235
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
2236
2236
|
className: "ant-input color-btn",
|
|
2237
2237
|
style: {
|
|
2238
|
-
backgroundColor: curJsonData
|
|
2238
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
2239
2239
|
}
|
|
2240
2240
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_5__.Tooltip, {
|
|
2241
2241
|
title: "\u70B9\u51FB\u79FB\u9664\u5F53\u524D\u989C\u8272\u503C",
|
|
@@ -2599,7 +2599,7 @@ var DateTimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
2599
2599
|
var timeFormat = DateTypeList[curType] || DateTypeList[0];
|
|
2600
2600
|
// 从jsonData中获取对应的数值
|
|
2601
2601
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
2602
|
-
var defaultTime = curJsonData
|
|
2602
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
2603
2603
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.isNeedTwoColWarpStyle)(curType); // 是否需要设置成两栏布局
|
|
2604
2604
|
|
|
2605
2605
|
var style = targetJsonSchema.style ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(targetJsonSchema.style)) : {};
|
|
@@ -3848,7 +3848,7 @@ var InputFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
3848
3848
|
disabled: readOnly,
|
|
3849
3849
|
required: isRequired,
|
|
3850
3850
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
3851
|
-
defaultValue: curJsonData
|
|
3851
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
3852
3852
|
onPressEnter: this.handleValueChange,
|
|
3853
3853
|
onBlur: this.handleValueChange
|
|
3854
3854
|
}))));
|
|
@@ -5573,7 +5573,7 @@ var RadioSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5573
5573
|
display: 'inline-block'
|
|
5574
5574
|
},
|
|
5575
5575
|
onChange: this.handleValueChange,
|
|
5576
|
-
defaultValue: curJsonData
|
|
5576
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
5577
5577
|
disabled: targetJsonSchema.readOnly
|
|
5578
5578
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
5579
5579
|
var optionLabel = item.label || item.name;
|
|
@@ -5934,7 +5934,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5934
5934
|
}
|
|
5935
5935
|
};
|
|
5936
5936
|
_proto.render = function render() {
|
|
5937
|
-
var _targetJsonSchema$sho, _targetJsonSchema$all;
|
|
5937
|
+
var _curJsonData, _targetJsonSchema$sho, _targetJsonSchema$def, _targetJsonSchema$all;
|
|
5938
5938
|
var _this$props2 = this.props,
|
|
5939
5939
|
schemaStore = _this$props2.schemaStore,
|
|
5940
5940
|
jsonStore = _this$props2.jsonStore;
|
|
@@ -5967,7 +5967,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
5967
5967
|
});
|
|
5968
5968
|
curJsonData = valueArray;
|
|
5969
5969
|
}
|
|
5970
|
-
var curValue = curJsonData
|
|
5970
|
+
var curValue = (_curJsonData = curJsonData) != null ? _curJsonData : targetJsonSchema.default;
|
|
5971
5971
|
if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_5__.isObject)(curValue)) {
|
|
5972
5972
|
curValue = JSON.stringify(curValue);
|
|
5973
5973
|
}
|
|
@@ -6004,6 +6004,8 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6004
6004
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_6__.Select, {
|
|
6005
6005
|
showSearch: (_targetJsonSchema$sho = targetJsonSchema.showSearch) != null ? _targetJsonSchema$sho : true,
|
|
6006
6006
|
mode: targetJsonSchema.multiple ? 'multiple' : undefined,
|
|
6007
|
+
defaultActiveFirstOption: (_targetJsonSchema$def = targetJsonSchema.defaultActiveFirstOption) != null ? _targetJsonSchema$def : false // 默认不选中第一条
|
|
6008
|
+
,
|
|
6007
6009
|
style: {
|
|
6008
6010
|
display: 'inline-block',
|
|
6009
6011
|
minWidth: '120px'
|
|
@@ -6633,7 +6635,7 @@ var TextAreaFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6633
6635
|
disabled: readOnly,
|
|
6634
6636
|
required: isRequired,
|
|
6635
6637
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
6636
|
-
defaultValue: curJsonData
|
|
6638
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
6637
6639
|
onPressEnter: this.handleValueChange,
|
|
6638
6640
|
onBlur: this.handleValueChange
|
|
6639
6641
|
}))));
|
|
@@ -6976,7 +6978,7 @@ var TimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6976
6978
|
targetJsonSchema = _this$props3.targetJsonSchema;
|
|
6977
6979
|
// 从jsonData中获取对应的数值
|
|
6978
6980
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
6979
|
-
var defaultTime = curJsonData
|
|
6981
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
6980
6982
|
var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
|
|
6981
6983
|
var isRequired = targetJsonSchema.isRequired || false; // 是否必填(默认非必填)
|
|
6982
6984
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_10__.isNeedTwoColWarpStyle)(targetJsonSchema.type); // 是否需要设置成两栏布局
|
|
@@ -7274,7 +7276,7 @@ var URLFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
7274
7276
|
disabled: readOnly,
|
|
7275
7277
|
required: isRequired,
|
|
7276
7278
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
7277
|
-
defaultValue: curJsonData
|
|
7279
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
7278
7280
|
onPressEnter: this.handleValueChange,
|
|
7279
7281
|
onBlur: this.handleValueChange
|
|
7280
7282
|
}))));
|
package/package.json
CHANGED
package/sdk/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:26 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
package/sdk/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @wibetter/json-editor v5.1.
|
|
2
|
+
* @wibetter/json-editor v5.1.12
|
|
3
3
|
* author: wibetter
|
|
4
4
|
* build tool: AKFun
|
|
5
|
-
* build time:
|
|
5
|
+
* build time: Fri Jan 17 2025 15:43:26 GMT+0800 (中国标准时间)
|
|
6
6
|
* build tool info: https://github.com/wibetter/akfun
|
|
7
7
|
*/
|
|
8
8
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -68114,7 +68114,7 @@ var CascaderSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68114
68114
|
},
|
|
68115
68115
|
options: options,
|
|
68116
68116
|
onChange: this.handleValueChange,
|
|
68117
|
-
defaultValue: curJsonData
|
|
68117
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
68118
68118
|
disabled: targetJsonSchema.readOnly,
|
|
68119
68119
|
allowClear: (_targetJsonSchema$all = targetJsonSchema.allowClear) != null ? _targetJsonSchema$all : true,
|
|
68120
68120
|
multiple: (_targetJsonSchema$mul = targetJsonSchema.multiple) != null ? _targetJsonSchema$mul : false
|
|
@@ -68251,7 +68251,7 @@ var CheckboxSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68251
68251
|
display: 'inline-block'
|
|
68252
68252
|
},
|
|
68253
68253
|
onChange: this.handleValueChange,
|
|
68254
|
-
defaultValue: curJsonData
|
|
68254
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
68255
68255
|
disabled: targetJsonSchema.readOnly
|
|
68256
68256
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
68257
68257
|
var optionLabel = item.label || item.name;
|
|
@@ -68605,7 +68605,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68605
68605
|
var SketchPickerContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_color__WEBPACK_IMPORTED_MODULE_3__.SketchPicker, {
|
|
68606
68606
|
className: "color-sketch-picker",
|
|
68607
68607
|
key: nodeKey + "-SketchPicker",
|
|
68608
|
-
color: curJsonData
|
|
68608
|
+
color: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
68609
68609
|
onChange: this.handleValueChange
|
|
68610
68610
|
});
|
|
68611
68611
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
|
@@ -68646,7 +68646,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68646
68646
|
}, readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
68647
68647
|
className: "ant-input color-btn",
|
|
68648
68648
|
style: {
|
|
68649
|
-
backgroundColor: curJsonData
|
|
68649
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
68650
68650
|
}
|
|
68651
68651
|
}), !readOnly && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_11__["default"], {
|
|
68652
68652
|
content: SketchPickerContent,
|
|
@@ -68655,7 +68655,7 @@ var ColorFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
68655
68655
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
68656
68656
|
className: "ant-input color-btn",
|
|
68657
68657
|
style: {
|
|
68658
|
-
backgroundColor: curJsonData
|
|
68658
|
+
backgroundColor: curJsonData != null ? curJsonData : targetJsonSchema.default
|
|
68659
68659
|
}
|
|
68660
68660
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_9__["default"], {
|
|
68661
68661
|
title: "\u70B9\u51FB\u79FB\u9664\u5F53\u524D\u989C\u8272\u503C",
|
|
@@ -69011,7 +69011,7 @@ var DateTimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
69011
69011
|
var timeFormat = DateTypeList[curType] || DateTypeList[0];
|
|
69012
69012
|
// 从jsonData中获取对应的数值
|
|
69013
69013
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
69014
|
-
var defaultTime = curJsonData
|
|
69014
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
69015
69015
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.isNeedTwoColWarpStyle)(curType); // 是否需要设置成两栏布局
|
|
69016
69016
|
|
|
69017
69017
|
var style = targetJsonSchema.style ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(targetJsonSchema.style)) : {};
|
|
@@ -70236,7 +70236,7 @@ var InputFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
70236
70236
|
disabled: readOnly,
|
|
70237
70237
|
required: isRequired,
|
|
70238
70238
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
70239
|
-
defaultValue: curJsonData
|
|
70239
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
70240
70240
|
onPressEnter: this.handleValueChange,
|
|
70241
70241
|
onBlur: this.handleValueChange
|
|
70242
70242
|
}))));
|
|
@@ -71927,7 +71927,7 @@ var RadioSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
71927
71927
|
display: 'inline-block'
|
|
71928
71928
|
},
|
|
71929
71929
|
onChange: this.handleValueChange,
|
|
71930
|
-
defaultValue: curJsonData
|
|
71930
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
71931
71931
|
disabled: targetJsonSchema.readOnly
|
|
71932
71932
|
}, options && options.length > 0 && options.map(function (item, optionIndex) {
|
|
71933
71933
|
var optionLabel = item.label || item.name;
|
|
@@ -72278,7 +72278,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72278
72278
|
}
|
|
72279
72279
|
};
|
|
72280
72280
|
_proto.render = function render() {
|
|
72281
|
-
var _targetJsonSchema$sho, _targetJsonSchema$all;
|
|
72281
|
+
var _curJsonData, _targetJsonSchema$sho, _targetJsonSchema$def, _targetJsonSchema$all;
|
|
72282
72282
|
var _this$props2 = this.props,
|
|
72283
72283
|
schemaStore = _this$props2.schemaStore,
|
|
72284
72284
|
jsonStore = _this$props2.jsonStore;
|
|
@@ -72311,7 +72311,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72311
72311
|
});
|
|
72312
72312
|
curJsonData = valueArray;
|
|
72313
72313
|
}
|
|
72314
|
-
var curValue = curJsonData
|
|
72314
|
+
var curValue = (_curJsonData = curJsonData) != null ? _curJsonData : targetJsonSchema.default;
|
|
72315
72315
|
if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_3__.isObject)(curValue)) {
|
|
72316
72316
|
curValue = JSON.stringify(curValue);
|
|
72317
72317
|
}
|
|
@@ -72348,6 +72348,8 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72348
72348
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
|
72349
72349
|
showSearch: (_targetJsonSchema$sho = targetJsonSchema.showSearch) != null ? _targetJsonSchema$sho : true,
|
|
72350
72350
|
mode: targetJsonSchema.multiple ? 'multiple' : undefined,
|
|
72351
|
+
defaultActiveFirstOption: (_targetJsonSchema$def = targetJsonSchema.defaultActiveFirstOption) != null ? _targetJsonSchema$def : false // 默认不选中第一条
|
|
72352
|
+
,
|
|
72351
72353
|
style: {
|
|
72352
72354
|
display: 'inline-block',
|
|
72353
72355
|
minWidth: '120px'
|
|
@@ -72964,7 +72966,7 @@ var TextAreaFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72964
72966
|
disabled: readOnly,
|
|
72965
72967
|
required: isRequired,
|
|
72966
72968
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
72967
|
-
defaultValue: curJsonData
|
|
72969
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
72968
72970
|
onPressEnter: this.handleValueChange,
|
|
72969
72971
|
onBlur: this.handleValueChange
|
|
72970
72972
|
}))));
|
|
@@ -73298,7 +73300,7 @@ var TimeFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
73298
73300
|
targetJsonSchema = _this$props3.targetJsonSchema;
|
|
73299
73301
|
// 从jsonData中获取对应的数值
|
|
73300
73302
|
var curJsonData = getJSONDataByKeyRoute(keyRoute);
|
|
73301
|
-
var defaultTime = curJsonData
|
|
73303
|
+
var defaultTime = curJsonData != null ? curJsonData : targetJsonSchema.default;
|
|
73302
73304
|
var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
|
|
73303
73305
|
var isRequired = targetJsonSchema.isRequired || false; // 是否必填(默认非必填)
|
|
73304
73306
|
var isNeedTwoCol = (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.isNeedTwoColWarpStyle)(targetJsonSchema.type); // 是否需要设置成两栏布局
|
|
@@ -73584,7 +73586,7 @@ var URLFormSchema = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
73584
73586
|
disabled: readOnly,
|
|
73585
73587
|
required: isRequired,
|
|
73586
73588
|
placeholder: targetJsonSchema.placeholder || "\u8BF7\u8F93\u5165" + targetJsonSchema.title,
|
|
73587
|
-
defaultValue: curJsonData
|
|
73589
|
+
defaultValue: curJsonData != null ? curJsonData : targetJsonSchema.default,
|
|
73588
73590
|
onPressEnter: this.handleValueChange,
|
|
73589
73591
|
onBlur: this.handleValueChange
|
|
73590
73592
|
}))));
|
|
@@ -269723,7 +269725,6 @@ var initSohuSourceData = {
|
|
|
269723
269725
|
description: {
|
|
269724
269726
|
title: '数据源名称',
|
|
269725
269727
|
type: 'input',
|
|
269726
|
-
default: '',
|
|
269727
269728
|
description: '',
|
|
269728
269729
|
placeholder: '',
|
|
269729
269730
|
onShow: 'type === "ContentStaticConfig"',
|
|
@@ -269750,7 +269751,6 @@ var initSohuSourceData = {
|
|
|
269750
269751
|
CONTENTID: {
|
|
269751
269752
|
title: '数据源ID',
|
|
269752
269753
|
type: 'input',
|
|
269753
|
-
default: '',
|
|
269754
269754
|
description: '',
|
|
269755
269755
|
placeholder: '',
|
|
269756
269756
|
onShow: 'type === "RuntimeDataSelfDefine"',
|
|
@@ -269930,7 +269930,6 @@ var initSohuSourceData = {
|
|
|
269930
269930
|
CONTENTPARAMS: {
|
|
269931
269931
|
title: '动态参数',
|
|
269932
269932
|
type: 'json',
|
|
269933
|
-
default: '{}',
|
|
269934
269933
|
description: '请填写JSON格式的参数',
|
|
269935
269934
|
placeholder: '',
|
|
269936
269935
|
},
|
|
@@ -269953,7 +269952,6 @@ var initSohuSourceData = {
|
|
|
269953
269952
|
SIZE: {
|
|
269954
269953
|
type: 'number',
|
|
269955
269954
|
title: '容量',
|
|
269956
|
-
default: 1,
|
|
269957
269955
|
minimum: 0,
|
|
269958
269956
|
maximum: 1000,
|
|
269959
269957
|
description: '该位置区块需要的内容条数',
|
|
@@ -269961,21 +269959,18 @@ var initSohuSourceData = {
|
|
|
269961
269959
|
TITLE: {
|
|
269962
269960
|
title: '标题',
|
|
269963
269961
|
type: 'input',
|
|
269964
|
-
default: '',
|
|
269965
269962
|
description: '',
|
|
269966
269963
|
placeholder: '',
|
|
269967
269964
|
},
|
|
269968
269965
|
CODE: {
|
|
269969
269966
|
title: 'Code参数',
|
|
269970
269967
|
type: 'input',
|
|
269971
|
-
default: '',
|
|
269972
269968
|
description: '',
|
|
269973
269969
|
placeholder: '',
|
|
269974
269970
|
},
|
|
269975
269971
|
URL: {
|
|
269976
269972
|
type: 'url',
|
|
269977
269973
|
title: '跳转链接',
|
|
269978
|
-
default: '',
|
|
269979
269974
|
description: '',
|
|
269980
269975
|
placeholder: '',
|
|
269981
269976
|
},
|
|
@@ -270017,7 +270012,6 @@ var initAdConfigSchema = {
|
|
|
270017
270012
|
id: {
|
|
270018
270013
|
title: '广告ID',
|
|
270019
270014
|
type: 'number',
|
|
270020
|
-
default: '',
|
|
270021
270015
|
description: '',
|
|
270022
270016
|
placeholder: '',
|
|
270023
270017
|
},
|
|
@@ -270039,13 +270033,11 @@ var initAdConfigSchema = {
|
|
|
270039
270033
|
value: 3,
|
|
270040
270034
|
},
|
|
270041
270035
|
],
|
|
270042
|
-
default: 1,
|
|
270043
270036
|
description: '',
|
|
270044
270037
|
},
|
|
270045
270038
|
fixArray: {
|
|
270046
270039
|
type: 'select',
|
|
270047
270040
|
title: '固定位置',
|
|
270048
|
-
default: [1],
|
|
270049
270041
|
description: '',
|
|
270050
270042
|
multiple: true,
|
|
270051
270043
|
onShow: 'rule === 1 || rule === 3',
|
|
@@ -270255,7 +270247,6 @@ var initAdConfigSchema = {
|
|
|
270255
270247
|
begin: {
|
|
270256
270248
|
type: 'number',
|
|
270257
270249
|
title: '开始位置',
|
|
270258
|
-
default: 1,
|
|
270259
270250
|
minimum: '1',
|
|
270260
270251
|
maximum: '50',
|
|
270261
270252
|
description: '',
|
|
@@ -270264,7 +270255,6 @@ var initAdConfigSchema = {
|
|
|
270264
270255
|
turn: {
|
|
270265
270256
|
type: 'number',
|
|
270266
270257
|
title: '间隔/隔',
|
|
270267
|
-
default: 1,
|
|
270268
270258
|
minimum: '1',
|
|
270269
270259
|
maximum: '50',
|
|
270270
270260
|
description: '',
|
|
@@ -270273,7 +270263,6 @@ var initAdConfigSchema = {
|
|
|
270273
270263
|
number: {
|
|
270274
270264
|
type: 'number',
|
|
270275
270265
|
title: '间隔/出',
|
|
270276
|
-
default: 1,
|
|
270277
270266
|
minimum: '1',
|
|
270278
270267
|
maximum: '50',
|
|
270279
270268
|
description: '',
|
|
@@ -270292,7 +270281,6 @@ var initAdConfigSchema = {
|
|
|
270292
270281
|
value: 1,
|
|
270293
270282
|
},
|
|
270294
270283
|
],
|
|
270295
|
-
default: 0,
|
|
270296
270284
|
description: '',
|
|
270297
270285
|
},
|
|
270298
270286
|
},
|
|
@@ -270334,13 +270322,11 @@ var initAdConfigSchema = {
|
|
|
270334
270322
|
value: 3,
|
|
270335
270323
|
},
|
|
270336
270324
|
],
|
|
270337
|
-
default: 1,
|
|
270338
270325
|
description: '',
|
|
270339
270326
|
},
|
|
270340
270327
|
fixArray: {
|
|
270341
270328
|
type: 'select',
|
|
270342
270329
|
title: '固定位置',
|
|
270343
|
-
default: [1],
|
|
270344
270330
|
description: '',
|
|
270345
270331
|
onShow: 'rule === 1 || rule === 3',
|
|
270346
270332
|
multiple: true,
|
|
@@ -270550,7 +270536,6 @@ var initAdConfigSchema = {
|
|
|
270550
270536
|
begin: {
|
|
270551
270537
|
type: 'number',
|
|
270552
270538
|
title: '开始位置',
|
|
270553
|
-
default: 1,
|
|
270554
270539
|
minimum: '1',
|
|
270555
270540
|
maximum: '50',
|
|
270556
270541
|
description: '',
|
|
@@ -270559,7 +270544,6 @@ var initAdConfigSchema = {
|
|
|
270559
270544
|
turn: {
|
|
270560
270545
|
type: 'number',
|
|
270561
270546
|
title: '间隔/隔',
|
|
270562
|
-
default: 1,
|
|
270563
270547
|
minimum: '1',
|
|
270564
270548
|
maximum: '50',
|
|
270565
270549
|
description: '',
|
|
@@ -270568,7 +270552,6 @@ var initAdConfigSchema = {
|
|
|
270568
270552
|
number: {
|
|
270569
270553
|
type: 'number',
|
|
270570
270554
|
title: '间隔/出',
|
|
270571
|
-
default: 1,
|
|
270572
270555
|
minimum: '1',
|
|
270573
270556
|
maximum: '50',
|
|
270574
270557
|
description: '',
|
|
@@ -270587,7 +270570,6 @@ var initAdConfigSchema = {
|
|
|
270587
270570
|
value: 1,
|
|
270588
270571
|
},
|
|
270589
270572
|
],
|
|
270590
|
-
default: 0,
|
|
270591
270573
|
description: '',
|
|
270592
270574
|
},
|
|
270593
270575
|
},
|
|
@@ -276012,6 +275994,13 @@ function moveBackward(curIndexRoute) {
|
|
|
276012
275994
|
function getDefaultOptionVal(jsonSchema, multiple) {
|
|
276013
275995
|
var defaultVal = '';
|
|
276014
275996
|
var hasOptions = false;
|
|
275997
|
+
if (
|
|
275998
|
+
jsonSchema.defaultActiveFirstOption === false ||
|
|
275999
|
+
!jsonSchema.defaultActiveFirstOption
|
|
276000
|
+
) {
|
|
276001
|
+
// 当默认不选择第一个数据项时,则不自动生成数值
|
|
276002
|
+
return undefined;
|
|
276003
|
+
}
|
|
276015
276004
|
if (jsonSchema.options && jsonSchema.options[0]) {
|
|
276016
276005
|
defaultVal = jsonSchema.options[0].value;
|
|
276017
276006
|
hasOptions = true;
|