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