@pisell/materials 2.2.14 → 2.2.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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellInformationEntry/Scan/index.js +1 -0
- package/es/components/pisellScan/index.d.ts +2 -0
- package/es/components/pisellScan/index.js +4 -2
- package/es/components/table/Table/index.less +0 -1
- package/iconfont/iconfont.js +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellInformationEntry/Scan/index.js +1 -0
- package/lib/components/pisellScan/index.d.ts +2 -0
- package/lib/components/pisellScan/index.js +2 -2
- package/lib/components/table/Table/index.less +0 -1
- package/package.json +5 -4
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://
|
|
38
|
+
scriptUrl: "https://unpkg.com/@pisell/materials@3.0.37/iconfont/iconfont.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -46,6 +46,7 @@ var Scan = (props) => {
|
|
|
46
46
|
height: "200px",
|
|
47
47
|
borderRadius: "12px",
|
|
48
48
|
onChange,
|
|
49
|
+
timeBetweenScansMillis: 1e3,
|
|
49
50
|
ref: scanRef
|
|
50
51
|
},
|
|
51
52
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-scan-custom-action" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -10,6 +10,8 @@ export interface PisellScanProps extends Omit<React.HTMLAttributes<HTMLVideoElem
|
|
|
10
10
|
borderRadius?: string | number;
|
|
11
11
|
/** 扫描完成回调 */
|
|
12
12
|
onChange?: (val: string) => void;
|
|
13
|
+
/** 扫描间隔时间 毫秒 */
|
|
14
|
+
timeBetweenScansMillis?: number;
|
|
13
15
|
}
|
|
14
16
|
export declare type PisellScanRef = {
|
|
15
17
|
codeReader: BrowserMultiFormatReader | null;
|
|
@@ -36,7 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_library = require("@zxing/library");
|
|
37
37
|
var import_index = require("./index.less");
|
|
38
38
|
var PisellScan = (0, import_react.forwardRef)((props, ref) => {
|
|
39
|
-
const { width, height, borderRadius, style, children, onChange, ...others } = props;
|
|
39
|
+
const { width, height, borderRadius, style, children, onChange, timeBetweenScansMillis = 500, ...others } = props;
|
|
40
40
|
const videoRef = (0, import_react.useRef)(null);
|
|
41
41
|
const codeReaderRef = (0, import_react.useRef)(null);
|
|
42
42
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
@@ -45,7 +45,7 @@ var PisellScan = (0, import_react.forwardRef)((props, ref) => {
|
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
(0, import_react.useEffect)(() => {
|
|
48
|
-
const codeReader = new import_library.BrowserMultiFormatReader();
|
|
48
|
+
const codeReader = new import_library.BrowserMultiFormatReader(void 0, timeBetweenScansMillis);
|
|
49
49
|
codeReaderRef.current = codeReader;
|
|
50
50
|
let selectedDeviceId;
|
|
51
51
|
codeReaderRef.current.listVideoInputDevices().then((videoInputDevices) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.16",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"build",
|
|
44
44
|
"lowcode",
|
|
45
45
|
"dist",
|
|
46
|
-
"antd"
|
|
46
|
+
"antd",
|
|
47
|
+
"iconfont"
|
|
47
48
|
],
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"antd": "^5.6.3",
|
|
@@ -63,8 +64,8 @@
|
|
|
63
64
|
"crypto-js": "^4.2.0",
|
|
64
65
|
"@zxing/library": "0.21.2",
|
|
65
66
|
"@pisell/utils": "1.0.28",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
67
|
+
"@pisell/date-picker": "1.0.97",
|
|
68
|
+
"@pisell/icon": "0.0.11"
|
|
68
69
|
},
|
|
69
70
|
"peerDependencies": {
|
|
70
71
|
"react": "^18.0.0",
|