pb-sxp-ui 1.0.66 → 1.0.68
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/dist/index.cjs +31 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -27
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +34 -31
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/FormatImage.js +3 -20
- package/es/materials/sxp/popup/AppointForm/index.js +3 -1
- package/lib/core/components/SxpPageRender/FormatImage.js +3 -20
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
@@ -5,6 +5,7 @@ import React, { useContext, useMemo, createContext, memo, useState, useRef, useE
|
|
5
5
|
import qs from 'qs';
|
6
6
|
import EventEmitter from 'eventemitter3';
|
7
7
|
import { css } from '@emotion/css';
|
8
|
+
import { BetaSchemaForm } from '@ant-design/pro-components';
|
8
9
|
import * as ReactDOM from 'react-dom';
|
9
10
|
|
10
11
|
/******************************************************************************
|
@@ -1159,7 +1160,7 @@ const AppointForm$1 = (_a) => {
|
|
1159
1160
|
key: '4'
|
1160
1161
|
}
|
1161
1162
|
], []);
|
1162
|
-
useMemo(() => {
|
1163
|
+
const columnsData = useMemo(() => {
|
1163
1164
|
if (layoutType === undefined) {
|
1164
1165
|
const list = cloneDeep(columns) || defaultColumns;
|
1165
1166
|
return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
|
@@ -1202,7 +1203,8 @@ const AppointForm$1 = (_a) => {
|
|
1202
1203
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1203
1204
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
|
1204
1205
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
1205
|
-
React.createElement("div", { className: 'pb-appoint-form-container' }
|
1206
|
+
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1207
|
+
React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1206
1208
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1207
1209
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1208
1210
|
color: submitColor,
|
@@ -8366,7 +8368,7 @@ var ExpandableText$1 = memo(ExpandableText);
|
|
8366
8368
|
* @Author: binruan@chatlabs.com
|
8367
8369
|
* @Date: 2024-03-20 10:27:31
|
8368
8370
|
* @LastEditors: binruan@chatlabs.com
|
8369
|
-
* @LastEditTime: 2024-05-
|
8371
|
+
* @LastEditTime: 2024-05-20 15:53:04
|
8370
8372
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8371
8373
|
*
|
8372
8374
|
*/
|
@@ -8378,32 +8380,34 @@ const FormatImage = forwardRef((props, ref) => {
|
|
8378
8380
|
setImgSrc(v);
|
8379
8381
|
}
|
8380
8382
|
}));
|
8381
|
-
// useEffect(() => {
|
8382
|
-
// setImgSrc(src);
|
8383
|
-
// }, [src]);
|
8384
|
-
const imgRef = useRef(null);
|
8385
8383
|
useEffect(() => {
|
8386
|
-
|
8387
|
-
const { current } = imgRef;
|
8388
|
-
if (current) {
|
8389
|
-
observer = new IntersectionObserver((entries) => {
|
8390
|
-
entries.forEach((entry) => {
|
8391
|
-
if (entry.isIntersecting) {
|
8392
|
-
setImgSrc(src);
|
8393
|
-
observer.unobserve(current);
|
8394
|
-
}
|
8395
|
-
});
|
8396
|
-
}, { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8397
|
-
);
|
8398
|
-
observer.observe(current);
|
8399
|
-
}
|
8400
|
-
return () => {
|
8401
|
-
if (observer && current) {
|
8402
|
-
observer.unobserve(current);
|
8403
|
-
}
|
8404
|
-
};
|
8384
|
+
setImgSrc(src);
|
8405
8385
|
}, [src]);
|
8406
|
-
|
8386
|
+
useRef(null);
|
8387
|
+
// useEffect(() => {
|
8388
|
+
// let observer: any = null;
|
8389
|
+
// const { current } = imgRef;
|
8390
|
+
// if (current) {
|
8391
|
+
// observer = new IntersectionObserver(
|
8392
|
+
// (entries) => {
|
8393
|
+
// entries.forEach((entry) => {
|
8394
|
+
// if (entry.isIntersecting) {
|
8395
|
+
// setImgSrc(src);
|
8396
|
+
// observer.unobserve(current);
|
8397
|
+
// }
|
8398
|
+
// });
|
8399
|
+
// },
|
8400
|
+
// { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8401
|
+
// );
|
8402
|
+
// observer.observe(current);
|
8403
|
+
// }
|
8404
|
+
// return () => {
|
8405
|
+
// if (observer && current) {
|
8406
|
+
// observer.unobserve(current);
|
8407
|
+
// }
|
8408
|
+
// };
|
8409
|
+
// }, [src]);
|
8410
|
+
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
8407
8411
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
8408
8412
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
8409
8413
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|