pb-sxp-ui 1.0.65 → 1.0.67
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 +29 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -29
- 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 +33 -32
- 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 +1 -3
- package/lib/core/components/SxpPageRender/FormatImage.js +3 -20
- package/lib/materials/sxp/popup/AppointForm/index.js +1 -3
- package/package.json +1 -3
package/dist/index.cjs
CHANGED
@@ -9,7 +9,6 @@ var React = require('react');
|
|
9
9
|
var qs = require('qs');
|
10
10
|
var EventEmitter = require('eventemitter3');
|
11
11
|
var css = require('@emotion/css');
|
12
|
-
var proComponents = require('@ant-design/pro-components');
|
13
12
|
var ReactDOM = require('react-dom');
|
14
13
|
|
15
14
|
function _interopNamespaceDefault(e) {
|
@@ -1183,7 +1182,7 @@ const AppointForm$1 = (_a) => {
|
|
1183
1182
|
key: '4'
|
1184
1183
|
}
|
1185
1184
|
], []);
|
1186
|
-
|
1185
|
+
React.useMemo(() => {
|
1187
1186
|
if (layoutType === undefined) {
|
1188
1187
|
const list = lodash.cloneDeep(columns) || defaultColumns;
|
1189
1188
|
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 } })));
|
@@ -1226,8 +1225,7 @@ const AppointForm$1 = (_a) => {
|
|
1226
1225
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1227
1226
|
React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
|
1228
1227
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
1229
|
-
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1230
|
-
React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1228
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
1231
1229
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1232
1230
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1233
1231
|
color: submitColor,
|
@@ -8391,7 +8389,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
|
|
8391
8389
|
* @Author: binruan@chatlabs.com
|
8392
8390
|
* @Date: 2024-03-20 10:27:31
|
8393
8391
|
* @LastEditors: binruan@chatlabs.com
|
8394
|
-
* @LastEditTime: 2024-05-
|
8392
|
+
* @LastEditTime: 2024-05-20 15:53:04
|
8395
8393
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8396
8394
|
*
|
8397
8395
|
*/
|
@@ -8403,32 +8401,34 @@ const FormatImage = React.forwardRef((props, ref) => {
|
|
8403
8401
|
setImgSrc(v);
|
8404
8402
|
}
|
8405
8403
|
}));
|
8406
|
-
// useEffect(() => {
|
8407
|
-
// setImgSrc(src);
|
8408
|
-
// }, [src]);
|
8409
|
-
const imgRef = React.useRef(null);
|
8410
8404
|
React.useEffect(() => {
|
8411
|
-
|
8412
|
-
const { current } = imgRef;
|
8413
|
-
if (current) {
|
8414
|
-
observer = new IntersectionObserver((entries) => {
|
8415
|
-
entries.forEach((entry) => {
|
8416
|
-
if (entry.isIntersecting) {
|
8417
|
-
setImgSrc(src);
|
8418
|
-
observer.unobserve(current);
|
8419
|
-
}
|
8420
|
-
});
|
8421
|
-
}, { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8422
|
-
);
|
8423
|
-
observer.observe(current);
|
8424
|
-
}
|
8425
|
-
return () => {
|
8426
|
-
if (observer && current) {
|
8427
|
-
observer.unobserve(current);
|
8428
|
-
}
|
8429
|
-
};
|
8405
|
+
setImgSrc(src);
|
8430
8406
|
}, [src]);
|
8431
|
-
|
8407
|
+
React.useRef(null);
|
8408
|
+
// useEffect(() => {
|
8409
|
+
// let observer: any = null;
|
8410
|
+
// const { current } = imgRef;
|
8411
|
+
// if (current) {
|
8412
|
+
// observer = new IntersectionObserver(
|
8413
|
+
// (entries) => {
|
8414
|
+
// entries.forEach((entry) => {
|
8415
|
+
// if (entry.isIntersecting) {
|
8416
|
+
// setImgSrc(src);
|
8417
|
+
// observer.unobserve(current);
|
8418
|
+
// }
|
8419
|
+
// });
|
8420
|
+
// },
|
8421
|
+
// { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8422
|
+
// );
|
8423
|
+
// observer.observe(current);
|
8424
|
+
// }
|
8425
|
+
// return () => {
|
8426
|
+
// if (observer && current) {
|
8427
|
+
// observer.unobserve(current);
|
8428
|
+
// }
|
8429
|
+
// };
|
8430
|
+
// }, [src]);
|
8431
|
+
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
8432
8432
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
8433
8433
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
8434
8434
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|