@cniot/android-pda-components 2.0.0-beta.14 → 2.0.0-beta.16
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 +6 -0
- package/doc/all-v2-components/index.jsx +32 -3
- package/es/index.cjs.js +6 -6
- package/es/index.es.js +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
PageFlowSystemPagesV2,
|
|
25
25
|
DatePickerV2,
|
|
26
26
|
InputFieldV2,
|
|
27
|
+
useFieldV2,
|
|
27
28
|
} from "../../packages";
|
|
28
29
|
import { Button, List } from "antd-mobile";
|
|
29
30
|
import "./index.less";
|
|
@@ -144,6 +145,8 @@ export default function (props) {
|
|
|
144
145
|
type = "list";
|
|
145
146
|
// type = 'tip'
|
|
146
147
|
|
|
148
|
+
const field = useFieldV2();
|
|
149
|
+
|
|
147
150
|
const showMap = {
|
|
148
151
|
LayoutV2: true,
|
|
149
152
|
FinishCardV2: true,
|
|
@@ -528,8 +531,31 @@ export default function (props) {
|
|
|
528
531
|
dataSource={[
|
|
529
532
|
{ label: "", value: "value", className: "high", display: false },
|
|
530
533
|
{ label: "", value: "value", className: "highlight", display: false },
|
|
531
|
-
{
|
|
532
|
-
|
|
534
|
+
{
|
|
535
|
+
label: "输入",
|
|
536
|
+
value: (
|
|
537
|
+
<NumberPickerV2
|
|
538
|
+
{...field.getProps("number", { validator: "required" })}
|
|
539
|
+
/>
|
|
540
|
+
),
|
|
541
|
+
type: field.getValidateStatus("number") ? "error" : null,
|
|
542
|
+
tip: field.getValidateStatus("number"),
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
label: "输入",
|
|
546
|
+
value: (
|
|
547
|
+
<InputV2
|
|
548
|
+
{...field.getProps("input", {
|
|
549
|
+
validator: "required",
|
|
550
|
+
onChange(val) {
|
|
551
|
+
console.log(`val:======`, val);
|
|
552
|
+
},
|
|
553
|
+
})}
|
|
554
|
+
/>
|
|
555
|
+
),
|
|
556
|
+
type: field.getValidateStatus("input") ? "error" : null,
|
|
557
|
+
tip: field.getValidateStatus("input"),
|
|
558
|
+
},
|
|
533
559
|
{ label: "最多六个字符", value: "2022-09-08 12:00:00" },
|
|
534
560
|
{ label: "最多六个字符123", value: "2022-09-08 12:00:00" },
|
|
535
561
|
{ label: "入库单号", value: "17836397" },
|
|
@@ -804,8 +830,11 @@ export default function (props) {
|
|
|
804
830
|
fullWidth
|
|
805
831
|
onClick={() => {
|
|
806
832
|
console.log(`primary button click===`);
|
|
833
|
+
field.validate().then(res=>console.log(`field.getValues:======`,field.getValues())).finally(() => {
|
|
834
|
+
console.log(`validate end===`);
|
|
835
|
+
});
|
|
807
836
|
}}
|
|
808
|
-
hotkey=
|
|
837
|
+
hotkey="Enter"
|
|
809
838
|
// hotkeyHandler={() => {
|
|
810
839
|
// console.log(`primary button hotkeyHandler===`);
|
|
811
840
|
// }}
|