dtable-ui-component 5.3.1-beta4 → 5.3.1-beta6

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.
Files changed (2) hide show
  1. package/lib/utils/url.js +4 -2
  2. package/package.json +1 -1
package/lib/utils/url.js CHANGED
@@ -48,7 +48,7 @@ const checkSVGImage = url => {
48
48
  exports.checkSVGImage = checkSVGImage;
49
49
  const isAIUrl = url => {
50
50
  if (!url || typeof url !== 'string') return false;
51
- return isTargetUrl('/ai/asset/', url) && !url.includes('http');
51
+ return isTargetUrl('/ai/asset/', url) && url.includes('http');
52
52
  };
53
53
  exports.isAIUrl = isAIUrl;
54
54
  const isDigitalSignsUrl = url => {
@@ -77,7 +77,9 @@ const generateCurrentBaseImageThumbnailUrl = _ref => {
77
77
  } = _ref;
78
78
  const validServer = server || ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable) && window.dtable.server || '';
79
79
  if (!partUrl || typeof partUrl !== 'string') return '';
80
- return "".concat(validServer, "/thumbnail/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl, "?size=").concat(size);
80
+ let url = "".concat(validServer, "/thumbnail/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
81
+ if (url.indexOf('?') > -1) return "".concat(url, "&size=").concat(size);
82
+ return "".concat(url, "?size=").concat(size);
81
83
  };
82
84
  exports.generateCurrentBaseImageThumbnailUrl = generateCurrentBaseImageThumbnailUrl;
83
85
  const generateCurrentBaseImageUrl = _ref2 => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "5.3.1beta4",
3
+ "version": "5.3.1beta6",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "3.0.1",