ronds-metadata 1.2.49 → 1.2.51
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.
|
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
37
37
|
/*
|
|
38
38
|
* @Author:wangxian
|
|
39
39
|
* @Date: 2021-09-18 14:15:04
|
|
40
|
-
* @LastEditTime: 2023-05-
|
|
40
|
+
* @LastEditTime: 2023-05-18 10:18:36
|
|
41
41
|
*/
|
|
42
42
|
import React from 'react';
|
|
43
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
|
@@ -101,7 +101,7 @@ function Index(props) {
|
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
useObservable(function (p) {
|
|
104
|
-
var _extraInfo$http, _extraInfo$http2
|
|
104
|
+
var _extraInfo$http, _extraInfo$http2;
|
|
105
105
|
// 判断是否有 watch的扩展属性
|
|
106
106
|
var _watch = extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$http = extraInfo.http) === null || _extraInfo$http === void 0 ? void 0 : _extraInfo$http.watch;
|
|
107
107
|
if (name && _watch && (p === null || p === void 0 ? void 0 : p.type) === 'onValuesChange') {
|
|
@@ -167,7 +167,7 @@ function Index(props) {
|
|
|
167
167
|
console.warn('watch:' + error);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
if (treeData.length > 0 && name && (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$http2 = extraInfo.http) === null || _extraInfo$http2 === void 0 ? void 0 : _extraInfo$http2.isTreeSelect) && (p === null || p === void 0 ? void 0 :
|
|
170
|
+
if (treeData.length > 0 && name && (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$http2 = extraInfo.http) === null || _extraInfo$http2 === void 0 ? void 0 : _extraInfo$http2.isTreeSelect) && (p === null || p === void 0 ? void 0 : p.type) === 'onValuesChange') {
|
|
171
171
|
var _evalString = '';
|
|
172
172
|
for (var _i3 = 0; _i3 < name.length; _i3++) {
|
|
173
173
|
_evalString = "".concat(_evalString, "[name[").concat(_i3, "]]");
|
|
@@ -381,16 +381,15 @@ function Index(props) {
|
|
|
381
381
|
};
|
|
382
382
|
var onDropdownVisibleChange = function onDropdownVisibleChange(_open) {
|
|
383
383
|
setTreeselectOpen(_open);
|
|
384
|
-
if (_open) {
|
|
384
|
+
if (_open && expandedKeys.length > 0 && treeRef.current) {
|
|
385
385
|
setTimeout(function () {
|
|
386
|
-
|
|
387
|
-
(_treeRef$current = treeRef.current) === null || _treeRef$current === void 0 ? void 0 : _treeRef$current.scrollTo({
|
|
386
|
+
treeRef.current.scrollTo({
|
|
388
387
|
key: expandedKeys[0],
|
|
389
388
|
align: 'top',
|
|
390
389
|
offset: 40
|
|
391
390
|
});
|
|
392
391
|
firstLoadTreeSelectRef.current = false;
|
|
393
|
-
},
|
|
392
|
+
}, 200);
|
|
394
393
|
}
|
|
395
394
|
};
|
|
396
395
|
var processSelectType = function processSelectType(isCascader, isTreeSelect, isPagination) {
|