@pisell/materials 3.2.18 → 3.2.19

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.
@@ -14,6 +14,7 @@ var SelectResource = function SelectResource(_ref) {
14
14
  _useState2 = _slicedToArray(_useState, 2),
15
15
  selectedValue = _useState2[0],
16
16
  setSelectedValue = _useState2[1];
17
+ console.log(selectedValue, lists, 'SelectResource');
17
18
 
18
19
  /**
19
20
  * @title: 渲染下拉框
@@ -26,8 +27,8 @@ var SelectResource = function SelectResource(_ref) {
26
27
  var renderOptions = useCallback(function () {
27
28
  return (lists || []).map(function (d) {
28
29
  return /*#__PURE__*/React.createElement(Select.Option, {
29
- value: d.form_record_id,
30
- key: d.form_record_id
30
+ value: d.id,
31
+ key: d.id
31
32
  }, d['label']);
32
33
  });
33
34
  }, [lists]);
@@ -95,5 +95,5 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
95
95
  };
96
96
  text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[item === null || item === void 0 ? void 0 : item.duration_type]) || text;
97
97
  var duration = "".concat(diffInDays).concat(text);
98
- return "".concat(date, " (").concat(duration, ")");
98
+ return "".concat(date, " ").concat(diffInDays ? "(".concat(duration, ")") : '');
99
99
  };
@@ -36,9 +36,10 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var SelectResource = ({ lists, value, onChange }) => {
38
38
  const [selectedValue, setSelectedValue] = (0, import_react.useState)(value);
39
+ console.log(selectedValue, lists, "SelectResource");
39
40
  const renderOptions = (0, import_react.useCallback)(() => {
40
41
  return (lists || []).map((d) => {
41
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Select.Option, { value: d.form_record_id, key: d.form_record_id }, d["label"]);
42
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Select.Option, { value: d.id, key: d.id }, d["label"]);
42
43
  });
43
44
  }, [lists]);
44
45
  return /* @__PURE__ */ import_react.default.createElement(
@@ -94,7 +94,7 @@ var getServiceTime = (item, currentDate) => {
94
94
  };
95
95
  text = (textTypes == null ? void 0 : textTypes[item == null ? void 0 : item.duration_type]) || text;
96
96
  let duration = `${diffInDays}${text}`;
97
- return `${date} (${duration})`;
97
+ return `${date} ${diffInDays ? `(${duration})` : ""}`;
98
98
  };
99
99
  // Annotate the CommonJS export names for ESM import in node:
100
100
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "3.2.18",
3
+ "version": "3.2.19",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, }: any) => JSX.Element | null;
3
- export default Time;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, }: any) => JSX.Element | null;
3
- export default Time;