@hzab/list-render 1.9.4 → 1.9.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # @hzab/list-render@1.9.5
2
+
3
+ fix: 修复 datePicker 传入 showTime 为 true 时显示时分秒
4
+ fix: 修复 QueryRender 内部组件 props 的执行函数
5
+
1
6
  # @hzab/list-render@1.9.4
2
7
 
3
8
  fix: 修复分页数据来源
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  import _ from "lodash";
2
2
  import { getFieldMap } from "./utils";
3
+ import { isRunStr, handleSchemaStrVal, isScopeKey as formIsScopeKey, getScopeKeyVal } from '@hzab/form-render/src/common/schema-handler';
3
4
 
4
5
  export const handleQuerySchema = (opt) => {
5
6
  const { schema, search, filters, onSearch, replaceComList, schemaScope } = opt || {};
@@ -212,6 +213,13 @@ export const handleHoc = (source, cb, opt) => {
212
213
  let _source = getSchemaVal(source, schemaScope);
213
214
 
214
215
  let res = null;
216
+ if (isRunStr(source)) {
217
+
218
+ _source = handleSchemaStrVal(source, schemaScope);
219
+ }
220
+ if (formIsScopeKey(source, schemaScope)) {
221
+ _source = getScopeKeyVal(source, schemaScope);
222
+ }
215
223
  if (_source) {
216
224
  res = await _source(...args);
217
225
  }
@@ -32,7 +32,7 @@ export function getVal(field = {}, data = {}, opt = {}) {
32
32
 
33
33
  if (val && (xComponent === "DatePicker" || xComponent === "DatePicker.RangePicker")) {
34
34
  const { picker, showTime } = xComponentProps || {};
35
- const mode = picker === "date" && showTime === true ? "time" : picker || "date";
35
+ const mode = showTime === true ? "time" : picker || "date";
36
36
  const _formatEnum = opt.dateFormatEnum || dateFormatEnum;
37
37
  const format = xComponentProps?.format || _formatEnum[mode];
38
38
 
@@ -18,7 +18,7 @@ function QueryRender(props, parentRef) {
18
18
  setSchema(
19
19
  handleQuerySchema({
20
20
  ...props?.config,
21
- schemaScope: props.schemaScope,
21
+ schemaScope: { ...props.schemaScope, scenario: "query" },
22
22
  schema: _.cloneDeep(props.schema),
23
23
  search: props.search,
24
24
  filters: _.cloneDeep(props.filters),