@agentscope-ai/design 1.0.26 → 1.0.27-beta.1769678521654
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/lib/antd/styles/index.style.js +3 -1
- package/lib/antd/styles/inputSearch.style.d.ts +2 -0
- package/lib/antd/styles/inputSearch.style.js +15 -0
- package/lib/antd/styles/table.style.js +7 -1
- package/lib/components/commonComponents/Audio/Control.style.js +1 -1
- package/lib/components/commonComponents/CodeBlock/index.d.ts +7 -0
- package/lib/components/commonComponents/CodeBlock/index.js +2 -2
- package/lib/components/commonComponents/MediaPreview/demo/demo1.d.ts +1 -0
- package/lib/components/commonComponents/MediaPreview/demo/demo1.js +44 -0
- package/lib/components/commonComponents/MediaPreview/index.d.ts +23 -0
- package/lib/components/commonComponents/MediaPreview/index.js +352 -0
- package/lib/components/commonComponents/MediaPreview/index.style.d.ts +1 -0
- package/lib/components/commonComponents/MediaPreview/index.style.js +54 -0
- package/lib/components/commonComponents/Pagination/index.js +22 -23
- package/lib/components/commonComponents/PromptsEditor/index.d.ts +6 -0
- package/lib/components/commonComponents/PromptsEditor/index.js +2 -1
- package/lib/components/commonComponents/Tabs/index.d.ts +6 -0
- package/lib/components/commonComponents/Tabs/index.js +7 -5
- package/lib/index.d.ts +9 -8
- package/lib/index.js +7 -6
- package/llms/all.llms.txt +1071 -1039
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +1 -0
- package/llms/components/commonComponents/InputSearch/index.zh-CN.llms.txt +6 -0
- package/llms/components/commonComponents/MediaPreview/index.zh-CN.llms.txt +21 -0
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +1 -0
- package/llms/docs/changelog/index.zh-CN.llms.txt +22 -0
- package/llms/index.llms.txt +19 -17
- package/package.json +1 -1
- package/llms/docs/guide/iconLibrary.zh-CN.llms.txt +0 -150
- package/llms/docs/icons/sparkIcons.zh-CN.llms.txt +0 -25
|
@@ -10,6 +10,7 @@ import { useButtonStyle } from "./button.style";
|
|
|
10
10
|
import { useDropdownStyle } from "./dropdown.style";
|
|
11
11
|
import { useFloatButtonStyle } from "./floatButton.style";
|
|
12
12
|
import { useInputNumberStyle } from "./inputNumber.style";
|
|
13
|
+
import { useInputSearchStyle } from "./inputSearch.style";
|
|
13
14
|
import { useMessageStyle } from "./message.style";
|
|
14
15
|
import { useNotificationStyle } from "./notification.style";
|
|
15
16
|
import { usePopoverStyle } from "./popover.style";
|
|
@@ -34,6 +35,7 @@ export var useIndexStyle = function useIndexStyle() {
|
|
|
34
35
|
var DropdownStyle = useDropdownStyle();
|
|
35
36
|
var FloatButtonStyle = useFloatButtonStyle();
|
|
36
37
|
var InputNumberStyle = useInputNumberStyle();
|
|
38
|
+
var InputSearchStyle = useInputSearchStyle();
|
|
37
39
|
var MessageStyle = useMessageStyle();
|
|
38
40
|
var NotificationStyle = useNotificationStyle();
|
|
39
41
|
var PopoverStyle = usePopoverStyle();
|
|
@@ -47,7 +49,7 @@ export var useIndexStyle = function useIndexStyle() {
|
|
|
47
49
|
|
|
48
50
|
// 返回组合组件
|
|
49
51
|
return function IndexStyleComponent() {
|
|
50
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseStyle), /*#__PURE__*/React.createElement(AlertStyle), /*#__PURE__*/React.createElement(BreadcrumbStyle), /*#__PURE__*/React.createElement(ButtonStyle), /*#__PURE__*/React.createElement(DropdownStyle), /*#__PURE__*/React.createElement(FloatButtonStyle), /*#__PURE__*/React.createElement(InputNumberStyle), /*#__PURE__*/React.createElement(MessageStyle), /*#__PURE__*/React.createElement(NotificationStyle), /*#__PURE__*/React.createElement(PopoverStyle), /*#__PURE__*/React.createElement(RadioStyle), /*#__PURE__*/React.createElement(SegmentStyle), /*#__PURE__*/React.createElement(SelectStyle), /*#__PURE__*/React.createElement(SliderStyle), /*#__PURE__*/React.createElement(TableStyle), /*#__PURE__*/React.createElement(TooltipStyle), /*#__PURE__*/React.createElement(TreeStyle));
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseStyle), /*#__PURE__*/React.createElement(AlertStyle), /*#__PURE__*/React.createElement(BreadcrumbStyle), /*#__PURE__*/React.createElement(ButtonStyle), /*#__PURE__*/React.createElement(DropdownStyle), /*#__PURE__*/React.createElement(FloatButtonStyle), /*#__PURE__*/React.createElement(InputNumberStyle), /*#__PURE__*/React.createElement(InputSearchStyle), /*#__PURE__*/React.createElement(MessageStyle), /*#__PURE__*/React.createElement(NotificationStyle), /*#__PURE__*/React.createElement(PopoverStyle), /*#__PURE__*/React.createElement(RadioStyle), /*#__PURE__*/React.createElement(SegmentStyle), /*#__PURE__*/React.createElement(SelectStyle), /*#__PURE__*/React.createElement(SliderStyle), /*#__PURE__*/React.createElement(TableStyle), /*#__PURE__*/React.createElement(TooltipStyle), /*#__PURE__*/React.createElement(TreeStyle));
|
|
51
53
|
};
|
|
52
54
|
};
|
|
53
55
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
+
export var useInputSearchStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-input-outlined,\n.", "-input-outlined.", "-input-disabled {\n border-color: var(--", "-color-border-secondary);\n}\n\n.", "-input-sm {\n font-size: 12px;\n height: 24px;\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.antPrefix;
|
|
14
|
+
});
|
|
15
|
+
export default useInputSearchStyle;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
-
export var useTableStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table-cell {\n border-radius: 0;\n}\n"])), function (p) {
|
|
4
|
+
export var useTableStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-table-cell {\n border-radius: 0;\n}\n.", "-table-wrapper .", "-table .", "-table-header {\n border-radius: 0;\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
5
11
|
return p.antPrefix;
|
|
6
12
|
});
|
|
7
13
|
export default useTableStyle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
-
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-media-player-controller {\n display: flex;\n padding: 8px;\n gap: 8px;\n align-items: center;\n width: 100%;\n height: 40px;\n overflow: hidden;\n}\n\n// \u65F6\u95F4\u6587\u672C\u6837\u5F0F\n.", "-media-time-text {\n flex-grow: 0;\n font-size: 12px;\n line-height: 20px;\n}\n\n// \u8FDB\u5EA6\u6761\u5BB9\u5668\u6837\u5F0F\n.", "-media-progress-container {\n flex-grow: 1;\n cursor: pointer;\n}\n\n// \u8FDB\u5EA6\u6761\u6837\u5F0F\n.", "-media-progress-bar {\n width: 100%;\n\n .", "-progress-bg {\n transition-duration: 0s;\n }\n}\n"])), function (p) {
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-media-player-controller {\n display: flex;\n padding: 8px;\n gap: 8px;\n align-items: center;\n width: 100%;\n height: 40px;\n overflow: hidden;\n}\n\n// \u65F6\u95F4\u6587\u672C\u6837\u5F0F\n.", "-media-time-text {\n flex-grow: 0;\n font-size: 12px;\n line-height: 20px;\n}\n\n// \u8FDB\u5EA6\u6761\u5BB9\u5668\u6837\u5F0F\n.", "-media-progress-container {\n flex-grow: 1;\n cursor: pointer;\n\n}\n\n// \u8FDB\u5EA6\u6761\u6837\u5F0F\n.", "-media-progress-bar {\n display: flex;\n align-items: center;\n width: 100%;\n\n .", "-progress-bg {\n transition-duration: 0s;\n }\n}\n"])), function (p) {
|
|
5
5
|
return p.sparkPrefix;
|
|
6
6
|
}, function (p) {
|
|
7
7
|
return p.sparkPrefix;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Extension } from '@codemirror/state';
|
|
1
2
|
export interface CodeBlockProps {
|
|
2
3
|
/**
|
|
3
4
|
* @description 语言
|
|
@@ -24,6 +25,12 @@ export interface CodeBlockProps {
|
|
|
24
25
|
*/
|
|
25
26
|
readOnly?: boolean;
|
|
26
27
|
onChange?: (value?: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* @description 扩展
|
|
30
|
+
* @descriptionEn Extensions
|
|
31
|
+
* @default []
|
|
32
|
+
*/
|
|
33
|
+
extensions?: Extension[];
|
|
27
34
|
}
|
|
28
35
|
export declare const langExtensionsMap: Record<string, any[]>;
|
|
29
36
|
export declare const beautifulJson: (val?: string, count?: number) => string;
|
|
@@ -78,9 +78,9 @@ var CodeMirrorWrapper = function CodeMirrorWrapper(props) {
|
|
|
78
78
|
}
|
|
79
79
|
return props.theme === 'dark' ? vscodeDark : vscodeLight;
|
|
80
80
|
}, [isDarkMode, props.theme]);
|
|
81
|
-
var extensions = typeof props.language === 'string' ? [].concat(_toConsumableArray(langExtensionsMap[props.language] || []), _toConsumableArray(props.value && props.language in lintExtensionsMap ? lintExtensionsMap[props.language] : [])) : props.language.reduce(function (ext, lang) {
|
|
81
|
+
var extensions = (props.extensions || []).concat(typeof props.language === 'string' ? [].concat(_toConsumableArray(langExtensionsMap[props.language] || []), _toConsumableArray(props.value && props.language in lintExtensionsMap ? lintExtensionsMap[props.language] : [])) : props.language.reduce(function (ext, lang) {
|
|
82
82
|
return [].concat(_toConsumableArray(ext), [langExtensionsMap[lang]]);
|
|
83
|
-
}, []);
|
|
83
|
+
}, []));
|
|
84
84
|
var codeMirrorElement = /*#__PURE__*/_jsx("div", {
|
|
85
85
|
className: cls("".concat(sparkPrefix, "-code-block"), props.className),
|
|
86
86
|
children: /*#__PURE__*/_jsx(CodeMirror, _objectSpread({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { Button, MediaPreview } from "../../../..";
|
|
8
|
+
import { useState } from 'react';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var mediaList = [{
|
|
13
|
+
type: 'image',
|
|
14
|
+
src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
|
|
15
|
+
alt: 'Image 1'
|
|
16
|
+
}, {
|
|
17
|
+
type: 'video',
|
|
18
|
+
src: 'https://cloud.video.taobao.com/vod/MgaPySDXyyWMT4QM-CWYjX6BlVMGNei259qPTCCQ7ew.mp4',
|
|
19
|
+
alt: 'Video 1'
|
|
20
|
+
}, {
|
|
21
|
+
type: 'image',
|
|
22
|
+
src: 'https://img.alicdn.com/imgextra/i4/O1CN01LwpgZg1DJokMyCkBJ_!!6000000000196-2-tps-312-312.png',
|
|
23
|
+
alt: 'Image 2'
|
|
24
|
+
}];
|
|
25
|
+
export default function () {
|
|
26
|
+
var _useState = useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
visible = _useState2[0],
|
|
29
|
+
setVisible = _useState2[1];
|
|
30
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
31
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return setVisible(true);
|
|
34
|
+
},
|
|
35
|
+
children: "Open Media Preview"
|
|
36
|
+
}), /*#__PURE__*/_jsx(MediaPreview, {
|
|
37
|
+
visible: visible,
|
|
38
|
+
mediaList: mediaList,
|
|
39
|
+
onClose: function onClose() {
|
|
40
|
+
return setVisible(false);
|
|
41
|
+
}
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MediaItem {
|
|
3
|
+
/** 媒体类型 */
|
|
4
|
+
type: 'image' | 'video';
|
|
5
|
+
/** 媒体资源地址 */
|
|
6
|
+
src: string;
|
|
7
|
+
/** 媒体替代文本 */
|
|
8
|
+
alt?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MediaPreviewProps {
|
|
11
|
+
/** 自定义样式类名 */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 是否显示预览 */
|
|
14
|
+
visible: boolean;
|
|
15
|
+
/** 媒体列表 */
|
|
16
|
+
mediaList: MediaItem[];
|
|
17
|
+
/** 当前选中的索引 */
|
|
18
|
+
currentIndex?: number;
|
|
19
|
+
/** 关闭回调 */
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
declare const MediaPreview: React.FC<MediaPreviewProps>;
|
|
23
|
+
export default MediaPreview;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { getCommonConfig, useCommonConfig } from "../../../config";
|
|
14
|
+
import { SparkAmplifyLine, SparkExitFullscreenLine, SparkFalseLine, SparkLeftLine, SparkReduceLine, SparkRightLine } from '@agentscope-ai/icons';
|
|
15
|
+
import { ConfigProvider } from 'antd';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
18
|
+
import IconButton from "../IconButton";
|
|
19
|
+
import Video from "../Video";
|
|
20
|
+
import { useStyle } from "./index.style";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
// 边界校验辅助函数
|
|
24
|
+
var clampIndex = function clampIndex(index, length) {
|
|
25
|
+
return Math.max(0, Math.min(index, length - 1));
|
|
26
|
+
};
|
|
27
|
+
var MediaPreview = function MediaPreview(_ref) {
|
|
28
|
+
var className = _ref.className,
|
|
29
|
+
visible = _ref.visible,
|
|
30
|
+
mediaList = _ref.mediaList,
|
|
31
|
+
_ref$currentIndex = _ref.currentIndex,
|
|
32
|
+
currentIndex = _ref$currentIndex === void 0 ? 0 : _ref$currentIndex,
|
|
33
|
+
onClose = _ref.onClose;
|
|
34
|
+
var _getCommonConfig = getCommonConfig(),
|
|
35
|
+
sparkPrefix = _getCommonConfig.sparkPrefix;
|
|
36
|
+
var _useCommonConfig = useCommonConfig(),
|
|
37
|
+
configProviderProps = _useCommonConfig.configProviderProps;
|
|
38
|
+
var Style = useStyle();
|
|
39
|
+
// 问题2: 添加边界校验
|
|
40
|
+
var _useState = useState(function () {
|
|
41
|
+
return clampIndex(currentIndex, mediaList.length);
|
|
42
|
+
}),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
activeIndex = _useState2[0],
|
|
45
|
+
setActiveIndex = _useState2[1];
|
|
46
|
+
var _useState3 = useState(1),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
scale = _useState4[0],
|
|
49
|
+
setScale = _useState4[1];
|
|
50
|
+
var _useState5 = useState({
|
|
51
|
+
width: 960,
|
|
52
|
+
height: 600
|
|
53
|
+
}),
|
|
54
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
55
|
+
baseSize = _useState6[0],
|
|
56
|
+
setBaseSize = _useState6[1];
|
|
57
|
+
var _useState7 = useState(false),
|
|
58
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
59
|
+
isTransitioning = _useState8[0],
|
|
60
|
+
setIsTransitioning = _useState8[1];
|
|
61
|
+
var containerRef = useRef(null);
|
|
62
|
+
|
|
63
|
+
// 计算基于屏幕大小的基础尺寸
|
|
64
|
+
useEffect(function () {
|
|
65
|
+
var updateBaseSize = function updateBaseSize() {
|
|
66
|
+
// 这里的 0.8 是预留边距比例,可根据需要调整
|
|
67
|
+
var screenWidth = 960;
|
|
68
|
+
var screenHeight = 600;
|
|
69
|
+
|
|
70
|
+
// 最小 960 * 600
|
|
71
|
+
var width = Math.max(screenWidth, 960);
|
|
72
|
+
var height = Math.max(screenHeight, 600);
|
|
73
|
+
setBaseSize({
|
|
74
|
+
width: width,
|
|
75
|
+
height: height
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
updateBaseSize();
|
|
79
|
+
window.addEventListener('resize', updateBaseSize);
|
|
80
|
+
return function () {
|
|
81
|
+
return window.removeEventListener('resize', updateBaseSize);
|
|
82
|
+
};
|
|
83
|
+
}, []);
|
|
84
|
+
|
|
85
|
+
// 问题8: 当 currentIndex 变化时更新 activeIndex,添加边界检查和重置 scale
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
var validIndex = clampIndex(currentIndex, mediaList.length);
|
|
88
|
+
setActiveIndex(validIndex);
|
|
89
|
+
setScale(1);
|
|
90
|
+
}, [currentIndex, mediaList.length]);
|
|
91
|
+
|
|
92
|
+
// 当 visible 变化时重置缩放
|
|
93
|
+
useEffect(function () {
|
|
94
|
+
if (visible) {
|
|
95
|
+
setScale(1);
|
|
96
|
+
}
|
|
97
|
+
}, [visible]);
|
|
98
|
+
|
|
99
|
+
// 问题6: 提取公共过渡动画逻辑
|
|
100
|
+
var transitionTo = useCallback(function (getNextIndex) {
|
|
101
|
+
if (isTransitioning) return;
|
|
102
|
+
setIsTransitioning(true);
|
|
103
|
+
setTimeout(function () {
|
|
104
|
+
setActiveIndex(getNextIndex);
|
|
105
|
+
setScale(1);
|
|
106
|
+
setTimeout(function () {
|
|
107
|
+
return setIsTransitioning(false);
|
|
108
|
+
}, 50);
|
|
109
|
+
}, 150);
|
|
110
|
+
}, [isTransitioning]);
|
|
111
|
+
|
|
112
|
+
// 切换到上一张
|
|
113
|
+
var handlePrev = useCallback(function () {
|
|
114
|
+
transitionTo(function (prev) {
|
|
115
|
+
return prev > 0 ? prev - 1 : mediaList.length - 1;
|
|
116
|
+
});
|
|
117
|
+
}, [mediaList.length, transitionTo]);
|
|
118
|
+
|
|
119
|
+
// 切换到下一张
|
|
120
|
+
var handleNext = useCallback(function () {
|
|
121
|
+
transitionTo(function (prev) {
|
|
122
|
+
return prev < mediaList.length - 1 ? prev + 1 : 0;
|
|
123
|
+
});
|
|
124
|
+
}, [mediaList.length, transitionTo]);
|
|
125
|
+
|
|
126
|
+
// 放大
|
|
127
|
+
var handleZoomIn = useCallback(function () {
|
|
128
|
+
setScale(function (prev) {
|
|
129
|
+
return Math.min(prev + 0.25, 3);
|
|
130
|
+
});
|
|
131
|
+
}, []);
|
|
132
|
+
|
|
133
|
+
// 缩小
|
|
134
|
+
var handleZoomOut = useCallback(function () {
|
|
135
|
+
setScale(function (prev) {
|
|
136
|
+
return Math.max(prev - 0.25, 0.5);
|
|
137
|
+
});
|
|
138
|
+
}, []);
|
|
139
|
+
|
|
140
|
+
// 问题7: 分离全屏和重置缩放的职责
|
|
141
|
+
// 进入全屏
|
|
142
|
+
var handleEnterFullscreen = useCallback(function () {
|
|
143
|
+
if (!containerRef.current || document.fullscreenElement) return;
|
|
144
|
+
containerRef.current.requestFullscreen().catch(function (err) {
|
|
145
|
+
console.error("Error attempting to enable full-screen mode: ".concat(err.message, " (").concat(err.name, ")"));
|
|
146
|
+
});
|
|
147
|
+
}, []);
|
|
148
|
+
|
|
149
|
+
// 退出全屏
|
|
150
|
+
var handleExitFullscreen = useCallback(function () {
|
|
151
|
+
if (document.fullscreenElement) {
|
|
152
|
+
document.exitFullscreen();
|
|
153
|
+
}
|
|
154
|
+
}, []);
|
|
155
|
+
|
|
156
|
+
// 切换全屏
|
|
157
|
+
var handleToggleFullscreen = useCallback(function () {
|
|
158
|
+
if (document.fullscreenElement) {
|
|
159
|
+
handleExitFullscreen();
|
|
160
|
+
} else {
|
|
161
|
+
handleEnterFullscreen();
|
|
162
|
+
}
|
|
163
|
+
}, [handleEnterFullscreen, handleExitFullscreen]);
|
|
164
|
+
|
|
165
|
+
// 重置所有状态(缩放 + 退出全屏)
|
|
166
|
+
var handleResetAll = useCallback(function () {
|
|
167
|
+
setScale(1);
|
|
168
|
+
handleExitFullscreen();
|
|
169
|
+
}, [handleExitFullscreen]);
|
|
170
|
+
|
|
171
|
+
// 点击缩略图(复用 transitionTo)
|
|
172
|
+
var handleThumbnailClick = useCallback(function (index) {
|
|
173
|
+
if (index === activeIndex) return;
|
|
174
|
+
transitionTo(function () {
|
|
175
|
+
return index;
|
|
176
|
+
});
|
|
177
|
+
}, [activeIndex, transitionTo]);
|
|
178
|
+
|
|
179
|
+
// 键盘事件
|
|
180
|
+
useEffect(function () {
|
|
181
|
+
if (!visible) return;
|
|
182
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
183
|
+
switch (e.key) {
|
|
184
|
+
case 'ArrowLeft':
|
|
185
|
+
handlePrev();
|
|
186
|
+
break;
|
|
187
|
+
case 'ArrowRight':
|
|
188
|
+
handleNext();
|
|
189
|
+
break;
|
|
190
|
+
case 'Escape':
|
|
191
|
+
onClose();
|
|
192
|
+
break;
|
|
193
|
+
case '+':
|
|
194
|
+
case '=':
|
|
195
|
+
handleZoomIn();
|
|
196
|
+
break;
|
|
197
|
+
case '-':
|
|
198
|
+
handleZoomOut();
|
|
199
|
+
break;
|
|
200
|
+
case 'f':
|
|
201
|
+
case 'F':
|
|
202
|
+
handleToggleFullscreen();
|
|
203
|
+
break;
|
|
204
|
+
case 'r':
|
|
205
|
+
case 'R':
|
|
206
|
+
handleResetAll();
|
|
207
|
+
break;
|
|
208
|
+
default:
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
213
|
+
return function () {
|
|
214
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
215
|
+
};
|
|
216
|
+
}, [visible, handlePrev, handleNext, onClose, handleZoomIn, handleZoomOut, handleToggleFullscreen, handleResetAll]);
|
|
217
|
+
if (!visible || mediaList.length === 0) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
var currentMedia = mediaList[activeIndex];
|
|
221
|
+
return /*#__PURE__*/_jsxs(ConfigProvider, _objectSpread(_objectSpread({}, configProviderProps), {}, {
|
|
222
|
+
children: [/*#__PURE__*/_jsx(Style, {}), /*#__PURE__*/_jsxs("div", {
|
|
223
|
+
ref: containerRef,
|
|
224
|
+
role: "dialog",
|
|
225
|
+
"aria-modal": "true",
|
|
226
|
+
"aria-label": "\u5A92\u4F53\u9884\u89C8",
|
|
227
|
+
className: classNames("".concat(sparkPrefix, "-media-preview-container"), className),
|
|
228
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
229
|
+
className: classNames("".concat(sparkPrefix, "-media-preview-main-content"), {
|
|
230
|
+
transitioning: isTransitioning
|
|
231
|
+
}),
|
|
232
|
+
style: {
|
|
233
|
+
width: baseSize.width,
|
|
234
|
+
height: baseSize.height,
|
|
235
|
+
transform: "scale(".concat(scale, ")")
|
|
236
|
+
},
|
|
237
|
+
children: currentMedia.type === 'image' ? /*#__PURE__*/_jsx("img", {
|
|
238
|
+
className: "".concat(sparkPrefix, "-media-preview-main-media"),
|
|
239
|
+
src: currentMedia.src,
|
|
240
|
+
alt: currentMedia.alt || ''
|
|
241
|
+
}) : /*#__PURE__*/_jsx(Video, {
|
|
242
|
+
src: currentMedia.src,
|
|
243
|
+
controls: true
|
|
244
|
+
})
|
|
245
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
246
|
+
className: "".concat(sparkPrefix, "-media-preview-nav-left"),
|
|
247
|
+
onClick: handlePrev,
|
|
248
|
+
"aria-label": "\u4E0A\u4E00\u5F20",
|
|
249
|
+
bordered: false,
|
|
250
|
+
icon: /*#__PURE__*/_jsx(SparkLeftLine, {
|
|
251
|
+
className: "".concat(sparkPrefix, "-media-preview-nav-icon")
|
|
252
|
+
})
|
|
253
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
254
|
+
className: "".concat(sparkPrefix, "-media-preview-nav-right"),
|
|
255
|
+
onClick: handleNext,
|
|
256
|
+
"aria-label": "\u4E0B\u4E00\u5F20",
|
|
257
|
+
bordered: false,
|
|
258
|
+
icon: /*#__PURE__*/_jsx(SparkRightLine, {
|
|
259
|
+
className: "".concat(sparkPrefix, "-media-preview-nav-icon")
|
|
260
|
+
})
|
|
261
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
262
|
+
className: "".concat(sparkPrefix, "-media-preview-toolbar"),
|
|
263
|
+
role: "toolbar",
|
|
264
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
265
|
+
className: "".concat(sparkPrefix, "-media-preview-zoom-controls"),
|
|
266
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
267
|
+
size: "large",
|
|
268
|
+
"aria-label": "\u653E\u5927",
|
|
269
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-button"),
|
|
270
|
+
onClick: handleZoomIn,
|
|
271
|
+
bordered: false,
|
|
272
|
+
icon: /*#__PURE__*/_jsx(SparkAmplifyLine, {
|
|
273
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-icon")
|
|
274
|
+
})
|
|
275
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
276
|
+
size: "large",
|
|
277
|
+
"aria-label": "\u7F29\u5C0F",
|
|
278
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-button"),
|
|
279
|
+
onClick: handleZoomOut,
|
|
280
|
+
bordered: false,
|
|
281
|
+
icon: /*#__PURE__*/_jsx(SparkReduceLine, {
|
|
282
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-icon")
|
|
283
|
+
})
|
|
284
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
285
|
+
size: "large",
|
|
286
|
+
"aria-label": "\u91CD\u7F6E",
|
|
287
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-button"),
|
|
288
|
+
onClick: handleResetAll,
|
|
289
|
+
bordered: false,
|
|
290
|
+
icon: /*#__PURE__*/_jsx(SparkExitFullscreenLine, {
|
|
291
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-icon")
|
|
292
|
+
})
|
|
293
|
+
})]
|
|
294
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
295
|
+
className: "".concat(sparkPrefix, "-media-preview-zoom-controls"),
|
|
296
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
297
|
+
className: "".concat(sparkPrefix, "-media-preview-close-button"),
|
|
298
|
+
onClick: onClose,
|
|
299
|
+
"aria-label": "\u5173\u95ED\u9884\u89C8",
|
|
300
|
+
bordered: false,
|
|
301
|
+
size: "large",
|
|
302
|
+
icon: /*#__PURE__*/_jsx(SparkFalseLine, {
|
|
303
|
+
className: "".concat(sparkPrefix, "-media-preview-tool-icon")
|
|
304
|
+
})
|
|
305
|
+
})
|
|
306
|
+
})]
|
|
307
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
308
|
+
className: "".concat(sparkPrefix, "-media-preview-thumbnail-carousel"),
|
|
309
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
310
|
+
className: "".concat(sparkPrefix, "-media-preview-thumbnail-wrapper"),
|
|
311
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
312
|
+
className: "".concat(sparkPrefix, "-media-preview-thumbnail-nav-icon"),
|
|
313
|
+
onClick: handlePrev,
|
|
314
|
+
"aria-label": "\u4E0A\u4E00\u5F20",
|
|
315
|
+
bordered: false,
|
|
316
|
+
icon: /*#__PURE__*/_jsx(SparkLeftLine, {})
|
|
317
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
318
|
+
className: "".concat(sparkPrefix, "-media-preview-thumbnail-list"),
|
|
319
|
+
children: mediaList.map(function (item, index) {
|
|
320
|
+
return /*#__PURE__*/_jsx("div", {
|
|
321
|
+
className: classNames("".concat(sparkPrefix, "-media-preview-thumbnail-item"), {
|
|
322
|
+
active: index === activeIndex
|
|
323
|
+
}),
|
|
324
|
+
onClick: function onClick() {
|
|
325
|
+
return handleThumbnailClick(index);
|
|
326
|
+
},
|
|
327
|
+
children: item.type === 'image' ? /*#__PURE__*/_jsx("img", {
|
|
328
|
+
src: item.src,
|
|
329
|
+
alt: item.alt || "\u5A92\u4F53 ".concat(index + 1)
|
|
330
|
+
}) :
|
|
331
|
+
/*#__PURE__*/
|
|
332
|
+
// 问题4: 添加 preload 和 muted 优化视频缩略图
|
|
333
|
+
_jsx("video", {
|
|
334
|
+
src: item.src,
|
|
335
|
+
preload: "metadata",
|
|
336
|
+
muted: true
|
|
337
|
+
})
|
|
338
|
+
}, index);
|
|
339
|
+
})
|
|
340
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
341
|
+
className: "".concat(sparkPrefix, "-media-preview-thumbnail-nav-icon"),
|
|
342
|
+
onClick: handleNext,
|
|
343
|
+
"aria-label": "\u4E0B\u4E00\u5F20",
|
|
344
|
+
bordered: false,
|
|
345
|
+
icon: /*#__PURE__*/_jsx(SparkRightLine, {})
|
|
346
|
+
})]
|
|
347
|
+
})
|
|
348
|
+
})]
|
|
349
|
+
})]
|
|
350
|
+
}));
|
|
351
|
+
};
|
|
352
|
+
export default MediaPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyle: () => () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import createGlobalStyle from "../../../libs/createStyle";
|
|
4
|
+
export var useStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-media-preview-container {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 9999;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--", "-color-bg-mask);\n}\n\n.", "-media-preview-main-content {\n border-radius: var(--", "-border-radius-lg);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: transform 0.3s ease, opacity 0.15s ease;\n opacity: 1;\n\n &.transitioning {\n opacity: 0;\n }\n}\n\n.", "-media-preview-main-media {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.", "-media-preview-nav-left {\n position: absolute;\n left: 48px;\n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.", "-media-preview-nav-right {\n position: absolute;\n right: 48px;\n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n padding: 0;\n}\n\n.", "-media-preview-nav-icon {\n font-size: 48px;\n color: var(--", "-color-bg-base);\n}\n\n.", "-media-preview-toolbar {\n position: absolute;\n top: 36px;\n right: 36px;\n display: flex;\n flex-direction: row;\n gap: 16px;\n}\n\n.", "-media-preview-zoom-controls {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n background: var(--", "-color-bg-mask);\n}\n\n.", "-media-preview-close-button {\n display: flex;\n flex-direction: row;\n padding: 8px;\n border-radius: 8px;\n cursor: pointer;\n border: none;\n}\n\n.", "-media-preview-tool-button {\n background: transparent;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.", "-media-preview-tool-icon {\n font-size: 24px;\n color: var(--", "-color-bg-base);\n cursor: pointer;\n\n &:hover {\n opacity: 0.8;\n }\n}\n\n.", "-media-preview-thumbnail-carousel {\n position: absolute;\n bottom: 42px;\n left: 50%;\n transform: translateX(-50%);\n padding: 8px;\n border-radius: 8px;\n background: var(--", "-color-bg-mask);\n}\n\n.", "-media-preview-thumbnail-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n.", "-media-preview-thumbnail-nav-icon {\n font-size: 16px;\n color: var(--", "-color-bg-base);\n cursor: pointer;\n flex-shrink: 0;\n\n &:hover {\n color: var(--", "-color-bg-base) !important;\n opacity: 0.8;\n }\n}\n\n.", "-media-preview-thumbnail-list {\n display: flex;\n flex-direction: row;\n gap: 8px;\n overflow-x: auto;\n scroll-behavior: smooth;\n max-width: 720px;\n\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.", "-media-preview-thumbnail-item {\n width: 56px;\n height: 56px;\n border-radius: 8px;\n overflow: hidden;\n cursor: pointer;\n flex-shrink: 0;\n border: 1px solid transparent;\n box-sizing: border-box;\n\n &.active {\n border-color: var(--", "-color-bg-base);\n }\n\n img,\n video {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.sparkPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.sparkPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
13
|
+
return p.sparkPrefix;
|
|
14
|
+
}, function (p) {
|
|
15
|
+
return p.sparkPrefix;
|
|
16
|
+
}, function (p) {
|
|
17
|
+
return p.sparkPrefix;
|
|
18
|
+
}, function (p) {
|
|
19
|
+
return p.sparkPrefix;
|
|
20
|
+
}, function (p) {
|
|
21
|
+
return p.antPrefix;
|
|
22
|
+
}, function (p) {
|
|
23
|
+
return p.sparkPrefix;
|
|
24
|
+
}, function (p) {
|
|
25
|
+
return p.sparkPrefix;
|
|
26
|
+
}, function (p) {
|
|
27
|
+
return p.antPrefix;
|
|
28
|
+
}, function (p) {
|
|
29
|
+
return p.sparkPrefix;
|
|
30
|
+
}, function (p) {
|
|
31
|
+
return p.sparkPrefix;
|
|
32
|
+
}, function (p) {
|
|
33
|
+
return p.sparkPrefix;
|
|
34
|
+
}, function (p) {
|
|
35
|
+
return p.antPrefix;
|
|
36
|
+
}, function (p) {
|
|
37
|
+
return p.sparkPrefix;
|
|
38
|
+
}, function (p) {
|
|
39
|
+
return p.antPrefix;
|
|
40
|
+
}, function (p) {
|
|
41
|
+
return p.sparkPrefix;
|
|
42
|
+
}, function (p) {
|
|
43
|
+
return p.sparkPrefix;
|
|
44
|
+
}, function (p) {
|
|
45
|
+
return p.antPrefix;
|
|
46
|
+
}, function (p) {
|
|
47
|
+
return p.antPrefix;
|
|
48
|
+
}, function (p) {
|
|
49
|
+
return p.sparkPrefix;
|
|
50
|
+
}, function (p) {
|
|
51
|
+
return p.sparkPrefix;
|
|
52
|
+
}, function (p) {
|
|
53
|
+
return p.antPrefix;
|
|
54
|
+
});
|