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