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/pb-ui.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', '
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.
|
5
|
-
})(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css,
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM));
|
5
|
+
})(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM) { 'use strict';
|
6
6
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
8
8
|
var n = Object.create(null);
|
@@ -1175,7 +1175,7 @@
|
|
1175
1175
|
key: '4'
|
1176
1176
|
}
|
1177
1177
|
], []);
|
1178
|
-
|
1178
|
+
React.useMemo(() => {
|
1179
1179
|
if (layoutType === undefined) {
|
1180
1180
|
const list = lodash.cloneDeep(columns) || defaultColumns;
|
1181
1181
|
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 } })));
|
@@ -1218,8 +1218,7 @@
|
|
1218
1218
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1219
1219
|
React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
|
1220
1220
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
1221
|
-
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1222
|
-
React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
1221
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
1223
1222
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
1224
1223
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
1225
1224
|
color: submitColor,
|
@@ -8383,7 +8382,7 @@
|
|
8383
8382
|
* @Author: binruan@chatlabs.com
|
8384
8383
|
* @Date: 2024-03-20 10:27:31
|
8385
8384
|
* @LastEditors: binruan@chatlabs.com
|
8386
|
-
* @LastEditTime: 2024-05-
|
8385
|
+
* @LastEditTime: 2024-05-20 15:53:04
|
8387
8386
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8388
8387
|
*
|
8389
8388
|
*/
|
@@ -8395,32 +8394,34 @@
|
|
8395
8394
|
setImgSrc(v);
|
8396
8395
|
}
|
8397
8396
|
}));
|
8398
|
-
// useEffect(() => {
|
8399
|
-
// setImgSrc(src);
|
8400
|
-
// }, [src]);
|
8401
|
-
const imgRef = React.useRef(null);
|
8402
8397
|
React.useEffect(() => {
|
8403
|
-
|
8404
|
-
const { current } = imgRef;
|
8405
|
-
if (current) {
|
8406
|
-
observer = new IntersectionObserver((entries) => {
|
8407
|
-
entries.forEach((entry) => {
|
8408
|
-
if (entry.isIntersecting) {
|
8409
|
-
setImgSrc(src);
|
8410
|
-
observer.unobserve(current);
|
8411
|
-
}
|
8412
|
-
});
|
8413
|
-
}, { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8414
|
-
);
|
8415
|
-
observer.observe(current);
|
8416
|
-
}
|
8417
|
-
return () => {
|
8418
|
-
if (observer && current) {
|
8419
|
-
observer.unobserve(current);
|
8420
|
-
}
|
8421
|
-
};
|
8398
|
+
setImgSrc(src);
|
8422
8399
|
}, [src]);
|
8423
|
-
|
8400
|
+
React.useRef(null);
|
8401
|
+
// useEffect(() => {
|
8402
|
+
// let observer: any = null;
|
8403
|
+
// const { current } = imgRef;
|
8404
|
+
// if (current) {
|
8405
|
+
// observer = new IntersectionObserver(
|
8406
|
+
// (entries) => {
|
8407
|
+
// entries.forEach((entry) => {
|
8408
|
+
// if (entry.isIntersecting) {
|
8409
|
+
// setImgSrc(src);
|
8410
|
+
// observer.unobserve(current);
|
8411
|
+
// }
|
8412
|
+
// });
|
8413
|
+
// },
|
8414
|
+
// { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8415
|
+
// );
|
8416
|
+
// observer.observe(current);
|
8417
|
+
// }
|
8418
|
+
// return () => {
|
8419
|
+
// if (observer && current) {
|
8420
|
+
// observer.unobserve(current);
|
8421
|
+
// }
|
8422
|
+
// };
|
8423
|
+
// }, [src]);
|
8424
|
+
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
8424
8425
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
8425
8426
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
8426
8427
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|