@yilianjituan/yilian_dgerm 0.0.1-alpha.28 → 0.0.1-alpha.29
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/README.md
CHANGED
|
@@ -113,3 +113,16 @@ MIT
|
|
|
113
113
|
8、PageTemplate 按钮适配:扩展edc
|
|
114
114
|
9、更换组件引入路径
|
|
115
115
|
10、PageTemplate 功能扩展: 添加ref声明
|
|
116
|
+
11、PageTemplate 参数调试:传入http
|
|
117
|
+
|
|
118
|
+
# 2024.10.30 更新日志
|
|
119
|
+
1、SelectMax 参数调试:传入http
|
|
120
|
+
2、DropDownSelect 参数调试:传入http
|
|
121
|
+
3、
|
|
122
|
+
4、
|
|
123
|
+
5、
|
|
124
|
+
6、
|
|
125
|
+
7、
|
|
126
|
+
8、
|
|
127
|
+
9、
|
|
128
|
+
10、
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "mode"];
|
|
2
|
+
var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "mode"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -23,11 +23,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
24
|
import React, { useEffect, useState, useRef } from 'react';
|
|
25
25
|
import { Select, Spin } from "antd";
|
|
26
|
-
import { http } from "../../commonAxios/http";
|
|
27
26
|
import _ from 'lodash';
|
|
28
27
|
var Option = Select.Option;
|
|
29
28
|
var Index = function Index(props) {
|
|
30
|
-
var
|
|
29
|
+
var http = props.http,
|
|
30
|
+
url = props.url,
|
|
31
31
|
_props$method = props.method,
|
|
32
32
|
method = _props$method === void 0 ? 'get' : _props$method,
|
|
33
33
|
handleSelect = props.handleSelect,
|
|
@@ -91,21 +91,27 @@ var Index = function Index(props) {
|
|
|
91
91
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
92
92
|
while (1) switch (_context2.prev = _context2.next) {
|
|
93
93
|
case 0:
|
|
94
|
+
if (url) {
|
|
95
|
+
_context2.next = 2;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
return _context2.abrupt("return");
|
|
99
|
+
case 2:
|
|
94
100
|
setSelectState(true);
|
|
95
101
|
_additionalParameters = dynamicParameter && beforeSearch ? beforeSearch(dynamicParameter) : additionalParameters;
|
|
96
|
-
_context2.next =
|
|
102
|
+
_context2.next = 6;
|
|
97
103
|
return inquireDiseases(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, searchValue, paramsRef.current), "pageNo", pageRef.current), "pageSize", 10), _additionalParameters ? _additionalParameters : {}));
|
|
98
|
-
case
|
|
104
|
+
case 6:
|
|
99
105
|
data = _context2.sent;
|
|
100
106
|
if (data.code === "OK") {
|
|
101
107
|
target = data.result;
|
|
102
108
|
totalPagesRef.current = target.totalPages;
|
|
103
|
-
options = filterOptionsCallback ? filterOptionsCallback(target.content) : target.content;
|
|
109
|
+
options = filterOptionsCallback ? filterOptionsCallback(target.content) : target.content || target;
|
|
104
110
|
storeListRef.current = type === 'scoll' ? [].concat(_toConsumableArray(storeListRef.current), _toConsumableArray(options)) : options;
|
|
105
111
|
setStoreList(storeListRef.current || []);
|
|
106
112
|
setSelectState(false);
|
|
107
113
|
}
|
|
108
|
-
case
|
|
114
|
+
case 8:
|
|
109
115
|
case "end":
|
|
110
116
|
return _context2.stop();
|
|
111
117
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["options", "optionMap", "url", "afterRequest", "allowClear"];
|
|
1
|
+
var _excluded = ["http", "options", "optionMap", "url", "afterRequest", "allowClear"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -10,10 +10,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import React, { useEffect, useState } from 'react';
|
|
12
12
|
import { Select } from 'antd';
|
|
13
|
-
import { http } from "../../commonAxios/http";
|
|
14
13
|
var Option = Select.Option;
|
|
15
14
|
var SelectMax = function SelectMax(props) {
|
|
16
|
-
var
|
|
15
|
+
var http = props.http,
|
|
16
|
+
_props$options = props.options,
|
|
17
17
|
options = _props$options === void 0 ? [] : _props$options,
|
|
18
18
|
_props$optionMap = props.optionMap,
|
|
19
19
|
optionMap = _props$optionMap === void 0 ? {} : _props$optionMap,
|
|
@@ -34,7 +34,7 @@ var SelectMax = function SelectMax(props) {
|
|
|
34
34
|
selectOptions = _useState2[0],
|
|
35
35
|
setSelectOptions = _useState2[1];
|
|
36
36
|
useEffect(function () {
|
|
37
|
-
if (url && url.url) {
|
|
37
|
+
if (url && url.url && http) {
|
|
38
38
|
http[url.method](url.url).then(function (res) {
|
|
39
39
|
if (res.code !== 'OK') return;
|
|
40
40
|
var IOptions = afterRequest ? afterRequest(res.result || []) : res.result;
|