form-driver 0.4.23 → 0.4.25

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/es/m3.js CHANGED
@@ -23128,7 +23128,11 @@ var ARangePicker = /*#__PURE__*/function (_Viewer) {
23128
23128
  // precision 为 minute 时只展示时分,不展示秒
23129
23129
  extraProps.showTime = precision === 'minute' ? {
23130
23130
  format: 'HH:mm'
23131
- } : true;
23131
+ } : true; // 同步设置输入框的显示格式,避免 showTime.format 只影响面板列而输入框仍显示秒
23132
+
23133
+ if (precision === 'minute') {
23134
+ extraProps.format = 'YYYY-MM-DD HH:mm';
23135
+ }
23132
23136
  } // 构造元素
23133
23137
 
23134
23138
 
package/lib/m3.js CHANGED
@@ -23153,7 +23153,11 @@ var ARangePicker = /*#__PURE__*/function (_Viewer) {
23153
23153
  // precision 为 minute 时只展示时分,不展示秒
23154
23154
  extraProps.showTime = precision === 'minute' ? {
23155
23155
  format: 'HH:mm'
23156
- } : true;
23156
+ } : true; // 同步设置输入框的显示格式,避免 showTime.format 只影响面板列而输入框仍显示秒
23157
+
23158
+ if (precision === 'minute') {
23159
+ extraProps.format = 'YYYY-MM-DD HH:mm';
23160
+ }
23157
23161
  } // 构造元素
23158
23162
 
23159
23163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "form-driver",
3
- "version": "0.4.23",
3
+ "version": "0.4.25",
4
4
  "description": "An efficient framework for creating forms.",
5
5
  "license": "MIT",
6
6
  "authors": [
@@ -63,7 +63,7 @@
63
63
  "@dnd-kit/utilities": "^3.2.2",
64
64
  "@babel/runtime": "^7.9.2",
65
65
  "ali-oss": "^6.17.1",
66
- "antd": "4.18.7",
66
+ "antd": "^4.18.7",
67
67
  "antd-mobile": "^5.37.1",
68
68
  "clsx": "^2.1.1",
69
69
  "lodash": "^4.17.20",
@@ -176,6 +176,10 @@ export class ARangePicker extends Viewer<State> {
176
176
  } else if (pcShowTime) {
177
177
  // precision 为 minute 时只展示时分,不展示秒
178
178
  extraProps.showTime = precision === 'minute' ? { format: 'HH:mm' } : true;
179
+ // 同步设置输入框的显示格式,避免 showTime.format 只影响面板列而输入框仍显示秒
180
+ if (precision === 'minute') {
181
+ extraProps.format = 'YYYY-MM-DD HH:mm';
182
+ }
179
183
  }
180
184
 
181
185
  // 构造元素
@@ -2,12 +2,13 @@
2
2
 
3
3
  import { Select } from "antd";
4
4
  import { Picker } from "antd-mobile";
5
+ import type { PickerColumnItem, PickerValue } from "antd-mobile/es/components/picker-view";
5
6
  import _ from "lodash";
6
7
  import React from "react";
7
8
  import { MUtil } from '../../framework/MUtil';
8
9
 
9
- interface PickerOption {
10
- label: string | React.ReactNode;
10
+ interface PickerOption extends PickerColumnItem {
11
+ label: React.ReactNode;
11
12
  value: string;
12
13
  }
13
14
 
@@ -1,6 +1,7 @@
1
+ import type { PickerColumnItem } from "antd-mobile/es/components/picker-view";
1
2
  import React from "react";
2
- interface PickerOption {
3
- label: string | React.ReactNode;
3
+ interface PickerOption extends PickerColumnItem {
4
+ label: React.ReactNode;
4
5
  value: string;
5
6
  }
6
7
  interface Prop {